this post was submitted on 21 Jul 2023
111 points (98.3% liked)

Linux

48681 readers
406 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

top 50 comments
sorted by: hot top controversial new old
[–] dandroid@dandroid.app 21 points 1 year ago (10 children)

Am I the weird one that just uses jetbrains for everything?

[–] kogasa@programming.dev 3 points 1 year ago

I do too. Nvim for text editing, vs code for the occasional one/two file script, jetbrains for anything more extensive

[–] superminerJG@lemmy.world 3 points 1 year ago

IntelliJ for Java and Rider for C#. VSCode for everything else.

[–] daddyjones@lemmy.world 3 points 1 year ago

Nope - that's exactly my workflow too.

load more comments (7 replies)
[–] Marxine@lemmy.ml 17 points 1 year ago (10 children)
  • 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.

load more comments (10 replies)
[–] under2x@lemdit.com 12 points 1 year ago (2 children)

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@lemmy.ca 6 points 1 year ago

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@sh.itjust.works 3 points 1 year ago

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.

[–] fxttr@feddit.de 11 points 1 year ago (1 children)
  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
load more comments (1 replies)
[–] thepiguy@lemmy.ml 10 points 1 year ago (4 children)

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.

load more comments (4 replies)
[–] StefanT@lemmy.world 10 points 1 year ago (1 children)

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 then scp it.

[–] Croquette@sh.itjust.works 4 points 1 year ago

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.

[–] Maxb0tbeep@lemmy.blahaj.zone 7 points 1 year ago

arch with vsc or jetbrains

[–] Gobbel2000@feddit.de 7 points 1 year ago (1 children)

Neovim for me. There are so many plugins to make the editor behave exactly as you want.

load more comments (1 replies)
[–] lelgenio@lemmy.ml 6 points 1 year ago (1 children)

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.

load more comments (1 replies)
[–] marsara9@lemmy.world 6 points 1 year ago

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
[–] Solemn@lemmy.dbzer0.com 6 points 1 year ago (1 children)
  1. Setup my vimrc.
  2. 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.
  3. Build the currently relevant project in whatever build system they started using 3 years ago (CMake is quite nice).
  4. Fix my vimrc to be compliant with whatever tabbing they use.
  5. 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.
  6. Make changes via vim.
  7. Debug via print because setting up gdb or JTAG on embedded systems is usually more effort than its worth.
  8. Realize it's a timing issue and reluctantly go find the JTAG debugger.
[–] Croquette@sh.itjust.works 3 points 1 year ago

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.

[–] treadful@lemmy.zip 6 points 1 year ago* (last edited 1 year ago)

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.

[–] selawdivad@lemm.ee 6 points 1 year ago (1 children)

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?

load more comments (1 replies)
[–] neytjs@lemmy.ml 5 points 1 year ago

Hobbyist programmer. When I switched to Linux, I started using the Atom editor for typing out my JavaScript projects (mostly Electron apps). Now I use Pulsar, because Atom development was cancelled.

https://github.com/pulsar-edit/pulsar

I also find nvm to be helpful for installing and using Node in the terminal.

https://github.com/nvm-sh/nvm

[–] Ultra980@lemmy.world 5 points 1 year ago (1 children)

I use helix on NixOS. I have the most basic setup for c(++):

  • edit with helix
  • write custom makefiles with a script I made
  • test the program with the makefile
  • debug with cout or printf
load more comments (1 replies)
[–] the_crab_man@lemmy.world 5 points 1 year ago

I mostly program in Rust and my main editor is VSCodium with the NeoVim extension but lately I've been experimenting with Alacritty + Tmux + Helix and I'm starting to like it quite a bit.

[–] nickwitha_k@lemmy.sdf.org 5 points 1 year ago* (last edited 1 year ago) (2 children)

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).

load more comments (2 replies)
[–] ForbiddenRoot@lemmy.ml 5 points 1 year ago (1 children)

Rust and C development mainly with a bit of assembly language sometimes:

  • Debian Stable with Xfce
  • distrobox with podman for containers
  • xfce4-terminal with tmux
  • vim with plugins (coc.nvim, delimitMate, NERDTree etc)
[–] garam@lemmy.my.id 3 points 1 year ago (1 children)

when you start xfce, it start with tmux?

[–] ForbiddenRoot@lemmy.ml 4 points 1 year ago

when you start xfce, it start with tmux?

No. I use tmux only inside the distrobox / podman dev container (which is also Debian 12 Stable). I like a more conventional DE for non-dev related usage of the computer. If I wanted a totally tmux-like or terminal-based environment I would go with i3, but that is not something I prefer for my desktop usage for non-coding activities.

[–] erogenouswarzone@lemmy.ml 5 points 1 year ago* (last edited 1 year ago)

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.

[–] mryessir@lemmy.sdf.org 5 points 1 year ago* (last edited 1 year ago) (1 children)

C and Lisp:

st -terminal

tmux -workspaces

vim -editor

vim-fugitive -git UI

make -did not require more power yet.

everything vanilla except some custom lines to have vim and tmux share the same pane/window navigation keys.

[–] Kajika@lemmy.ml 4 points 1 year ago
[–] sagrotan@lemmy.world 4 points 1 year ago (1 children)

