Hacker News new | past | comments | ask | show | jobs | submit login
Tips for Self-Learning Programming (hiphipjorge.com)
216 points by hiphipjorge on Dec 10, 2016 | hide | past | favorite | 53 comments



I've studied digital media design for learning, and I have to admit and I think that the thing that most people overlook is constructing proper scaffolding so they can bootstrap themselves as they learn.

The fact is that there is such a wealth of resources out there that beginners often-times quickly get derailed. The most important thing to start is actually to try to find a way to dull out the noise and actually learn solid principles. Someone trying to get into web development today can quickly spend a week trying to set up Babel and PostCSS and get tremendously discouraged before they realize they are actually going about it the wrong way.

My suggestion to people who are new to coding is to actually go into a domain where that ISNT going to happen. If you have the motivation/time, don't try to learn to program by learning web dev. Instead, pick something like "Think Python" or some other resource that you can use as the CANONICAL resource for truth, and that will give you a linear path to progress to. Your advice about doing it yourself and pushing and the 80/20 rule is all gold, but I think it will be met with limited success if a person doesn't have a clearly established guiding path like that from the getgo.

And once that friend gets comfortable enough with programming principles and wants to then explore specific application domains, I would again make the same recommendation as before. Find that ONE canonical resource that can move you to the next step, and proceed with it as your bible until you have enough under your belt that you can then go out and explore concepts -- which you now can hang onto the solid foundation you built. For web, for instance, Steve Huffman's course at Udacity is pretty excellent at giving you the barebones of how a web application works. Do that. Forget styling, forget responsiveness, forget everything... but use that as your one-stop-shop to understand how a website works. Ok, now do your own. Ok, now explore that a little. Confident enough? Great, find another canonical source for SPAs. ng-book is great if you want to do angular (and I'm sure their react book is just as solid). Done all the examples in the book and feel confident? Ok great, now go read blogs about these things. Lather, rinse, repeat.


That's actually really good advice. Agree completely that finding a good canonical source that takes away all possible ways to get derailed is awesome.

The only thing I'd say is that I do think web dev is still the best thing to learn first when getting intro programming for two reasons: There's something about having what you've made out on the internet for anyone to see, that has a URL attached to it that is much more rewarding that writing something that lives purely in your own computer. The second reason I think webdev is very good is because there's a huge job market out there for it for which the barrier to entry is fairly low. I think it'd be very hard to get a job as a backend engineer with 0 experience being self taught, vs starting out in front-end web-dev (not that one is harder than the other!).


I agree with much of what you said. I self-taugh that way (Codecademy). I teach my nieces this way. However, If I had it to do again I would have started with iOS - my current profession - or Android, simply because the IDE is more defined. Web technology is all over the place. Unless you wrote vanilla JS, you could spend more time fretting over if AngularJS is the way to go if XYZ is better... Sure it was difficult to go from JS to C/Objective-C but if I had considered that from the start I wouldn't have lost the first three months confused about differences between Ruby/Python and JS.


I've started the same path & after being confused about webdev flavor-of-the-month technology to learn for a few months, I'm trying to settle on learning iOS/Swift, fundamentals, data structures & algorithms. At least with with iOS(or Android), there is a goal of making an App & submitting it to a store.

I still have doubts & keep distracting myself by going back to look at webdev/JS tutorials/books/videos because it seems like there is more webdev jobs available & I'm not sure how to go from webdev tutorials/self learning to an actual job. I already know HTML/CSS & have made static sites for small businesses in the past.


Solid advice!

I think learning is more about structuring knowledge than merely memorizing the facts. The more you understand how and why something works, the easier it becomes to structure that knowledge. Then learning as a whole just becomes a simple composition of understanding the parts.

Music theory is very well organized in that respect. There are very few core concepts to learn (notes, intervals, scales) and everything else is built by composing them. Our theory can be seen as the same (values, functions, objects) and Lisp somewhat embodies it. Music just has the advantage of time to organize that knowledge.

I feel this is also why learning new abstract concepts over time is harder, because you need to shake a large subset of that knowledge tree you've built over time to fully understand their implications.


Can't agree enough with this advice. I did cs50x followed by hartls rails tutorial and now I'm working professionally and find it trivial to pick up new tech (using the single canonical redource to get started of course).


Best tip is to find a problem you want to solve, and use programming as the solution! Pick a language you're interested in and just go at it! Best advice I have.

I started off writing an instagram bot https://github.com/marclave/InstaBot

Recently I interned at tesla writing firmware for the Model S

