site banner

Small-Scale Question Sunday for July 23, 2023

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

3
Jump in the discussion.

No email address required.

How the heck do you people program all day without pulling your hair out? I've spent 5+ hours just trying to clone a jupyter lab notebook from GitHub and open it, and good lord even with GPT's help it's like pulling teeth.

You are doing the hardest thing there is to do in programing: Anything other than programing.

Work on a supportive team. They'll have runbooks to help you through it, and if you find the runbook isn't working for you, the runbook author and/or senior engineers will be around to help you through it.

This is enough of a problem that GitHub Codespaces exists, advertised as solving exactly this problem, so it's not just you.

Some of this is just experience / familiarity with the tooling. While I agree with other comments in the thread that for professional development, I'm usually working on the same codebase for a while (and when I do spin up on a new codebase, they're sufficiently used to getting new hires set up that they have written instructions), for working in random open source repos, getting set up is usually a few quick rounds of installing whatever packages it complains are missing at most. And while not universal, a lot of GitHub repos do have instructions in how to get started working in the repo.

For a Python project, it's surprising you need anything more than the latest Python and pointing virtualenv at the requirements.txt file. I assume there were some dependencies that couldn't be installed that way for some reason.

(You mention in another comment that you're on Mac... which I've never used for development but I've fairly frequently heard of Linux devs switching to Mac saying the dev support is close enough to Linux and they like the rest of the OS better... so I assume it's plenty usable as a dev platform.)

I stay away from development whenever possible.

My job is 90% MATLAB. This is worthless for making final applications. It also keeps people from asking me to test it for production or to kuber deez netes. Instead, I get to play around the math and simulations, and cooperate with much more experienced developers when I contribute to a release.

Modafinil, caffeine, nicotine.

Mostly modafinil tbh. Every top developer I work with is on it, or on adderall.

Honestly, it's frustratingly common for it to be a big headache to get a new repo running properly on your local system. I've seen it plenty of times at companies and open-source projects of all sizes. Fortunately, at least companies usually have people who can help you out with initial setup. It's less common with open-source projects - if they had people willing to help newbies, they'd usually have already fixed the problems that make it so hard.

Anyways, not to get on too much of a tangent, but you're not crazy and it is painful. You can work through it though, and it'll get easier to onboard into new projects with time. It's also usually a lot less painful to actually do work in a project once you've got your local setup sorted out.

Some intellectual work is novel and intricate - at an extreme, research mathematics, but including coding. Other work is more rote, just application of potentially hundreds of relatively simple ideas - think filling out paperwork, law, medical practice.* The 'plumbing' part of programming - getting your environment set up, figuring out why you misconfigured dependency 37 and your build is failing with a new message, docker kubernetes terraform cloud yaml CI - is often the latter. You just need to know a few thousand distinct facts. Having a good command of the fundamentals is critical - what is a folder and a file, what is a program, what are users and file permissions, what's a packet, how are files laid out on my operating system, what's a git, what's a http... And then the facts specific to whatever frameworks/languages/systems you're using - what's my system package manager, my language package manager, do they conflict, what are rust crate features, what's a python wheel, what directory is pip installing to... The latter especially becomes a mess. In the past decade it's gotten a lot better, but that's come with new tools and ideas to learn.

So as for 'how you do it', you just need to pick up the thousand different facts. Read docs, follow tutorials, and figure out why each step works. And once you've done that for one or two things, it'll be easier to pick up new stuff, because you'll have a sense of why things work the way they do.

I'm curious what your issue specifically was, and if you got it to work?

*this is a continuum, there's no difference in kind, just lower and higher levels of complexity, which is philosophers have had trouble with in the past. Coding you have trouble with would be rote to someone incredibly smart, and even filling out a form requires a lot of generalization that we just don't notice, like we don't notice breathing or walking.

I'm curious what your issue specifically was, and if you got it to work?

Cloned the repo, but can't get jupyter lab to have the right PATH to that directory. Still working on it unfortunately.

Autism and passion.

As much as I love my fellow programmers, all of the best programmers have a degree of obsessiveness that allows them to revel in the annoying bits. Env setup is genuinely the worst part of the job, but the type of annoyance never goes away.

Look at the best computer scientists. Even among the stereotypically nerdy STEM fields, mathematicians and physicists are the only 2 groups that appear more 'autistic' at face value. Silicon Valley could not have been made about any other people. And it is a lot closer to a documentary, than feels comfortable to admit.

it's like pulling teeth.

It's a feature not a bug.

meta joke: I am currently on the Motte procrastinating because our envs are currently broken, and I don't feel like being the one to fix it.

