Coders, what is your workflow on Linux

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 :

  1. Code in VsCode
  2. Build in CMake
  3. Transfer the app through scp on the target with a custom script (target is running petalinux, which is yocto + Xilinx recipes)
  4. 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.

erogenouswarzone,
@erogenouswarzone@lemmy.ml avatar

I’m running Docker in Windows and have a mounted drive. I code in VSC using that mounted folder / volume, and the page shows up on localhost. Just a few simple apps to convert fixed width to csv’s and back and gives analytics on the data using jStat and tables with dataTables. Nothing fancy, but I like it.

Edit: httpd 2.4 as the Docker container.

marsara9,
@marsara9@lemmy.world avatar

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.

  1. Code in VSCode
  2. Build using docker buildx
  3. Test using a local container on my machine
  4. Upload the tested code to a feature brach on git (self hosted server)
  5. Download that same feature branch on a RaspberryPi for QA testing.
  6. Merge that same code to develop 6a. That kicks off a CI build that deploys a set of docker images to DockerHub.
  7. Merge that to main/master.
  8. That kicks off another CI build.
  9. SSH into my prod machine and run docker compose up -d
Maxb0tbeep,
@Maxb0tbeep@lemmy.blahaj.zone avatar

arch with vsc or jetbrains

under2x,

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.

shassard,

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.

Croquette,

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.

mvirts,

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

Croquette,

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.

mvirts,

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.

Croquette,

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.

lelgenio,

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.

Croquette,

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.

FermatsLastAccount, (edited )

Do Data Scientists count? I run Bedrock Linux with Hyprland WM and Alacritty as my terminal manager.

I use Jupyter Labs for almost everything. Then Emacs for anything else. I don't like the default config at all, and I'm not that well versed in elisp, so I use Doom Emacs.

Croquette,

Yes it counts. It’s far from what I do so my understanding of what you do is limited (read: I know nothing about data science).

I need to look into Hyprland WM. I tried i3, but it had a lot of errors and wasn’t working well for a reason unknown to me.

style99,
@style99@kbin.social avatar

I use Geany, so that's basically my whole workflow.

nickwitha_k,

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:

  1. Prototype desired functionality to get at least individual parts working.
  2. Start from scratch and rough out any classes/structs and test suite boilerplate.
  3. Start the red->green->refactor loop, giving extra granularity to parts of code that I am less confident in.
  4. Once all intended functionality is implemented, run manual tests (I generally develop tools).
  5. Fix bugs that unit tests failed to prevent or I failed to anticipate.
  6. Repeat 4 and 5 until acceptable.
  7. Prepare commit.
  8. Push commit and receive failure because I haven’t fully configured my formatters to clean trailing whitespace and VT100-compatible line lengths.
  9. 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).

Croquette,

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.

nickwitha_k,

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.

Marxine,
@Marxine@lemmy.ml avatar
  • 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.

FarLine99,

BUT, it is not made by the same people who made VSCode. Completely different team.

Croquette,

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.

Lucky,

Microsoft develops vscode as open source, but compiles it with proprietary telemetry tooling.

VSCodium compiles from the same source code but without the telemetry

Croquette,

Then i will definitely switch. Are the VsCode addon compatible with VsCodium?

Marxine,
@Marxine@lemmy.ml avatar

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.

Croquette,

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

ruination,

Copilot doesn’t work on VSCodium from my experience.

InFerNo,

There is, or was, also code-oss. Can’t remember all the differences though

Violet_McQuasional,
@Violet_McQuasional@feddit.uk avatar

Ooh. I did not know about vscodium! I’ve removed vscode and installed it on my Mac. Thanks.

Marxine,
@Marxine@lemmy.ml avatar

You’re welcome! Hope you enjoy it~

fxttr,
@fxttr@feddit.de avatar
  1. Code in Emacs
  2. Create a Nix Flake for building my Environment
  3. Build with whatever buildsystem the language requires, often Stack or Cargo
  4. Package for nixpkgs
Croquette,

Never heard of the points 2 to 4, so I will look into it.

sonymegadrive,
  • kitty terminal emulator
  • Vim for editing
  • CMake for builds
  • A shell script based around entr for automatically running the build/test cycle when I modify files
delial,
@delial@lemmy.sdf.org avatar
  1. Code in Emacs or Jetbrains (depends on language and laptop cpu)
  2. Run make to build, run, debug, or clean (I like makefiles for documenting basic tasks)
  3. Commit with git when chunk of work is done

I tend to do everything locally on bare metal. I never liked putting stuff in containers or running a vm.

VS Code is a great editor, though. It actually feels a bit like Emacs.

SanndyTheManndy,
@SanndyTheManndy@lemmy.perthchat.org avatar

Neovim (with NvChad or the like) + tmux is great, once you figure out the keybinds. Probably not so great for debugging, though. VSCode is a good all-rounder.

Croquette,

VSCode is the same on Linux, so it was easy to have at least some familiarity in Linux. So it was an easy choice when I switched to linux.

SanndyTheManndy,
@SanndyTheManndy@lemmy.perthchat.org avatar

In that case, you might wanna check out VSCodium, a malware-free version of VSCode.

treadful, (edited )
@treadful@lemmy.zip avatar

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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines