Hello,
I installed Ubuntu a few months ago on my work laptop and I’ve been running and loving it since.
However, I am used to VsCode, so this is what I am using in Ubuntu as well.
So I am curious, what kind of coding so you do? And what is your workflow.
I am an embedded firware developper and mainly use C. I am cross compiling my code in VsCode for a FPGA from Xilinx (dual core arm + PL)
Never dove into make files and cmake more than what I needed in the past, but I had an opportunity to learn CMake and build a project from it.
So my workflow is :
- Code in VsCode
- Build in CMake
- Transfer the app through scp on the target with a custom script (target is running petalinux, which is yocto + Xilinx recipes)
- Use gdb server to debug the code.
It’s a pretty simple workflow, but I’d like to know what you guys are running so that I can maybe upgrade my workflow.
- Code in VSCodium
- Code in Kate to keep thing fresh
- Code in Nvim because I still need to learn it
- Cry while debbuging a React app because the error messages aren’t very good
- Wish I were working with Svelte or had enough backend experience to switch to being a backend dev
- Play with terminal configs and shell scripting to distract myself from my woes
- Rinse and repeat.
Aside from the (not so much) jokes, give VSCodium a try, it’s to VSCode what Chromium is to Chrome, and works just as well.
Ooh. I did not know about vscodium! I’ve removed vscode and installed it on my Mac. Thanks.
You’re welcome! Hope you enjoy it~
I will look into VSCodium. I’ve heard a little about it, but I couldn’t tell you what is the difference between the two.
Microsoft develops vscode as open source, but compiles it with proprietary telemetry tooling.
VSCodium compiles from the same source code but without the telemetry
Then i will definitely switch. Are the VsCode addon compatible with VsCodium?
They are, but some might not be available from the extension store. Usually copying from vscode extensions folder works with no issues in my experience, but search the Codium store first just in case.
Alright, I’m going to install VsChromium next monday and switch over. I don’t use a lot of addons, but I’d like to have my most used addons
Copilot doesn’t work on VSCodium from my experience.
There is, or was, also code-oss. Can’t remember all the differences though
BUT, it is not made by the same people who made VSCode. Completely different team.
Am I the weird one that just uses jetbrains for everything?
Isn’t JetBrains a paid suite? I’ve heard a lot of good things about it, but since my workflow is basic, VsCode was always the choice wherever I worked.
There is a “community edition” which is free.
It’s also open source but only for java.
It’s not just Java. It supports a few other languages as well. I am pretty sure it supports Rust, HTML, JavaScript and maybe a couple others. It doesn’t support Python, Go, PHP, C/C++, or Ruby (as they have separate products for those).
I do too. Nvim for text editing, vs code for the occasional one/two file script, jetbrains for anything more extensive
Nope - that’s exactly my workflow too.
IntelliJ for Java and Rider for C#. VSCode for everything else.
I use it too. It’s very good if you prefer an IDE and one stop shop for it all.
JetBrains, the refactoring tools are much better than any alternative, and that is a great productivity booster. Also, it has excellent remote support. Mainly at the moment, I’m using pycharm and clion.
JetBrains with vim bindings for me.
I’m an old school emacs guy, I prefer that for c++/python/etc and run KDE Neon because I like KDE and I’m used to ubuntu (and Kubuntu has some issues). For c++ I use CMake, google test. Not really a fan of docker etc. but I have used Kubernetes and docker in the past. Those types of containers just create new and more complicated problems than just testing on the target platform, but in some niche cases it can be useful.
I can’t stress enough how awesome emacs is, but it takes a serious investment to get efficient with it.
emacs with magit and meow are just amazing efficiency add-ons to my workflow. when your tools just get out of your way and keep you in the flow, it’s much easier to stay productive.
How long did it take you to get comfortable with emacs? I have it installed on my work laptop, but it was daunting to use when everything was new to me.
I can’t use containers with my target platform since I only have 64Mb of qspi flash and 512Mb of Ram. So it’s baremetal for me, but i’m used to that.
- Code in Emacs
- Create a Nix Flake for building my Environment
- Build with whatever buildsystem the language requires, often Stack or Cargo
- Package for nixpkgs
Never heard of the points 2 to 4, so I will look into it.
Transfer the app through scp […]
I use an ad-hoc while loop in a shell with
inotifywait
to wait for changes in the watched directory and thenscp
it.That’s clever. I’m not used to shell scripting yet, but I really like that it is easy to automate things in Linux. If you can run it in terminal, you can script it.
Tmux + nvim for editing code and bspwm for a fully keyboard only workflow. I have some keybinds in tmux to open a new pane and run cargo or whatever command is necessary to run the code.
How long have you been using nvim/vim in general?
I have to use vi/vim from time to time for basic editing (like on petalinux for example), but it is quite intimidating to get into. I’m already over my head right now, so adding a new learning curve might not be the best timing.
I had to use vi for work (only editor installed on the servers), and it snowballed and now I can barely type in anything that doesn’t have vim bindings.
The first few days were pretty rough, but I learned the absolute minimal basics, and then just organically learned features as I needed them/whenever I felt like what I was doing was tedious, and there had to be a better way. It’s been about 10 years, and I’m still learning!
One small suggestion, check YouTube for videos of people showing off vim features, e.g. https://youtu.be/5r6yzFEXajQ. You won’t remember everything from one watch, but it’ll help you see what is possible/how powerful vim is, which can guide your “this is so painful how do I make this better” searches down the line.
Here is an alternative Piped link(s): https://piped.video/5r6yzFEXajQ
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I’m open-source, check me out at GitHub.
Someone suggested vim adventures to learn vim so I will look into that for sure. I really like the proposition of the Vim.l workflow, but I need to set time aside right now that I don’t have. But once my project is started properly, I will definitely dive into Vim
arch with vsc or jetbrains
I’m also running Ubuntu as my main machine at home. (I have a Mac and do Android development for my day job).
But at home, I do a lot of website and backend dev.
- Code in VSCode
- Build using
docker buildx
- Test using a local container on my machine
- Upload the tested code to a feature brach on git (self hosted server)
- Download that same feature branch on a RaspberryPi for QA testing.
- Merge that same code to develop 6a. That kicks off a CI build that deploys a set of docker images to DockerHub.
- Merge that to main/master.
- That kicks off another CI build.
- SSH into my prod machine and run
docker compose up -d
Neovim for me. There are so many plugins to make the editor behave exactly as you want.
I really want to get more into neovim, being able to host the backend service and just point to it from other servers seems super useful for me!
I mainly use Python, so my workflow is the same on every OS: Neovim and a shell, usually one of each in a vertical split. This transfers nicely to remote SSH sessions too, and even works in Termux on my phone!
Have you investigated whether it’s possible to test your cross-compiled builds in Qemu, rather than copying them to the host?
It’s possible to use QEMU, but since my primary goal is to use the hardware (GPIO, ADCs, SPI, etc.), it isn’t as useful for me in that case since I want to physically interact with the board. There is certainly a point where I will use QEMU more, but for the moment, it’s not practical.
I usually hack stuff together with vim and tmux (I know, it’s redundant but Ctrl b is just a reflex at this point) when on a remote machine, but I use vscode at work and recently discovered the remote mode for Linux development… It’s pretty awesome, like not anything you can’t set up with vim or emacs, but it’s seamless remote development if you already like to use vscode
I would like to do remote dev directly on the target, but it only has64Mb qspi Flash and 512Mb of RAM, so I can’t install any modern development tools without exploding my 64Mb.
I cross compile with arm-linux-gnueabihf-gcc so I at least don’t need to use the awful Xilinx IDE.
Since we’re not sure yet if we will keep our current hardware for 1.0, but not tying my project to a vendor tools, I can easily switch my custom scripts for the new hardware.
Hmm are you compiling code? Sounds like the kind of platform that shouldn’t host its own build tools. For that kind of setup I would consider building a remote dev box that can push to / debug the target platform? Maybe even control power to reset the dev board.
I cross compile then push the program through a scp and start gdb-server with a script.
The remote dev box is a good idea because I can use any computer to access it and still be able to push code. I will look into it.
I work with backend web development, so running code could not be any easier, normally there’s a docker image setup watch for changes, recompile and execute.
My text editor is Kakoune, after learning the keybindings I just cannot go back to vim or vscode, selection based editing just makes so much sense to me.
I use NixOS, which comes in handy for keeping my home and office computers in-sync. I also use nix shells to declare the tools necessary to develop each project.
As for window management I use sway, one big window for kakoune to the left, other terminals for docker/tests/git to the right.
I tried to get into window management but it was a bit much at the time. I will retry soon.
I have one big 48 inch 4k screen, so a window manager will definitely be a big plus.
I’m the only Sublime Text guy here, I guess. Mostly with extensions for formatting, linting, and detecting compilation/type errors. I work with all kinds of languages, mostly interpreted. Python, Rust, Bash, JS/Typescript, Solidity, and a smidge of others so it’s hard to pin down one workflow.
EDIT: Just wanted to add that it’s really cool to see the diversity in the replies. This here is the power of Linux.
- Setup my vimrc.
- Clone the project, and realize that whatever repo managing system they started using 3 years ago requires setup steps not in the README and breaks everything at the slightest touch.
- Build the currently relevant project in whatever build system they started using 3 years ago (CMake is quite nice).
- Fix my vimrc to be compliant with whatever tabbing they use.
- Realize that for some reason, someone made a commit in the file I’m reading that uses 3 space tabs. And worse, someone approved that PR.
- Make changes via vim.
- Debug via print because setting up gdb or JTAG on embedded systems is usually more effort than its worth.
- Realize it’s a timing issue and reluctantly go find the JTAG debugger.
It’s funny how the JTAG debugger should be the first thing that we use, but just like you, I don’t want to use it until really necessary.
But the moment I setup everything, then I wonder why I’ve waited so long to do the setup haha.
I vehemently dislike coding directly on my workstation and do all of my development in remote VMs via SSH, when possible. My work MBP is a glorified SSH terminal with a web browser. I got my start in the industry with remote SysAdmin stuff so, it feels pretty natural.
For an IDE, I use Neovim, currently with a plugin distribution - Neovim because I got used to the vim syntax as a SysAdmin and the distribution because I can’t justify sinking more time into tuning my env for a bit but am intending to scrap it all around the holidays or so.
Most of my work is in Go or Python. At home, it’s a mix of CircuitPython, C, and I’m picking up some Rust (mainly embedded for C and Rust). Will be starting to learn Verilog this weekend.
For Go and Python, I tend to lean towards a TDD approach, even if it gets a bit derided by coding streamers.
My workflow tends to be:
- Prototype desired functionality to get at least individual parts working.
- Start from scratch and rough out any classes/structs and test suite boilerplate.
- Start the red->green->refactor loop, giving extra granularity to parts of code that I am less confident in.
- Once all intended functionality is implemented, run manual tests (I generally develop tools).
- Fix bugs that unit tests failed to prevent or I failed to anticipate.
- Repeat 4 and 5 until acceptable.
- Prepare commit.
- Push commit and receive failure because I haven’t fully configured my formatters to clean trailing whitespace and VT100-compatible line lengths.
- Push commit again and send for code review.
Currently, my build automation is kinda in CMake. Really, the Makefile is just calling a build in a docker container.
For C, Rust, and Verilog, I’m not yet familiar enough to have yet established workflows.
ETA: I think I just got the same FPGA as you! Xilinx Zync-7020 (Digilent Arty Z7-20).
Almost the same FPGA, we use the Mars ZX2 from Enclustra which uses the zynq7010.
The TDD approach is a hard sell to companies because it’s hard to quantify what time is saved in the end and the MBAs of this world have a hard time with that.
I think that some companies and devs also have a bad taste in their mouth due to overzealous adopters and policies, along with using mocks that are not necessarily going to maintain parity with their production counterparts. Some things are a bit silly to test and mocks like that are going to introduce future technical debt.