Better HN
topnewbestaskshowjobs
Log inSign up

VBprogrammer

8,523 karma · joined Mar 16, 2009 (17y ago) · 2,630 submissions

Submissions

comment 15y ago · link · parent

I think one of the biggest errors a bad programmer makes is seeing 'bad' code everywhere. Sure, some code stinks but just because some code doesn't do something the way you would have done it doesn't make it bad.

If you do have to complain about some piece of code then do so in concrete terms:

- Presense of bugs

- Lack of error handling

- Preformance issues (real ones, that cause real problems)

- Security issues

- Poor robustness

- Redundancy

comment 15y ago · link · parent

Given that my socks are partitioned into two sets (washing basket and drawer) and as I mentioned above I would throw them out if the failure rate became high enough to impact the asymptotic behavior I'd say that O(1) is probably correct.

comment 15y ago · link · parent

On a more practical note but along a related thread, a couple of years ago I threw out all of my socks and bought a stack of the exact same plain black socks. Now I never have to worry about matching socks, when a hole appears I just throw that sock out, when I'm getting low on socks I throw out the lot and buy them new.

comment 15y ago · link · parent

I would go one step further and just send me back to the homepage.

comment 15y ago · link · parent

I don't know whether this was a one off, a subject which he was able to knock out of the park or if you are right. I do think someone should pay him a lot of money to find out.

comment 15y ago · link · parent

I'm not sure what that anecdote was trying to say. I think the majority of the 2 hours would be getting to grips with the codebase, given that he probably hasn't had time to look at it in years. I've never seen anything to suggest that Zuckerberg is an incompetent programmer.

Similarly, if you took one of the engineers and showed them the commercial agreements and reporting that Zuck would be instantly familiar with I'm sure they'd take a long time to get grips with it.

comment 15y ago · link · parent

I honestly think that would be a bigger story, an author of an open-source library telling a potential contributer to take a hike (well, words to that effect) without reviewing their potential contribution.

My personal interpretation is that the author was saying there is no 'user' way of doing it.

comment 15y ago · link · parent

A good friend of mine owns a Rotax 503 powered Flash 2 Alpha flexwing.

I've been flying quite a few times, once after doing its 50 hour overhaul. Really interesting and simple engines.

Pretty cool way of spending time!

comment 15y ago · link · parent

Actually, microlights of the last decade were built around 2 stroke engines originally designed for snow-mobile use.

http://en.wikipedia.org/wiki/Rotax

My main concern is that an engine failure in that design is an instant crash from whatever height you happen to be at.

comment 15y ago · link · parent

Oh come on, half those people are typing one handed.

Sorry.

comment 15y ago · link · parent

Yeah, that is a pattern I occasionally use but I prefer what I have written above as the control flow is more explicit. A missing return (or even one which is quite deliberately omitted) is much harder to spot.

comment 15y ago · link · parent

