Your SlideShare is downloading. ×
0
How to TeachYourself toCode.
Part 1:Stop Waiting for thePerfect Technical Co-Founder and StartLearning How to Code
Why learn how to code?
A lot of you just havean idea
If you’re expecting to find someoneto build that idea for you, it’snever going to happen
Demand for developers hasskyrocketed
Think about it…
Anyone with any programmingtalent is getting offers fromFacebook, Google and dozens ofother startups right now
Why should a programmer chooseyour idea over any other?
Do you want topay someone?
1)You will pay too much
1)You will pay too much2)You’ll be unhappy with the process
1)You will pay too much2)You’ll be unhappy with the process3)You’ll get something back you didn’t want
WHY?
WHY?Software is hard to estimate
WHY?Software is hard to estimate“Should this really take 15 hours, oram I getting ripped off?”
If you’re an entrepreneur waiting forsomeone to execute your idea for you,you’re not an entrepreneur
(sorry)If you’re an entrepreneur waiting forsomeone to execute your idea for you,you’re not an entrepreneur
“Pre-Dodgeball I went through 3-4 years thinking Iwas going to meet some magical engineer whowould build all the stuff I w...
Learning how to code≠How to be a software engineer
The point is for you to learn tocode well enough tobuild a prototype
(aka Minimum Viable Product)The point is for you to learn tocode well enough tobuild a prototype
MVP = quick + dirty
“Product with the fewestnumber of features needed toachieve a specific objective.”– The Entrepreneurs Guide to Customer De...
Side note: build products that arevaluable despite being ugly
Eventually you’ll need tofind a lead developer
Knowing how to code helps youfind, pitch and manage gooddevelopers
More and more, the things weinteract with in the worldaround us qualifies as“technology”
There are 10 kinds of people:
There are 10 kinds of people:Those who understand binaryand those who don’t
Society is quickly dividinginto two groups:1)Those that know how to code –they can manipulate the very structureof the wor...
Part 2:Choosing aProgrammingLanguage
I get it,it’s scary tojump in.
C, Java, C++, PHP, JavaScript, Python,C#, Perl, SQL, Ruby, Shell, VisualBasic, Assembly, Actionscript,Objective C, Lisp, W...
Breaking down a web application
Web applications are applicationsaccessed over the internet
(which are different frommobile applications)
Every web application has afront-end and a back-end
The front-end is what you seeFront-end languages:• HTML• CSS• JavaScriptWeb Pages
<h1>Welcome to Twitter.</h1><p>Find out what’s happening,right now, with the people andorganizations you care about.</p>
<h1>Welcome to Twitter.</h1><p>Find out what’s happening,right now, with the people andorganizations you care about.</p>Th...
The back-end is what you don’t seeDatabaseWeb Pages RulesProgramming languages:PHP, Ruby, Python, JavaDatabase languages:SQL
echo “Hello World”; print(‘Hello World’) puts “Hello World”They’re all the same, just differentPHP Python RubyHello World ...
And then there areweb application frameworksDatabaseWeb Pages RulesWeb application frameworks: Ruby on Rails, Django
“alleviate overhead associated with webdevelopment by providing libraries fordatabase access, templating frameworks, andse...
“alleviate overhead associated with webdevelopment by providing libraries fordatabase access, templating frameworks, andse...
If your goal is to build aprototype, start withRuby on Rails(aka ‘Rails’)
Ruby on Railsis a web application frameworkfor Ruby
Rails is the easiest to dive into
Rails is the easiest to dive into(tons of resources and a huge community)
Ruby (and therefore Rails) is easier to understand
exit unless "restaurant".include? "aura"
[toast, cheese, wine].each { |food| print food.capitalize }
[toast, cheese, wine].each { |food| print food.capitalize }(try saying it out loud)
Rails hides all the stuff you reallydon’t need to know
Rails is just shortcuts like thisrails new applicationcreatecreate README.rdoccreate Rakefilecreate config.rucreate .gitig...
So you can do stuff like this
There’s a temptation forprogrammers to say“Start with PHP or Java”
They say this because:1. it mirrors the way we learnthings in school2. it’s how they learned
IGNORE them
With those languages, you’llspend MONTHS learning thebasics so that you can do this:
(make a yellow square)
With Rails, fast and simple isthe name of the game
The ability to get quick andpositive feedback on yourprojects is crucial
A final note:“Scaling” Rails
Does Rails scale?
Yes Some of the most heavily traffickedsites in the world use RailsBasecamp Twitter Shopify Yellow PagesGitHubLivingSocial...
Part 3:How I Taught Myself toCode in One Month
I find traditional learningextremely tedious
So do you.(Otherwise you’d have learned how to code by now.)
So I developed my own methodI call “brute-force” learning
In college I would download podcasts ofclasses I was taking (from other schools)
Then I’d listen to the podcastson the subway or walkingaround the city.
Doing this ended up eliminatinghundreds of hours of studying(also teachers loved my “unique perspectives”)
Why does thiswork?
Have you ever been confused by somethingwhen its explained one way but when it’sexplained a different way it just clicks?
The result is that learning isless tedious
More importantly, the stressof feeling like you have tolearn something the first timedisappears
It’s OKAY to not understandsomething the first time
It’s OKAY to not understandsomething the first timeIsn’t that sort of the point?
The first time you learn something,your mind creates a mental map. Afuzzy picture of all the pieces andhow they fit togeth...
When you go back, you relearnthe specifics and it all starts tomake more sense
Just speed through as manyintroductory tutorials as possible
Here’s what I recommend:
One Month Railsby Mattan Griffel (Me!)
Ruby on Rails Tutorialby Michael Hartl
When you finish, you’ll be able tobuild your own basic web app
But there will be specificfeatures you don’t know howto implement
Railscasts by Ryan Bates
At some point along the way, youmay feel a temptation to STOP andlearn Ruby (or HTML or CSS)
At some point along the way, youmay feel a temptation to STOP andlearn Ruby (or HTML or CSS)Don’t.
Ruby RailsRuby is huge
Ruby RailsRuby is hugeAnd you only need toknow a tiny bit of it
Besides, you’ll learn all theRuby, HTML and CSS you needto know along the way
After you’ve finished, check outthese fun resources that coverbasic Ruby:• Codecademy’s Ruby Track• Why’s (Poignant) Guide...
Troubleshooting
75% of coding is Googling*
75% of coding is Googling**totally made up statistic
Stack Overflow
A lot of times you know whatfeature you want to build, but youdon’t know what it’s called
For example: Cron jobs let youschedule tasks in your app
Ask someone
Rails is very popular atthe moment and has aLARGEcommunity for support
The best way to learn is to go to aRails meetup and ask someone whoknows more than you
in NYC• NYC.rb• NYC on Rails• NewYork Ruby Meetup• Ruby Nuby
Go attend somehackathonsand find teams to work with
To hear about hackathons, sign upfor the following mailing lists:• General Assembly• This Week in NYC Innovation• StartupD...
The ∞ list of Rails includes:• Rails for Zombies• Peepcode• Agile WebDevelopment withRails• Ruby on Rails Guides• Hackety-...
Part 4: Coding in a nutshell
Installing Rails issuper easy
This is your command centerCommand Line Text EditorBrowser
The text editoris where youwrite your codeSublime Text
The commandline is where yourun your codeTerminal
The browser iswhere you seethe resultGoogle Chrome
Rails uses a Model View Controller(MVC) architectureControllerViewModelDatabase
DatabaseWeb Pages RulesControllerView ModelRails uses a Model View Controller(MVC) architecture
Github is where you save versions of yourproject files
Heroku lets you deploy your app so that it’slive in seconds
Part 5: Let’s begin
1. Go toRailsInstaller.org
1. Go toRailsInstaller.org2. Download theright installer
1. Go toRailsInstaller.org2. Download theright installer3. Follow theinstructions
1. Go toRailsInstaller.org2. Download theright installer3. Follow theinstructions4. Yes do the Gitthing too
Some people get this error:Error changing group of /opt/rix to rvm
Some people get this error:Error changing group of /opt/rix to rvmWho can solve this first?!
Let’s check if it worked
Find your command line
Find your command lineOpen Programs > RailsInstaller > Command Prompt with Ruby and Rails
Type this command and hit enterrails -v
Type this command and hit enterrails -vRails 3.2.13If it says something likethis, then it worked!
You’ve installed Rails, and you’reready to create your first app
Go to onemonthrails.comto keep learning
Thank you :)Mattan Griffelmattan@onemonthrails.commattangriffel.com
How to Teach Yourself to Code
How to Teach Yourself to Code
How to Teach Yourself to Code
How to Teach Yourself to Code
How to Teach Yourself to Code
Upcoming SlideShare
Loading in...5
×

