Live data from Hacker News

Ask HN: How to become a better programmer?

news.ycombinator.com

31–40 of 63 posts

Re: Ask HN: How to become a better programmer?

#31
post #26

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…

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.

Re: Ask HN: How to become a better programmer?

#32
post #15

A lot of good programmers aren't fans of OOP. Of course, before you can decide whether you're a fan or not, you should understand it. So I'm all for that:)

Agree. OOP is great for packaging libraries, but when it comes to software architecture it's way too easy to shoot yourself in the foot.

One common mistake, which I don't think is emphasized enough, is that modeling the problem and modeling the software are not the same thing. The problem can have a "User" actor, but this doesn't mean at all that the software should also have a User class. And yet you see User classes far too often.

Re: Ask HN: How to become a better programmer?

#33
post #26

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…

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.

Re: Ask HN: How to become a better programmer?

#34
post #7

"improve my PHP abilities to OOP" Reading that made me laugh. PHP's OOP is extremely flawed (among various other things, like their inability to universalize the $needle and $haystack argument order: http://bugs.php.net/bug.php?id=37088 ), so using PHP to "improve your technical abilities" wouldn't really get you anywhere except having a better understanding of PHP. I think that what you're trying to accomplish reall…

I dont want to start a flamewar regarding PHP/OO but I must say that I disagree. There are some things that isnt very well implemented in PHP but in the OO aspect of the language it has most of the needed constructs and if you stay away from the obvious pitfalls its "good enough".

If you value time / fun over code/data integrity at all time PHP is a excellent choice for producing web services. If you are writing a control system for a airplane I would not recommend it.

Re: Ask HN: How to become a better programmer?

#35

Learn another language. Not just because PHP isn't a particularly good one (IMHO), but because learning new languages inevitably teaches you new ways of thinking about programming. Ruby is good for OOP.

Since nobody mentioned yet... lisp is a great language to learn just to expand your horizons. Don't expect to actually develop websites in it (though clojure might be a good bet for more complex web apps), but it _will_ make you a better programmer.

Re: Ask HN: How to become a better programmer?

#36
post #26

Earlier quoted context omitted.

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…

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…

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.

Re: Ask HN: How to become a better programmer?

#37
post #26

Earlier quoted context omitted.

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…

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…

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...

Re: Ask HN: How to become a better programmer?

#38
post #36

Earlier quoted context omitted.

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…

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 re…

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.

Re: Ask HN: How to become a better programmer?

#39
post #30
post #29

Earlier quoted context omitted.

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)

Re: Ask HN: How to become a better programmer?

#40
post #12
post #2

It's important to differentiate between the technical ability to build web applications and the craft of programming. It seems you are interested in the former, in which case I would recommend learning a popular framework (Ruby on Rails or Django). While you are learning a framework you'll pick up the base language just fine. If you'd like to learn the more general craft of programming, Peter Norvig has some excellen…

Between starting with Ruby on Rails or Django with Python, is one better to start with than the other?

Personally I tried Ruby on Rails and I did not like it. There was too much magic going on and it was confusing to a beginner like myself. I thought about Django but I got the impression that it is just "Python on Rails", so I stayed away from that too. I ended up going with web.py, and I enjoy it. I understand what is happening and what all the pieces of my program do.

It's not for everybody. There are fewer plug-ins for the framework and doing things like session management is a little harder than in Rails. The community is small (though the Google group is active). I had to spend 10 or 20 hours learning sqlAlchemy instead of having an DBORM handed to me out of the box.

But it is far easier to create a complex web app that breaks the Rails/Django paradigm. Reddit uses web.py.

There are some cool open source projects on Github that can get you started:

http://github.com/alexksikes

Please note that my experience may have been better because I already logged a thousand lines or so in Python before diving in (which reminds me of a great free book for learning Python - "Dive into Python").

Post reply on HN