Login
Theme: Light Dark

What is the best process for a new web development for occasional developers?

Tagged:

Home - Quora Link

Personally, what I would do in this situation is to maintain a set of notes. I keep mine in Dropbox so they’re always available. Every time I start a project, I keep a note of things that I needed to do and learn about and then refer back to the notes every time I need to do it again.

I do this for standing up new cloud servers all the time, as I found using configuration management for pet projects to be like using a sledgehammer to kill a fly. Way too much friction. Notes that you can just edit whenever things change are much better.

Here’s what I use:

  1. Building a Server 
  2. ================= 
  3.  
  4. - Make a Digital Ocean box 
  5. - Use digital_ocean SSH key 
  6. - Check "Internal Networking" 
  7. - Add host to `dotfiles/ssh/.ssh/config` 
  8. - Log in to the Digital Ocean box 
  9. - specify root user using `-l root` 
  10. - Add `deploy` user 
  11. adduser deploy 
  12. - Enter password 
  13. - tap 'return' for rest of prompts 
  14. - Add `deploy` user to sudo group 
  15. usermod -a -G sudo deploy 
  16. - Exit out of SSH session 
  17. - Add the SSH key for password-less login 
  18. ssh-copy-id <server-name> 
  19. - uses `~/.ssh/id_rsa` 
  20. - Test password-less login 
  21. ssh <server-name> 
  22. - should just log in 

It’s tempting to want to write scripts to automate this, but I’ve so far found that when the scripts break, you now have two major problems, the one you’re fixing, and the fact that the script broke. I don’t want my personal life to get mired in yak shaving, so I refrain from automating this kind of thing. I don’t need to reimplement configuration management.

You can use the same “checklist”-type approach with anything that you have to do often enough to want some kind of process, but not so often that it’s worth maintaining software for. I use the above procedure maybe twice a year. When I do, it’s a huge time saver.

For your particular use case, I use Rails and my process to start up new projects changes so often as to make even the lightweight procedure described above to be too process to bother with. Rails has generators to make it easy to introduce workflow and process if you want it.

For example: `rails new <app-name> -T` will generate a new rails app without a testing framework. `rails new <app-name> --database=postgresql` will set it up to use PostgreSQL rather than the default SQLite.

Your workflow might look like this:

  1. Run the generator command. Write the generator command down in your notes
  2. Decide you need something. Grunt, Sass, whatever.
  3. See if there’s a generator command to automate introducing it into the project
  4. If so, blow away the project directory, re-run the generator command with the added feature.
  5. Edit your notes to include the new generator command. Make sure you note down what each switch does.
  6. If not, then make another section in your notes to describe how to add the new feature.
  7. Go back to step 2.

It’s a good idea to study the generator documentation before you do this so you’re not in the position of having to blow away non-generated additions in order to add new generated ones. But redoing them gives you the opportunity to iterate your procedure, so I don’t sweat it too much.

If you’re feeling froggy, learn how the generator system works, then you can make your own plugins. If you’re feeling super-froggy and want to give back, start a public project and push them out to the world. This is heads and tails harder, and not falling in the realm of “increasing convenience,” so yeah.