Doesnt matter how you start, its just that you start :)


Great article! I started by learning Python instead of the typical HTML-CSS-JS way. So I can build nice scripts to do nice stuff (like scraping, analyzing social media data, conecting multiple APIs to do whatever, etc.) but I can't build a simple good looking website lol. Btw, I don't know if I regret, because now I'm learning front-end and I think it's easier for me now that I know some good stuff on a backend language, and even better, because I write my front-end code while I'm thinking about my back-end (and how to connect each other), and vice versa. So I think there isn't one way to learn to code, there are lot of ways, and the good thing is that each way can bring you to very different scenarios.


The best tip I've seen for learning programming is to code along with videos, while also trying to predict what the presenter will code. Doing that allows you to get going quickly without too much frustration. I like that I can experiment and ask myself questions but still have a working program at the end.

The article I read about this is at https://medium.com/learning-new-stuff/a-simple-technique-to-...


Different strokes for different folks, I guess, but I'd find that unbearable.


IMO there's not that much you have to learn to cover the fundamentals of programming: variables, arrays, control statements, and functions. When I've worked with deficient programmers in the past, they seem to struggle on this level. I think if you can master the fairly limited fundamentals, you're basically set. True no one will want to hire you without experience, but you will already be a better than average programmer.


I'd say if you learned some basic stuff about complexity/algos/data structures too it'd put you firmly in the above-average category.


I have been thinking that maybe I was wrong on what I thought I did to become a Programmer.

Probably, It wasn't the right answers I found on google, or the help I got from friends that made me to learn.

Perhaps it is the wrong solutions, wrong implementations, bad design choices that made me learn. The main focus is making it right, but there are thousand ways of making it wrong.

What I'm trying to say is, maybe this story about Thomas Edison( I picked it up from the internet a while ago so I don't have the link for it, I'm not so sure if he even actually said this ).

"I have not failed 1,000 times. I have successfully discovered 1,000 ways to NOT make a light bulb."

So, fail fast, fail often until you realize your next implementation won't be subject to your previous failures then you will learn( and probably be enlightened)


I'm often baffled by why it is that Programming is one of the very few (perhaps only) academic disciplines or technical proficiencies where learning without the assistance of another, more expert, human being is not only accepted, but encouraged. I expect it's because we're a young discipline and there are enough people around who did teach themselves and aren't critical about whether they might have done better with a teacher. While it's certainly possible to learn programming on one's own, that approach is fraught with the same problems that learning advanced maths, physics or martial arts on one's own would be: you're apt to miss (or never even encounter) foundational ideas and techniques, develop idiosyncratic or even inappropriate approaches, be unfamiliar with key theory, etc. My experience with several generations of programmers is that the self-taught can be excellent programmers, but they also tend to not play well with others, have difficulty integrating their code into larger projects, and sometimes wander off into territory (and algorithms) a more formally trained person would know to avoid. They also have a lamentable tendency to reinvent the wheel, and to be unable to effectively argue for or against a particular approach on the basis of objective criteria. So, while it's possible you're the Computer Science equivalent of Ramanujan, it's much more likely you're not.


I think that programming has a pedagogical bonus attached to it that other disciplines, except maybe writing and various arts, don't have.

With programming you can build something gratifying and real at no cost, which, if you're good enough, can actually lead to monetary reward rather quickly. This type of instant and rewarding feedback is immense when it comes to learning something.

Think of every other STEM subject. With Chemistry, sure you can learn about the subject, but to perform experiments you need money to buy materials, and nobody will hire a chemist without a degree. With Physics you're in a similar but different sort of situation, where even if you could afford the materials, you're limited to rather boring experiments along the lines of projectile motion, which doesn't seem to offer an rewards unless you become big on youtube. With engineering, I guess you can build some stuff, and that might actually pay off in the long run and be useful in the short run, but again, material costs.

With programming you just need a computer and you can pretty quickly make something that you can monetize, even simply using free hosting if you're idea is decent enough. With a super minor investment in a market license you can put a good enough app up and start making bank. The only real limit is your brain.


I don't understand. A self-taught programmer would know everything he needs to know given that he learnt with the right resources. Whatever you can learn from a teacher you can learn it from a book; teachers themselves write the books! The only difference would be that you can't ask question to a book, and if you have the right questions, that's invaluable. Good thing we have forums and stackoverflow, but sometimes questions don't get answer and when they do, they don't get a quality answer for that matter.


To add to this, I wonder how much better sitting in a lecture hall listening to a professor explain something actually is than watching a recording of that same lecture.


