Live data from Hacker News

Ask HN: Non-technical people, how did you learn to code?

news.ycombinator.com

41–50 of 58 posts

Re: Ask HN: Non-technical people, how did you learn to code?

#41
Learning to code is the same as learning a second language. You must recognize the amount of energy it takes to learn french, and apply it to learning ruby. Your final goal - which for the HN crowd would be something like building a SaaS web app, is equivalent to writing a novel. But before you get to your novel you must learn how to speak and think in the language. You need to know the vocabulary and how to write sentences and then paragraphs. Start with ruby or javascript, and become comfortable with the vocabulary. Learn about strings, arrays, loops, methods, functions and classes. Understand the basics of input and output. Commit all the small code snippets or phrases to your rote memory. You need to know what a for loop is in your sleep. Write it over and over again until its ingrained in your memory, until you can write it without looking at any documentation. This will be the boring part, but you need these tools to continue to the more rewarding states that involve creativity. From here start reading small programs ( As a front-end developer I started by reading jquery plug-ins I was using for websites, sticking with ones with less then 300 lines of code). Read every statement of these programs and if you don’t know what something does, google it. Write every line out for yourself, making sure you know what everything does. Writing out code it the ultimate way to learn. Do this as much as possible. Translate these small programs into English. Actually write out the translation. Then a few days later try to write the program yourself by only looking at the translation you wrote. Try to memorize patterns you notice. Think of features you would want to add to these programs- try adding them! These 300 line programs are like essays. When you are ready to write you own essay, start off by building a calculator. If you still don’t have any idea how one would go about building a calculator, go back to reading more programs written by other people. When you are looking at other programs try and find elements that you could use to build a calculator. If you are ready for the calculator then you are transitioning from merely knowing the vocabulary of a the language to creating something meaningful with it. When creating a program start by thinking of everything you need, gather all your requirements. “I am going to to need to create buttons that a user can press”, “ I am going to need a method for a plus operation”, “I am going to need to store values pressed in an instance variable.” Take your requirements and ideas and build it. From here, build bigger and bigger programs. As they get bigger they are no longer programs but applications. Keep reading other code are writing it. Learn about frameworks and databases. Buy books on application development and read them. Try and get some consulting work- If you have a responsibility to a client it will help motivate you. Create your own small applications, and then slowly morph it into your novel.

Writing code is the real key- think of writing at least 50 lines of code a day.

This process takes about a year.

Re: Ask HN: Non-technical people, how did you learn to code?

#42
Just a tiny little suggestion if you don't personally know anyone who can help you code, try a good website. StackOverflow.com is a pretty awesome Q&A site with lots of smart guys on there. Just make sure you do Google stuff first and don't ask questions without showing that you've actually done some research on your own.

Re: Ask HN: Non-technical people, how did you learn to code?

#43

Learning to code is the same as learning a second language. You must recognize the amount of energy it takes to learn french, and apply it to learning ruby. Your final goal - which for the HN crowd would be something like building a SaaS web app, is equivalent to writing a novel. But before you get to your novel you must learn how to speak and think in the language. You need to know the vocabulary and how to write se…

A lot of gems here, thanks a lot!

Re: Ask HN: Non-technical people, how did you learn to code?

#44
I started learning html/css/javascript by viewing the source of websites, copying/pasting each file into notepadd++ and then saving each one in a desktop folder.

From there I changed the paths so the style.css pointed to its location in the folder. I'd do the same thing for any .js scripts. After getting it running locally I would deconstruct the site (remove and add back various pieces of code) to witness how one thing relates to another.

I myself, need to jump on frameworks. I'm too stuck in my comfort zone of design and front-end skills.

Re: Ask HN: Non-technical people, how did you learn to code?

#45
For me, nothing really clicked until I actually started working on something that was meaningful to me.

Before that, I tried every book I could find, religiously watched the latest Railscasts, Peepcode screencasts, etc. and watched every free tutorial out there. Until I started working on something that I needed and just plowed through it until it was built, nothing truly clicked. It also helped that I locked myself in my attic for three weekends straight to get my first "real" project done - setting aside that kind of time to focus is huge...

