Skip to content

Comment on Ask HN: How to become a better programmer?

Comments

Since nobody suggested it, go to college/university and learn about data structures, lists and processor architecture. It will help you become a much more insightful programmer.

This advice is so bad I think it just gave me cancer.

The OP is asking "what abilities are required to effectively build complex web apps and services?"

99.9999999999% of data structures in web programming are arrays and hashes. Look those up on wikipedia and read it, then you are done, now get to work.

Processor architecture??? Is that really to be taken seriously? Not only was it previously not relevant to the OP's question, but its becoming more irrelevant because virtual machines and the "cloud" paradigm.

OOP details are great if you are going to write your own libraries or plugins, but its not necessary for cranking out websites. Most of the time the OOP you are going to be dealing with you can fake.

Javascript is a must have, but you don't have to get so fancy with it. Just enough to drive a popular framework. I'd recommend jQuery, it seems to be the emerging winner.

Learn the CSS, broken browsers, and the box model, which will waste so much of your time.

If you just want to work for yourself try a few web frameworks and go with what works for you. Using anything from PHP to rails to Django, you could take over the world, they are all good.

Look into scalability. Its fun stuff to learn about, even if you never lucky enough to need it, here's a good place to start http://highscalability.com/

As part of scalability look into AWS like EC2, EBS and S3, they are game changers. You don't have to use them, but if you need them, they are there to save your ass.

Learn about "viral" marketing and how sites go viral.

Learn about database backup and recovery, and as part of scalability learn how you can scale databases.

Learn about unit testing, QA or even something like Selenium, figure out which works for you best and in which ways.

Learn to figure out what users want and what itch you need to scratch.

Figure out how to make interfaces that don't suck. And when you do, let me know how.

While I agree about your points I still maintain that a couple of courses in data structures and algorithms is a very good investment of your time.

In data structures you learn how to properly use a data-type. You learn how to implement a hash and a list. That is knowledge that is very valuable when programing high level stuff later on.

In algorithms you learn how to construct loops and programs that run faster than they would otherwise. For instance, think about how much faster it is to search for something in a sorted list than in a unsorted list (its log vs exp if its a nested search).

Processor architecture because you want to know where those bits go, if you dont, how are you ever to truly understand pointers, variables and data structures?

Your life will be soo much easier with these fundamentals in Computer Science in regards of scalability, performance and even user design. It's not for everyone and you can certainly do without it. But what you're advocating is basically "luck". Not everyone will write plentyoffish or twitter.

The guy wants to build complicated websites, not be a hacker snob, so I'm giving him the honest truth and getting modded down for it.

"While I agree about your points I still maintain that a couple of courses in data structures and algorithms is a very good investment of your time."

Maybe a good investment of your time, but not if you are going to just be building websites, that would not be a good investment, the returns on that investment would be small.

"In algorithms you learn how to construct loops and programs that run faster than they would otherwise. For instance, think about how much faster it is to search for something in a sorted list than in a unsorted list (its log vs exp if its a nested search)."

Do you even do any practical web programming? Unless you are hitting a amazing load on your server this would never come up. Also, if you are digging into these details you better have a good reason because there a good chance of creating bugs or overloading your web box. However if you keep it basic, and just scale horizontally, which you don't seem to understand web hosts can do, its a much better use of resources.

"Processor architecture because you want to know where those bits go, if you dont, how are you ever to truly understand pointers, variables and data structures?"

I've been in web development and scripting for 15 years, can you show me where these "bits" are, I must have misplaced them.

I'm 100% self-employed and build websites where I earn money from advertising/affiliate/sales-revenue. Been doing it fulltime for 7 years now, before that I was a student for a couple of years (where I learned that me and academics wasnt a match made in heaven..).

I used to have a site that carried 5m uniques/month, but I've also run sites that had has worse performance problems with much less users. I know of several instances where I got stuck and had help from academic books (to refresh my memory) or friends that paid more attention in class than I did :-)

