How to Teach Yourself to Code
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

How to Teach Yourself to Code

  • 142,501 views
Uploaded on

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

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

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
142,501
On Slideshare
127,219
From Embeds
15,282
Number of Embeds
157

Actions

Shares
Downloads
2,408
Comments
30
Likes
346

Embeds 15,282

http://mattangriffel.tumblr.com 2,931
http://fumit.blogspot.jp 2,122
http://teachyourselfcode.com 1,237
http://techmaster.vn 1,133
http://www.startupjungle.com 1,121
http://mattangriffel.com 897
http://someday-starts-today.com 737
http://tweakyourslides.wordpress.com 675
http://www.dragonworksstudio.com 573
http://www.scoop.it 440
http://www.businessincubatorns.com 319
https://twitter.com 236
http://aroundtheworld2k13.wordpress.com 234
http://www.manishreddy.in 219
http://students.flatironschool.com 197
http://grandmawasacommunist.com 129
https://lilysahifulb.ghost.io 117
http://fumit.blogspot.com 106
http://www.linkedin.com 94
http://faz.my 77
http://static.001.students.flatironschool.com 64
http://lurnq.com 61
http://blog.websourcing.fr 58
http://pogrammershub.tumblr.com 58
https://www.linkedin.com 55
http://gbdo.wordpress.com 54
http://www.teachyourselfcode.com 51
http://iamkelvinlee.tumblr.com 50
http://bomnavy.wordpress.com 50
http://lilysahifulb.com 49
http://flavors.me 49
http://vassilko4edu.ucoz.com 49
http://tumblr.hootsuite.com 47
http://www.n4express.com 45
http://life20.kr 43
http://www.twylah.com 43
http://durdelafeuille.tumblr.com 43
http://egpierce.tumblr.com 38
http://mattan.sqsp.com 38
http://www.roldanodepersio.com 38
http://inkubator.biz 37
http://wgordon3.bo.lt 35
http://bo.lt 35
https://si0.twimg.com 33
http://manishreddy.tumblr.com 30
http://localhost 29
http://www.princegeorgescountyvtn.com 29
http://portalmatematicodeevelio.blogspot.com 27
http://davidbladow.bo.lt 25
http://www.techgig.com 25

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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