Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I watched the wolf of wall street recently. I see some of the solutions to these code golf exercises as similar to the bankers who beat their chests and celebrate their masculinity in selling penny stocks to gullible investors.These code golf exercises seem like the software developer equivalent: "look at how brilliant and superior I am that I can obfusicate code into something no-one understands in only 2 lines".

My concern here is that this Code Golf mentality infects the normal day-to-day coding at Google. Just because an implementation can spawn a few lines it doesn't make it a good implementation. What about clean code, maintainability, automated testing, self documenting code...

I pity the codebase I would have to maintain from one of these code golfers.



Nice how many off-handed insults you've managed to pack into such small space, based on no data at all except extrapolating from your own prejudices. It's almost like some kind of HN comment golf.

A playful programming competition is really not at all comparable to cheating innocent people out of their money. Like, seriously. People are generally able to behave appropriately in situations with different expectations. There's no reason to think that it's not equally applicable to using the appropriate programming style for the project. It's like you're looking at somebody walking on the street in jeans and a T-shirt, and complaining that they're not properly dressed for the opera. And no code gets committed without a code review at Google anyway.

Finally, code golf is rarely about obfuscation; obfuscation just for its own sake isn't compatible with minimizing code length. Once you e.g. know the basic Perl golf tricks, the code can be surprisingly readable since it really just contains the core of the algorithm.


Insult golf sounds kinda fun. Try to come up with the most insulting thing possible in the least characters.

On a more serious note, I agree with you. There's some alarmist reactions to things like this, but in reality I don't think it's an issue at all. Sure, there might be bragging and such, but that's the point of something like this, isn't it? It's a game, not a serious discussion on optimization. Short code is more "fun" than superoptimized to my mind.


My concern here is

If people write a haiku

They might never stop.




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

Search: