Ah yes, good old dependency.
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
I have also mixed up crontab -l
with crontab -r
. 😔
Let this be a lesson to start versioning your crontabs.
We never had our crons in source control, but I always saved it somewhere (usually on my machine and the target machine) so we had some history just in case of typing r instead of l for some reason. You can also create an alias called backupCrontab or something that runs the command for you and puts the output somewhere safe.
Had a similar thing once. Some how, some way, the DBA copied and pasted something wrong. Oracle DB had some odd extra syntax for left and right joins that other DBs didn't (or at least that I'd never seen). My best guess is that he auto formatted out of habit and maybe it took those symbols out.
It took a long time to find that. Because the only evidence something was wrong was that ONE of our customers wasn't being billed for ONE product. Everyone else was fine. Basically they were using it in a very atypical way. The left joins made sure to include them in the billing even because they didn't have whatever was on the right of that join. Everyone else did.
SQL auto format is still mostly terrible
The only half decent format is to start from the Mozilla style and then make it more sane.
I’ve been playing with sqlglot lately and want to start using it for diffs.
For us it's a task that no one is even aware of and the first issue is the customer saying their data export doesn't work. You had a data export?
Only tangentially related, but "What a elegant house of cards" is an insult i'm going to use someday.
Cron job that evals some base64 encoded string which is actually downloading a script from a personal GitHub repo of an IT guy who left...
And just started cleaning up their GitHub account…
AHAHAHAHAHAHA you couldn't make this up
So do you work for Spotify or Zoom?
Probably DeepSeek.
Why does this sound like maintaining my nextcloud instance from time to time?
Idempotent code/repositories are great - I love making everything as reproducible as possible. Particularly in make where every 'all' type command should have a corresponding 'clean' command. Many times I'll see code bases where they skip defining the 'clean' command... or worse, have no 'all' command to begin with and rely on the developer knowing all the build and environment setup commands...
Yeah, I don’t consider most code complete unless it’s safe and reproducible. I love make, currently using npm but you can set up scripts with it. Automating the build process was the very first thing I did.
This project is a piece of work. There’s effectively no documentation, and every now and then I find something new like this. The stuff I’ve fixed up so far has been much much more reliable and performant.
Part of me just wants to rewrite the whole thing, but I need to ship features so we can sell the product and pay my salary.
At least I’m not a cog in a huge corporation getting my soul crushed every day. I actually love fixing weird stuff.
since you are currently using npm, check out pnpm
also "just" seems to be a more modern replacement for make
I'll check out both, thanks!
Just update your Clang library!
Time to restore a whole machine backup to a VM with no network connectivity, and manually pull the command?
I was able to do that
Turns out there was a second bug which triggered this one, and a bug I found in this script that I thought was responsible was happening silently for months.
Now three bugs are squashed
Somebody’s having a fun day! /s
What's a cron job?
An older way of automating stuff.
It's not there by default nowadays, because systemd tends to fulfil their requirements.
The executive branch of the US government.
Scheduled job, but implies that it uses a cron format.
Cron is a scheduler to run a program at a set frequency
We have a couple of those at work. Black boxes that are used.
I'm rebuilding one after it failed on one morning for SQL odbc reasons. And its just a binary that shuffles data around.
This is almost exactly what happened to me on Monday, resulting in a fifteen hour day.
My particular jenga piece was an Access query that none of my predecessors had deigned to document or even tell me about... but was critical to run monthly or you had obsolete data embedded deep within multi-million dollar reports.
Thank god I don't work on salary anymore, or I'd be really upset.
I stopped reading at “Access” and just wept a silent tear for you.
Oh god Access.
You have my condolences.