Hacker News new | past | comments | ask | show | jobs | submit login
Good code, bad code. The only truth. [comic] (osnews.com)
56 points by hollywoodcole on Feb 5, 2008 | hide | past | favorite | 21 comments



I guess that depends on who's saying, "WTF". That's often the response of many people to some of the best code I've ever seen.


The person saying WTF should have a weight depending on how many WTF's they get for their own code. Like googles pagerank.

eg bad coder gets tons of WTFs, is a bad coder He WTFs at everything because he has no clue, doesn't understand, but his WTF's are weighted low.


A problem with this, is that often the WTF go unsaid in public due to political reasons. My boss is the one who exclaims WTF the most in public. However, he generates a heck of a lot of WTF in private. Also, many of the WTF we generate are actually due to our coding around his WTFs.

This is just a restatement of the Principle of Least Astonishment

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


Carmack's reverse


"WTF...you scheduled an 8:00am code review for the Weblogic properties file." Is this bad. I get this a lot from my co-workers.


What I really hate is when people comment the obvious. For example:

    /**
     * Add var1 to var 2
     **/
    $total = $var1 + $var2;


Especially when the comment is wrong or misleading, as in this example.


Haha, you got me. Good eye.

But in reality it does the same thing, so does it really matter?


wtf..its writen in Perl .. wtf ..and he didn't use strict; wtf i think he did so so he could autovivify the variable,

wtf I don't have a Perl interpreter on this machine stupid machine, wit i guess $total now is equal to zero

Perl is f awesome

fawesome hehe ... new word to the dict ..wtf..


I really hate it when some people that call themselves programmers, still use PHP for serious development.


I don't think there is anything wrong with PHP for serious development, as long as you're using it with an MVC paradigm or framework. It is faster than Ruby.


True. I like Cake Php. But I still wouldn't consider php for serious dev. Call me stupid, but I have a prejudice against recent startups that use php. It smacks me that they couldn't find smarter developers that know something else.

Im sure, there are great php devs. out there, but from experience, %90 are not. It is the barriers of entry are too low for php to get started, which is not necessary a good thing, as you end up with many so self called "experts" than know nothing.


Choosing a language is highly subjective to the people you have available and the application you are building. Discounting php developers off hand is foolish.

Many huge sites are built in php such as facebook and last.fm

There's a well known path to scaling PHP, whilst big Rails sites such as Twitter are having to build it as they go.

I'm working for a startup who are building on C# and asp.net. This is hugely to our advantage as our customers are large enterprises. Microsoft is on the approved vendors list, Rails, Django and others are not.


If PHP is serious enough for Facebook, it's serious enough for most web startups.


Good point .. if you know more about the frameworks and languages facebook uses please share.

I think PHP have been bashed so long by so many people I am really not surprised by his opinion.

Finally, I remember in an interview with linus torvalds they asked him, what's the most important quality in a programmer, and he said taste! And i like this thought, your choice of programmer language reflect your taste, who would pick PHP with all the bad press it gets in the geeky community (slashdot,serverside.com, here and elsewhere) definitely someone with very very bad taste, the bad type of geek, the business man geek

Plus just because facebook is popular, doesn't give credit to php! the guy got lucky!

Google uses python, and i think python is a terrible taste in programming language, terrible taste! why, in my experience, it made script unreadable, i had to find editor with folding, and draw imaginary lines on the screen just to see were a block end and a new one start, and being as paranoid as i am, i just decided to never touch it, python is just bad taste, i wish it dies, i feel bad when i see cool stuff writen in it, cool stuff i would just have to ignore, because, how terrible can the ppl who wrote this program be....they chose python!!!


as opposed to what? 90% of Ruby Developers that are?


I agree. PHP is very powerful if you know how to use it correctly. I have been working with CodeIgniter lately and it is one of the better frameworks I have seen. Sure cuts down development time.

I've never really considered Ruby, but maybe I should since everyone is raving about it.


Nice nice as far as PHP frameworks are concerned. The best I've seen are CodeIgniter and Symfony. I just recently launched a CodeIgniter app. It was a breeze!


I don't think there is anything wrong with PHP for serious development (whatever that is), as long as I don't have to use it.

Seriously though, claiming PHP is faster than Ruby is pretty suspect. There are benchmarks that can bolster either side of that debate...


...and down you go!


lol, don't neg me bro...




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

Search: