top | item 1837241

Ask HN: How do I get past beginner-programmer?

11 points| sidek | 15 years ago | reply

Hello. I've always been interested in programming, and I've learned some languages and programmed a few programs. I'm probably best, actually, with ARM assembly for a few reasons I don't want to go into- it has a bit to do with the DS and GBA.

However, I always take a very long time to do (what seem to be ) relatively simple things , and my solutions usually end up being terribly inefficient.

It seems like my problem is that, although I have a good command of the commands found in programming languages, I don't know how to use those languages well. Perhaps my problem could be compared to that of one whom can read every word of a foreign language, but cannot use the grammar at all.

To try to solve this problem, I've been trying to create a lot of relatively short programs that solve problems requiring some algorithm work, but I seem to be slow in improving.

In any case, I'm wondering if there's any ways to see faster improvement - if I need to sink a lot of time into improving, I don't mind; I simply don't want to if it's not necessary.

Thanks for reading, sidek

13 comments

order
[+] MattJ100|15 years ago|reply
For my part, I got involved in an open-source project very early on. I produced plugins and patches for the project, and people in the community gave valuable criticism and helped me improve my code.

I didn't do this consciously to improve my skills, I stupidly thought I was "good enough" back then. However I remember that changed when I sent a 20 line patch to a developer, and he replied "Wouldn't this be better?" with a 2-line patch that also caught corner-cases I'd missed. From that day forwards I realised exactly how unskilled I was, despite knowing well the language and APIs, and I realised how valuable that community was to me.

I haven't stayed with that project, I moved about a bit. I found that I enjoy networking and protocols, so I'm more active in another community now. Finding something that I really like doing I would count as the second thing that helped me improve. I find it sad the number of people I encounter who are just programmers for the sake of it, and not because they love what they do - some of them are good, but I've seen some of the worst code come from these people (who really couldn't care less).

TL;DR I'm really really good ;) [I should learn to avoid tagging British sarcasm to everything I write, it always bites me back]

[+] Scott_MacGregor|15 years ago|reply
Find a medium sized piece of code in a language that you already know. Pick code that is that is "good" well written "tight" code that is already written by someone else.

Spend a couple of weeks getting to fully understand how the code works. Then spend some time playing with your own modifications to it. Work on making it do something new and unique. Then once you are comfortable with it, pick another piece of medium sized "tight" code and do it again.

Pick something of a size that that seems challenging to you personally. Be it a single dll or an entire OOP application. Pick something challenging, but not so big that you cannot get a hold of it in your brain and learn from it in a couple of weeks.

After three or four of these self directed learning exercises you should have a better understanding of how to write "tight" code.

At that point, (with some additional experience under your belt) pick up an advanced programming guide for the language you have been studying and read it cover to cover.

http://encyclopedia2.thefreedictionary.com/tight+code

[+] barrydahlberg|15 years ago|reply
Moar program!

Seriously though... pick a modern, popular language which has lots of resources available and go and build real world useful things. Once you have the basics down you spend a long time learning style. A lot of this comes from having made a great many mistakes before and being able to draw on a huge pool of ways not to do it.

Attempt big programs that are a bit beyond your means and learn how to break them into small pieces you can build. Then learn how to build those up into abstractions that let you make the big program. Learning the different types of abstraction available to you in your language and how to apply them with style is what will turn you into a great programmer.

(Languages: Python, C#, Ruby, Scheme, Clojure etc)

(Abstractions: Functions, modules, classes, closures, aspects etc)

[+] elliottcarlson|15 years ago|reply
I would recommend getting peer reviewed - allow people to review your code, coding style etc and offer constructive criticism on how you could have done things better, cleaner and more efficiently - this can be done here on HN, by getting involved in open source projects or just talking to people who you know are good enough.
[+] geekytenny|15 years ago|reply
You are improving but you want this to happen more rapidly! The language you are most intimate with will not allow for rapid development of projects.

"sure you may like walking or running, but if you need to get anywhere quicker you need to fly".

Practice! Yes, but with the right tools for the desired results.

[+] PilotPirx|15 years ago|reply
Read some books about algorithms. Implement the exercises in Python. "Artificial Intelligence A Modern Approach" by Russel & Norvig would give you some interesting insights and exercises.
[+] olalonde|15 years ago|reply
Your best language is ARM assembly... are you serious?
[+] sidek|15 years ago|reply
Well , I'm most experienced with it. I can get lots of things done in Haskell and Python too, but I know ARM assembly intimately.
[+] nands|15 years ago|reply
yup! practice is the key. Gradually you will be able to start figuring better way of doing things.