Live data from Hacker News

Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

news.ycombinator.com

31–40 of 63 posts

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#31
post #11
post #6

Do you feel like your skills are steadily improving? Do you critically examine your code from a year ago, and have the urge to rewrite it because you could now do better? When you're coding, do you think "What's the best possible way to do this," instead of just "How can I get this code to run?" If you answered yes to all of the above, then you're probably already a "good" programmer, and you'll only get better. If n…

I think there may be a mixture since your question: > When you're coding, do you think "What's the best possible way to do this," instead of just "How can I get this code to run?" I do both. Mostly begin with phase 2 (mentally) and then go back and look at the 'best way' and design schema and business objects around that. I end up making a lot of sacrifices and doing things that are probably not optimal due to what I…

Oh yeah, absolutely! I didn't mean to imply you should never ask "How can I get this code to run." I meant that you shouldn't stop there. And it sounds like you're not stopping there.

> My knowledge of design patterns is fairly limited

I'd recommend reading articles and books on that. And also reading open-source code. The latter can be very challenging, but also very rewarding. You should study it until you understand not just what design decisions were made, but why they were (most likely) made. If you can't figure it our, ask :)

> I tend to churn out projects that work

There's nothing wrong with doing that as a first step. Many programmers will make something that works, and then refactor it into something that works and is nicely architected. Have you tried that approach? Is the issue that you don't have enough time per project?

> I think they lack the elegance of many of the open source projects or example githubs I've seen.

It's a good sign that you recognize as much. That means you have an eye for good code, which is huge. What's your biggest obstacle right now? What prevents you making the jump from merely appreciating good code to writing it?

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#34
If you'll allow me the arrogance of saying that I'm pretty good in my genres (web-app, mobile, and I'm starting to come into my own in game programming but really I have a shit-ton to learn in these fields I know enough to sound smart but I'm FAR from a genius), I'll say that most of what you are seeing is a bunch of subject matter experts answering questions. For example I might be able to tell you the in depth ins and outs of using RabbitMQ as a messaging queue for async processing in a web application but I know next to nothing about how to write an audio driver for Linux, or the math principles behind the best cryptography algorithms. So to answer your question I'd need to rephrase it a bit and say how do I become really good at a subject. Here's what I did: - I have 15 years of professional experience, sorry I don't think there is any shortcut on this one. 15 years teaches you things and processes that you will never learn in 2. THIS DOES NOT MEAN that all programmers with 15 years are better than anyone less experienced just that there certain things that the years drill into your head that's impossible to give to someone with less experience. - I read A LOT. Like 3-4 technical books a month. Immersing myself in the my area of study helps my think naturally in those techs. - I write a lot of experimental code. - I go to meetups and talk to other good developers - I constantly try to learn something that I think is over my head.

Never stop learning and never stop pushing yourself. I'm driven to know everything I possibly can about my areas.

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#35
It's simple... for any software you run into ask yourself:

How can it work? How does it work? How it should work?

And the most important thing:

Avoid involving yourself into code that is a mess before knowing how it should be written in the first place.

Also, if you're into OOP, think about access modifiers as:

private - if it's called from somewhere it has to be only in this class... (or im gonna slap someone!)

protected - only this class and its child classes...

public - does this really has to be part of an interface?

Once you start thinking this way you know you're on the right track.

...and read a lot. :)

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#36
I noticed that when at work, I usually end up doing one of the following three things:

  1. Explain things - either to my co-workers or to the computer.
  2. Explore - navigate the codebase figuring out how different pieces connect to each other, building an adequate mental model of the system.
  3. Debug - search for the root cause of a problem by examining the state of a system in between steps.
Sometimes my mental model ends up being insufficient and I have to do 2 and 3 together to "update" it.

Thus, I think that to become a better programmer, you need to get better at these three things.

"Explanation", I think, is the most difficult one. I have found that studying math has improved my explanation skills dramatically, and it helps not only when talking to computers, but also when talking to people. Of course, not everyone has the opportunity or desire to study things like calculus or differential equations, but I think that reading computer science books is a nice way to exercise that math/logic muscle.

To get better at things like debugging, I had to tear down some mental barriers. Sometimes you'll have to go out of your comfort zone. Never think "oh, this is too hard for me". For example, if you're writing something in Python, you must be mentally prepared to dive into the internals of a 3rd party C module. The key is to approach it with a "we must get to the bottom of this!" mentality.

Don't worry too much about technology. Your "goodness" as a programmer isn't defined by how many languages you know. It's better to know a few very different languages than a lot of similar ones. For example, I think that knowing Java and Lisp is better than knowing Java and C#, because you can quickly pick up C# using your previous knowledge of Java, but knowing Lisp may teach you something you wouldn't know if you decided to stick only to enterprisey languages that give you higher employability.

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#37
I suggest you learn a bit about perspective and human psychology, starting with The Imposter Syndrome: http://en.wikipedia.org/wiki/Impostor_syndrome

Sometimes, folks who think they know everything just don't know how little they know. Some of your smartest people sound not terribly confident because they know the limits of what they know and how many things are unanswered. Sometimes, really talented, amazing people feel like shams and really mediocre people feel like they have conquered everything and are The Bomb.

After that, you also need to find out some kind of objective measure of "good" for x thing. I don't know enough about programming to suggest what that might be for that domain.

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#38

> like everyone else here You need to realize that there are a lot of people commenting on hacker news (or for instance Stack Overflow). On any given topic, specialists of that field will show up and share their insight. For instance, on an article on technology X, it's not uncommon that someone that helped developing X shows up. You also need to remember it's not the same person that knows everything :) it may be th…

Exactly what I wanted to say. It's a bit like Facebook where everyone seems like they've got more interesting lives than yours - but that's just people cherry-picking the interesting bits of their lives and putting that on display.

I used to feel inexperienced and self-conscious until I started looking through the code of open source projects I use, seeing sloppy and sub-optimal code. We're all human, and we can always improve.

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#39
post #36

I noticed that when at work, I usually end up doing one of the following three things: 1. Explain things - either to my co-workers or to the computer. 2. Explore - navigate the codebase figuring out how different pieces connect to each other, building an adequate mental model of the system. 3. Debug - search for the root cause of a problem by examining the state of a system in between steps. Sometimes my mental model…

> 1. Explain things - either to my co-workers or to the computer.

That is SO true. Explaining things to others is a great way to make sure you really understand something. Hence the old saying "to truly understand something, you must teach it".

I'm ashamed to have forgotten to include this point in my response, but I think people looking to learn new things should make it a point to look for opportunities to teach / lecture / explain / whatever, as much as they can. What has worked well for me is volunteering to present at the local Linux User's Group or Java User's Group or something like that. It forces you to really do a deep dive into a very focused area for a while, to make sure you can do it justice.

Re: Ask HN: How Do I Become A 'Good' Programmer... Like Everyone Else Here

#40
It's simply gained through study and experience.

However, the idea that you can keep up with the output of the computing industry (that employs tens/hundreds? of thousands of people) is an impossibly lost cause.

Instead specialize, while keeping an eye open for large shifts such as GUI, Web, and mobile have been in the past. I would avoid technologies such as php, that do not sufficiently encourage you to do the right thing.

Post reply on HN