Live data from Hacker News

Ask HN: How did you learn to code?

news.ycombinator.com

11–20 of 23 posts

Re: Ask HN: How did you learn to code?

#11
I learned to code by reading lots of books, writing lots of code and getting involved in a local user group.

If you want to learn Ruby and Rails a couple of good resources are Learn to program by Chris Pine (an intro to ruby) and the rails tutorial by Michael Hartl http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

Some other books I would recommend: - Practical object oriented design in ruby - Computer science programming basics in ruby - Agile web development with ruby on rails 4 - Eloquent ruby - Design patterns in ruby

If you get on the http://oreilly.com email list they regularly have 50% off ebook sales.

Re: Ask HN: How did you learn to code?

#13
Not sure why you're learning to code, but getting into a positive feedback loop of (have idea, create, tune) is a great thing if you're doing it for more than 'just a job'.

I'd get proficient with linear flow programming, then functions, and build some things before worrying about object oriented programming.

Folks I've worked with have had good luck with perl but there's certainly a strong argument for javascript between web dev and node.js...

Or if you want to go old school fire up BASIC and play with some programs from http://www.atariarchives.org/basicgames/

Not suggesting you should stay at that level (BASIC, perl, etc) but building the feedback loop of liking the process/having fun can be great to get at the beginning of the learning process.

Re: Ask HN: How did you learn to code?

#14
I wanted to make things. First I wanted my own web page; so I learned HTML. Then I wanted to make AIM robots, so I learned perl. First I modified the source of programs that already worked, then I read the Llama which magically filled in all the blanks (oh, that's why that keyword is repeated all over!) Then I wanted to make Facebook apps, so I learned PHP. Then I wanted to get a job, so I learned ruby, CSS and JavaScript.

I also went to ACE computer camp where I built crappy versions of Tic Tac Toe in BASIC and completed numerous factorial exercises.

Re: Ask HN: How did you learn to code?

#15
While I did not learn programming this way [1], I highly recommend the following book to beginners of programming:

"Algorithms + Data Structures = Programs" by Niklaus Wirth: http://www.amazon.com/Algorithms-Structures-Prentice-Hall-Au...

While example programs are in Pascal programming language (that the author created), it is still a very well written book that teaches how to connect real world problems to programming from a beginner's standpoint. It assumes the least out of the reader of nearly all programming books I know of. Check out the reviews at Amazon.

[1] My story: I started programming at the age of 11 when my father gifted me a computer, and its manual. That manual was so concise and precise that I learned something new from it each time I read it. It ended with a chapter on writing machine code, which led me to write short programs in machine code straight by age 15!

Re: Ask HN: How did you learn to code?

#16
I think I learned to code by having login on slovax. slovax was a VAX 11/750 at the University of Wisconsin-Madison during a time when there were a ton of hackers there. Many of them went on to Sun.

slovax was the machine that had the 4BSD source on it and somehow, I have no idea how, I got an account on it.

Blah, blah, blah, all my memories don't mean shit. What is maybe interesting is how you might learn from reading source. Most of it is pretty boring, I'm looking at you, the kernel source is getting more interesting, but for me the place where the light came on was the bowels of libc. At the time I was too dumb to get the kernel stuff, that was over my head, but I could figure out libc. Until I came to popen(). It called fork(). My head exploded - I had never ever thought of creating a subprocess to do my bidding. Yeah, I'm old, all you guys got this, but at the time (.5MHZ VAX was what I was reading the code on) the idea that you would spawn a process to do something in libc was out there. It was the first time I realized that you could do pretty much anything with a computer.

Same tl;dr: as the other guy. Read the source, lots of good stuff there.

Re: Ask HN: How did you learn to code?

#17
I learned basics by understanding html + then I dug deeper in dhtml. I remember looking at demo source files to learn how they worked. I studied simple code that I could implement. I did this for a couple years. Rather than read books, I read code then figured how to write my own.

Re: Ask HN: How did you learn to code?

#18
Since the question is looking for recommendations on how to learn now, I'd say try out an environment where you can see results that excite you the most. If you want to see objects on a web page moving around, learn JavaScript. If you'd like to see fancier graphics, look at Unity and one of its languages. And if you like text output, you got a huge world of languages you can explore - just find a topic and problem you want to work on. Being motivated to solve something was what got me the most excited when beginning to program.

As for how did I personally learn to code?

HyperTalk in HyperCard. It was the best way to quickly see how different logic constructs worked, since I could manipulate graphics onscreen rather than just print out text. Shortly thereafter, Learn C Programming in 21 Days.

But once I learned what I could, I took some of the concepts from C and tried to find some similar way to accomplish that in HyperTalk... which worked for quite a few shareware projects.

Re: Ask HN: How did you learn to code?

#19
The for dummies or Head First Series are good. I generally pick a technology, have a feel of it(meaning, just learn it on the surface by poking around it) then learn it in depth if i really need it. Most IMPORTANTLY, NOTHING, I REPEAT NOTHING BEATS PRACTICE.

All the best.

Re: Ask HN: How did you learn to code?

#20
I would start with a skills test, try to use vloopup in a spreadsheet. If you can get to grips with vlookup, then look for something that fits with how you learn, a book, an online course or even making small changes to programs you find on the web. Java script is probably a good c hoice, as there are online example around that you can try. But as others have requested, please say why you want to learn. edit:I started with games, changing code in simple games created by others. But I was 13, games are important to a 13 year old ;)
Post reply on HN