How should I learn programming?
Hello Hackers.
I hope everyone is doing great. I have been a reader of HN for so long due to my genuine interest in internet and programming. I am a Finance graduate and an ACCA. Frankly I don't enjoy my profession anymore. I have seen myself interested in learning how to program and build web apps. I would like to know about two things. First that do we have any professionals out there who quit their former professions (finance, marketing, etc) and pursued programming as their careers? What difficulties did you face and is it worth it or not? Secondly I want to know the different resources where I can learn how to program? I would be very happy to hear from you. Thanks
Regards Ahmed
(
13 comments
| 9 points
| on HN
)
The great thing about Scheme is that, unlike Python -- where I suddenly find myself explaining that this is generator syntax, that is function syntax, and so on -- lisps (like Scheme) have some extremely simple syntax principles. This makes them very easy to teach to someone who hasn't seen programming before, and helps people through understanding what exactly machines do.
You may also want to start with JavaScript. (Do not confuse JS with Java.) JS has some of the best returns for its investment, because if you're building web apps, you will eventually have to face it anyway. (JS is the programming language of the Web.) You should run Firefox with Firebug (and eventually GreaseMonkey) if you want to make the most day-to-day use of learning JS.
JS allows you to more readily have a concrete goal. Concrete goals are great for the dive-right-in school of programming. Let me offer this as something attainable: Sudoku. Go and find a web site which lets you play sudoku, and if you've never played, familiarize yourself with the rules. There are a bunch of them, like "if all the other numbers appear in this row, column, and box except one, then this number should be that one number." I will give you a little bit of a head start on this: on the site puzzle-sudoku.net, here is how to get the board elements in a JavaScript object which you can then enumerate and query:
I'm not saying you have to know what all of that does right now! Especially if you've never seen JavaScript before. But I am making your first programming task a little easier by solving the problem of finding the elements and turning them into a useful data structure for you to play with. Once you know the language a bit better, you might like to peek inside this to see how it works -- but you might also just use Firebug's "inspector" tools to see what the data structures look like without my help.When you want to start solving the Sudoku, you might start looking through board.all to see which elements do not yet have a value. Then you might want to start writing and using rules like this:
And then you might realize that this rule is not quite strong enough to solve Sudoku puzzles, and start thinking about how to describe even stronger Sudoku-solving strategies to a your computer. You might start a GreaseMonkey script to try to apply the automatic procedures every 1000 ms (every second) that you're on this page, so that as you solve the Sudoku the computer "helps you out" in realtime. You might start implementing 'speculative' algorithms, where you type 'a' instead of 1, 'b' instead of 2, and so on, to see if this leads to a contradiction somewhere down the line -- and your computer can notice that you're thinking speculatively and start to type 'a', 'b', and 'c' alongside you. (You might want to use an uppercase letter to denote the letter which started the speculative train of thought off, though, because it will quickly get lost!)So that's the sort of thing which programming is, and that's how I'd look to learn it. Dive right in like a six-year-old: play for ten minutes, fall, hurt yourself, cry for five; then get up and breathe deep and play with it some more, repeat as necessary.
While the SICP lectures do in fact have a ridiculously huge scope, I was also surprised when rewatching them -- mostly with how basic they were when they started. "Here's adding, here's subtracting, here's what a lambda is." One thing that's nice about SICP is that assignment is very consciously "added on later."
I wouldn't have expected them to be beginner material either, but then I met a nice gal named emma on Freenode's ##club-ubuntu IRC channel, who was using SICP to learn programming. I remember remarking that this must be very hard and she didn't understand why it should be.
I'm jealous of Emma, I bet that would be a really strong base for building programming skills.
http://news.ycombinator.com/item?id=2701504
While doing that, start pre-reading for your specific interests.
I'd love to hear from others who have transitioned from another profession to programming in recent years. Advice from experienced programmers on how to break into the profession full-time would also be most welcome.
Yep
> What difficulties did you face and is it worth it or not?
Probably no: http://www.halfsigma.com/2007/03/why_a_career_in.html
http://www.codecademy.com
Learn the basics of JavaScript on this site and then move on to other languages.