Hacker Newsnew | past | comments | ask | show | jobs | submit | 2007-12-18login
Stories from December 18, 2007
Go back a day or month. Go forward a day, month, or year.
1.Daily WTF: ITAPPMONROBOT (thedailywtf.com)
47 points by nickb on Dec 18, 2007 | 10 comments
2.The US sub-prime crisis in graphics (bbc.co.uk)
40 points by vikram on Dec 18, 2007 | 22 comments
3.A Common Lisp web startup test-case, two years after the Reddit switch (fallenfrukt.com)
42 points by mqt on Dec 18, 2007 | 15 comments
4.For Sale: Used Social Voting Site, Asking Price $300 Million, Goes By The Name Of Digg (techcrunch.com)
33 points by nickb on Dec 18, 2007 | 27 comments
5.How can I learn to scale my project?
25 points by voidfiles on Dec 18, 2007 | 18 comments
6.Toshiba makes a personal Nuclear Reactor. Available in the US 2009 (nextenergynews.com)
24 points by Readmore on Dec 18, 2007 | 17 comments
7.How to become a programmer
23 points by lowfat on Dec 18, 2007 | 36 comments
8.Building Skills in Python [Version 2.4] (free book) (mac.com)
19 points by nickb on Dec 18, 2007 | 8 comments
9.What's Wrong with the For Loop (notes-on-haskell.blogspot.com)
19 points by nickb on Dec 18, 2007
10.Milemeter: Buy Your Insurance By the Mile (oreilly.com)
18 points by terpua on Dec 18, 2007 | 14 comments

First, ignore the language wars. They are all BS. You want to use PHP, use PHP. Just keep in mind that every language was written for a fairly specific task and it's very good at that task. Don't try to use C to write a server-side script. Likewise, it doesn't make sense to use PHP to write an OS. Try to understand what problem you want to solve and then pick the right tool for the job based on performance, libraries available, community support and past projects that are similar to yours.

Now on to becoming a better programmer:

Find a good project and read some theory books on debugging and how to write code in general (check amazon.com and read the reviews). Books like Code Complete 2nd edition and Beautiful Code. If you want to be more serious about it, the Computer Science series by Knuth will give you all you need to know to get a CS degree, but they are boring so you have to be willing to stick with them. Those books, 3 volumes, are the bibles of Computer Science ( yes, someone will disagree) and as such they are theory. However, you need to know a good deal of that theory to write good software. Specifically, you can concentrate on searching/sorting algorithms, algorithm analyses and machine architecture.

In general, you will find that there is a HUGE learning curve to understand what the computer is doing with your program and how to write code that makes sense, which makes you a good developer. However, the time you invest in learning what happens behind the scenes is worth it's weight in gold, independent of the language you use.

Always try to figure out what the tool/language you are using is trying to do and don't blindly trust it.

Never, ever skimp on comments. You don't have to write a novel and explain that you are adding 2 to variable i, but do explain what the function is doing or what a complex bit of code is doing, this will save you hours when trying to find that bug.

Use a version control tool. The simplest one to use would be Subversion and the book for it is free online. There are also free Subversion hosting services such as http://beanstalkapp.com/.

Depending on how serious you are, you might want to look at the coursework from colleges like Stanford. Many top schools post their coursework with lectures online.

Google is your best friend. Just paste the compiler error and remove any variable names and you will often find people who had the same exact problem with possible solutions. You might have to play with the search string, but you will often arrive at an answer quite fast in this manner.

Try to find mentors on forums and newsgroups. This will take time as you develop relationships with people, but it's the best way to learn as the software development industry is still, very much, based on the notion of apprenticeship.

Try to study some open source projects. Little ones are best, as they are least complicated usually. Trying to figure out what someone else wrote will make you a better programmer in a hurry, because you will notice mistakes people make and how you would like to do things differently.

Lastly, think about which tool/program/etc. that you would love to have or rewrite an existing project in your own style and do it. The first one will be horrible, full of bugs and many many problems, but it will teach you more than most classes you take in school.


