top | item 19680491

Ask HN: What does your development stack look like in your favorite language?

62 points| appleflaxen | 7 years ago

We are living in an incredibly time with respect to programming languages; the choices and diversity available are amazing. But it's often difficult to get up and running.

What's your recipe to get from a fresh OS install to the minimum viable development environment to do "real" work (not just a helloworld program) in your favorite language?

(include as much or as little detail as you want)

57 comments

order
[+] goodells|7 years ago|reply
I use macOS as a development machine but usually deploy code to a headless Ubuntu Server instance in the cloud.

Primary API server development is in Elixir since it’s just an elegant beast and can handle the vast majority of “pure” business logic.

If I need a database, in-memory store, or anything that can run in Docker I use Docker compose to run it. If it needs a bigger box or something managed in production I’ll just use whatever the hosting provider exposes (e.g. DigitalOcean’s Managed Databases).

Some stuff like bulky user data, random binary files, etc. goes to AWS S3.

Automated tests are developed alongside features and get run with GitLab’s continuous integration. This configuration usually reflects the dependencies that are run in Docker in development, but sometimes for low-impact tests I’ll just have it hit stateless production services.

Documentation gets auto-generated by Elixir’s ExDoc, or whatever language’s mainstream solution. Generating this for production documentation gets handled by GitLab CI of course.

Clients that hit the API are variable based on my needs but I usually make a React + Redux SPA or something in the Unity game engine. Web development is always set up with Gulp so that I can run and forget about whatever Webpack, Sass, and the files are doing underneath, it just updates automagically. Depending on the size of the project I often have multiple clients accessing overlapping subsets of API actions.

If this sounds like what your company is using or wants to use, please feel free to reach out at sam (at) mangane.se (I am in the USA even though the TLD is Swedish).

[+] jermaustin1|7 years ago|reply
1. Install Windows 10 Pro 64 (15 minutes or so, possibly shorter) and run updates.

2. Install Firefox and Chrome

3. Install Git

4. Install Visual Studio

5. New Asp.Net Core Project with MVC

6. a few hours later get bored and install Netflix and turn on the Office.

[+] iLemming|7 years ago|reply
- install git

- install Emacs

- clone my dotemacs repo

- clone dotfiles repo with a single org file (that comprises my entire machine configuration)

- Run M-x org-babel-tangle. That "extracts" all the dotfiles - gitconfig, bash settings, mail, environment variables, language specific settings. Depending on the machine, either Linux or OSX specific settings, etc.

See, my entire machine configuration is an immutable thing - whenever I need to make changes I'd do it in my .org file and run org-babel-tangle.

[+] junpertoo|7 years ago|reply
Do you have a link to a description of this? It sounds like a great way to manage dotfiles with actual context.
[+] greggirwin|7 years ago|reply
Most responses so far support your view that it's difficult to get up and running. So many pieces and parts, which doesn't just mean getting an MVDE up and running, but learning and using all those tools, libraries, polyglot-based environs, and domains they each inhabit. The fact that you asked this question is telling.

As far as choices and diversity, how different are things, and how have they changed from what we had 25 years ago? That sets the context for my answer.

My language of choice is Red, a direct descendant of Rebol. You've likely never heard of either. And Red is still Alpha software. That doesn't mean we don't do real work though. In the spirit of full disclosure, I am part of Team Red, so I'm biased. :^) One of our taglines is "Fighting Software Complexity", which is what makes software development so painful today. The sad part is that it's not necessary (at least in most cases). I'll try not to evangelize, because anyone using any tool or language to fight software complexity is on the right track in my book.

Reducers (what we call Red Users) have widely varying setups, as Red is cross platform, with syntax configs for a number of editors and VSCode plugin. Any editor will do.

I like the short responses a couple gave: `PyCharm` and `Go+Plan9Port`. Simpler is better. Red falls into that category, as you just need to download a single 1MB EXE, which contains the entire toolchain. It will self-build GUI and CLI REPLs from that. Cross-compiling and a cross-platform GUI system are built in as well, not separate. No dependency on GCC, CLANG, JVM, or others (though we may add an LLVM back end, and compiling service to use it, this year).

We'd like to be even smaller than 1MB, but want to include useful features too, so it's a balancing act. We also give up features others get for "free" by resisting external dependencies. This comes back to avoiding difficulties. You can compile Red apps that have no external dependencies themselves, and will be ~1MB (I won't go into Red/System here, but it's like C in EXE size and speed). This is important if you consider deployment as part of real work. How do you deploy your apps? In the case of Red desktop apps, you just give the user an EXE.