How to Teach Yourself to Code

152,109

Published on

A talk I did at Angelhack SF on May 4, 2013 (Updated).

Published in: Self Improvement, Technology
30 Comments
385 Likes
Statistics
Notes
No Downloads
Views
Total Views
152,109
On Slideshare
0
From Embeds
0
Number of Embeds
82
Actions
Shares
0
Downloads
2,733
Comments
30
Likes
385
Embeds 0
No embeds

No notes for slide

Transcript of "How to Teach Yourself to Code"

  1. 1. How to TeachYourself toCode.
  2. 2. Part 1:Stop Waiting for thePerfect Technical Co-Founder and StartLearning How to Code
  3. 3. Why learn how to code?
  4. 4. A lot of you just havean idea
  5. 5. If you’re expecting to find someoneto build that idea for you, it’snever going to happen
  6. 6. Demand for developers hasskyrocketed
  7. 7. Think about it…
  8. 8. Anyone with any programmingtalent is getting offers fromFacebook, Google and dozens ofother startups right now
  9. 9. Why should a programmer chooseyour idea over any other?
  10. 10. Do you want topay someone?
  11. 11. 1)You will pay too much
  12. 12. 1)You will pay too much2)You’ll be unhappy with the process
  13. 13. 1)You will pay too much2)You’ll be unhappy with the process3)You’ll get something back you didn’t want
  14. 14. WHY?
  15. 15. WHY?Software is hard to estimate
  16. 16. WHY?Software is hard to estimate“Should this really take 15 hours, oram I getting ripped off?”
  17. 17. If you’re an entrepreneur waiting forsomeone to execute your idea for you,you’re not an entrepreneur
  18. 18. (sorry)If you’re an entrepreneur waiting forsomeone to execute your idea for you,you’re not an entrepreneur
  19. 19. “Pre-Dodgeball I went through 3-4 years thinking Iwas going to meet some magical engineer whowould build all the stuff I was thinking about. But Inever met that person, so I taught myself ASP andMS Access out of a book and got to work justhacking stuff together. I’m still a really shittyprogrammer but I know enough to hack a prototypetogether.”- Dennis Crowley, Foursquare
  20. 20. Learning how to code≠How to be a software engineer
  21. 21. The point is for you to learn tocode well enough tobuild a prototype
  22. 22. (aka Minimum Viable Product)The point is for you to learn tocode well enough tobuild a prototype
  23. 23. MVP = quick + dirty
  24. 24. “Product with the fewestnumber of features needed toachieve a specific objective.”– The Entrepreneurs Guide to Customer Development
  25. 25. Side note: build products that arevaluable despite being ugly
  26. 26. Eventually you’ll need tofind a lead developer
  27. 27. Knowing how to code helps youfind, pitch and manage gooddevelopers
  28. 28. More and more, the things weinteract with in the worldaround us qualifies as“technology”
  29. 29. There are 10 kinds of people:
  30. 30. There are 10 kinds of people:Those who understand binaryand those who don’t
  31. 31. Society is quickly dividinginto two groups:1)Those that know how to code –they can manipulate the very structureof the world around them.If you’re interested in learning more, read Program or Be Programmed: http://amzn.to/yzd6hm2)Those that don’t – their lives arebeing designed and directed bythose that do.
  32. 32. Part 2:Choosing aProgrammingLanguage
  33. 33. I get it,it’s scary tojump in.
  34. 34. C, Java, C++, PHP, JavaScript, Python,C#, Perl, SQL, Ruby, Shell, VisualBasic, Assembly, Actionscript,Objective C, Lisp, Where do youstart? Delphi, Pascal, Scheme,Haskell, Tcl, Backbone, Fortran, Ada,Lua, ColdFusion, Cobol, Erlang, D,Scala, Smalltalk, Ocaml, Forth, Rexx,
  35. 35. Breaking down a web application
  36. 36. Web applications are applicationsaccessed over the internet
  37. 37. (which are different frommobile applications)
  38. 38. Every web application has afront-end and a back-end
  39. 39. The front-end is what you seeFront-end languages:• HTML• CSS• JavaScriptWeb Pages
  40. 40. <h1>Welcome to Twitter.</h1><p>Find out what’s happening,right now, with the people andorganizations you care about.</p>
  41. 41. <h1>Welcome to Twitter.</h1><p>Find out what’s happening,right now, with the people andorganizations you care about.</p>This is HTML
  42. 42. The back-end is what you don’t seeDatabaseWeb Pages RulesProgramming languages:PHP, Ruby, Python, JavaDatabase languages:SQL
  43. 43. echo “Hello World”; print(‘Hello World’) puts “Hello World”They’re all the same, just differentPHP Python RubyHello World Hello World Hello World
  44. 44. And then there areweb application frameworksDatabaseWeb Pages RulesWeb application frameworks: Ruby on Rails, Django
  45. 45. “alleviate overhead associated with webdevelopment by providing libraries fordatabase access, templating frameworks, andsession management. Blah blah blah blahblah blah blah.”Web application frameworks
  46. 46. “alleviate overhead associated with webdevelopment by providing libraries fordatabase access, templating frameworks, andsession management. Blah blah blah blahblah blah blah.”Web application frameworksbuild web appsreally quickly
  47. 47. If your goal is to build aprototype, start withRuby on Rails(aka ‘Rails’)
  48. 48. Ruby on Railsis a web application frameworkfor Ruby
  49. 49. Rails is the easiest to dive into
  50. 50. Rails is the easiest to dive into(tons of resources and a huge community)
  51. 51. Ruby (and therefore Rails) is easier to understand
  52. 52. exit unless "restaurant".include? "aura"
  53. 53. [toast, cheese, wine].each { |food| print food.capitalize }
  54. 54. [toast, cheese, wine].each { |food| print food.capitalize }(try saying it out loud)
  55. 55. Rails hides all the stuff you reallydon’t need to know
  56. 56. Rails is just shortcuts like thisrails new applicationcreatecreate README.rdoccreate Rakefilecreate config.rucreate .gitignorecreate Gemfilecreate appcreate app/assets/images/rails.pngcreate app/assets/javascripts/application.jscreate app/assets/stylesheets/application.csscreate app/controllers/application_controller.rbcreate app/helpers/application_helper.rbcreate app/mailerscreate app/modelscreate app/views/layouts/application.html.erbcreate app/mailers/.gitkeepcreate app/models/.gitkeepcreate configcreate config/routes.rbcreate config/application.rbcreate config/environment.rb...create vendor/pluginscreate vendor/plugins/.gitkeeprun bundle install
  57. 57. So you can do stuff like this
  58. 58. There’s a temptation forprogrammers to say“Start with PHP or Java”
  59. 59. They say this because:1. it mirrors the way we learnthings in school2. it’s how they learned
  60. 60. IGNORE them
  61. 61. With those languages, you’llspend MONTHS learning thebasics so that you can do this:
  62. 62. (make a yellow square)
  63. 63. With Rails, fast and simple isthe name of the game
  64. 64. The ability to get quick andpositive feedback on yourprojects is crucial
  65. 65. A final note:“Scaling” Rails
  66. 66. Does Rails scale?
  67. 67. Yes Some of the most heavily traffickedsites in the world use RailsBasecamp Twitter Shopify Yellow PagesGitHubLivingSocial GrouponSoundcloud ZendeskHulu
  68. 68. Part 3:How I Taught Myself toCode in One Month
  69. 69. I find traditional learningextremely tedious
  70. 70. So do you.(Otherwise you’d have learned how to code by now.)
  71. 71. So I developed my own methodI call “brute-force” learning
  72. 72. In college I would download podcasts ofclasses I was taking (from other schools)
  73. 73. Then I’d listen to the podcastson the subway or walkingaround the city.
  74. 74. Doing this ended up eliminatinghundreds of hours of studying(also teachers loved my “unique perspectives”)
  75. 75. Why does thiswork?
  76. 76. Have you ever been confused by somethingwhen its explained one way but when it’sexplained a different way it just clicks?
  77. 77. The result is that learning isless tedious
  78. 78. More importantly, the stressof feeling like you have tolearn something the first timedisappears
  79. 79. It’s OKAY to not understandsomething the first time
  80. 80. It’s OKAY to not understandsomething the first timeIsn’t that sort of the point?
  81. 81. The first time you learn something,your mind creates a mental map. Afuzzy picture of all the pieces andhow they fit together.
  82. 82. When you go back, you relearnthe specifics and it all starts tomake more sense
  83. 83. Just speed through as manyintroductory tutorials as possible
  84. 84. Here’s what I recommend:
  85. 85. One Month Railsby Mattan Griffel (Me!)
  86. 86. Ruby on Rails Tutorialby Michael Hartl
  87. 87. When you finish, you’ll be able tobuild your own basic web app
  88. 88. But there will be specificfeatures you don’t know howto implement
  89. 89. Railscasts by Ryan Bates
  90. 90. At some point along the way, youmay feel a temptation to STOP andlearn Ruby (or HTML or CSS)
  91. 91. At some point along the way, youmay feel a temptation to STOP andlearn Ruby (or HTML or CSS)Don’t.
  92. 92. Ruby RailsRuby is huge
  93. 93. Ruby RailsRuby is hugeAnd you only need toknow a tiny bit of it
  94. 94. Besides, you’ll learn all theRuby, HTML and CSS you needto know along the way
  95. 95. After you’ve finished, check outthese fun resources that coverbasic Ruby:• Codecademy’s Ruby Track• Why’s (Poignant) Guide to Ruby• RubyMonk• RubyKoans• Learn Ruby the Hard Way• Ruby Warrior
  96. 96. Troubleshooting
  97. 97. 75% of coding is Googling*
  98. 98. 75% of coding is Googling**totally made up statistic
  99. 99. Stack Overflow
  100. 100. A lot of times you know whatfeature you want to build, but youdon’t know what it’s called
  101. 101. For example: Cron jobs let youschedule tasks in your app
  102. 102. Ask someone
  103. 103. Rails is very popular atthe moment and has aLARGEcommunity for support
  104. 104. The best way to learn is to go to aRails meetup and ask someone whoknows more than you
  105. 105. in NYC• NYC.rb• NYC on Rails• NewYork Ruby Meetup• Ruby Nuby
  106. 106. Go attend somehackathonsand find teams to work with
  107. 107. To hear about hackathons, sign upfor the following mailing lists:• General Assembly• This Week in NYC Innovation• StartupDigest• Startup Weekend
  108. 108. The ∞ list of Rails includes:• Rails for Zombies• Peepcode• Agile WebDevelopment withRails• Ruby on Rails Guides• Hackety-hack• Teamtreehouse• Code School
  109. 109. Part 4: Coding in a nutshell
  110. 110. Installing Rails issuper easy
  111. 111. This is your command centerCommand Line Text EditorBrowser
  112. 112. The text editoris where youwrite your codeSublime Text
  113. 113. The commandline is where yourun your codeTerminal
  114. 114. The browser iswhere you seethe resultGoogle Chrome
  115. 115. Rails uses a Model View Controller(MVC) architectureControllerViewModelDatabase
  116. 116. DatabaseWeb Pages RulesControllerView ModelRails uses a Model View Controller(MVC) architecture
  117. 117. Github is where you save versions of yourproject files
  118. 118. Heroku lets you deploy your app so that it’slive in seconds
  119. 119. Part 5: Let’s begin
  120. 120. 1. Go toRailsInstaller.org
  121. 121. 1. Go toRailsInstaller.org2. Download theright installer
  122. 122. 1. Go toRailsInstaller.org2. Download theright installer3. Follow theinstructions
  123. 123. 1. Go toRailsInstaller.org2. Download theright installer3. Follow theinstructions4. Yes do the Gitthing too
  124. 124. Some people get this error:Error changing group of /opt/rix to rvm
  125. 125. Some people get this error:Error changing group of /opt/rix to rvmWho can solve this first?!
  126. 126. Let’s check if it worked
  127. 127. Find your command line
  128. 128. Find your command lineOpen Programs > RailsInstaller > Command Prompt with Ruby and Rails
  129. 129. Type this command and hit enterrails -v
  130. 130. Type this command and hit enterrails -vRails 3.2.13If it says something likethis, then it worked!
  131. 131. You’ve installed Rails, and you’reready to create your first app
  132. 132. Go to onemonthrails.comto keep learning
  133. 133. Thank you :)Mattan Griffelmattan@onemonthrails.commattangriffel.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×