Live data from Hacker News

Be Aware of the Makefile Effect

blog.yossarian.net

221–230 of 347 posts

Re: Be Aware of the Makefile Effect

#221

This is “Copy-Pasta Driven Development” [0] and it’s not even related to makefiles. It’s related to the entire industry copying code from here to there without even knowing what they are copying. TBH I think copilot has made this even worse, as we are blindly accepting chucks of code into our code bases. [0] https://andrew.grahamyooll.com/blog/copy-pasta-driven-develo...

Blame the business people. I tried becoming an expert in `make` probably at least 7 times in a row, was never given time to work with it daily until I fully memorized it. At one point I simply gave up; you can never build the muscle memory and it becomes a cryptic arcane knowledge you have to relearn from scratch every time you need it. So I moved to simpler tools. The loss of deep work is not the good programmers' f…

I wouldn't say so. Make is very simple and you can grasp the basis within an hour or so, if you're familiar with shell scripting (as it's basically a superset of shell scripts, with the dependency graph on top). Then all you have to do is just in time learning which is mostly searching for a simpler pattern that what you're currently doing.

Re: Be Aware of the Makefile Effect

#223

Earlier quoted context omitted.

If you think `make` is “too complex and black-box-like” then you haven't seen `cmake`.

If you think cmake is a good example of more complex than make, then you haven't seen automake/autoconf. The first thing I thought of. You can find tons of tons of configure scripts that check if you're running ancient versions of Unix, checks that a byte is 8 bits wide, and a ton of other pointless checks. They don't do anything with all that information, don't think for a moment that you can actually build the app…

I have seen both, and I consider them roughly similar.

Re: Be Aware of the Makefile Effect

#225
post #211
post #160

Earlier quoted context omitted.

To be clear: I'm not suggesting a time machine, and I'm not listing any particular set of skills everyone must have. I'm saying that excusing the lack of core job skills by citing immediate time pressure is a smell. It tells me that that someone probably won't ever learn weird stuff. And in software development, people who don't learn weird stuff end up in that 50% bucket posited upthread.

> I'm saying that excusing the lack of core job skills by citing immediate time pressure is a smell. It tells me that that someone probably won't ever learn weird stuff. And in software development, people who don't learn weird stuff end up in that 50% bucket posited upthread. Or the whole chain of work culture is bad and people do not have adequate down time or brain juice to pursue these. Additionally, how many do…

> Or the whole chain of work culture is bad and people do not have adequate down time or brain juice to pursue these.

And... again, I have to say that that kind of statement is absolutely of a piece with the analysis upthread. Someone who demands a "work culture" that provides "down time" or "brain juice" to learn to write a makefile... just isn't going to learn to write a makefile.

I mean, I didn't learn make during "downtime". I learned it by hacking on stuff for fun. And honed the skills later on after having written some really terrible build integration for my first/second/whatever job: a task I ended up doing because I had already learned make.

It all feeds back. Skills are the components you use to make a career, it doesn't work if you expect to get the skills like compensation.

Re: Be Aware of the Makefile Effect

#226

Earlier quoted context omitted.

Blame the business people. I tried becoming an expert in `make` probably at least 7 times in a row, was never given time to work with it daily until I fully memorized it. At one point I simply gave up; you can never build the muscle memory and it becomes a cryptic arcane knowledge you have to relearn from scratch every time you need it. So I moved to simpler tools. The loss of deep work is not the good programmers' f…

I wouldn't say so. Make is very simple and you can grasp the basis within an hour or so, if you're familiar with shell scripting (as it's basically a superset of shell scripts, with the dependency graph on top). Then all you have to do is just in time learning which is mostly searching for a simpler pattern that what you're currently doing.

Hm, I'm not sure that's the case. Some of make's weirdness comes from bash-isms, not shell scripting in particular.

Re: Be Aware of the Makefile Effect

#227

Earlier quoted context omitted.

The local ones, mentioned in the original comment that we've been discussing in this thread? The local runner, executing on the developer's machine.

Of course it makes no difference whether that runner runs on our local CI host or on my dev machine.

I think GP got confused, it's not running the runners locally, it's running the CI steps locally (see the other sibling replies).

For example, running tests locally exactly the same way as in the runner - sometimes I have to open a debugger in the middle of a test to see what exactly went wrong. Our tests run in gitlab in a particular docker image, and I've been adding a "make test" that runs the same tests in the same image locally, with additional flags to have full interactivity so the debugger works if needed.

Re: Be Aware of the Makefile Effect

#229
post #138

calling this "Makefile" effect is a terrible disservice. one could as easily call it "PHP" effect, "YAML" effect, etc. pick whichever language you'd personally like to denigrate. there is nothing that makes makefiles inherently more or less susceptible to this. if it's more common, it's because people don't want to take the time doing more solid engineering and clean design for something like a ci/cd config or a make…

I think article addresses

> if it's a problem, it's a problem of discipline.

With this

> Also note: the title is “be aware,” not “beware.” The Makefile effect is not inherently bad!

Re: Be Aware of the Makefile Effect

#230
post #77

Earlier quoted context omitted.

You're probably using the wrong tool and should consider a simple plain shell script (or a handful of them) for your tasks. test.sh, build.sh, etc.

(not the parent) Make is - at its core - a tool for expressing and running short shell-scripts ("recipes", in Make parlance) with optional dependency relationships between each other. Why would I want to spread out my build logic across a bunch of shell scripts that I have to stitch together, when Make is a nicely integrated solution to this exact problem?

Any modern attempts to do this better than make? I often write small “infra” bash scripts in my projects, maybe I could use a tool like that.
Post reply on HN