I think one of the reasons why people are encouraged to learn programming on their own over other disciplines is because it is perhaps the most flexible field for a large swathe of the learning-styles spectrum. Are you the kind who learns best from observing large complex solutions produced by someone else and tinkering with it? Available. Read from textbooks and answer prepackaged problems with definite solutions? Aplenty. Prefer to build something from scratch learning what you need as you go along? Perfectly suited. And you can prove your competency easily: "here's a thing I built using what I learned and/or I understand how this works perfectly well and I can talk about it."

The skills for other career paths do not have this confluence of circumstances. Learning accounting is a lot of bookwork, you can't just "dive in". Learning to be a car mechanic, you have to get dirty, you can't just read a bunch of textbooks. You want to become a martial artist, you can't just kick a tree a bunch and become an expert. But you can do the equivalent for programming and be just fine.


You're absolutely correct that programming seems to be one of the few disciplines that can be self-taught. It certainly feels like the only science and engineering discipline (as music and the arts are accessible to those who take the time to self-learn).

I'd really like to learn quantum mechanics and particle physics, but I see almost no alternative to going back to school. I took lots of Calculus and had two semesters of Physical Chemistry, but I doubt I can rely on that much now. I've thought about hiring a university student as a tutor, but even that seems inadequate...


I think there is just one main equation in Quantum Mechanics [1]. Learn how to work with that one equation and you are pretty much there.

[1] https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation

Of course, figuring out how to use that equation may require lots of work but I think that is pretty much it. I 'm no physicist but at least this is were I would start.

It is similar in Electrical Engineering and Mechanical Engineering. In Electrical Engineering pretty much everything derives from Maxwell's equations and in Mechanical Engineering everything derives from Newton's Laws of motion. Everything else is just details.


In case you really want to try something --

If you want to learn QM, you should pick up Griffith's "Introduction to Quantum Mechanics" and work through it. It's a readable undergraduate level treatment that hits all the important stuff.



I'm going to go out on a limb here, but it's an honest limb.

For the world I've lived in for the last 25 years, commercial and contract software development, I would go so far as to say a degree in some sort of computer science is actually a detriment.

Going through the list of co-workers I've had, there is a definite pattern of the ones that were self-taught were better programmers than the ones with degrees. Of course, there were exceptions, but it was when someone caught the programming bug before they went to college.

It seems that the success of our industry caused people to get the idea it was a great degree for getting a good job after college, but they didn't realize it takes passion to stay on the perpetual learning curve. They are often difficult to get good results out of, both technically and personally.

Anecdotally, our current team of 15 the, 5 of the 6 best programmers are self taught, including the excellent lead programmer (well, one of those 5 is a college drop-out, as am I). One of the first programming jobs I had was for a what most of would consider an industry luminary of his day, and he was self taught. When I moved on the next job was run by a self-taught programmer, as is the company I work at today.

I'm not saying a degree in something computery is bad, it just not the advantage the other degrees seem to be. And to a certain degree (no pun intended) I wish it was. It just doesn't seem like a computery degree properly prepares people for the actual rigors they will face.


I suspect Selection Bias


And you may be correct in that perhaps a self-taught programmer prefers a self taught programmer and that's the sort of group we have formed. Hence my "anecdotally."

But in the end, the proof is in the pudding. When you've got to deliver, and the people who deliver best are self-taught, then in really reinforces that assumption.


I too observe the best colleagues I have historically were not Computer Science degree-holders. In fact two have no degree at all.


> Programming is one of the very few (perhaps only) academic disciplines or technical proficiencies where learning without the assistance of another, more expert, human being is not only accepted, but encouraged.

You have to draw a distinction between programming as a skill and holding an accredited degree in Computer Science. You can certainly learn to program some useful Python without learning advanced Analysis of Algorithm, Abstract Algebra, Type theory, Building compilers and many others at University.

What level of skill is needed is highly dependent on context. There is a vast need for programmers with a freshman or sophomore level of programming skill who have some domain specific knowledge in practically every industry you can think of. Having a degree requirement for most of these positions would result in highly over qualified people and a rapid turnover.

If your project requires skills that only someone with a degree is likely to have then by all means put that as a requirement. But there are many positions that simply do not need upper division skills to get the job done.


Given how fast this industry moves I'd argue that a self-taught programmer actually has an advantage since they've shown an aptitude to pick up relevant things without direction.

I've seen PhD developers who can't code their way out of a wet paper bag so we can all make sweeping judgements :).


It's the immediate feedback. The problem comes when the programs grow and the feedback is no longer immediate.