Think of it this way: learning a programming language is learning a completely arbitrary and made up language that is used to talk to a hunk of 80 million silicon switches and try to convince those switches to do something complicated. It's going to take a little while to learn that language.

When I first started studying CS at school, I thought that there was some secret knowledge that the true hackers had that allowed them to program without thinking about it. And alas, I must not have had the hacker gene because I worked at it and worked at it and worked at it until I solved a problem, only to move on to the next problem.

Then, it hit me: That's the secret knowledge. You just have to keep chipping away at it. Eventually you'll become good at it. There's no free ride; it's a lot of hard work.

13.Ask YC: Good/small open source projects to work on?
14 points by brooksbp on Dec 18, 2007 | 12 comments
14.Voting Bot War at Reddit? (reddit.com)
13 points by dood on Dec 18, 2007 | 6 comments

Brilliantly wrong.
16.9 Essential Principles for Good Web Design (psdtuts.com)
11 points by nreece on Dec 18, 2007

Clearly it is in deference to D i j k stra. ;-)

A great story - I even felt a bit of compassion for the poor old serverbot sitting in the corner when it was neglected and no longer needed.

I heard they got around 200m...
20.Personal private trains for Heathrow. Very sci-fi. (bbc.co.uk)
11 points by jsmcgd on Dec 18, 2007 | 1 comment

1) Profile. You really shouldn't start blindly optimizing code without profiling. Profile it, find your bottlenecks, optimize, rinse, and repeat. You should also benchmark your hardware; run scripts that make requests to your www server. Check out Apache's ab benchmark. Etc...

2) Cache. Google "Memcached". Django has support for this. This will alleviate huge database bottlenecks (if your app is read heavy). Also possibly consider some sort of FS (file-system) structure specific for your app. It looks like you deal with a bunch of media files, that could get hard to manage without a proper FS plan.

3) Write clean code. There is no sense in profiling, optimizing, caching, etc if your code is horrible. Those things will lead to even worse, unreadable, unmanageable, possibly slower code.

From your description you asked slightly more specified questions, but you really need to understand the basics of above before specializing for your app. At least that's what I believe.

22.$8,000-per-gallon printer ink leads to antitrust lawsuit (arstechnica.com)
10 points by nickb on Dec 18, 2007 | 1 comment
23.Inside the "Ron Paul" Spam Botnet (secureworks.com)
10 points by hhm on Dec 18, 2007 | 2 comments
24.Y combinator (the function) in Ruby (eecs.harvard.edu)
10 points by cduan on Dec 18, 2007 | 3 comments

This particular article is rather poorly written, but if its title has a ? appended it makes a fun discussion topic.

My take is that Digg's downfall (if it happens :-) was sealed long ago by Kevin Rose's personality. One only has to watch Diggnation with their stupid drinking antics and Beavis and Butthead humor to know that the audience Digg was courting was pretty low brow.

Then, suddenly, Digg tried to extend outside tech news and be a general purpose new site. Big mistake since low brow doesn't mix with Science, World News, etc.

The only positive thing I can say for Digg is that at least the comments there aren't as bad as on YouTube.

Or maybe I'm just bitter because I got banned from Digg and publicly branded a 'spammer' by a Digg employee.

26.Ask YC: is networking class worth it?
10 points by lg on Dec 18, 2007 | 16 comments
27.Jiggy: Javascript App Framework for iPhone (jiggyapp.com)
10 points by chaostheory on Dec 18, 2007 | 10 comments

I have taught AI many times now and I must agree.

You don't know how many times I have heard a student claim that they have made some type of major advance. But on inspection it usually comes down to something that requires exhaustive search.

I think that there is definitely a place for new ideas in the field, but I don't think they will come from complete novices. I think they will come from those who have CRITICALLY read the basic literature. And probably from those who have read more than just the basics too.

My own pet peeve on the field now is the over emphasis on asymptotic complexity. Sure its important, but its not exactly an AI result. The scruffies need to make a come back and start coding! See my own meager efforts (http://www.anaphoric.com)

29.Q&A with Peter Norvig: The evolution of Web search (technologyreview.com)
9 points by mqt on Dec 18, 2007

Please tell me that you are joking.

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

Search: