Ask HN: How did you learn to code?
I'm fairly new to HN, and have recently started teaching myself to code. So far I've used Codecademy and General Assembly's DASH tool. I've also heard good things about One Month Rails.
What would you all recommend as far as inexpensive online resources? Or would you suggest I save up the money for a hacker bootcamp? Thanks!
22 comments
[ 2.5 ms ] story [ 58.4 ms ] thread1. What do you want to learn? Web development? Systems programming? Native application programming (whatever the platform)? Figure out what your target is.
2. Go to your local book store after you solve no. 1, pick a book up that involves that general topic, and read a few pages to see if it works for you. Don't buy a "learn x in y hours/days" book. Buy something you can use as a reference.
I've found that it is easier for me to focus and understand things when I am not actually trying to do them at the same time.
3. Specifically about Rails: I'm not hugely qualified to speak about Ruby, but the friends I do have that use Rails daily have always told me that Rails has grown pretty hard for newbies to jump into immediately. Of course, I could be wrong. I wrote a small project using Sinatra, which is a really easy way to jump into using Ruby & writing a web app at the same time.
I wouldn't recommend putting any money into bootcamps. You can teach yourself everything you need to know. The majority of bootcamps I've seen are fairly expensive for someone without any real understanding of what they're getting in to, and I would go as far as to say I have seen 0 that would teach anything useful beyond "learn language x", which you can do on your own - every popular language has excellent documentation. You should want to learn the fundamentals, and try to figure out how to apply that knowledge to any language or situation you come across.
(Hope that helps a bit.)
tl;dr: Do it, study it, do it some more. Do it a lot.
P.S. "One Month Rails" sounds like something you'd want to do later in your career. If then.
rails an phython are sometimes thought of as next generation languages. Java/C+ suffer greatly from the amount of scaffolding to do something simple like have a object used between layers. Python and I believe rails, says it will do stuff like setter/getters (scafolding), you concentrate on the logic. php also has some great use, they are untyped languages. typing for java/c++ can be argued as not as necessary as one may think, thats where python, php, and I believe perhaps Rails (dont quote me on that) say again, concentrate on whats needed and not having to type everything. if the web results in a string, then no need to declare that throughout your stack.
anyhow, my 2 cents. not the fastest path necessarily, but over time you may want to have good code, useable by others and designed reasonably so its not as hard to get to next steps like scale...
I think that, whichever choice you take, being motivated and actually doing stuff will be the best :)
You have to decide on what you want to do first (do you have a startup in mind? working as a programmer? why do you want to learn to program?).
With programming, just taking classes definitely doesn't cut it, the joy is wanting to make the computer do something and overcoming the obstacles to get there (and hopefully getting several "aha" moments along the way).
I think that if I had to start today, there are lots of awesome online resources (but I don't know them, so I can't recommend any). No idea about hacker bootcamps.
There are many different types of programming; as well as many different levels.
Web programming isn't going away for a while, and it can be useful for doing quite a lot of things. I wrote a quick start guide for beginners like yourself [1] a while ago, that you might find useful.
I didn't even know HTML six years ago, and have been working full time in the industry for almost three years now. I started out trying to force a piece of forum software into being a community-based website. I quickly got into writing custom add-ons for that forum software. I just kept moving further and further up the food chain until I got to where I am today: being paid to build multiple, complex web applications.
The toughest part about learning something completely new is not knowing the right questions to ask. It can be insanely frustrating at times. But if you can stick with it, all the anguish, self-doubt, and sleepless nights will be worth it. If you really want something, you can do anything.
[1] https://degreesofzero.com/article/70
If its not appropriate here I wouldnt mind at all if its downvoted so that it does not take visible real estate. This is from a mail I wrote some time ago.
--
As you would know my background is not in EE or CS but in manufacturing where we had very little hands on experience with computers. We had a course where we learned FORTRAN and that was about it. In those days, a pc magazine used to distribute redhat in a CD. I think the first one I got my hands on was version 5.2. The mighty 486s in college used to command a lot of respect, and as lowly undergrads we weren't allowed to touch them. I owe Linu[x|s] and Stallman a lot of gratitude because much of what I learned about how a computer works was not from a course but actually digging through the linux and GNU system.
This was also quite normal for all linux users then. The whole point of using Linux was to figure out how things work and change things to your liking. "Change" meant editing a file and compiling, not pushing mouse buttons. If you wanted a system that worked [or not], there was always windows. It was very confusing to hear anyone complain that not everything worked right out of the box on Linux. The whole point of Linux then was then to poke around and re-tool it, it was not even expected that everything will work. It was a rudimentary car, that came with an excellent set of tools, a workshop and a manual.
If I were to choose a single word to desribe the linux user base that would be "curiosity". A lot of that has changed, now many use linux not because it allows them to learn and tinker, but because its a better windows. I dont begrudge the fact, it shows Linux has matured.
One of my first forays into personal programming was because of a printer. Printing would always make me cringe because I could not get economy mode or two-up. I barely new C. Over multiple trips to the printer room to check if the patch worked, I finally got it to run. In the process I learned the the entire path from the point one types "lpr filename" to the bits dumped on the network. I also learned how pretty code can be. Deutsch's ghostscript code is one of the most beautiful C code around, atleast to me then. I think only way to pick up good coding style is to read good code.
To give an example how bad the scenario was then: if you wanted to install something that was not on the CD, doing an apt-get install (or rpm) was out of question over the 2B/s dialup we had then. So I had to hack up a p2p file distribution system for rpms. It did signature verification and multiple parallel downloads of the same file broken up into chunks. All I can say is that it did not become napster :) But I learned a lot. Till before that I did not much know what a network even was.
I wrote it in TCL (writing that in C would have been way beyond my league) and contributed a patch for TCL's FTP client. Given that I was a complete novice, and that this worked at all and that I, a complete clueless newbie could actually contribute anything was unimaginably gratifying for a manufacturing engineering undergrad.
TL,DR Was taught quite a bit by the GNU and Linux sources
I stumbled on python a few years later, when I started playing with Blender. The online tutorial for that was pretty good (at least for me, having programmed before). If you want advice, you might start there and see how far you get.
Hacking with Ruby, Python, C#, Java, Objective C, etc, etc is fun, exciting but you won't learn the foundation stuff which sooner or later comes up as a stumbling block.
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.
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.
I also went to ACE computer camp where I built crappy versions of Tic Tac Toe in BASIC and completed numerous factorial exercises.
"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!
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, <string.h> 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.
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.
All the best.
I was exposed to Java and C# in my computer science engineering course, but I never actually learned much apart from the basics which I needed for the course itself. Ironically, I didn't pick up on the very things which I was thought formally.
I learned basic javascript and more PHP stuff (MVC, OOP, templates et all) when I got a chance to intern in a small start up. I did a few small freelance jobs after that.
I learned some basic Python and Ruby by myself, and learned advanced Javascript when I got exposed to Node.js. I learned more Ruby when I got a small Ruby/Sinatra gig. More Node.js when I got employed as a Node.js developer. MongoDB/Redis/everything else was mostly on the job.
Linux/Bash was a lot of experimentation, and a lot of practice.
As you can see, the pattern is that I learned mostly by myself: By trying to do things, and by using online resources. I never read a full book (apart from the Javascript the Good Parts), and never finished a full online course. I learned as I worked.
I am not condoning this method, and I don't know if its the best, but it's what worked for me.
My question would be the best way to plan for developing an iOS app? Should I be bothering to learn the basics of JS or just skip to jquery tutorials? C++ basics important? Thanks!