My workflow is: my neovim config is - at last - nearly perfect, quickly configurable for many languages on the go, nevertheless I don't code because when I get home from work I have barely the energy to play for half an hour.

load more comments (1 replies)
[–] danhab99@programming.dev 4 points 1 year ago* (last edited 1 year ago)

$mod+enter vim enter Ctrl+p [type a part of the name of the file I want] O [write code]

[–] happyhippo@feddit.it 4 points 1 year ago* (last edited 1 year ago) (9 children)

Java dev, running opensuse Tumbleweed with KDE.

IntelliJ IDEA, maven, git, postman

Kate for quick edits and note taking works very well

Konsole is my terminal of choice

Teams for Linux because I have to

docker on the command line because there's no docker desktop for Linux. There is for windows and MacOS tho, although Linux is literally the thing where it runs on the kernel and whose concepts the whole thing is based upon. Fuck them.

Kind of sad to see still lack (for Linux in general) of apps that are often used in companies. E.g. Teams and docker desktop

[–] suspectum@lemmy.ml 4 points 1 year ago* (last edited 1 year ago) (3 children)

Teams for Linux sucks and is not maintained anymore. Devs recommend using the web app and this is what I'm using in Chrome, works really well. Otherwise I'm also on Tumbleweed KDE :)

load more comments (3 replies)
load more comments (8 replies)
[–] mrmanager@lemmy.today 4 points 1 year ago* (last edited 1 year ago)

Neovim. I work in devops so it's terraform, ansible and aws cli right now... No need to compile anything or build anything. It's quite nice and simple. :)

The ability to do everything with shortcuts and no mouse means i get into a certain flow feeling that is really nice. When I need to web search, I use the mouse however. I don't like the vim like plugins for the browser. The mouse is way faster there.

[–] why@lemmy.sdf.org 4 points 1 year ago

I mainly write C. I really like Intellij Clion because it uses CMake as project files. It also makes tools like valgrind, perf and gdb available without having to go to the terminal.

[–] Boopdedoop@sh.itjust.works 4 points 1 year ago

i3wm/sway - lets me navigate windows with vim-like keyboard motions Neovim - best power editor, hands down. But it takes a bit of tweaking. Tmux - lets me have multiple terminals up in one window. Make/CMake/whatever the project uses. I also write scripts for anything that causes friction which can be automated. Vimium/VimiumFF in the browser - lets me navigate most webpages with just the keyboard.

[–] vaalla@discuss.tchncs.de 4 points 1 year ago

I mostly write rust now, but this workflow was finetuned over years. Use 2 terminals each on a diferent monitor, one runs neovim and the other is for building/running. If the project is a bit more complex, I will run it in a docker container( maybe mount the /etc/shadow and frieds so all artefacts are created using the same user as in the outside) . Developed a bunch of tools over the years to optimise this:

  • a 'package manager' in bash so I have a folder for each project/context. One for work, one common, one for the server stuff like this. All are in PATH.
  • parterm - remote control for the terminal so i can start a build from neovim in a different terminal.
  • 'ndock' - at work I use a bunch of branches, this script will set up a few envs and then start a docker in a folder coresponding to that branch.

At my old job had to work on a remote vm so I setup sshfs for a while, but was slow and just moved all my tools there.

I have a pattern where i put all my projects in ~/dev/<branch> and all info related to a task in ~/dev//bugs/<issue_nr>. This is usefull because I can have scripts the work similar for different projects with small changes. For example to run my binary with the config for a issue i just do

ndock <branch>
nr <issue nr>

This will start docker or connect to an existing one for that branch if available, compile the code, run my binary with the config present in the bug folder. In the last few month started running it with rr to be sure i can debug any random issue.

[–] fhein@lemmy.world 3 points 1 year ago (3 children)

Like many others I also use NeoVim, but it was quite a bit of learning curve before you get comfortable with it. And you really have to go all in and learn at least the basics, if you try to use it like a normal text editor thinking you'll learn commands as you go along then you're going to hate it.

In addition to having to learn how to use vim, you also need a good configuration and probably some plugins if you want to use it as an IDE. Personally I use fzf, coc, vim-dirvish, lightline, lightline-bufferline and papercolor-theme.

load more comments (3 replies)
[–] wgs@lemmy.sdf.org 3 points 1 year ago

I use vis to write code, ^Z and make/mk to build the project. Most of the debugging is done with valgrind and eventually gdb though my use is very limited.

When I work on manpages, I use wendy to automatically preview manpages everytime the source file changes.

[–] Elw@lemmy.sdf.org 3 points 1 year ago
  1. Code in Nvim
  2. At work we build using shell scripts, for personal stuff it's usually Make
  3. At work, deploy with Jenkins to Kubernetes or through Puppet to real/vm hosts. a. At home, I use Ansible 99% of the time
  4. Debugging?
[–] CalcProgrammer1@lemmy.ml 3 points 1 year ago

Code in VSCode

UI in QT Creator

Build with qmake

Commit with git

Push to GitLab

Run jobs with gitlab-runner

Deploy AppImage, deb, rpm builds with Docker

[–] forgotmylastusername@lemmy.ml 3 points 1 year ago
  • Sublime Text.
  • Whatever build toolchain of the current thing I'm using.
[–] style99@kbin.social 3 points 1 year ago

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

load more comments
view more: next ›