Hacker Newsnew | past | comments | ask | show | jobs | submit | more 5teev's commentslogin

This also applies to some Critical Mass riders in the Bay Area.


Tag line: "All the Code That’s Fit to printf()"


NSLog(@"All the code that's fit to NSLog()");


Objective-C's tendency to long names (variables, selectors, classes) makes it more "self-documenting" than any language I've worked with. Besides, it's not that bad with autocomplete.


I'm not an Objective-C native, but every time I write Objective-C it feels like I'm writing a short story.

    applicationDidLoad:withANotification:iWonderWhatTheWeatherTodayIs:LetsAskSiri:


>> I'm not an Objective-C native, but every time I write Objective-C it feels like I'm writing a short story.

That's the whole point of it ;-). Remember you usually only have to write the code once, but you or someone else may have to read it many times.

I used to hate long variable and function names in the past, and I used to hate named parameters. Going on the assumption the time spent typing the code was somehow relevant, and also feeling a little more badass being able to write all this cryptic gibberish to 'control the computer'. In time, I've learned none of this matters and readability of your code is one of the most important quality metrics of any piece of software that needs to be maintained by multiple people and/or over a long timespan.


With Xcode it's just as bad as it looks. If you have multiple names with the same prefix you have to type it all or scroll in a list to select the correct item.

It even fails to complete types like NSString correctly when part of a method call. Not always of course, just when it gets confused, and then I have to delete and type again because the case is wrong.


Or press tab to get a partial completion and use the arrow keys to pick the right one?


Now if only that autocomplete would passively infer the current project prefix + (super)class name, so you wouldn't have to type it when it's "local"...


Small typo:

Euler defined the function e^x in analysis as:

   e^x = lim(1+x/n)^n
as x tends to infinity

Should be "as n tends to infinity".


It's an interesting intellectual exercise to build THE email validation regex, but it's shortsighted to inflict your experiment on the public.

While I definitely enjoyed how Friedl's book (http://regex.info/book.html) builds over several chapters to an ever more complex solution, maybe a page long, my takeaway was: don't bother. A friendly UI will help users avoid an obvious mistake, but as other posters have pointed out, the only real validation is, does an email get there?


Just to clarify why sgpl cited him: he is one of the (if not the absolute) most successful rappers of all time. Definitely top of his field. And married to Beyoncé (who is no slouch herself). http://en.wikipedia.org/wiki/Beyoncé_Knowles (just in case)


Note also: they don't have to read you your rights unless you're already under arrest and they want to question you.

http://www.lawcollective.org/article.php?id=115


They don't ever have to read your rights ... they just can't use your answers in court.


If your app directly accesses the camera with AVFoundation, saving photos is a lot less automatic than you might expect. It's easy to save the raw image data but you have to generate and add just about any interesting metadata (EXIF, GPS, TIFF, etc.) explicitly. It's hard to do right--as the rather many discussions on StackOverflow suggest--and definitely a steep price to pay for a customized camera interface.


It's not that hard actually, it's just tedious. The easiest way to do it is use the CIImageProperties (http://developer.apple.com/library/mac/#documentation/Graphi...)

The better way though is to use a class like this: https://github.com/gpambrozio/GusUtils/blob/master/GusUtils/...

I see your point though - it's not trivial. I just happen to have a lot of experience in this area. I do a lot of video/imaging on the iphone.


This article reminded me of a Flash game I played with several years ago:

http://www.redistrictinggame.org/

If you work through the levels, you'll see that voting districts sometimes must have highly irregular shapes to ensure maximum representation of the various groups of constituents. You'll definitely see cases where "objective" boundaries leave some groups completely unrepresented.

Gerrymandering definitely happens, and it's a big problem, but it's not a simple one.


I just figured he open-sourced his house so more people could "contribute" to the repair work.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: