That said, here are some tips. Note that I have never taught someone to code, but I am familiar with mentoring someone through a skill set I already have. Consider all languages as placeholder terms for whatever stack you are going to teach, they are what I started my career in, so I'm using them here.
- Beware the curse of knowledge. Yeah, I know XYZ the most obvious thing in the world, but if you think back to the dawn of time, you'll remember when you didn't understand how a function worked.
- Start slow. This builds off the last one. Start with the basics. I personally learned to code in the following order. HTML > CSS > JS > jQuery > PHP > MySQL > PHP. Start easy and lay a solid foundation, then build on that.
- Teach the language before the framework. Okay, this is based off my learning experience rather than my teaching experience. However, if you want your friend to fully grasp and be able to keep going, teach them JS before jQuery and PHP before Laravel. Show them how the magic works. It will make it so much easier for them (and you) down the road.
- Have fun. I know that's a cliche ending to every list ever. But remember to make the process enjoyable. Presumably, you are a programer, and if you are anything like me, you love what you do. Try to instill that in your teaching. It'll make your friend more likely to stay and learn without fighting the process.
Good luck!
It makes easy to have decent scripts/programs for office work (pandas + directory handling) imo
a lot people in non coding jobs (e.g. managers) would benefit from being able to code, or least read it efficiently too.
Knowing how long something can take to code, what is complex and what is not, what out of the box functions there are and when coders have to come up with their own clever functions to achieve the set goal.
I apologise in advance for the snarky comment, but it seems you have not reached solid foundations yet :-)
I would highly recommend against this.
If you lend money to someone, expect to never get it back ever, regardless of the deal you made. I know this from personal experience.
What I also know from personal experience is not to expect someone to learn how to code because you want them to. I gave my old laptop (which was still working well) to my cousin under the condition that he completed a single Udacity course on programming. I will tell you right now that he did not even come close to finishing the course.
I don't know you or your friend of course, but if I had to put my money on it, your friend is not going to learn to code, and you're not going to get your money back for a long time, if ever.
But those people and I have strong trust relationships, ones that are very hard to build, and require the right circumstances to exist. These relationships truly are rare and I am lucky to have even one.
So, in support of grardb's point, if you don't already have a trust relationship with this person, your offerings to pay for them and also help them learn will most likely end in failure and a loss of cash from you (OP).
The key to learning any new skill is motivation and if an adult isn't motivated enough to start the learning process themselves then they'll likely always come up with excuses not to when another tries to instruct them.
I think the main problem at that point is that I didn't exactly know what to learn other than the fact that it was called "programming". Only after I was taught how to code that I was able to see the power of being able to write software and the applications that I could make.
Also, in general, I don't think college students (adults) would be motivated to learn all of their field by themselves because when searching for the information it'll be way too disorganized; it's not curated and sequenced by instructors/professors. I recently took a hardware/architecture course and I realized that I learned bits and pieces of that stuff beforehand but never attained a holistic picture of how stuff worked at the OS level because I just didn't really know what to look up, and learning from my professor also gave me the ability to learn more things about the material by myself afterward.
BJ Fogg teaches a Persuasion Techniques course at Stanford. His model describes the threshold at which a person will perform an action as a curve on a motivation / difficulty chart.
Persuasion (the act of making someone else more likely to do something) requires reducing the difficulty of that thing, increasing the motivation of the person, or both.
If the guy might be interested in programming (or just being able to make a living for himself), perhaps having a mentor lowers the difficulty enough to put him over his threshold.
Speaking from teaching experience, whatever you do, how many hours you put if it is not on other party's interest its never going to work.
Advice on lending money just lend it by clearly setting forth a return time or better don't expect a return at all.
People who know how to code underestimate what it takes - time, effort, understanding - for others to learn to code. It's not impossible but it's challenging and requires grasping abstract concept that some people can't. For many, it's not a matter of throwing more time at it. It won't work.
Road to hell is paved with good intentions they say.
Younger people tend to vastly underestimate the complexity of getting someone back on track, after they've gone off the deep end, to a point where they're reaching out to non family members, asking for money.
To me, that's a giant red flag. I didn't loan my brother money to pay off his car, because the sooner people learn financial responsibility, the better.
Coddling people with hand-outs is only prolonging the pain.
Most people simply don't think that way, end of story. Some do though, I hope you picked one of them.
I wouldn't worry too much about teaching him to "code" as there are a lot of ways to be valuable in the industry in general, and helping your friend is a very good thing to do.
In any case, I think you will probably get a lot out of this . Just don't try and force a square peg down a round hole.
I am just bad at parsing audio basically, I also have a hard time picking out lyrics in songs and whatnot. My spanish is terrible to this day.
I definitely learned some, and can stumble around by myself without english, but no one is going to mistake me for a spanish speaker.
I think programming aptitude is similar; for sure just about anyone could learn to use a loop and if statement to solve fizzbuzz type problems; but are they going to be able to modularize those control structures and come up with solutions for "real" problems?
I am pretty sure not.
I think it's an almost intuitive and deep understanding of cause and effect; without this basic understanding, you can't get very far. That is, IF-THEN-ELSE branch logic.
Understanding this - which most people do every day, but don't do it in a concrete, thinking-it-through-before-doing-it fashion. Doing it is one thing, being able to describe and write down the process of steps is a completely other thing. I think those who have this early have an advantage in learning programming quicker than others.
Some I would say have this - but for some reason or another never learn programming, or pick it up much later in life. When they do, though, they tend to advance and come up to speed extremely quickly.
This might be the initial skill to discuss and teach. Ask them how they would make a peanut butter and jelly sandwich (or any other basic task of that nature - how to tie your shoes is another one); there's a surprising number of steps in the logic, and most people don't think about it when they do it - they just do it.
Interestingly - for instance - in cooking there's a term called "mise en place", which is a French culinary term meaning "everything in it's place". In short, it is a method of first gathering all of your ingredients, pre-measuring them, ordering them in the order for the recipe, then using them in the proper order. It's a means of both simplifying cooking and making sure you have everything, so your not all over the kitchen, and such.
This is equivalent to "initializing variables" (it makes me wonder if those who are "natural cooks" also wouldn't make good coders? Then again, I suck at cooking...) - so for instance in the case of a PB&J you'd "get the PB, get the jelly, get the bread, get the knife, open PB, open jelly" as the "mise en place" of the "making PB&J sandwich" process.
Then - show how to diagram (process flow diagram, aka flowchart) the process (just use the basic symbols: boxes, diamonds, and circles). This too can reinforce and show visually the process and how the steps relate.
Finally - as far as what to teach - I'd personally start with LOGO. It's a proven beginner's language, which is actually quite sophisticated and complex the deeper you get into it. If your student is visual, the ability of LOGO to show "turtle graphics" can be an interesting motivator. It's simple enough to grasp the basics immediately, but complex enough to learn the majority of basics in software development.
From there, you'd probably want to move on to Python.
Programming isn't hard to teach or to learn, but it is incredibly frustrating to do both.
I guess you could say it's hard because it is frustrating.
A friend of mine[1] pushed and pushed and pushed me to learn Python, and at one point even paid me a small amount to make two plugins for Anki(a flashcard dekstop app), which was really difficult, but are still on my Github today[2].
That was enough of a push that then, I pushed as hard as I could into Django, got my first gig, and a year later switched to Ruby/Rails, and have been growing ever since.
I highly recommend this course of action. It absolutely changed my life, and brought me from barely being able to scrounge out a minimum wage job after crossing the country, to making more money than my Father and being able to live effectively wherever I want, and in just 5 years. It's been incredible, and it's all thanks to his kindness toward me.
I typically charged a couple hundred bucks so that they would have "skin in the game". 100% of the people, I or someone else funding, failed to finish the course. Having skin in the game is absolutely critical to their success.
In this case, it seems they have nothing to lose, and I suspect if they are willing to beg you for cash, they would have no problem going elsewhere.
I suggest some sort of deal where he has to put something in other than "time and effort". Perhaps have him "pay" you in other ways, such as chores around your house. Mowing the lawn, etc.
Who knows if he really has motivation to learn to code at all, or is just doing it to get your money. Without his own internal motivation, learning is not gonna work. But even if he has internal motivation, this is still like loaning money to friends but worse.
The barrier to entry is so low -- talking about learning to code, not necessarily finding employment. I have tried with coworkers and family members who wanted to do it for the money and their heart just wasn't in it.
I would say since money is involved and he doesn't necessarily have the same strong motivation that self learners usually do that it's important to lay down clear rules, i.e. what does it mean to learn to code. Ideally this should be output based rathe than input oriented, like building a certain simple app. That's also extremely rewarding.
I always tell people to follow the stanford course on swift (from itunes u), it's absolutely brilliant. Depending on his background something else might be more suitable, but in any case you could act as the TA checking his homework, but also as a classmate/teacher that can answer questions. The bulk of the presentation of new material you ca safely leave to a mooc i think.
Good luck!
TL/DR: Lessons from teaching a friend to code.
I have a friend who was looking for a career change. I've spent somewhere between 75 and 150 hours helping him learn to code. (Web development.) Here's what I learned in the process:
1. I highly overestimated how quickly one could learn web development with no prior programming experience. I was too optimistic, and I told him if he put serious time in, he could have the skills to build a simple web app in 6 months. He put in a more realistic amount of time than I'd suggested, balancing other areas of life. It took him closer to 18 months, including enrolling in a coding camp, which he's now about to complete.
2. Charging money for a service helps people take it seriously. At first I didn't charge him, but then I took the advice of a friend who has that philosophy. This isn't definitive evidence, but I think charging for the training helped both him and myself to take it seriously and put effort into it. He's now about to graduate from a code camp, and I'm not sure if he would have done it if not for establishing that mindset that this training is valuable. (I recognize the value of code camps is debatable.)
3. Motivation is an important (and tricky) thing. There were times where he was spending more time on video games than programming. But I remember when I was learning, and programming felt very hard and mysterious for years before I began to feel comfortable making an entire project on my own. The difficulty level was demotivating at times.
I was teaching JS basics to a friend the other day who was interested, and he said something that I thought was particularly well-worded. When he stumbled across the idea of classes (as in OOP, that is), I said he should avoid them for now because it's too advanced and it would just make things confusing. I encouraged him to focus on basic functions and control flow.
He demurred, insisting that we do something "actually interesting" and had me teach him how to create a class. He likened the motivation to learning Brazilian jiu-jitsu:
> I don't want to spend hours practicing passing the guard, I want to learn to rip someone's fucking arm off.
And having learned some BJJ myself, and having experienced that exact same desire and irritation, I couldn't help but sympathize. Passing the guard is a crucial part of BJJ, but it feels quite basic and uninteresting in the beginning, much like if statements and for loops.
The point is, make sure your learner is working on something he finds interesting, like trying to put together a basic calculator app or anything concrete that he can relate to. Empty isolated exercises that aren't leading to building anything are detrimental to interest and motivation.
My gut feeling is that it will be hard to make work. Learning to code takes a long time (a bootcamp is 11 - 17 weeks at 60hrs a week, so 660 - 1020hrs). However keep in mind that's entry level proficiency.
I think the best outcome would be that this person learns enough to get into a bootcamp. You'd be shocked how many people apply who just aren't ready to even start. They could learn enough with you that they find out if they like it or not, and if so from there they can take out a private loan to attend one. Keep in mind, I'm not sure how predatory (or not) the companies giving private loans to bootcamp grads are, but it is an option, and at ~$17k in cost, it's steep but not life derailing if doesn't work out (my guess is it's about the cost of a broken bone if you're not insured, just a guess there).
If you make the expectation they learn to code to get a job, it probably won't happen, if you level set that they learn enough to get into a program and OWN IT, then perhaps you'll have some success.
Just my two cents, hope this helps!
I do question the lending money thing but maybe there's some aspect of his character that makes you trust him enough to risk the relationship that we're not aware of.
For your friend I think that is great as you avoided any kind of conflict of interests for him.
People are either able to code or not. Teaching does not work. Those who are able to code almost entirely pick all the skills by themseves. If a 'natural born' coder gets into some formal environment, such as university or something, suсh a person in two months surpasses the level of all the peers and the direct instructor as well.
In the university I was trained for automatics. But I quickly learned that coding takes me no effort at all, as opposed to, say, understanding electronics. After reading Wirth, Kernighan & Ritchie, and Stroustrup I often found myselfs hinting students from the programming department how to perform their tasks as they were scratching their heads and I was just passing by.
This has nothing to do with inteligence. I'm perhaps not very smart. When I starred at some scheme I had no idea if this an amplifier or something else, what is the role of one resistor or another. At the same time mates from my group read it as it was written in plain English (err, in plain Russian to be precise). But the very same persons were totally unable to code. It's very strange. For me coding is trivial and takes no inteligence. This is why I do it for living. The path of the least resistance. I'm kind of puzzled why persons smarter than me cannot code.
Anyway, after reading some foundational books the only thing that helps is reading other people's good code. For me it was reading pieces of the old (around 90's) BSD and GNU code.
I never met a person I'd appreciate for directy handing me over any useful coding skill. YMMV.
There are two problems. If you substitute "gardening" above for "coding," my statement is still true. The second is the nature of learning exercises. We all know that a real problem to solve generates motivation that is much more valuable than, and can self-generate syntax and algorithm knowledge.
With all the free tools, free courses, and free pdfs around, I wouldn't try to train someone who is not already brimming with questions generated by real frustration.
Coding is hard, and takes a lot of hours (like, a thousand or two) to get to basic proficiency. So yeah, you need a lot of will power and motivation to get it done. Especially outside formal setting like university, where you are pretty much forced to do it.
I know plenty of smart people who have uninspiring jobs with low salaries, and they keep talking how they will learn to code, but they don't manage to go past hello world.
If you judiciously assign him tasks to work on, help him get started but encourage him to use solid Google/Stack Overflow skills to solve his own problems, you may end up truly helping him.
The alternative, which scares me a little, is that he will start working on tutorials, get bored, start to doubt himself and then completely disappear from your life because he failed and can't pay you back.
You are saying 'Learn to code, that career path worked for me, it will work for you'.
Unfortunately my daughter broke off the engagement so we didn't get a chance to work on much together but he went on to a career in coding so it worked out pretty good just the same.