Ask HN: How to step up my coding skills?
My current job is lucrative but very unsatisfying, so I want to change careers and become a software developer. I understand that skilled developers are in high demand, but I have never written a program longer than about 1000 lines. What should I do over the next 6-12 months to become a "skilled developer"? Would it be possible to learn enough in that time so that I could pass a coding interview? I've been running Linux for years and know it inside and out, and I double majored in math and physics. I would love to work for a tech startup, or an established company like Google.
56 comments
[ 2.5 ms ] story [ 121 ms ] threadI would say not to spend too much time reading books as you won't remember any of it when it comes time to code.
If that's not your cup of tea, then start contributing to open source projects. Learn Git and Subversion, then start taking tickets for Firefox or Chrome. Start off with the easy things, then work your way up. There's lots out there that needs attention, and being able to show a potential employer your commits will stand you in good stead. There was a guy who was developing Chrome on here a while back offering you just that: get in touch with him, and he'll start feeding you tickets.
Ah, found it. here you go: http://www.aaronboodman.com/2010/10/wherein-i-help-you-get-g...
Contributing to open source projects is the obvious thing to do there. Try to pick up a project which reacts relatively quickly to patches and which of course is of some interest to you :)
10 = Sam's Learn Java in 24 hours
100 = did some programming courses at highschool / university
1000 = baseline professional programmer. Has already understood the basics of writing reasonable code at the function level
10000 = experienced programmer - will stand out in a corporate environment, probably the minimum that you want working on a startup. Understands architectural issues and mastering the environment outside the application
100000 = star programmer. That said, I don't see a big difference between the last two categories in terms of pure programming skills. The difference is more in that the 100000 LOC programmer is capable of directing a team, explaining the system architecture to others, making the code more modularisable and accessible to others (doing the necessary makefile magic so that code will compile as C or C++ for example, or providing a plugin architecture, or adding bindings for a scripting language etc)
To go back to the original question, if you find that you are limited to 1000 LOC programs, looking at the list, you need to look a bit more at architectural issues - encapsulation, OO, functional style programming, that sort of stuff, to get you to a level where your code won't descend into an unholy mess when it starts getting bigger.
I actually use the size of codebases written entirely by the candidate as an indicator in job interviews - it gives a good feeling of where the person is at.
Anyhow, our discussion is a little theoretical. In practice, I can say that what I described is really truly what you find when you work in a large corporation writing code. I know it's hard to believe, but have a look around at the horror recruiting stories on this site, or stories talking about how enterprises do software development. It's not a pretty picture. It's not just that your baseline programmer can only write a project of about 1000 LOC, but also that there are a significant number of "developers" that can't even do that. Hard to believe, until you've seen it for yourself, but true nonetheless.
And having a friendly reviewer is excellent!
It is really hard to find someone who can explain what is bad about code design and what should I do about it or what should be "best".
Try to think about exiting programs that intrigue or excite you. Clone these.
Think about whether you want to write "web" applications, mobile applications, scientific applications, etc. Basically, with a background like yours, coding will be easy to "step up", you just need to commit the time and discipline to doing so. Pick something, do it, and stick with it until you're good at it.
http://mvanier.livejournal.com/998.html
http://matt.might.net/articles/best-programming-languages/
--------------
I haven't read pyHardWay, but I think it's vaguely in the lineaage of why's:
http://www.cs.uni.edu/~wallingf/teaching/188-agile/ruby/whys...
and for FP:
http://learnyouahaskell.com/
http://learnyousomeerlang.com/content
http://www.lisperati.com/clojure-spels/casting.html
Also, SICP, little schemer. Others?
These days, my advice -- if I felt qualified to give any, which I don't -- would be to decide now whether you want to be "a programmer", or "a (COBOL | Python | Ruby | PHP | Java | JavaScript | .NET) programmer". That is, decide whether you want to learn the principles of programming, and apply those to multiple languages, or whether you want to learn a language, and specialize in it.
If you choose to be a generalist, then you'll be able to more easily pick up new languages and work in alien frameworks, because everything you look at will be similar to something else you already understand. You won't be as good as someone who specializes in that particular language or framework, but you'll be good enough to get a job and do reasonably well at it. The flexibility will also make it easier for you to find jobs, assuming that you're able to sell your generalism as an advantage instead of a disadvantage.
If you choose to specialize, you might not ever understand certain low-level programming concepts, but if someone needs work done in your language or framework of choice, you'll be able to knock it out without any concern about how long it'll take you to familiarize yourself with the environment.
This decision will probably mostly be the result of your own mindset -- whether you prefer puzzles or stability -- as well as whether you'd rather aim for a job as a consultant (or freelancer) or a regular job as an employed programmer for some company.
If you decide to be a generalist, I'd recommend spending a couple of months learning basic concepts in an "easy" language (PHP, VisualBasic, Pascal), and then diving into C and then C++. By then you should be able to relate most languages to one of the couple you've worked with, and you'll have a better idea of what to learn next. You'll also develop a solid understanding of types, stacks, heaps, object frameworks, and on and on.
If you decide to specialize, then honestly the best recommendation I'd have would be to hit some of the job sites, see what people are looking for (and willing to pay for), then get some real, actual books on that particular language and dive in.
Your background in math and physics will help you when it comes to thinking analytically, but programming is still a whole other level of analytical thinking.
Good luck!
But, you're right, PHP does have a bad reputation in programming circles.
> hard to debug.
True, but there are ways to remedy this. My primary development environment is a PBG4; since I'm doing lots of Javascript/PHP work these days (and hating most of it), I have MAMP set up for a local development environment, with MacGDBp for debugging, and a couple of bash scripts that let me rsync between my laptop and various servers. With MacGDBp, I can step through PHP code, set breakpoints, examine variables, the usual debuggery stuff.
There are Windows equivalents for all of these tools.
1. Become a programmer and not a coder (see below)
2. Don't skimp on theory, algorithms, data structures and math
3. Learn many different languages between OOP and Functional
4. Contribute to open source
5. Have personal projects
6. Stay current (but not inundated) with the industry
7. Plan on spending at least 5 years to become "skilled"
Some elaboration:
Becoming a programmer means having vision and seeing the system - not just its parts.
Theory, math, algorithms, data structures &c... will help give you a point of view that is abstract enough that you can see the system and not just its constituent parts.
Learning different languages exposes you to radically different ways of thinking, different methodologies, different approaches, and different "programmer culture".
Contributing to open source was the best thing I ever did - I was around other programmers of varying skill levels that influenced me from the very small to the very large. Plus, there's an amount of rigor in the application of the VCS/ticketing/workflow system that you will rarely find anywhere else (you typically will have upwards of 50 or more developers that work on code at different times of the day and all of this needs to be coordinated without soaking up the project lead's time). There is also more quality control of the API's and code, in general, because it is something other people use - not just the institution.
Personal projects is self-explanatory. Anything small, to the large.
Staying current is easy, just skim HN/Reddit and read articles that catch your interest but don't get sucked into them as a time sink.
It took me five years to become "skilled" at web application programming with Python. I would venture to guess that number will be true of many industries (with varying degrees). However, do it once and your ability to adapt is pretty acute.
Programming is an investment of your mind, body, and spirit. I wouldn't have it any other way though :) Any engineering field, really, where you get to create. Programming just has the quickest feedback loop of them all.
This is what I am missing at my current job. I don't create anything! My clients are people who innovate and build. I want to be my clients.
I applaud your will to pivot to something else, and your desire to learn something new at a deep level. Best of luck!
I'll add that you should consider a site like StackOverflow to really get into "sprints" on lots of different programming topics. Plus you'll get to see what the experts do at the same time you submit your own answers, which is very helpful in the learning process.
When I first started programming I always wanted to build a clan league (I was 14 at the time and Counter-Striker was just the coolest). So I learned php, mysql, and html (this was in 2003, so tables were still very popular). It took a while to learn enough to understand what I was doing but eventually I figured out what I was doing.
Pick something you have passion about and just go for it. The little extra motivation will help you in times of deep frustration where you just can't find the problem.
Secondly, pick up some very general "programming" books like Paul Graham's Hackers and Painters. I also suggest reading CODE to get a fundamental understanding of how computers actually work. Once you understand those fundamentals, things will become easier.
Having an itch to scratch is important, it's hard to devote hundreds of hours to a learning project if you don't care about the end result.
For the specific task of getting through a programming interview you should check out the list I made here: http://www.7bks.com/list/610009
I highly recommend you start with The Algorithm Design Manual and do all the exercises you can at the end of the chapters. They're excellent because they start off easy and get harder and harder. If you've written some small programs and scripts I think you shouldn't have too much difficulty.
What is this the 90s? Considering how many better alternatives that are available on the cloud advising someone new to programming to set up their own server is a waste of time. That energy would be better spent learning something interesting. A better idea would be to write your own simple CMS for your blog. That would be a better exercise and a better demo of your development skills than setting up an Apache server which just shows that that you can follow a long series of tedious steps rather than actual coding.
I originally come from a finance background, though I'm taking a year off now to focus on programming for some of the same reasons you mention.
Joel Spolsky listed four books which he believes makes a solid foundation for a good programmer and that's what I'm working through, along with building random apps/projects: http://stackoverflow.com/questions/414779/what-should-a-self...
After those two I would consider what gaming topics you want to investigate further(rendering, collision, AI, etc.), and start specializing your search.
I developed some small games and helped a friend with his architecture thesis using Visual Basic 6 + a 3D engine: http://www.truevision3d.com
It was REALLY fun and I was also able to show it to others to get their opinion.
Anyhow... I second the game dev suggestion. Good luck!
Beyond that, being proficient with an editor is key to reducing repetition. learning to use flexible tools will make everything easier.
You should pick a SW opening as an example and focus on developing your skills to land your first job. Your best chance is to leverage your backgrond in math and physics, for example for a programming job using python for research (http://news.ycombinator.com/item?id=1864591).
Once you are programming full time you can spend your spare time expanding your skills as a programmer in other areas.
Find where your interests with development overlap. Seeing as you already have a background in Math and Physics, put it to use. Go look for some open source projects that you're genuinely interested in and try them out. Like other people have said, contribute and engage with the community.
If you're just fixing small bugs in these projects - it's still valuable enough in that you had to have some understanding of software some other people wrote (in a potentially large codebase).
If you do eventually decide to be more ambitious with creating a project of your own - aim to do something very useful / interesting (that doesn't necessarly mean a large application). Make it open source, have people review it and don't shy to promote it. That kind of thing is great to have on a resume.
I see that open source is encouraged, but you won't have the same drive as you would if you are working on your own project.
So find someone that is better than you and work on that cool idea that you always think about; we all have at least one.
[1] http://news.ycombinator.com/item?id=1496780
Most of all, I'd say MOTIVATION is an important factor. I'm guessing very few programmers, experienced or not, sit all their time off from work/school programming and/or always have that "oooh-I-want-to-go-home-and-start-up-a-long-session-of-<insert programming language>" all the time. At least _I_ need some motivation and inspiration every now and then. I go to a lot of live programming forums and also watch a lot of youtube programming/presentation videos just to get inspiration and to get my motivation up. Often these events are way out of my field of programming, but I still go, because I always feel good and full of spirit when leaving. This goes for me personally, of course, but may be a good advice for you too.
Having put this from my point of view, I would love to get some advice on where to get started on open source projects or the like, where I can get smaller tasks to complete. (I think that that Chrome thing that was mentioned in the start of this thread might be out of my league, but I'll give it a try.)