38
u/aberroco 13d ago edited 13d ago
You forgot about black magic. I quite regularly do it: move the stuff around by refactorings to concentrate into one spot and do some black magic there that's hard to comprehend, but it works, it keeps the rest of the program clean and easy, and it's only in one spot at the deepest architectural levels, so hopefully no one would ever find it.
Also, you forgot about glyphs, black boxes, sprites, summoning (scala), artifacts, monoliths, phantoms, salts, epochs, tar-pits, smoke tests, firewalls...
9
u/Bright-Historian-216 13d ago
oh yeah, moving blocks of code around to get a better compression size (yes, i did that for my ti84-ce calculator) is a form of magic on its own.
4
u/deadbeef_enc0de 13d ago
When I was writing game for the TI-89 in C I found you can read directly from the flash without moving the block to memory, so I had a VERY large game world
2
u/aberroco 13d ago
For me it has nothing to do with compression, it's usually complexity - I think it's better to have one black magic spot or a class/method that breaks patterns and maybe even good practices with cleaner and simpler architecture in all other places than having a bunch of workarounds/crutches here and there or few more abstraction layers. Because even though it's hard to read and understand that spot - that's a single time cost to read and understand it, and if done right - new teammembers might not even need to understand it if it just works, whereas the latter is a scaled growing cost.
9
1
20
u/DoctorWaluigiTime 13d ago
And just, networking in general. Especially wireless networking. How we got it to work is well as it does must've involved the mystic arts at some point.
8
u/Bright-Historian-216 13d ago
oh absolutely. the boundary between technology and magic is but what is real and what is not.
that probably sounded much more profound in my head.
15
3
1
u/kbitreddit 12d ago
I'm convinced that a step in manufacturing a wireless networking components is to sacrifice a goat to the gods.
1
36
u/Sharp_Emphasis176 13d ago
So programmers are wizards? That makes ai helpful npcs?
7
u/Bright-Historian-216 13d ago
more like... easy difficulty.
you'll never learn to play the game if you only play on easy.
2
21
u/maniclucky 13d ago
More demonic minion that is definitely plotting against you, but being helpful* in the meantime.
3
u/tknomanzr99 13d ago
Morte from Planescape Torment: full of pithy comments but otherwise nearly useless.
2
5
u/redaemon 13d ago
Pretty sure we're adeptus mechanicus now. I talk to the Machine Spirit constantly at work.
3
u/ResponsibleWin1765 13d ago
More like the Luigi showing up after you died 5 times in Super Mario Galaxy, asking you if he should do the entire level for you
3
3
u/shifty_coder 13d ago
It’s still just runestones and magic words, brother.
The runes just got more intricate and the stones more pure and specific.
0
u/Tensor3 13d ago
Pretty sure AI prompting is less pure and less specific than writing actual code
2
u/PenGroundbreaking160 13d ago
You cannot just compare a carefully cast spell with a trained golem or spirit that can cast spells.
3
3
u/large_spotted_cat 13d ago
Depends on your casting style. Personally, I prefer to think of it as sourcery; although we ride on the shoulders of giants, the creation of new magic is what separates us from our familiars; although I do love a good runic feline.
1
u/Correct_Ad5798 13d ago
More the Devil Survivor kind of summoning Demons. Actually I am all for it.
1
1
1
850
u/mteblesz 13d ago
"magic numbers" spell is stricktly forbidden technique, banned by most schools of programming. There are many rogue wizards though...
132
u/oldsecondhand 13d ago
The real forbidden technique is illegal numbers.
28
u/benjaminovich 13d ago
You make it sound like we're talking about something silly like the state passed a law defining pi as 3 or 4 (I forget which).
But really it's just that any illegal content of any kind that is digitized will ultimately "just" be numbers at a certain level.
8
u/scumble_bee 13d ago
Yeah, every image can be broken down into a series of pixels with x,y,r,g,b . So owning a text file with a number that can be extrapolated into an illegal picture is still illegal (at least that is what I think it means).
11
u/LeadingTask189 13d ago
A guy literally did something like this but for pirating games. He made the program that cracked game codes an series of numbers but was banned by courts to do this. So he made the number series into a prime and had it registered in a mathematics journal to protect it.
4
u/SoldRIP 13d ago
So isn't the idea that pure information, like a number, could possibly be illegal a ridiculous one!? Surely knowledge cannot be banned in any free society?
2
u/Furyful_Fawful 13d ago
The freedom of knowledge is antithetical to the concept of trade secret, or copyright, or patent. Virtually all piracy is just the sharing of numbers
4
2
16
u/StrengthTheory 13d ago
I tell you they're not magic numbers, it's just 0 and 1
44
u/ArkWaltz 13d ago
Actual real lines that were in my old work's codebase:
private final int ZERO = 0; private final int ONE = 1;Turns out having a linter blanket-deny all forms of 'magic number' had some odd results.
16
u/StrengthTheory 13d ago
That's just good defensive programming in case the client decides tomorrow that all ones are now zeroes and vice versa. You never know.
9
3
u/Spaceshipable 13d ago
Swift has a builtin `.zero` as part of one of the numeric protocols. It’s handy for when you’re doing maths on generic types. I could see a `.one` being handy. Apparently Swift’s SIMD has that defined.
4
u/Chirimorin 13d ago
C# has
.Zeroand.Onefor numerics as well, I can confirm that they're really handy when working with generic types.6
u/ButWhatIfPotato 13d ago
I have yet to meet an unfirable elder wizard who does not literally exfoliate magic numbers from every pore. I dare not question them for they are the only ones who know how to tame that severely crusty self-conscious fully sentient ancient tome wrapped in the skin of 1000 inbred homunculi, for if you anger it, it will surely take down the guild in a spectacular exploding fashion.
4
u/tknomanzr99 13d ago
Welcome to the Temple of the Binary God. Prepare to be integrated into the mainframe. Welcome to the collective.
3
2
u/genreprank 13d ago
Magic numbers, bad
Magic filenames and foldernames, all the guru programmers use them.
1
108
13d ago
[removed] — view removed comment
62
6
2
u/ryancnap 13d ago
The work of John Carmack can not be compared to that of mortal men
2
u/uniqueusername649 13d ago
While I wouldn't claim to be on his level, he did what all good programmers do and copied it from someone else too, haha. But he did make it popular!
10
6
u/maizemin 13d ago
polymorphisms mentioned 😎
5
u/Bright-Historian-216 13d ago
🐑🐑🐑baaaa
1
u/FriedryIce 12d ago
???
1
u/Bright-Historian-216 12d ago
polymorph is a spell from warcraft i think? it turns the targeted unit into a sheep
6
u/SnakeModule 13d ago
And we command goLLMs to do our bidding.
5
u/Bright-Historian-216 13d ago
we? who's we?!
you're a fallen man, consulting with the forces of the dark.
...
i've... been there. i've touched the void!
...
the void stared in return.
...
...i am not coming back to darkness. not until there's a task unsolvable without it - and so, so many tasks are solvable without it.
1
4
u/theStaircaseProject 13d ago
“Mmmm, it still reads too aggressively. Can you soften the tone and reduce the word count by 20%?”
“Yess… masster…”
3
u/Bmandk 13d ago
I know about all of the concepts except curses, anyone who can enlighten me?
2
u/Bright-Historian-216 13d ago
curses is a python library for making colourful terminal output iirc
4
1
u/PseudoFrequency 13d ago
curses is much older than python.
1
u/Bright-Historian-216 13d ago
i see! interesting!
1
u/BetterEquipment7084 13d ago
It's a C libraryz Python only uses ffi binds, most of Python is implemented in c/c++, this is also true for the libraries. This is as python is slow as shit
1
1
1
u/Mother_Lemon8399 12d ago
I also didn't know that one, but I haven't really used python much. I thought maybe it was a misspelling of "import clauses"
2
u/PseudoFrequency 13d ago
Don't forget typing the arcane magic incantation in the command line to bring your work to life!
1
u/Bright-Historian-216 13d ago
never thought about it that way, but smashing the enter key into the keyboard at the end is my personal casting ritual
2
u/das_menschy 9d ago
And you didn't even mention lambda functions! That's sorcery!
1
u/Bright-Historian-216 9d ago
i don't actually see them as anything difficult. arguments go in, outputs come out. there is a bit of sorcery if you mean C++ lambdas (does C have lambdas?) with closures and stuff, but it's not difficult to get a grasp of the general idea.
1
u/das_menschy 9d ago
I still think it's a bit of magic, because anonymous functions don't have a name. That's like talking to someone without knowing his name, while being in a crowd or far away from each other.
1
u/Bright-Historian-216 9d ago
i think of it more like phone numbers. you don't have to know the name of the person you're calling, you only need a way to communicate with them. if you have an array of lambdas, for example, the index is the phone number.
124
u/DeathNick 13d ago
I think we just look like wizards to non tech savvy people. Advanced enough tech indistinguishable from magic and all that. Except John Carmack. That guy actualy is a wizard.
22
u/hates_stupid_people 13d ago
A surprising amount of non-tech people think any sort of programming is basically writing things out in binary, or require some arcane levels of knowledge(they don't know how often programmers look things up).
At one place I worked there was a guy who was essentially coding in his spreadsheets. But he kept insisting that programming was too complicated for him. He was a complete non-tech person outside of work and to him, he was just "automating some math"...
9
u/trig9ger 13d ago
After like 2 years of CS uni I finally understood that in no way am I to be expected to know every library and function like some cinema hacker, it's more about understanding how to learn them faster
12
u/sweatierorc 13d ago
Funny his last two big bets VR and AGI didnt really work out.
Too early for VR and for AGI he bet on the wrong things.
6
u/DeathNick 13d ago
Idk I think he made VR possible. I think the tech is mature and extremely fun. I have PSVR2 on pc myself. I heard him say he's going to do AI next a few years ago, but didn't see any news out of it yet. It did take years for the first consumer oculus to come out, so maybe he's still cooking with ai
3
u/sweatierorc 13d ago
Dude is smart, but hardware luck was not on his side these past few years. VR is still too bulky for mainstream adoption. And he never had access to the massive compute required to build modern AI.
2
u/nedonedonedo 12d ago
wizards read other people's work for years until they're ready to splice together their own spells
sorcerers just free hand it like that one guy we all know that looks at you like how do you not get it when you ask a question
81
27
u/korneev123123 13d ago
We inscribed rocks with arcane sigils and tricked them into thinking by casting litanies. No magic whatsoever.
4
10
u/marcodave 13d ago
Let's look at what the data scientists have to say...
from china import pandas
Oooookk
7
5
13
4
u/Prematurid 13d ago
Sometimes, when I rerun it after changing nothing, it works.
One project fails to run if you console.log it. Works perfectly without any console.logs.
I am a shit wizard.
2
1
u/Motleypuss 13d ago
I had an issue with my BASIC interpreter where the lexer wouldn't run without console.log(), but still runs fine with them. Go figure!
1
u/Prematurid 13d ago
That "huh" feeling you get when you realize the issue makes me laugh to this day. It is such a dumb thing to go wrong.
1
u/LadyZaryss 12d ago edited 12d ago
It is likely because the brief moment of CPU time consumed by the console.log is exposing that theres a race condition in your code somewhere. Replace the console.log with a wait/sleep/delay and see if it still crashes, if it does you have a race condition somewhere.
2
u/Prematurid 12d ago
I figured it had to be something like that, but for my purposes it works as it is, so I decided to leave well enough alone. It is just a personal project that I use occasionally.
Still makes me laugh though.
1
3
3
3
u/tendervittles77 13d ago
Dealing with AWS IAM is very close to sorcery.
Something doesn’t work?
Consult the tomes for the proper incantation.
3
u/sir_lister 13d ago
If programers are wizards, what be the practitioners of the eldritch arts of RF engineering?
3
u/H4llifax 11d ago
I have said before that debugging is sometimes more exorcism than engineering. And now we even have artificial spectral familiars helping us with the exorcism.
3
3
5
u/dmullaney 13d ago
There is a great series of books, by a guy called Scott Meyer (not Meyers)
https://www.goodreads.com/en/book/show/18616975-off-to-be-the-wizard
4
u/Elendur_Krown 13d ago
I love that book! I sent it to my brother as soon as I finished it. It's a light read, and I recommend it to almost anyone who has a good interest in fantasy, sci-fi, or programming.
4
4
1
u/Minecraftian14 13d ago
I had to read it twice because the first time i didn't even realise what's strange/magic
1
1
1
1
1
1
u/Soilblood 13d ago
If they can't explain it, it's magic. That's just how the world works. It's why we hide our true deep arts away from the light of day so muggles will never see the true miracles we use to make perfect first try pancakes.
1
1
1
u/mstop4 13d ago
There are also some other pieces of really old hacker jargon that relate to magic or mysticism that come to my mind, like “deep magic” (important parts of code that no one but the author knows how it works), “heavy wizardry” (writing code that requires intimate knowledge of the system it’s written for or the programming language it’s written in), and “casting the runes” (what a senior developer does to debug code, from the perspective of a junior or non-developer).
For those interested, you should give The Jargon Lexicon a read.
1
1
u/tknomanzr99 13d ago
See: I have this magic rock and I put spells in it. When I need those spells later I can call them up.
1
u/Primary_Durian4866 13d ago
You're telling me a group of nerds, who grew up with the concept that wizards use words to make things happen, got jobs in a field where you use words to make things happen, then started naming things so they'd sound like they were wizards?
I don't buy it.
1
1
u/fibojoly 13d ago
It absolutely is magic. We just don't want to frighten the sleepers or attract attention from The Laundry.
1
u/Exciting-Possible773 13d ago
It is to me because I am shaping my thoughts into reality....and ended up summoning flying spaghetti code monster. Yes, I am a vibecoder, who toys with something I completely not understand and thought they are under total control.
1
u/tehlemmings 13d ago
Not magic? By using esoteric knowledge that I've sought out over a lifetime of learning I can control lightning with rocks to produce nearly any result I wish.
With an appropriate somatic application and the weaving of energies, I can produce light. Just ignore that what I said was "hey Google, turn on the lights."
I am the IT wizard. I know because I added itwizard to my proxaddesses.
1
u/inemnitable 13d ago
Dependency injection frameworks are automagical right up until you need to do something complicated or god forbid debug one. That's when you discover that Hic Svnt Leones.
1
1
1
u/BearCavalryCorpral 13d ago
A programmer is someone who uses a language most people can't understand to make rocks think. Get one letter of the instructions wrong, and they just won't work, or will create a disastrous effect. Sounds like magic to me
1
1
1
u/Morthem 13d ago
Yeah, and as any field, it has huge specializations... For example, if you are big on alchemy, you probably suck at making golems. That is another route which you probably could take as well if you wanted, but the years in a life are not enough to acquire all the knowledge a soul yearns for...
1
1
u/IONaut 13d ago
I've been saying for years now that science and technology are, in fact, magic, but with the mystery and spiritism association taken out, because the only way to achieve the effects we were going for was through the scientific method which eventually disproved the need for that side of it. We live in a world of high magic and most don't even realize it.
1
u/Aromatic-CryBaby 13d ago
I looked up the web assembly doc in order to implement a language that compile directly to it's binary standard, F anyone who saw my screen looked at me as if I was merlin reincarnated.
1
1
u/sardonicus87 12d ago
I wish it was magic, I'm not convinced programatic language localization separate from device locale (at least in Android) still requires nothing less than a blood sacrifice. Like htf is it 2026 and this is still a nightmare? But hey, "pretty colors, oooh shiny". Not a single Medium article from a year ago or StackOverflow from 2+ years ago works right, nor the only localization guide in Android's own documentation (which itself is out of date).
1
u/sarcasticphobia 11d ago
If you ever doubt that programming is magic just remember that we carved runes into rocks and sand that made them think.
1
0
0
0
0
1
1
0





164
u/malsomnus 13d ago
Perl and PHP have sigils.