3 ms·
- Version control - Unit testing - Leak detectors (for languages like C/C++) - Race detectors - Auto-formatting (eslint, gofmt) - A solid editor (prev: vim
by zeroxfe 6y ago
- Version control
- Unit testing
- Leak detectors (for languages like C/C++)
- Race detectors
- Auto-formatting (eslint, gofmt)
- A solid editor (prev: vim, now: vscode)
- One-step deployment scripts/automation (even for small projects)
I have not found a lot of value in debuggers, outside of after-the-fact debugging (e.g., core files.) I much prefer printf-style debugging.
- xcubic 6y agoWould you go into details about the one step deployment?
- zeroxfe 6y agoI usually have a shell script called 'deploy.sh' that does a bunch of git, test, deploy stuff. So part of my development workflow is calling "deploy dev", "deploy staging", and/or "deploy prod" to push any changes to the dev/staging/prod environments. The script makes sure changes are tagged, committed, and pushed, tests pass, builds and pushes container images, static files, and then rolls out binaries. The rollouts depend on the infrastructure -- it could be something like scp + kill/restart, or a kubectl command, or "gcloud run deploy", etc. One-step deployments vastly improve the quality of the service because I can test things in real environments quickly, push out patches and bug fixes quickly, keep updates small and bounded, and bonus, I can come back to a codebase months later and not have to re-learn how to roll something out.
- xcubic 6y agoFor a while I used pm2 to deploy stuff. It's honestly a nifty little tool but I'm moving away into a docker based solution. Initially I was thinking into having a CI build the images and push it to the server and so one but for my personal projects, it's too much. So I might just do a bash script to build the image, push it to the hub and then connect to ssh to pull the image and restart. Regarding your script, could you share a template?
- nickysielicki 6y ago> I have not found a lot of value in debuggers, outside of after-the-fact debugging (e.g., core files.) I much prefer printf-style debugging. Have you heard of/tried rr? I think you might find that it fits your thought process better than traditional debuggers. https://rr-project.org/ https://rr-project.org/
- zeroxfe 6y agoNever heard of it, but I'll take a look. Thanks for the pointer. :-)