Publicidad
Publicidad

Más contenido relacionado

Similar a How to Teach Yourself to Code(20)

Publicidad

Último(20)

Publicidad

How to Teach Yourself to Code

  1. How to Teach Yourself to Code.
  2. Part 1: Stop Waiting for the Perfect Technical Co- Founder and Start Learning How to Code
  3. Why learn how to code?
  4. A lot of you just have an idea
  5. If you’re expecting to find someone to build that idea for you, it’s never going to happen
  6. Demand for developers has skyrocketed
  7. Think about it…
  8. Anyone with any programming talent is getting offers from Facebook, Google and dozens of other startups right now
  9. Why should a programmer choose your idea over any other?
  10. Do you want to pay someone?
  11. 1)You will pay too much
  12. 1)You will pay too much 2)You’ll be unhappy with the process
  13. 1)You will pay too much 2)You’ll be unhappy with the process 3)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, or am I getting ripped off?”
  17. If you’re an entrepreneur waiting for someone to execute your idea for you, you’re not an entrepreneur
  18. (sorry) If you’re an entrepreneur waiting for someone to execute your idea for you, you’re not an entrepreneur
  19. “Pre-Dodgeball I went through 3-4 years thinking I was going to meet some magical engineer who would build all the stuff I was thinking about. But I never met that person, so I taught myself ASP and MS Access out of a book and got to work just hacking stuff together. I’m still a really shitty programmer but I know enough to hack a prototype together.” - Dennis Crowley, Foursquare
  20. Learning how to code ≠ How to be a software engineer
  21. The point is for you to learn to code well enough to build a prototype
  22. (aka Minimum Viable Product) The point is for you to learn to code well enough to build a prototype
  23. MVP = quick + dirty
  24. “Product with the fewest number of features needed to achieve a specific objective.” – The Entrepreneurs Guide to Customer Development
  25. Side note: build products that are valuable despite being ugly
  26. Eventually you’ll need to find a lead developer
  27. Knowing how to code helps you find, pitch and manage good developers
  28. More and more, the things we interact with in the world around us qualifies as “technology”
  29. There are 10 kinds of people:
  30. There are 10 kinds of people: Those who understand binary and those who don’t
  31. Society is quickly dividing into two groups: 1) Those that know how to code – they can manipulate the very structure of the world around them. If you’re interested in learning more, read Program or Be Programmed: http://amzn.to/yzd6hm 2) Those that don’t – their lives are being designed and directed by those that do.
  32. Part 2: Choosing a Programming Language
  33. I get it, it’s scary to jump in.
  34. C, Java, C++, PHP, JavaScript, Python, C#, Perl, SQL, Ruby, Shell, Visual Basic, Assembly, Actionscript, Objective C, Lisp, Where do you start? 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 applications accessed over the internet
  37. (which are different from mobile applications)
  38. Every web application has a front-end and a back-end
  39. The front-end is what you see Front-end languages: • HTML • CSS • JavaScript Web Pages
  40. <h1>Welcome to Twitter.</h1> <p>Find out what’s happening, right now, with the people and organizations you care about.</p>
  41. <h1>Welcome to Twitter.</h1> <p>Find out what’s happening, right now, with the people and organizations you care about.</p> This is HTML
  42. The back-end is what you don’t see Database Web Pages Rules Programming languages: PHP, Ruby, Python, Java Database languages: SQL
  43. echo “Hello World”; print(‘Hello World’) puts “Hello World” They’re all the same, just different PHP Python Ruby Hello World Hello World Hello World
  44. And then there are web application frameworks Database Web Pages Rules Web application frameworks: Ruby on Rails, Django
  45. “alleviate overhead associated with web development by providing libraries for database access, templating frameworks, and session management. Blah blah blah blah blah blah blah.” Web application frameworks
  46. “alleviate overhead associated with web development by providing libraries for database access, templating frameworks, and session management. Blah blah blah blah blah blah blah.” Web application frameworks build web apps really quickly
  47. If your goal is to build a prototype, start with Ruby on Rails (aka ‘Rails’)
  48. Ruby on Rails is a web application framework for 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 really don’t need to know
  56. Rails is just shortcuts like this rails new application create create README.rdoc create Rakefile create config.ru create .gitignore create Gemfile create app create app/assets/images/rails.png create app/assets/javascripts/application.js create app/assets/stylesheets/application.css create app/controllers/application_controller.rb create app/helpers/application_helper.rb create app/mailers create app/models create app/views/layouts/application.html.erb create app/mailers/.gitkeep create app/models/.gitkeep create config create config/routes.rb create config/application.rb create config/environment.rb . . . create vendor/plugins create vendor/plugins/.gitkeep run bundle install
  57. So you can do stuff like this
  58. There’s a temptation for programmers to say “Start with PHP or Java”
  59. They say this because: 1. it mirrors the way we learn things in school 2. it’s how they learned
  60. IGNORE them
  61. With those languages, you’ll spend MONTHS learning the basics so that you can do this:
  62. (make a yellow square)
  63. With Rails, fast and simple is the name of the game
  64. The ability to get quick and positive feedback on your projects is crucial
  65. A final note:“Scaling” Rails
  66. Does Rails scale?
  67. Yes Some of the most heavily trafficked sites in the world use Rails Basecamp Twitter Shopify Yellow Pages GitHubLivingSocial GrouponSoundcloud Zendesk Hulu
  68. Part 3: How I Taught Myself to Code in One Month
  69. I find traditional learning extremely tedious
  70. So do you.(Otherwise you’d have learned how to code by now.)
  71. So I developed my own method I call “brute-force” learning
  72. In college I would download podcasts of classes I was taking (from other schools)
  73. Then I’d listen to the podcasts on the subway or walking around the city.
  74. Doing this ended up eliminating hundreds of hours of studying (also teachers loved my “unique perspectives”)
  75. Why does this work?
  76. Have you ever been confused by something when it's explained one way but when it’s explained a different way it just clicks?
  77. The result is that learning is less tedious
  78. More importantly, the stress of feeling like you have to learn something the first time disappears
  79. It’s OKAY to not understand something the first time
  80. It’s OKAY to not understand something the first time Isn’t that sort of the point?
  81. The first time you learn something, your mind creates a mental map. A fuzzy picture of all the pieces and how they fit together.
  82. When you go back, you relearn the specifics and it all starts to make more sense
  83. Just speed through as many introductory tutorials as possible
  84. Here’s what I recommend:
  85. One Month Rails by Mattan Griffel (Me!)
  86. Ruby on Rails Tutorial by Michael Hartl
  87. When you finish, you’ll be able to build your own basic web app
  88. But there will be specific features you don’t know how to implement
  89. Railscasts by Ryan Bates
  90. At some point along the way, you may feel a temptation to STOP and learn Ruby (or HTML or CSS)
  91. At some point along the way, you may feel a temptation to STOP and learn Ruby (or HTML or CSS) Don’t.
  92. Ruby Rails Ruby is huge
  93. Ruby Rails Ruby is huge And you only need to know a tiny bit of it
  94. Besides, you’ll learn all the Ruby, HTML and CSS you need to know along the way
  95. After you’ve finished, check out these fun resources that cover basic 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 what feature you want to build, but you don’t know what it’s called
  101. For example: Cron jobs let you schedule tasks in your app
  102. Ask someone
  103. Rails is very popular at the moment and has a LARGEcommunity for support
  104. The best way to learn is to go to a Rails meetup and ask someone who knows more than you
  105. in NYC • NYC.rb • NYC on Rails • NewYork Ruby Meetup • Ruby Nuby
  106. Go attend some hackathonsand find teams to work with
  107. To hear about hackathons, sign up for 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 Web Development with Rails • Ruby on Rails Guides • Hackety-hack • Teamtreehouse • Code School
  109. Part 4: Coding in a nutshell
  110. Installing Rails is super easy
  111. This is your command center Command Line Text Editor Browser
  112. The text editor is where you write your code Sublime Text
  113. The command line is where you run your code Terminal
  114. The browser is where you see the result Google Chrome
  115. Rails uses a Model View Controller (MVC) architecture Controller View Model Database
  116. Database Web Pages Rules ControllerView Model Rails uses a Model View Controller (MVC) architecture
  117. Github is where you save versions of your project files
  118. Heroku lets you deploy your app so that it’s live in seconds
  119. Part 5: Let’s begin
  120. 1. Go to RailsInstaller.org
  121. 1. Go to RailsInstaller.org 2. Download the right installer
  122. 1. Go to RailsInstaller.org 2. Download the right installer 3. Follow the instructions
  123. 1. Go to RailsInstaller.org 2. Download the right installer 3. Follow the instructions 4. Yes do the Git thing 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 rvm Who can solve this first?!
  126. Let’s check if it worked
  127. Find your command line
  128. Find your command line Open Programs > RailsInstaller > Command Prompt with Ruby and Rails
  129. Type this command and hit enter rails -v
  130. Type this command and hit enter rails -v Rails 3.2.13 If it says something like this, then it worked!
  131. You’ve installed Rails, and you’re ready to create your first app
  132. Go to onemonthrails.com to keep learning
  133. Thank you :) Mattan Griffel mattan@onemonthrails.com mattangriffel.com
Publicidad