When it comes to the programming I do for fun, I have no problem because I can program however I want, no code reviews, no deadlines, no scrum, no poorly spelled two sentence long ticket descriptions pretending to be a well-described set of requirements, etc...

When it comes to the programming that I do for money, well metaphorically speaking I do pull my hair out. I am somewhat burned out being a professional programmer at this point and I really am only doing it for the money. I could use a nice few months off. To be honest I am just driven by fear at this point, I do not want to lose the level of income that I have gotten used to.

I hope that we can both figure out how to pull our hair out less.

I sympathize man. I’m in sales and have been hating my career for years, but the golden handcuffs of high income are real! We are blessed at least to have the opportunity to make money, but it sure has a cost.

This is why docker is so widely used. It's like ctrl-c/ctrl-v, but for an entire computing environment (and there do exist docker containers specifically for running jupyter notebooks).

Getting the development environment running for a project is one of the worst aspects of programming IMO. Some people thrive on it and don't get bothered but for me, it goes something like this.

to fix this dependency conflict just run A B C in your terminal.

Then you find out that running A B C, each comes with its own A's B's, and C's and then they recurse forever. You just pray this is the last time you run random terminal commands from StackOverflow and this time it will work.


On the other hand, using ChatGPT is depriving you of learning the debugging skills many of us from the older days before language models had to earn through suffering but at least we know how to do it without gpt.

Also docker has been a godsend in this regard. Also if you are really struggling with getting the dev environment up, maybe its just because you are on Windows. Things are a lot easier to get up and running on Mac and Linux.

Thank you for illustrating the exact process I followed, in undergrad, as I decided not to pursue software engineering.

Then you find out that running A B C, each comes with its own A's B's, and C's and then they recurse forever. You just pray this is the last time you run random terminal commands from StackOverflow and this time it will work.

After programming for long enough, you get really good at installing software and fixing build errors.

On the other hand, using ChatGPT is depriving you of learning the debugging skills many of us from the older days before language models had to earn through suffering but at least we know how to do it without gpt.

Is this a bad thing? Like why would we need debugging skills if ChatGPT can solve that problem?

Oh and I actually have been using a Mac.

Like why would we need debugging skills if ChatGPT can solve that problem?

Because there are lots of problems where ChatGPT is not helpful or gives outright incorrect information that a layman won't even recognize as incorrect.

Eventually chatGPT runs into the fundamental problem of not having enough context. Impossible for it to debug many issues in medium and large codebases.

Thus my observation that all the examples I've seen of how ChatGPT is supposedly oh so helpful in programming are really examples of what'd be better called scripting.

Good luck getting ChatGPT to write you the required initialization code for ffmpeg mp4 encoder with sensible quality and speed settings since the defaults are utterly braindead (the required code is ~100 lines of largely undocumented structs and function calls).

Because..

A guy who uses chatGPT and knows how to debug is more powerful than a guy who uses chatGPT and doesn't know how to debug.

I know a lot of posters here have some insane timelines on AGI and think any endeavor of knowledge or skill acquisition is useless because AGI will make us all useless tomorrow. Which MIGHT HAPPEN.

But assuming LLM's don't improve all that much in the near future and we don't get the GOD AGI, what I said will hold. It certainly holds in the present.

The people who know how to code are more effective using GPT than those who don't, if anything they reap exponential gains relative to those who don't know "the basics"

More or less every example I've seen of ChatGPT's touted benefits to programming has had little to do with programming and has ended up being just fairly simple scripting.

Infrastructure stuff (like fiddling with repos and dependencies) is boring and frustrating. No one likes that stuff. But if everything is working smoothly and you can just focus on actual coding for an extended period of time then it’s fun.

My experience is that programming is like 98% fiddling with infrastructure stuff though…

What?

You set up the development environment, repositories and libraries once and don't have to deal with any of that until a non-trivial change / upgrade comes up in a year or two.

No?

It's a one-off thing unless the projects you are working with take no more than 2-3 days to finish.

If you are programming professionally (or on large projects), you might work on the same codebase for years on end.

Depends on what you’re doing.

If you’re doing a bunch of short projects in a row, possibly all using different languages and different frameworks etc, then yeah you’ll feel like you’re spending most of your time doing setup.

On bigger, longer-lived projects, there will be longer stretches of time where the infrastructure “just works” and you can focus on the code.

Ahh that's an interesting point, and does make a lot of sense. Perhaps I just haven't gone deep enough in the past to appreciate the nice side of things. Good to know.

How the heck do you people program all day without pulling your hair out?

How kind of you to assume that I still have hair to pull out...