That's about as non-evangelistic as I can get it seems. :^) This isn't meant as an ad for Red, but to provoke more thought about our entire ecosystem mindset. We can have recipes for swaths of tools and libraries, but how big is the entire dev/deploy/runtime system, how many places can things go wrong, and how much do you need to know to keep it all working?

Good question. Thanks for asking it.

[+] droptablemain|7 years ago|reply
If I needed to build a quick app that I would feel extremely confident with, I would launch a Digital Ocean droplet running Ubuntu or similar and set up Nginx / MySQL / PHP.

I would use Lumen (~Laravel light) to build the API, probably using JSON web tokens for authentication.

For the front-end, I would spin up a Redux-less Polymer build (web components) with a service worker.

That would probably be my go-to stack, because I know it very well and can develop rapidly in that context.

[+] keepitsimlpe|7 years ago|reply
I do mainly macOS and iOS development. In the last 20 years, I don't remember ever doing a fresh install because I just haven't needed to. I simply install (well update) macOS and Xcode. That's it. That's everything I need to do my development. Honestly if I needed more, I don't think I'd bother anymore. I'm amazed at the sheer number of extra crap developers on other platforms are forced to install just to be productive.
[+] alkonaut|7 years ago|reply
- Windows 10 (What can I say I play games on my big beefy desktop and I’m not going to run another OS for coding).

I code in 2 envs

- IntelliJ Idea + IntelliJ Rust plugin (steps: install+run rustup, install IntelliJ, install Rust plug-in)

- Visual Studio + C# (steps: install vs, Done)

Mostly low level techy things like audio plugins, raytracers and similar.

For the occasional (rare) web project I do backend in one of the above and frontend in vs code, using whatever framework became most popular that morning.

[+] kbd|7 years ago|reply
I keep all my config source controlled and have my own setup program that creates symlinks and so on, along with a "bootstrap" script that starts from a clean Mac and installs and configures everything I need:

https://github.com/kbd/setup/blob/master/bootstrap.py

There are still some things that are manual:

* some macOS settings that can't easily be set via "defaults write"

* VS Code makes it hard to source control its settings, so I use the settings sync extension, but that requires manual config of the gist id and access token. It's super frustrating that a programmer's editor makes it hard to source control its settings!

* iterm2's config system is frustrating as well, with user-level config (eg. colors) mixed in with things like window positions and "last time checked for updates" timestamps. So I pretty much set up my last good config for it and then run 'git update-index --assume-unchanged' on its config so I don't have to see the file constantly dirty in my repo.

[+] pritambaral|7 years ago|reply
My own machine if possible, ask for ThinkPad or Dell XPS Dev. Ed. if client insists on their machine. Worst case, for short periods: anything with a decent keyboard.

Arch Linux on my machine. Kubuntu latest (LTS is acceptable, if not preferred) on client's. Worst case, for short periods: anything close to Linux with an up-to-date stack (say, homebrew on macOS).

ed25519 SSH keys, preferably my own. ssh-agent (GnuPG, when on Linux) with compulsory confirmation on every sign. SSH certificates a must for host authentication, preferred for client authentication.

ZeroTier or Wireguard strongly preferred for VPN access to client networks. OpenVPN et al. begrudgingly accepted, but only for short durations. TeamViewer et al. strict no on own machine.

LXD and/or systemd-nspawn for containerisation. Docker strict no on my machine.

Terminal Emulator: Konsole or Konsole-based if possible. Worst case: anything with decent colours and keybinding support.

Font: Whichever suits the display, resolution etc. the best among: Iosevka (family), Hermit, and Fantasque Sans Mono.

Editor/IDE: At minimum — Vim or Neovim; Preferred — Emacs 26 with own spacemacs-based config.

Version control: Minimum — git; maximum — magit.

Plugins: On vim/neovim — few, if any, in-editor plugins; on Emacs — custom config tuned for specific stacks; Out-of-editor — stack-specific CLI tooling.

Almost every stack I use I try to stick as close to latest vanilla as I can (e.g., C/C++ is just ordinary text editing with compilers in -Wall -Werror etc. modes). Some stacks that are somewhat non-vanilla:

Python: 3.7 strongly preferred; 3.6 begrudgingly accepted; 3.5, 3.4, and 2.7 only for legacy maintenance. flake8, pylint, et. al. with possible Emacs integration. Sphinx (with a tuned config) for documentation, autodoc favoured.

SQL & DB: Emacs's org-mode+org-babel for playing; Sqitch and pg_tap for committing.

Racket: Emacs with Geiser. Org-mode (and thus org-babel) for small scripts/projects.

Common Lisp: SLIME (with small extensions in elisp, primarily for remote editing), sbcl (always built from source and installed with sources), quicklisp (augmented with small, private dist), erudite (+ private extensions) for literate programming (rendered, via Sphinx, to PDF).

