r/AskComputerScience • u/[deleted] • Apr 26 '21
Why are development environments always such a mess?
Whenever I clone a company project to work with it for the first time, it always takes me a few hours just to get it up and running. Why is this so difficult, why can't we use some sort of system that isn't so brittle where one Python package getting a version update breaks a bunch of things?
3
u/OpeningJump Apr 26 '21
Why don't you propose using docker for such situations (messy dev environments) in your company?
6
Apr 26 '21
Docker is just duct tape if you are in such a situation.
It's a really great tool for roll-outs, easy scaling, testing environments, etc., but it is not a solution to intransparent dependencies. The problem is just moved out of sight, left to grow where no one sees it. - And once you have to upgrade your base image you are suddenly in a complete and utter mess, wading through yards of undeclared required programs and their versions in a desperate attempt to find the issue.
The real solution is:
A project needs a set of clearly defined dependencies and their setup. Either defined in code (with tools like maven, etc.) and at least in text form with versions and install instructions.If you have that, it becomes a matter of looking at the list and installing. - Or - in case of docker - it enables to take one look at the list, look at the version differences of the external packages and it will be (almost always) easy to see where issues will arise.
That's the way to go and everything else is just plain lazy.
1
5
u/jalagl Apr 26 '21
The team has to set aside some time upfront to make it "less messy".
For example, in a previous project, when we started we created some docker containers to run the app and be able to debug it, and used the Maven docker plugin to automate unit testing and set it up for debugging. Then we created instructions to setup the two IDEs our teams uses (import Maven projects, setup the internal Maven repo, ports used for debugging, etc), and boom! You can be up and running quickly. And the docker images were reused for automated deployments and QA.
Setting that up did take some time, but once setup, it was really easy to get started or recreate the env if you needed to. The thing that took longer was pulling the docker image and sample data, which was several gigs.
1
u/TransientVoltage409 Apr 26 '21
The only thing worse than not understanding how messy this stuff gets is understanding how messy it gets: https://xkcd.com/2347/
OTOH, that leaves a lot of room for improvement. It's just a question of what we do next. (However: https://xkcd.com/927/)
3
Apr 26 '21
Reminds me of that NPM package that got removed and broke a ton of stuff until it was restored
10
1
Apr 26 '21
I wonder if there's some kind of thing like types, that ensures 'good' development environments?
-30
u/Fat-Ranger-3811 Apr 26 '21
it’s because you’re a moron who doesn’t know how to use python
9
Apr 26 '21
Looks like someone forgot to attend their child on the computer
-17
u/Fat-Ranger-3811 Apr 26 '21
like the child trying to use python here? Oh that’s you lol
11
3
u/dddonehoo Apr 26 '21 edited Jul 08 '25
hat touch marvelous waiting husky longing plants cagey six mysterious
This post was mass deleted and anonymized with Redact
0
Apr 26 '21
[deleted]
2
Apr 26 '21
Yes. (technically there are tools for managing python 'environments' now, but, no matter what people argue, that remains an external bodgefix for a problem that should be solved by the base tools.)
15
u/tomatizzzle Apr 26 '21
It'll get better with experience. Once you start doing it often you'll begin to recognize what is needed to get the project going before you even build it.
When updating a package there's always a chance of it breaking stuff. I don't think that's eve going to change tbh