Hello guys, it's me again today I'm going to show you what's my setup for a Linux machine take in mind I'm not talking about a RPI or a server, I'm talking about a full flesh developer's pc, for this example I'm using a computer with ubuntu 19.10 installed.
Most of this are just small lists so you know what they are, and I will add a command or two while write them (Most how to install them)
Packages
Here you will see some programs that they are easily installed with apt, that is why i decided to separate packages and software.
build-essentials
If you didn't knew, build-essentials is literally what it says, the essentials to build a lot of software, mostly I use it to install g++ and gcc, c++ and c compiles and make, software used to make a compilation more human.
sudo apt install build-essential
python3 and pip3
When i finnished my programming course on college, the first thing I tried to learn was python (I did good i think), and looking that python2 is getting deprecated this year, why not python3? Mostly I use it when I'm trying to learn ML and Django (never quite understood Django)
sudo apt install python3 python3-pip
Node.js and npm
I mean... come on? node.js and npm are like the heart of tons of projects now a day, with web development trying to replace software development, I use this two for most of my web projects.
sudo apt install nodejs npm
Expo
I use expo for quick and dirty react native apps, for me is the best absolutely, you should give it a try if your pc isn't really powerful but you want to make apps.
sudo npm install -g expo-cli
CRA (create-react-app)
I Know its not the best, but it makes the cut plus is kind of fast, but I use it to make my react project templates
sudo npm install -g create-react-app
Git
I don't even know why i left this for the last... I mean... git man, is like the most used command I have on my pc, I dont even need to let you know what i use it for.
sudo apt install git
Vim
I like to experiment with server and stuff, and most of the times they have a "sudo protected" file and I need to edit it, so I just use vim, it can be a B!tch but I like it.
sudo apt install vim
Fonts
If you are new to coding, you might be thinking "WHY THE F!@K do I need a font for?"
Well let tell you that fonts are really important, you wouldn't like stare at a ugly font for 5+ hours right?
Fira code
So give fira code a chance, here is the GitHub page, since it depends on every OS, how to install them.
Fira Code
Edit
A good friend of mine did this tutorial
Installing FiraCode on Windows and Ubuntu
Josué Rodríguez (He/Him) ・ Jan 13 '20
Software
VS code
I use vs code as my main code editor,I think I don't need to elaborate. I installed it from the Official Site
Thunder bird
I use thunder bird obviously for my emails, It was my first email app, and its still going, you can actually install this one with a command.
sudo apt-get install thunderbird
Random programs I use (You might like one)
- Popcorn Time - I Love watching movies (not while coding though...)
- Transmission - Illegal stuff you know... movies hahaha.
- Gimp - Simple to use image editor.
- Libresprite - Ok so this one my first program compiled by myself, let me know if you would like to learn to do so.
So this was my first actual "long" post, if you liked it please let me know. That way I might Start making more "long" posts
Top comments (81)
Ubuntu-fonts are also pretty nice for coding, I've tried all of them and always come back to Ubuntu's, even tho I used Ubuntu just for about a week like 8+ years ago. Doesn't have ligatures but I kinda prefer it that way sometimes ligatures hide things like == Vs === but is a matter of taste.
A kindred spirit! I don't think I'll ever be able to move away from Ubuntu fonts.
Hahahaha give firacode a change belive me you won't regret it
Yeah I suppose I should
don't let them sway yo with their ligatures!, be strong and follow the path of... Ubuntu fonts?
I don't know try them, but I suspect that you'll come back, for me is really annoying to read code in a font I dislike or find hard to read. And also, Ubuntu font is the only just the right size, with others 8 is too small and 9 too big for me.
Hahahaha neveeeeer he must come to our ligatures!
I would try them just to give them the chance, but I know I would be back with Ubuntu fonts before long. I always think non-developers must find it weird, but if your dev environment is easy on your eyes, it's that much more fun to do the work. I use VS Code with Ubuntu font, and a custom mash-up of Material Dark and One Dark Pro themes. It looks so good on my 4K monitor.
Daaamn... That sound awesome hahahah I have a 32 inch television that I use as monitor :v
I currently have 2x1080p monitors; is that 4K as awesome as it sounds? is not too much light (too tiresome)? have you found 32" is a good fit for arms length distance or would you recommend something a bit bigger? and finally, did you found difficult to find a TV without color compression? with color compression fonts get blurry but maybe new TVs don't compress or comes with options to disable it.
Well I found 32" to be fine, I had just used 4k for video games actually, and my tv doesn't make my fonts get blury, actually it's a new TV and it costed like HNL 3500 (~150 USD), but if you are using a laptop try a tv as a second monitor man there is not that much difference
I'll give it a thought, as you may know, once you add a monitor you can't take it away, to add a screen to the workflow is a big commitment. If you are not careful everything but 10 screens will feel wrong. Is like when you buy your first mechanical keyboard, after that all the keyboards that felt okay, start feeling like garbage.
I will always say one monitor is meh it gets the job done, two monitors are great it gets the work done faster and three are a overkill don't get me wrong if you can afford 3 get them by all means but two should be enough for most programmers
(Disclaimer: I used to write for a popular PC gaming website about gaming graphics and displays, so my opinions on monitors probably diverge somewhat from what may be thought of as more "mainstream".)
At work, I use three external 1080p monitors in a line, and my laptop's 15" 4k display. I keep my console (putty/bash and chrome dev console) window up full time on the leftmost display, vs code on the next, Chrome and other apps (db tools, etc.) and outlook on the laptop screen. It works pretty nicely.
At home I have just a single 27" 4k display, and while it is really nice for smoothing font edges, you have to scale everything up at least 50% to keep icons and text from disappearing, so I tend to think 4k is wasted for coding on a desktop monitor. High-DPI scaling works really well in Windows 10, but not so great in any linux distro I've used. They mostly limit you to whole number scaling (100%, 200%, etc.), and the scaling is far from global/universal. Windows is also not completely universal, but at least you can do 125% or 150% without having to do anything special. It actually defaulted to 150% on my 27" display.
Anyway...point is, if you have more monitors, you'll find something to put on them. I keep (only half-jokingly) asking for 2 or 3 more at work. The primary benefit is always having various windows open and On Top.
is like the size of drawers, closets or pockets. You'll never have too much space, only too much stuff on them. But they are also like cake, nobody "needs" cake, nobody "need" 3 monitors (well maybe some). But we want them anyway :)
I'm rockin three 28" monitors. It's a pretty sweet setup, if I do say so myself.
I use Ubuntu fonts with ligatures (from Fira) thanks to github.com/ToxicFrog/Ligaturizer
Ok, I think that settles our little nonsensical and almost cult-like discussion of the thread above, thank you very much (ironic) I guess we'll have to go back to Xorg Vs Wayland, Vim Vs Emacs or something like that. Or are you gonna rationally solve those too? ugh
PS: So the fonts work well? no weird characters sometimes?, asking for a friend, I'll tell him to try them...
For me it did man
damn
I have used ubuntu's too, but actually I'm exactly the opposite I need the ligatures hahaha I loved them, that's why I recommend fira code, there's some really good. But they are paid...
For web dev, I'd also recommend:
pytest
,jest
,cypress
... Software that isn't tested is broken as designed.Docker is invaluable, because of your reasons and also to easily try versions without making a mess with your system filling it with a bunch of libs, programs, config files, etc. And gives you freedom to use whatever weird distro you like (if you work in Linux) instead to be tied to something similar than your target.
I agree on this, sometimes getting tons of libraries on your PC is not the best and it can help
I love them all, you know I have just used jest. I have never used a test on any other software hahaha, oh and ci just for expo
Jest is great for unit tests, and some integration tests.
Cypress is amazing for end-to-end testing. I love watching it open a browser, and interact with my site in a full-fledged UI.
Biggest reason tests take time away from dev sometimes is because of how much I just love watching them run 😅
I can tell that I do love watching them, but I don't think that they are necessary 100% especially if you are testing while coding,
I have used jest for integration, but never for unit.
Over the course of years programming with linux, I've gone through a lot of stuff. But there's always some new stuff that when I give it a go I can no longer do without it, here are a few recently discovered utilities that are definitely staying for the win:
RipGrep: Search through files for a pattern at lightning speed
github.com/BurntSushi/ripgrep
fzf: Filter search results with ease
github.com/junegunn/fzf
z: Jump easily and quickly between your most often used directories, without all that cd nonsense
github.com/rupa/z
tig: Terminal interface for git, pretty sexy and usefull, I would recommend adding an alias
tig='tig status'
as it starts by default in tree view, but most of the time what I want is to see current status and prepare to commit.github.com/jonas/tig
Forgot another of my favorites:
Bat: A
cat
replacement with syntax highlighting, you'll never usecat
againgithub.com/sharkdp/bat
Damn! All of them sound amazing, let's hope beginners read the comments and see this one
I love powerline for my terminal, especially seeing what branch and/or virtual env I'm in: powerline.readthedocs.io/en/latest/
If you write in Python you can't live without virtual environments. So virtual environment wrapper is essential: pip install virtualenv virtualenvwrapper. I know python3 comes with venv, but I've never invested enough time to figure out if virtualenvwrapper still works with that, and I can't live without virtualenvwrapper.
People have already mentioned docker, but I just like to point out that even if a docker image is not your final artifact, they are a great tool for allowing any developer to run your unit tests regardless of how they have set up their development system, specifically OS (now that docker is on the big 3). And anything that allows your developers to run your code in a repeatable environment will save time, and that very same process can be used on your CI/CD server.
I haved never seen powerline, but now I love it hahaha, you know I think is an old habit of not using virtual environment when I was leaning python people always install everything global, I haven't used any virtual environment for that, but I hope I can give it a try, oh and docker... I know... I know haha it's that I don't always do unit testing so I thing right now is not necessary plus it's a beginners tutorial
Well, I am 20 years into this and if there is one thing I could advise beginners, it's to write your unit tests from the very beginning. It's far easier to update a unit test than it is to take time out to write unit tests for an entire code base that is lacking them. And in languages that are interpreted instead of compiled, such as python, it's your quickest and easiest way to catch simple logical errors. And you get syntax and typo checks for free. Add in linting, and you have a simple workflow that produces an incredibly low rate of bugs. Saving time is the name of the game.
As for the virtual envs, I also see this as a way to reduce bugs - specifically dependencies in setup.py. While working, one might determine they need a library, install it, write the code, and move on, forgetting to add it to a requirements file. Creating a new virtual env from scratch to run your unit tests right before you push to git removes the potential for missing dependencies. And you can roll that whole process up into a script. I create an env, run pytest, run pylint, run coverage, run an HTML report, and destroy the env all in a bash script. That, or run it in a fresh docker container.
Have you been using unix long?
Pure Unix, no. We had a few Spark boxes at the beginning of my IT days. But soon after everything was Red Hat flavor Linux. By the time I had migrated into software development, Ubuntu was gaining popularity. Not sure the IT department ever left RH, but cyber devs did favor Debian-based.
Great post David! I love reading detailed and concise posts like yours ;)
I'd like to recommend to install "nvm" instead of the node binary, since you may find some projects where your node installation needs to be an older version o newer. With nvm you can manage your node versions with ease.
Btw is nice to see other latam folks here on DEV, keep it on!
Thanks for the compliment, its my first long and concise post, but I see people liked it so I might write more,
You are completely right for the nvm but I didn't included just because of the simplest way for a beginner to start.
Btw Honduras here, where are you from?
Well yes, I agree with you on the nvm comment, although when I started I wish i had learn to use nvm first haha.
And yes, congratulations on all the positive feedback you are receiving, I hope to see more posts of your authorship.
Mexico here, saludos :D
Thinking about it... they are some times i needed an old npm... you are right hahaha
I just posted a quick tutorial on makefiles, and I had one on readme files just in case you are interested
Saludos Mexico Ten una buena semana amigo :D
My recommendation, XFCE4-Terminal. I've tried all terminal emulators available in Linux through the years. From the heavy Konsole to the light st and let me tell you; XFCE4-Terminal is by far the best for me, dropdowns don't work for me, I always hace 20+ open terminal, to open videos, play music, code, write documentations, testing, read news in RSS, etc.
If you are concerned about RAM, with 20+ open terminals XFCE4-Terminal eats less RAM than st, has transparency (I use tiling WM so I like to see my wallpaper once in a while :) ), has included scrolling (I'm watching you st), is fast, stable and resizes text with the window. And has a reasonable dependencies (I'm watching you now Konsole). Others to consider are Alacritty, which is very fast but consumes a lot of RAM, if you don't open too many instances is no problem (20MB Vs 70MB is not much difference) only with an unnatural amount of open instances becomes a problem, and is because has no deamon mode which is a plus because is one falls doesn't affect the other instances, but XFCE4-teminal never falls anyway.
damn... this a 100% hardcore hahaha i love how you use more than 20 terminals, I means tops i use 4 or 5 never over 10, I respect that...
I don't know, most of the time is insecurity, will I still use this?, maybe, let just get another terminal..., unwatched yt videos, paused music, etc.
I guess sounds fancier than it is, is just the fact that my current uptime is 60 days, sounds impressive but is mostly laziness and not updating kernels (I think I have 3 piled up) and I haven't been in the mood update them so why bother rebooting, just suspended at night.
Usually things that sound awesome really are not; openbox because I was awesome? nope, low RAM, after that i3, now because I was awesome? nope again, for a while I didn't have space to work with a mouse and my old touchpad was awful so, avoid mouse it was: ratpoison > awesome > xmonad > Qtile > i3 and I got used to it so, that's what I use it now.
Everything CLI?, low RAM again and again got used to it. Same with RSS that allow me to close about 10 browser tabs, my bookmarks are a black hole mess, so if I close a tab is dead to me and only destiny will lead me back to it, so a lot of tabs, a bunch of RAM that seemed precious to me before, I know..., don't overthink it.
Even my overpopulated Conky/i3 status bat is just to keep RAM and CPU at bay.
man sometimes laziness is awesome! hahaha
As many people have mentioned, if you're working with node, a node version manager is essential, since you may have different projects that require different node versions.
Most people recommend
nvm
. I usednvm
for a very long time, until I found nave. I definitely prefernave
now. For each project, I can create a.naverc
with the required version. Then, when I start working, I donave auto path/to/project/root
. It creates a subshell using the required version ofnode
, and when I'm done, I can just exit that subshell, and I'm back to my preferred version ofnode
.I'd change nodejs to nvm.
It will make your life really easier if you need to switch node versions.
I know, but for the simplicity of the begginers I just putted npm, I don't think that they would download someone's else project right away
I've seen a lot of people finding out about nvm way too late, leaving pain reinstalling node. Because sometimes even minor versions matter. In the ruby community, they learn about rvm right from the start. And I've noticed a lot of people suggesting it here from real-life experience. So I guess it would be great if you could edit an article. Don't get me wrong, it is awesome, but may be even better. Cheers!
I'm surprised nobody mentioned tmux yet. Tmux is a terminal multiplexer, so it allows you to have split panes, multiple "windows" and more importantly, it allows you to disconnect from a session, then reconnect to it again and never lose the status of any of your screens.
By far my favorite development environment tool of late
Good advice.
I don't use Ubuntu but can't deny it's one of the favorite distros for developers.
I use openSUSE Leap and would recommend
Damn... All of those are great, I haven't used opensuse just because I didn't liked the DE but your recommendations are great, I Always have snap on my ubuntu's by defualt so that's why I didn't mention it hahaha
;)
The distro is not relevant. openSUSE allows many DE: Gnome, KDE, xfce, etc.
I worked with Ubuntu for a while, but couldn't get used to Gnome, but I used Guake, linuxbrew.
Something we forgot to mention is the browser. =|
Also the musicplayer =D My usual is Clementine which is lighter than Amarok.
You are right... Should I added now? I mean I use Firefox and rhythmbox but I can add them