[+] fouc|7 years ago|reply
Absolute minimum:

1. MacOS or Linux

Do everything in Terminal.app Configure it nicely: grey on black, 13pt monaco, etc setup shell w/ tab completion (bash or zsh & oh-my-zsh)

2. Install homebrew (osx package manager) 2a. brew install git 2b. brew install vim (optional, nice to have newer version)

3. install vim-rails (which gives us syntax highlighting for ruby & js)

4. use rvm to install specific ruby versions etc as needed.

Ready to work with ruby, rails, javascript.

[+] davemp|7 years ago|reply
Getting up and running on a Linux environment after the first time is pretty fast. Here's how I'd set up a new machine for C, CPP, Rust, and documentation

- install arch (partition, video/wireless setup, etc)

- pacman -S i3-gaps polybar termite compton base-devel gdb rust vim firefox pandoc textlive-most evince git

- git clone mydotfiles.git && sh mydotfiles/install.sh

[+] ptrkrlsrd|7 years ago|reply
I'm a full stack developer who usually work with Go, Rust, .Net Core or Haskell + some frontend stuff. I got two laptops for development, one running Arch and one running MacOS and often switch between them.

1. Install Emacs, kitty and Neovim

2. Clone dotfiles and my Doom Emacs config

3. Install Go, Rust, .Net Core and NPM

4. Install Docker and kubectl

5. Get my secrets from my secret source

[+] nickjj|7 years ago|reply
I use Windows 10 Pro with WSL.

Setting up WSL (Ubuntu 18.04) from scratch to be a tweaked out Vim / tmux environment involves running 1 Ansible command.

I also use Docker for Windows but configure WSL to connect to it. I have a bunch of real world projects in Flask, Rails and Phoenix running in this environment. Switching between all of them only takes seconds thanks to tmux's persistent sessions. I'm switching a lot too since I juggle a bunch of freelance and personal projects.

Overall I'm happy with the set up. The single workstation is responsible for full time development, audio / video editing and gaming.

An up to date list of all of the tools I use can be found here: https://nickjanetakis.com/blog/the-tools-i-use

[+] oblib|7 years ago|reply
I code on a mac using BBEdit.

I develop locally on a Raspberry Pi running Raspbian and deploy to a DigitalOcean VPS running Ubuntu 16.04 or !8.xx

Both the Pi and the VPS are running:

Apache Web Server and CouchDB

My apps are written almost entirely in Javascript running in the user's web browser.

On the client side I mostly use PouchDB.js, jQuery, and Bootstrap.

On the server side I use Perl.

[+] marcuskaz|7 years ago|reply
1. Fresh install of Ubuntu

2. Clone my dotfiles repo: https://github.com/mkaz/dotfiles

3. Run install script: ~/dotfiles/init-linux.sh

Sets up dotfiles with my preferences, and packages I need for Go, Node, LAMP

[+] vlindos|7 years ago|reply
Nowadays: Typescript + React + Postgresql + Visual Code + macOS + github | Gitlab + digital ocean
[+] alxexperience|7 years ago|reply
I do API development for the web. My machine runs Ubuntu 16.04, and my work is almost completely in JavaScript and TypeScript.

I have Node.js setup, and I have TypeScript installed as my first npm package, since the scale of my work is made so much more manageable by it.

Locally, I run WebStorm by JetBrains. It has a lot of useful plugins, and it’s build in Debugger is invaluable when debugging large, complex code. I use Docker for MongoDB and Postgresql. PGAdmin is extremely valuable for Postgres.

Git is used all the time to check in code, and most of my code is self-documented/JSDoc, since I’m not really a big fan of writing external documentation unless it is user facing.

[+] hamiltonc|7 years ago|reply
My favorite configuration for my day job (big tech company, writing high availability storage firmware):

- Ubuntu

- Git, mercurial, fd-find, ripgrep, exa.

- Vim + spf13 + ctags + cscope as a fallback for text-only sessions.

- Eclipse CDT: most of my work is C/C++, huge code bases, kernel and userspace. Nothing beats CDT in terms of navigation (go to definition, call hierarchy, class hierarchy, to name a few). It's a little tricky and involving to get the indexing right, but totally worth it.

- Gdb and crash (life savers!).

For my side projects (mostly rails), it's pretty much the same as above on a mac and vscode instead of eclipse.

[+] jetti|7 years ago|reply
Using a fresh install of MacOS

1. Install Git

2. Install Rustup

3. Install Visual Studio Code

4. Install Rust (rls) VS Code extension

[+] micael_dias|7 years ago|reply
Doesn't git come with macOS