Skip to content

Instantly share code, notes, and snippets.

@kr
Last active October 13, 2015 01:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kr/7f3142fd076b308042df to your computer and use it in GitHub Desktop.
Save kr/7f3142fd076b308042df to your computer and use it in GitHub Desktop.

Getting started on Heroku in only 100 steps.

I recently had an amazing interaction with a friend of mine getting started on Heroku for the first time. It really highlights how badly we and the industry are failing new programmers and how much room there is to make the initial experience faster and smoother.

My friend had a small amount of programming-ish experience with SQL, and is technically-minded, but no existing development environment. Not a programmer, but has stated a desire to learn. Our goal was only this: to start using heroku, to push a hello-world app in order to see the product first hand.

Here's the story:

Friend: I want to understand Heroku beyond general, hand-wavy descriptions.

Me: You have to use it.

Friend: Okay, what should I do?

Me: Here's a quick start (https://devcenter.heroku.com/articles/quickstart). You should run through the stuff on that page, and then pick one of the languages at the bottom (doesn't matter which one) and do the language-specific quick start. Let me know if you have any questions at all and we'll work through it together. It shouldn't take too long.

(the next day)

Friend: Okay I've been going through these instructions and I have a question. I installed the "toolbelt" but I don't see Heroku anywhere. I searched in spotlight for "Heroku" but nothing showed up.

Me: Open an app called 'Terminal'; you can type commands there. Try typing "heroku login" and pressing return.

Friend: Okay that works, "would you like to generate one Y or N", what should I do?

Me: [This appears to be about SSH] Pick "Y" or just press return.

Friend: What's "ssh"?

Me: It's a way to run commands on another computer, sort of like how you're running commands in Terminal on your laptop right now. I'll explain it more thoroughly later, it doesn't matter for our purposes here.

[ It really doesn't matter. We're not really even using ssh for its main purpose. It's a transport for a transport (git) for deploying your code. ]

Friend: Okay I'm done. Which language should I use? What's clojure? Is that a language? What is django?

Me: Some of those are languages and some are frameworks. You should pick either ruby or python to keep things quick and easy.

Friend: Okay I'll do python.

Friend: Some of these steps look the same as before. Do I have to repeat them?

Me: No, you can skip those. Start where it says "simple hello world application".

Friend: .

  • python & virtualenv
    • homebrew installation mistake

(yak shaving: "let's screen share so I can help you better"; try skype, doesn't seem to work. try google hangout, send gchat invite, send hangout invite, install google video chat plugin, which doesn't work the first time, restart browser, install the plugin again, then join the hangout)

  • homebrew command on python guide gets a 404.
    • so detour to the homebrew web page
  • os x developer tools
  • reset apple id password
  • set up apple developer profile (what kind of developer are you?)
  • download command line tools for xcode (30 minutes!!!)
  • add 'export PATH=/usr/local/bin:$PATH' to ~/.bashrc (how?!?!)
  • brew install python --framework (another 30 minutes!!!)
  • add 'export PATH=/usr/local/share/python:$PATH' to ~/.bashrc (how?!?!)
  • easy_install pip ==> permission denied!!! (which easy_install is /usr/bin/easy_install)
  • going off script... sudo easy_install pip
  • pip install virtualenv ==> permission denied
  • sudo pip install virtualenv

now it's copy+pasting stuff from Getting Started with Python on Heroku

pretty smooth sailing

  • pip install Flask (has to download more crap)

  • create app.py (how???)

    • going off script... touch app.py, then open TextEdit
  • ...

  • git push heroku master

    ==> the authenticity of ssh key ab:cd:... cannot be established

    add to your keychain? (yes/no) (wtf?????)
    

heroku logs (timeout the first time!)

@kennethreitz
Copy link

FWIW, Homebrew 404 was reported and fixed several weeks ago.


Step number one in the guide for installing Python says "The latest version of Mac OS X, Lion, comes with Python 2.7 out of the box. You do not need to install or configure anything else to use Python."

If this person doesn't know what ssh or PATH is, they clearly should be using the canned version mentioned.

Should I put more emphasis on this?

@kr
Copy link
Author

kr commented Jan 3, 2013

Maybe. I read this section too and had trouble deciding what to do
and make a recommendation. Here was my thought process:

getting started

@kr
Copy link
Author

kr commented Jan 3, 2013

If you can find a way to eliminate this decision, that would be ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment