Don't learn how to code, learn how to make things
jakelevine.me
jakelevine.me
I think a more accurate title would be "Code first, learn how to code later."
And you're probably right. Personally, I learned how to code in PHP because my company needed a web app for something, so I bought a basic web programming textbook that happened to teach PHP/MySQL, read it for a week or two, and then started building the app.
Now I have a few different "stock" scripts and applications that I've implemented, and when I want to learn a new language, I learn by studying the new syntax for a week or two and then dive right into re-implementing some of my existing scripts & applications in that language as my "homework," and just googling things whenever I get stuck. I think this is a pretty good way to learn programming outside the classroom.
But, how about the people that don't know any programming language? If they had never engineered anything from the start through planning and designing and implementing, how can they begin to use a programming language they are beginning to learn? None of the tools that languages provide have a context for a new programmer, much in the same way that high school kids don't understand why math is so important.
I agree with your first statement in that "things" should mean something other than software. Maybe they should build a treehouse or a toothpick bridge or anything to get the process of creation and engineering into the mix of thinking about writing code.
It's like the old saying, "How do you eat an elephant? One bite at a time."
Once someone understands this, you can show them Python or Javascript or whatever and basically go, "Here's the syntax to declare/call a variable, function/method, array, boolean test, iterative loop, etc. Now here's a real-world programming problem. Break it into smaller sub-problems and solve each of them using these tools, then put the steps together into a logical sequence to create a runnable program. Google the documentation for the language and its libraries if you get stuck."
Planning, designing, testing, etc. can be learned later. First you just need to take a problem, break it up into bite-sized pieces, and start taking bites.
This is why object-oriented programming is bad for beginners, by the way. OOP puts design ahead of problem-solving. You really don't always need to create an abstract model of a problem before you can work on solving it, but OOP forces you to do this.
You could teach in small chunks and work up to big chunks in order to illustrate to the student how the smaller chunks make up the whole, instead of starting with the whole and making little chunks out of it. It could make the process of learning to code less daunting.
Basically I made a Tip Calculator, and did it in a very functional way. Here was my thought process. I basically had one method, "didClickCalculateTip" - a button click-down. First I knew I had to take the user input as a string, and convert it to a float. Okay, Google, show me what you got. Then doing math on the float. Okay, now I have a result. How do I put that back on screen onto a label? Hmm, it won't let me set the string property of my UILabel to a float. Google: how to make a UILabel's text (string property) show a float. Okay, now print to the console to make sure it works. And voila.
So, using an OOP language isn't bad right off the bat, because I was able to plug in and figure out OOP design and principles by virtue of playing around with the language over time. I'm a pretty proficient Objective-C developer right now because I haven't stopped playing around with it over the past year and 3/4. Object-oriented design patterns aren't mystical, they make a lot of sense when you just think about them. I chose the language because my quest was to make an iPhone app I had as an idea (not the tip calculator haha) but needed to start somewhere to learn how to program. So I picked the tool that would directly translate to the product I actually wanted to make.
I think that the article's main point is learning by doing vs learning by instruction - and it applies to software as well as physical things. I tend to agree pretty strongly that this is a better - and more fun - way to learn.
I was on the solar car team in college. Most of the people on the team were engineering students, but without a doubt the most valuable guy was doing a graduate program in ligustics. He had no formal engineering or design training, but was very hands-on and could design and build pretty much anything. He still stands as the best "hacker" of mechanical arts I know. In contrast, most of the engineering students (myself included) were pretty useless at design until we took a more hands-on approach to it.
On a flip to this, I'm doing a PhD now in biomaterials engineering. Even the "exparimentalists" (myself included) in the group usually spend more time using and writing software than in the lab.
If you take this approach, then you would have learnt some aspects of the language, and hence won't have the patience to go through an introductory book again. I programmed in python for a year without knowing how python variables are actually names, because I was too impatient to go through a introductory book.
Also, never felt the feeling of "Whoa, this is cool, I'll refactor this method using that?"
But seriously people, don't use the word "building" when you talk about virtual things. In your bubble writing software might be the only kind of creative work there is, but in the world at large, building is associated with the construction of tangible results. And while I am ranting: Don't use "engineer" as if software engineering is the only engineering discipline either.
That is, if you want to be a programmer loved by your peers and those who inherit your codebases.
If you're cranking out weekend-project websites (see author's examples) and $0.99 apps, you'll get by with a minimal knowledge of software development.
There is a difference between hobby and professional programming, but both are equally important.
Learning something complex for the sake of leaning is appealing to some people, but not everyone. For some people, that first website can be very empowering. It can be a gateway to trying to solve increasingly complex problems with code.
With that said, i totally disagree with the idea that you should be able to build a functional prototype in a weekend. That's crazy talk if you're truly trying to create something worthwhile. Sure building a practice site in a weekend to get you hands a little dirty, and kind of get a feel for the way things work is a great idea, but if you start with the goal of building a prototype of your masterpiece in a weekend, you're surely setting yourself up for a fantastic failure, and probably get demotivated and quit. I think it's a better idea to dabble a bit with some fun practice and then get an idea of what you're building entails, then set a realistic goal(aka 4x what you think it'll take you) and set out to make something great.
Just my 2 cents.
Apparently this same sentiment is held by Zuckerberg as well in his code.org video. "It didn't start off as this mission to learn all of Computer Science, but rather build something cool that me and my sisters could use."
This could probably be seen as a serious problem, but not a problem with Codecademy, more of a problem with society as a whole.
Codecademy DOES provide people some of the tools they'll need to make things with computers. And another tool in the kit is always a good thing. Makes us better makers.
We can give people knowledge, we can teach them how to think, but if they don't know how to DO anything, what are they going to do with all of their ideas?
In my experience people usually just need to be enabled to become makers. Tell them "You could make a thing! A Cool thing!" and if they believe you, they'll go out and prove it.
This article is useful in that way, it might enable folks to start using whatever they do have in their toolkits to start producing. Creating value.
But "Don't learn how to code"? That's just silly.
My advice is DO buy high quality books/courses that teach the fundamentals too. Scan them so you know what kind of stuff you can learn from there. When stuck making something try to learn the hard way. Learning from blog articles/tutorials like "How to make X" that give you prepackaged answers is just very unproductive in the long run. Been there, done that.
Also keep in mind that when you're working with other people knowing the right jargon is very useful. It will make you better at finding the right answers on Google too. Speaking jargon is the natural language equivalent of high-level programming.
I don't have to aim for something bigger to enjoy coding and I don't understand why so many people claim the opposite. When it gets to the trivial parts of a project, I just get bored and never finish them.
And learning to code by reading a Rails book? Don't you have to know how to code before you build even a basic Rails app? Even average coders can't easily grasp all the concepts behind building a full-fledged web app, nevermind someone who barely knows what a for loop is.
Agreed. As someone who has some coding experience (i.e. current CS student) but who is learning web dev, many parts of Rails/Django are way over my head. Rails/Django weren't designed for beginners. I've found starting with Flask which does considerably less than Rails/Django to be much more understandable. Sure I am probably often reinventing a shittier wheel but I think there is benefit in understanding what a full blown framework like Rails or Django provides before using one.
I'm going to write a post about this specifically soon. I feel like it's this insane craze that rails is the way to go for people that don't know a single thing about programming, and it makes me sad that 99% of these people will end up dropping it because of this misguided notion.
Rails freed me from the minutiae of the type of programs you'd write in school.
I think the biggest advantage of rails/etc. is that you DON'T need to understand every detail to get real work done.
Rails for zombies and the rubyonrails.org as well as http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
Those resources + a genuine interest in building web apps pushed me over the edge.
I'm sure you can learn to love it but for me programming was something I instantly knew I wanted to learn everything about.
Learn how to make and sell things ...