Just pick a small-ish project that is personally relevant and hack your way through it until it's reasonably functional. Also pick a language that is fairly simple and readable (I chose Ruby, but there are lots of good options) and a problem that isn't too difficult at first (e.g., a straightforward CRUD app will build confidence before moving on to bigger and better).

Also, you'll see a ton of recommendations for the "next big thing" (e.g., Node.js) on sites like HN and you'll be tempted to run from one new language or framework to the next. Try to avoid that if possible. I think the key is just picking anything that can get you as close as possible to solving the problem you're trying to solve. Later on you can worry about finding the ideal tool for the job.

I should note that I'm not a pro developer by any means, but I can hack together prototypes and simple apps fairly quickly coming from a similar background to you, and this is the way I went about it...

Re: Ask HN: Non-technical people, how did you learn to code?

#46
Even someone who learnt when (s)he was 8 had to learn somehow ;). In my opinion (no one is gonna agree but I'll tell it anyway), I'd start with a language like BASIC. You need to understand variables, loops, conditional branchs, and all the basic stuff before other concepts (object oriented programming, etc ... ). In modern languages, everything is mixed together, which is good for coding but ot that good for learning. I'd do Basic -> C -> C++ . This combo will give you all the basics you need without teaching you "bad" habits. Then up to you : java, python, ruby, haskell ...

Re: Ask HN: Non-technical people, how did you learn to code?

#47
In 11th grade (1999), I learned how to program in Javascript from http://www.htmlgoodies.com/primers/jsp . I went through every single one of those documents / primers.

As zedshaw says, do every exercise, type every bit of code, etc.

After learning javascript, I went on to learn something more immediately useful. It took me about a month before I had built and completed my own local file search engine with jscript (windows scripting) and ms access. I altered my sleep schedule to 34/14 (awake 34 hours, sleep 14). If your mind is actively engaged in the learning, you won't need to sleep regularly. Sleep was the only limiting factor.

3 months after first learning javascript, I had rewritten my file search engine in perl and C, and upgraded my database from ms access to mysql. I didn't know much about perl and C, but I was happy to now "know" 3 languages and 2 databases.

Re: Ask HN: Non-technical people, how did you learn to code?

#48
post #9

I started programming when I was 24 (11 years ago) and working at my first job. A coworker was my mentor early on, and we pair programmed frequently for a couple of months. I read a couple of Wrox Java books and just learned by writing a lot of code and reading as much as I could. Luckily, I was tasked with developing a whole bunch of forms for a client-server application, which the IDE helped me out with a lot with…

Can you define #3? Meaning going from easy to difficult? Or starting with a difficult task and trying to solve it (at the beginning everything seems difficult, but yeah :).

I implemented a lot of statistics functions to learn how to program in a language. Some of the things I've learned on include:

  * moving averages
  * linear regression
  * matrix operations
  * matrix lu factorization
  * polynomial interpolation.
  * multiple linear regression
  * cubic spline interpolation
  * variance, covariance, correlation
  * gamma function
  * t-test, t-value calculations
One limitation of the above is that it doesn't explore all of a language's features. The above are mostly interested in array processing. There aren't any classes or generic types or what-have-you.

Re: Ask HN: Non-technical people, how did you learn to code?

#49
Have something exciting and technically trivial that you want to build. Draw it. Build it.

My first "programming" projects were a Processing app that fills your screen with randomly colored dots that increase in size, a website that will send an email after a one-year delay, and a pair of headphones that play back everything that happened 20 minutes ago.

These were perfect projects because they were "correct" and presentable when they were done, they have small enough scope that you can spend days perfecting the details, and they were done when they were done.

Lower the bar. Incorporate things you already know about. Build it for yourself. Make the objective a thing rather than a skillset.

Re: Ask HN: Non-technical people, how did you learn to code?

#50
post #22

First, I'm about as technical as they come (8 years old sounds about right), so take my advice with that in mind. But I think becoming "technical" is critical to learning how to code. I don't mean you should start solving equations in your spare time. I just mean find a concrete problem that you're motivated to solve (i.e. something fun), and then solve it. Maybe you think AI is cool, so try to figure out what it tak…

Interesting approach. So how should I become technical? Let's say I'm interested in AI, I can't just think about a problem without a certain base knowledge right?

Stanford is offering free online access to their courses. You may want to check that.
Post reply on HN