Question

I am developing code mainly using Bash, C, Python and Fortran and recently also HTML/CSS+JavaScript. My OS is Ubuntu.

Maybe I am exaggerating, but I figured that I kind of spend more time getting software (Debian and Python packages mainly, sometimes also from source) to be installed properly than actually developing code. And I am not talking about coding vs. debugging, debugging is part of coding for me.

It happens so often to me that I update my Linux packages and then my Python packages and my software does not work anymore, because some .so files have another name now, and Python does not find them anymore. Or I setup a totally clean Ubuntu VM, install a package with pip and get two screens of error message, because some debian package was not installed. I am not a system administrator, I enjoy developing software. But this just annoys me. I do not want to inform myself on all the 157 Python packages and thousands of Debian packages I have on my system and know what their dependancies are. I want to write code and implement new functionality into my code.

What am I doing wrong?

Was it helpful?

Solution

What am I doing wrong?

You're trying to develop in an environment where you're also the sysadmin, devops and the local technical product owner for every pip package you use - and you're assuming that the sysadmin, devops and TPO roles should be no effort just because they're not what you're interested in.

Those are paid full-time jobs (ok, maybe not TPO) that people have because they are not trivial.

Maintaining up-to-date development environments can be a lot of work. The usual approaches are

  1. to work for a large enough organization that it's someone else's job, or
  2. to somehow automate it (which is why things like conda and docker exist - although this is still a non-trivial amount of work you'd prefer the person from #1 to do instead)
  3. to just update infrequently

Specifically, you have two different package managers (apt and pip) that don't know much about each other and aren't co-ordinated.

I'd recommend you:

  • get a working initial development environment
  • choose some way to be able to clone that environment when you want a new VM (or docker or other) container starting at a working baseline
  • don't update it at all unless there's a specific feature or security update you want
  • don't update it when you actually want to be developing, because you'll get frustrated whenever it doesn't work instantly
  • ideally perform updates in a clone, so you can give up and get back to developing in a working environment if it is more broken than you can face fixing right away
Licensed under: CC-BY-SA with attribution
scroll top