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.

  • Marxine@lemmy.ml
    link
    fedilink
    arrow-up
    28
    ·
    1 year ago
    • 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.

    • Croquette@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      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@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

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

        VSCodium compiles from the same source code but without the telemetry

          • Marxine@lemmy.ml
            link
            fedilink
            arrow-up
            3
            ·
            1 year ago

            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@sh.itjust.worksOP
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              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

    • FarLine99@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

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

    • Croquette@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      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.

          • 133arc585@lemmy.ml
            link
            fedilink
            arrow-up
            3
            arrow-down
            2
            ·
            1 year ago

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

    • Kogasa@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

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

    • balp@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      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.

  • under2x@lemdit.com
    link
    fedilink
    arrow-up
    13
    ·
    1 year ago

    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
      link
      fedilink
      English
      arrow-up
      7
      ·
      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.worksOP
      link
      fedilink
      arrow-up
      3
      ·
      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.

  • fx_@feddit.de
    link
    fedilink
    arrow-up
    13
    ·
    1 year ago
    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
  • StefanT@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    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.worksOP
      link
      fedilink
      arrow-up
      4
      ·
      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.

  • thepiguy@lemmy.ml
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    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.

    • Croquette@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      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.

      • JoeyJoeJoeJr@lemmy.ml
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        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.

        • Croquette@sh.itjust.worksOP
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          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

  • marsara9@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    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
    • andruid@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      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!

  • selawdivad@lemm.ee
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    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?

    • Croquette@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      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.

  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    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@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      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@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        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@sh.itjust.worksOP
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          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@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    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@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      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.

  • treadful@lemmy.zip
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    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.

  • Solemn@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago
    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.worksOP
      link
      fedilink
      arrow-up
      3
      ·
      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.