For what it's worth I couldn't disagree more. I use the guard pattern very often (as described here http://video.ias.edu/webfm_send/1207 [Video]).

Rather than writing:

   if (argc == 3) {
      if (fname) {
         /* Do stuff */
      } else {
         printf ("File name cannot be null");
      }
   } else {
      printf ("Wrong number of arguments");
   }
I would write:

   if (argc != 3) {
      printf ("Wrong number of arguments");
   } else if (!fname) {
      printf ("File name cannot be null");  
   } else {
      /* Do stuff */
   }

comment 15y ago · link · parent

I would rather they report the news while staying on the correct side of copyright law.

If the author of the original post was a professional photo journalist who happened to post some of his photos to twitter would it be fine for the BBC to use that photo?

Similarly, if you wrote a script which was then used verbatim in a commercial product outside of the any license you had granted because they had to get the product out the door would that be fine?

comment 15y ago · link · parent

For more context, I believe the average lifespan of the era was nearer 40.

comment 15y ago · link · parent

Actually that is not the assumption at all. The assumption in both the space shuttle and most other (fixed-wing) aircraft is that the pilot is right handed. However, what you don't expect is that actually most of the really fiddly work happens with the right hand, changing settings, pressing buttons, tuning radio's and writing down notes. The left hand has to be taught to fly but thats actually less demanding that teaching the left hand to do that other stuff. This is even true of aircraft which have yokes rather than side-sticks, as the throttles are controlled by the right hand and during the take-off and landing the right hand is stationed on the throttles.

Interestingly for a helicopter this pattern is reversed, the control inputs required to control a helicopter are so much more demanding that the pilot sits on the right hand side so that he uses his right hand for the primary control and has to either make do with his left or temporarily switch hands to do the other stuff described above.

comment 15y ago · link · parent

Apparently it can be done.

http://www.cs.cmu.edu/~dbrumley/pubs/openssltiming.pdf

comment 15y ago · link · parent

I see where you are coming from, however I would bet that the majority of the money you have, with the exception of the coins in your pocket, is already in the form of bits on a computer.

comment 15y ago · link · parent

I recently looked through the Google developer guidelines and they still recommend not changing the page contents significantly using Javascript. Also, the !# in modern AJAX apps is there to avoid having to run the Javascript in order to crawl the content. Do Google actually do that much with the Javascript on a page even today?

comment 15y ago · link · parent

I think the biggest advantage of skip lists is that if a man held a gun to my head and forced me to implement a logarithmic time algorithm I could implement skip lists in an hour or so from memory. Any of the others...maybe given a week and a couple of good books.

comment 15y ago · link · parent

The map and filter functions were almost depreciated in Python 3.

http://www.artima.com/weblogs/viewpost.jsp?thread=98196

comment 15y ago · link · parent

It is certainly the case in the UK that a stolen car remains the property of the original owner even when purchased by someone who has no knowledge of the theft.

See: http://www.telegraph.co.uk/motoring/news/2753701/Motorists-u...

My understanding was that the due diligence one is expected to conduct under caveat emptor would include ensuring the buyer had the legal title of the goods to be purchased, but this might be a regional variation or I could just be wrong.

2482.

The Powerbook Prank(zug.com ↗)

1 points · by VBprogrammer · 15y ago · discuss

comment 15y ago · link · parent

I'm not sure where his GPS location would have come from. Do MacBooks have GPS built in these days?

Also, from the photo's it is only clear that he has the guys email address, and even if he did have his password I'm not sure what he could do with it without committing a fairly serious offense.

I really have no idea how you would go about contacting this person without putting yourself in a compromised position. I realize that you do not want people to jump to conclusions as to this guys guilt, however, at the very least he would be a leading suspect in the theft of this laptop, and that is not the sort of person I'd meet for a coffee and to talk about him maybe giving back my laptop.

Also, if you emailed the guy and politely asked him to return the laptop how long do you think it would take for him to get rid of it on craigslist or ebay?

Therefore, attempting to get more information on who this person is in order to build evidence that the police might be interested in looking at seems quite reasonable.

comment 15y ago · link · parent

Indeed. I would imagine a lot of drug dealing goes on outside normal working hours while most parking fraud happens during the working day.

comment 15y ago · link · parent

The original poster clearly respected this right. The page clearly says "this guy has my MacBook," not "this guy stole my MacBook." Which, presuming the original poster isn't outright lying, is clearly true.

I think making all reasonable attempts, including creating a webpage, to identify that person is well within his rights.

comment 15y ago · link · parent

In general the rule is Caveat Emptor - or buyer beware. It is up to the buyer of the goods to ensure that the seller is the legitimate owner of the property being sold. A thief cannot convey good title.

Your hypothetical Craig's lister would be in possession of stolen goods.

In fact, having photos of the person improperly in possession of your property and not making any effort to identify that person could be perceived as being complicit in the arrangement.

(However IANAL...)

comment 15y ago · link · parent

I also know very little about concrete but I would expect that this construction varies slightly from traditional concrete due to the water being sprayed on the outer surface, rather than being part of the mixture. I could be wrong though.

comment 15y ago · link · parent

Call me old fashioned but I think Google keeps having slightly embarrassing failures because it tries to copy ideas, without significantly improving on them, where the dominant player has already gained a critical mass of users.

comment 15y ago · link · parent

I'm not sure how to say this without attracting a wave of descent, so I'll simply say that your comment made me smile.

I truely hope you are sucessful in instilling among your children the ideal that the advancement of the human race is more important than advancement of self.

comment 15y ago · link · parent

I completely agree, platform as a service is not killing open source. I would add that the exact opposite is a more compelling argument; almost all of the open source heavy companies (Facebook, Google, Amazon etc) are huge contributors back to open source projects.

I suppose it might impact the revenue model of the commercial backers of certain open source projects, but I fail to see how this is otherwise detrimental to the users and contributors of open source software.

1
828384
88