News for hackers. Stuff that matters.

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

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 | 11 points | on HN )
Re:Ask HN: How do I get past beginner-programmer? by MattJ100 on Wednesday October 27, 2010 @04:30AM (#1837786)
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]

Re:Ask HN: How do I get past beginner-programmer? by Scott_MacGregor on Wednesday October 27, 2010 @03:54AM (#1837717)
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

Re:Ask HN: How do I get past beginner-programmer? by barrydahlberg on Wednesday October 27, 2010 @03:23AM (#1837665)
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)

Re:Ask HN: How do I get past beginner-programmer? by malandrew on Wednesday October 27, 2010 @06:10AM (#1837965)
"Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman" by Dave Hoover & Adewale Oshineye

http://apprenticeship-patterns.labs.oreilly.com/

Re:Ask HN: How do I get past beginner-programmer? by elliottcarlson on Wednesday October 27, 2010 @08:01AM (#1838171)
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.
Re:Ask HN: How do I get past beginner-programmer? by geekytenny on Wednesday October 27, 2010 @02:07AM (#1837478)
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.

Re:Ask HN: How do I get past beginner-programmer? by PilotPirx on Wednesday October 27, 2010 @02:12AM (#1837492)
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.
Re:Ask HN: How do I get past beginner-programmer? by n2dasun on Wednesday October 27, 2010 @01:39PM (#1839615)
Re:Ask HN: How do I get past beginner-programmer? by codedivine on Wednesday October 27, 2010 @01:04AM (#1837330)
Re:Ask HN: How do I get past beginner-programmer? by weilawei on Wednesday October 27, 2010 @12:48AM (#1837296)
Program more.
Re:Ask HN: How do I get past beginner-programmer? by olalonde on Wednesday October 27, 2010 @12:29AM (#1837255)
Your best language is ARM assembly... are you serious?
Re:Ask HN: How do I get past beginner-programmer? by sidek on Wednesday October 27, 2010 @12:59AM (#1837316)
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.
Re:Ask HN: How do I get past beginner-programmer? by nands on Wednesday October 27, 2010 @01:32AM (#1837395)
yup! practice is the key. Gradually you will be able to start figuring better way of doing things.