My experience with several generations of programmers is that the self-taught can be excellent programmers, but they also tend to not play well with others, have difficulty integrating their code into larger projects, and sometimes wander off into territory (and algorithms) a more formally trained person would know to avoid.

What a load of bollocks.


I don't think self-study in other fields is actually frowned upon.


I'm a Software Engineer, and the more things I learn to do in life, the more I think the follow is the most important.

"Don't focus on the doing, that's easy. Focus on the planning and bigger picture".

In programming, the actual syntax and doing is simple to learn, and SO and Google make it easy to figure out problems. The hard part is the design - how do components work together, how does your system interface with other systems, etc. etc. Focus on that.

Before you start coding, think about the design.

Now I'm doing other things in my life, I see the same applies to writing (don't just start writing - think about what you want to say and HOW), photography (pushing shutter is easy - what are you trying to say?), videography (same), house building (need a good plan before hitting in nails) etc etc


This isn't helpful, really.

The hardest point of learning programming, especially doing it yourself, is going from "OK, I understand the basic concepts and I can easily do exercises in the textbooks" to "I can take some sort of novel problem and decide how to solve it and then implement a solution." Unfortunately it'd take someone more clever than me to figure out how to actually teach that skill to beginners reliably. I think that's where many quit.


>Unfortunately it'd take someone more clever than me to figure out how to actually teach that skill to beginners reliably.

The biggest issue is that there's a canyon between the easy-to-solve issues (think CRUD applications) to very good solutions of the world's best applications/sites today (linux kernel, MS Office, Gmail). There's not a lot of "medium difficulty" projects in my experience. So if you come to the field looking to climb a ladder of skill like you did for K-College education, you run into a lot of difficulty mid way.

Just learning your tools and using them well is a long trek. Never mind finding out new and interesting ways to use them.


That's not really the chasm I mean though. I mean more like the difference between "sort some strings in some order to demonstrate mastery of this concept" and "implement a simple CRUD app," and I'd argue it's just as wide, if not wider, than the one you're talking about.


He basically hit the nail on the head. The short version I always tell people is "Read a book, do the exercises, then code something with the docs, google and SO on the side. Repeat until you don't need SO and the docs that much anymore, but never be ashamed to use them". As far as I can tell, this, or some variation on this, is the only real way to code.


I took this to mean "teaching machines how to program themselves". Ah well :)


"There are two types of programmers: perfectionists and hackers [who] just want the thing to fucking work, even at the detriment of the codebase."

are you using the term hacker right? unless hacker has changed meaning, I think not.

linus and other kernel programmer who strive to write as correct and maintainable code as possible (at least used to) proudly call themselves hackers, and refer to what they do as hacking.


The meaning of hacker has kind of changed for some people to be more in the vein of people who write "dirty hacks" or "hack things together" which implies the quick-and-dirty programming the author alludes to.

"hacker" means many things to many people, though.


I don't know that we really need to quibble over this one word, but since people talk about "hacks" it seems like someone who writes a lot of "hacks" could reasonably be called a "hacker." I'd say this is more of a spectrum than a binary though.


I taught myself programming at age 9 with no Internet access. Today there are many more resources available...

You can find tutorials for almost any language in YouTube. Then, you have large communities in IRC servers such as Freenode that are very helpful.

Then, get Zeal (or Dash, etc) and some documentation for whatever technology you are working on.

Koans can be a good way of getting used to a language as well.


Couldn't have appeared at a better time. I've been stuck at a codewars challenge for hours. I guess i'll just bite the bullet and unlock the answer.


i always found that IRC's have individuals that should be able to get you sorted into the correct direction... or when you just need humans to talk to.


@hiphipjorge can you help invite me to lobster?


If you want to learn how to create bloated and slow applications and just how to use frameworks and crappy APIs, then please do start with web dev. The world really needs another social "service" or task list manager.

If you want to learn programming and how the machine works you start with C. The best part is that C is a small language and you only need a single book to get started. Once you've got the hang of basic principles, you write little toy programs, web server, proxy server, parsers, etc. When you learn C you also focus on what's important, which is solving the problem, and creating instructions that align with how the CPU works, and you avoid all these traps of wasting time learning how to scaffold abstraction (like OOP) instead of writing code that actually does something.

During this early period in your learning you should be focused on this, and not read arbitrary blog posts or watch arbitrary talks on what's the "best" programming practices... You should not be frequenting Stack Overflow to pick up bad habits from seemingly correct answers to the wrong questions. Remember, you don't know shit, who are you to judge what's right or not in an accepted answer? You will be brainwashed by all this crap out there.