My point, and as others point out, you just dont learn these things yourself unless you are forced todo it. Learning to solve a problem and learning to learn are two very different things and the later makes your view of a issue much more complete. Many subjects is completely useless stuff that is only in the courses to make them hard, but when I look back I tend to see that many courses were very valuable.

Sounds like you dropped out of academics, were successful in website development, are arguing for a hands on learning approach where it "makes your view of an issue much more complete", and even successfully used compsci books, you write "many subjects is completely useless stuff" and yet in your first post you give advice of doing the opposite of what you found success doing.

I'm saying that academics helped me understand some subjects that have been very valuable for me in my "career" as a website developer.

Perhaps I would have done fine without them, but I'm sure my projects are better as a result of me spending a couple of years learning stuff.

If you want to become a "better" programmer in the context of writing more efficient code, more bugfree code and become more efficient (learning to use the concepts that comes with the language instead of reinventing the wheel). Then yes, school helps.

You can learn it outside school aswell but I bet it will take more time in the long run. I think we'll have to accept that we disagree on this topic.

And indeed, it might just be that, if you happen write a twitter by the seat of your pants, it will choke on the volume and you will be fired and replaced by someone who knows how data structures lead to scalability. You never know...

http://www.techcrunch.com/2008/04/23/amateur-hour-over-at-tw...

You have a fair point... however I never regretted that my early programming was mostly algorithms and data structures. I think that's a ceiling most self-taught programmers find hard to pass. Everything else can be learned with a google... but if you don't have an algorithmic mind relatively simple problem are show stoppers. Stuff like implementing a cache or understanding why sql subqueries suck so much cpu time are pretty straightforward - but I don't want to think how I would approach them without those first years of sorting and graphs.

Downvoted for tone, not for the quality or validity of your viewpoint.

Great list. Four years at school for theory is an increasingly inefficient investment in time and money. A high school senior starting today and ending in four years would learn a lot more about cutting-edge programming by reading HN and following up with lots of experimentation than by going to school.

I agree with your conclusion. but I had to downvote for the poor presentation of the answer.

Style over substance? Another reason down-voting is a disgrace for this website and should have stayed removed.

Nothing to do with style: the other sort of presentation :)

i.e. I believe you started the response with a rather silly statement then structured the rest in a sort of out-of-breath "OMG SRSLY" way. Unreasoned response is bad - but badly structured reason is worse.

I apologise for the rudeness but I feel that sort of posting needs to be discouraged.

I'd have let it pass but for the cancer comment: that's just idiotic.

(sorry, I hope it comes in as constructive criticism - because the point was good, I just doubt anyone really read it)

This is probably one of the reasons they experimented with removing the down-voting on comments. Some people, rather than vote on relevance or insight of the comments feel they should be enforcing their own arbitrary standards.

I think the issue is in looking on down votes as a bad thing :) who cares? You did make a silly comment and people are pointing that out (relevance is fairly subjective; I suspect a number of people read the cancer comment and then stopped reading it as "not relevant")

Sometimes people down vote poorly or for the wrong reasons, I agree. I think this case was justified - but for the cancer comment I myself wouldn't have - indeed I'd probably have upvoted because I do agree. That is how badly it came across (and as you might read elsewhere this is about my 2nd vote today :))

It was a quote from Futurama.

But I have no regrets about the rest. I don't want to see this guy going in the wrong direction, and the suggestion of learning about chip design was just way beyond bad.

But why bother. Hacker news is becoming an echo chamber. I should stick to LISP being my answer to every question.

I think that allowing mean-spirited posts to be down voted is useful. Sometimes it reminds me I need to be a bit more constructive.

"Processor architecture??? Is that really to be taken seriously?"

Sure. You can get big speed-ups by exploiting the storage hierarchy, and by writing less-branchy code that does not bamboozle the branch predictor.

These can be studied from the top-level functional perspective. The low-level details can be ignored.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.