Hacker News new | ask | show | jobs
by invisible 2246 days ago
I'd love to hear if anyone has an example of a great dev experience/environment/workflow? It seems like they are all hacky or bad in one way or another.

Some general things I'd quantify as making a "good" environment:

- The time from saving a file and seeing the change should be low

- Running the environment is complete, just like production/staging

- Database schemas are reproducible and in a single location

- Intermittently issues due to differences between machines are nonexistent

- A debugger can be hooked up to the process or otherwise remotely debugged via network

- Very little configuration necessary

- Ability to use third-party APIs for integrations and infrastructure dependencies

- Any crons or async tasks are easy to run

- No other arbitrary limitation on access that get in the way (it is just audited if necessary)

- [If allowed] production data can be pulled in for testing

1 comments

I've built it a few times for smallish startups.

1. Build tools/dependencies from source on macOS and Linux

2. Use an OS agnostic init (supervisord)

3. Automate machine setup and deployment in something like Ansible or Saltstack

This allows you to bootstrap a bare macOS or Linux system with a smallish shell script and run all the necessary services in the same way they'd run on production. You have very little specialization between production and dev -- like in the cloud you just run Postgres, you don't use RDS on Amazon.

Coincidentally this makes supporting multi-cloud or bare metal very easy since you don't use anything that's really special in any cloud. Like I would run our main thing on ec2, but CI/dev workloads on Linode where I can get cheap VMs.

Most of the piecemeal automation - migrations, cron were just tools written in python - some were daemons, others just scripts that ran during a deploy.