Now, depending on why you want to learn programming, you can start heading in that direction. The way to really learn, is bite off more than you can chew, but it has to be a project you really care about. You will learn as you go. I advice you not waste too much time, especially on "tutorial videos", just copying code someone else wrote will teach you a lot less than figuring out the correct code to write on your own. It's incredible how helpless people learning today have become compared to how things were figured out in the old days. When people actually learned how to write an interpreter or something like that just out of reverse engineering another. So, don't sell yourself short.

You have to think about this kind of like how most people get confused when it comes to all these contradicting articles and research on health issues and what you should or shouldn't eat, the best exercises for this or that. All the shit people say and write about programming, it's kind of like that, only worse.

Pragmatic programming is actually very simple and straightforward, I have been programming since I was 12, and at this point, I would call the actual act of programming mundane, because it's just typing in these simple instructions following the rules of this dumb thing (CPU). It's all these shitty abstractions and layers of complexity people introduce that makes it... tiresome, not difficult. For beginners it must seem very convoluted.


I posted + wrote this article. I'm disappointed I'm in the front page of HN and there's not a single comment here. Not even a "Nice article!", or a "Stopped reading after the 5th grammar mistake", or a even "This guys doesn't know what he's talking about because X"!

People hate on the comments section on HN, but the silence is much worse.


Was just about to write a nice comment. Oh well ;)

No, but nice article, there are some things I absolutely recognize from my own journey of learning to program. I especially went overboard with the "read all the things" mentality and now know a lot from going down the rabbit hole time and time again. You do have to have the free time for it though. Furthermore I'd like to add as something I found really hard to get into is just trying things. Just get the general idea on screen and work to get it to compile, then refactor until satisfied and work out the last kinks. As I would categorize myself as being in the 'perfectionist' category I found it really hard for quite some time (years) to work experimentally like this.


> You do have to have the free time for it though.

OMG! THIS!

I don't think I couple have pulled it off if I didn't do this in college/summers when I had all that free time. It would have been impossible otherwise. That might be a valid criticism of my post... it presumes people have a lot of time.

> As I would categorize myself as being in the 'perfectionist' category I found it really hard for quite some time (years) to work experimentally like this.

Honestly, I think all great programmers are in that category. The bad ones start businesses and then hire great programmers to fix their shitty code.


Thanks and here you go.

> The trick here is for it to feel uncomfortable. This is rather painful, but that's how it should be. Coding follows the 80/20 rule. You spend 80% of your time on 20% of your code or 20% of what you're learning. Getting using to this uncomfortable feeling and overcoming it is key.

This is the biggest takeaway for me. Often I think I will progress linearly which leads to frustration and abandonment.

> Basically, getting stuck for more than an hour on something is almost always a waste of time.

I will beg to disagree with you on this, asking for help too soon actually lead to superficial learning.

> Recognized the difference between deep diving and hacking. Pick accordingly.

Great advise. I am guilty of this one as well. I have spend whole Saturday on AWS configuring and reconfiguring stuff which I cloud have left it at a good enough in couple of hours.

edit: typo


Thanks for the reply ;)

> I will beg to disagree with you on this, asking for help too soon actually lead to superficial learning.

Good to know someone disagrees with me on this! Make all those hours I spent on stupid stuff not seem worthless. You are probably right that there's also a balance here between superficial learning and just getting unstuck. I still do believe that spending too much time on something is probably a waste of time!

> I have spend whole Saturday on AWS configuring and reconfiguring stuff which I cloud have left it a good enough in couple of hours.

Guilty as well!


Why would you want non-programmers to hang out at sites like HN? You are then recommending they go to Stack? This is a bad advise (happy?). But really!

I am a self-learner and I am attempting to self-learn programming lately. I would not send anyone to these two types of sites which you are recommending right out of the gate. There is no chance anyone would learn programming via HN. And a newbie commenting at Stack is going to get a rude awakening (which would then lead to morale loss).


You are right that in order for this to work the beginner needs a high level of confidence because HN and SO can be very hostile places. I still believe that being exposed to things earlier rather than later is usually beneficial. You might not understand them at the beginning, but later on you will. If a good article is posted on HN, you might not understand all of it, but you might understand 1/10 of it and it might be useful later on.

Also, once you know EVERYONE gets hated on when posting a question in SO (even very experienced programmers), you can probably handle someone hating on your stupid question.


hiphipjorge is the best personal domain name I've ever seen.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: