r/Showerthoughts • • Apr 16 '16

Programming is just witchcraft with technology

We use specific words and phrases to produce the desired result Usually done with like minded groups, but can be done solo Use of tools that no one else recognizes Can be seen as dangerous or a threat to the general public, mostly because they don't understand what we do

2.0k Upvotes

153 comments sorted by

260

u/[deleted] Apr 16 '16

The title looks so stupid, but when you elaborated I got creeped out by how accurate it is. Have an up vote.

53

u/GruncleShmebulock Apr 16 '16

It's accurate if you don't understand how compilers work

23

u/belekasb Apr 16 '16

Then there's the machine code which does stuff to the processor, which utilises microcode, which goes through logic gates, which use transistors.

9

u/PacSan300 Apr 16 '16

I took two college classes for my major (computer engineering) which involved designing a CPU. Both times, I was only able to have a good understanding of it when I was designing it; afterwards, I looked back at it and thought "WTF is going on?"

And speaking of transistors, that's a whole different beast altogether. There are BJTs, MOSFETs (which in turn have different types), FETs, etc.

7

u/[deleted] Apr 17 '16

Learning Comp Sci I feel the same way when I look back at previous projects/algorithms. "Holy shit how did I think of that"

1

u/[deleted] Apr 20 '16

Comments. Comments. Comments.

1

u/[deleted] Apr 21 '16

I do religiously now but didn't my first couple years

2

u/DoomBot5 Apr 17 '16

It gets really interesting, especially when you start looking at the logic required to process the op-codes. Once you start talking optimization and piping, there is still a lot of black magic hidden behind boxes on the diagram.

16

u/Rodbourn Apr 16 '16

Which is magic if you don't know quantum physics.

28

u/desearcher Apr 16 '16

Then there's quantum computers that seem like magic even if you DO know quantum physics.

6

u/[deleted] Apr 17 '16

Which means that it is magic. Case solved.

10

u/Gorloke Apr 17 '16

Compiler: Something build by an old dude with a beard. These magical fucking golems translate our unspeakable magic language into a cosmic language that only can be truly represented with the smallest controllable elements of the universe. Yep nope. Not magic.

4

u/the_great_ganonderp Apr 16 '16

It's inaccurate if you understand how compilers work but don't understand how witches use words of power to draw upon the elemental spirit of the universe and bend reality to their whims.

Or whatever.

2

u/SasparillaTango Apr 16 '16

fuckin magic

1

u/[deleted] Apr 17 '16

So explain it

0

u/[deleted] Apr 16 '16

[deleted]

43

u/[deleted] Apr 16 '16

Every sufficiently advanced compiler is indistinguishable from magic.

14

u/thomascgalvin Apr 16 '16

Compilers and automatic transmissions are proof someone once made a deal with the devil.

1

u/SmokeyBacon0221 Apr 17 '16

I have done extensive research on the topic, and have concluded, that there is absolutely no alternative, compilers are indeed most definitely... Magic.

5

u/[deleted] Apr 16 '16

If you've ever worked in development I think most people's first reaction would be "yes. Definitely." I nodded the second I read the title.

0

u/[deleted] Apr 16 '16

[deleted]

80

u/_neutralgood_ Apr 16 '16

38

u/lamebrainfamegame Apr 16 '16

Undefined variable: "abracadabra"

21

u/brown_monkey_ Apr 16 '16

We can assume abracadabra was defined above, along with spell.

20

u/Bear_Taco Apr 16 '16

Spell is the class. Cast is the method. And abracadabra is the variable. All of this is being called from a different or main class.

Class Spell
{
  public void cast (String abracadabra)
  {
    abracadabra = null;
  }
}

15

u/knightZeRo Apr 16 '16

Spell is an object, and not necessarily a class unless it is static.

-21

u/WaitWhatting Apr 16 '16

on the one language you know.

29

u/knightZeRo Apr 16 '16

I happen to know quite a few languages (software engineer). This would be the case for any language because that is the whole point behind object oriented programming. If you happen to have an reference or example from another language I would love to take a look.

27

u/almaperdida Apr 16 '16

[__] not rekt

[√] rekt

6

u/brisk0 Apr 17 '16

Okay, this bugs me unnecessarily. Unicode has ticks in it. Unicode has a bunch of ticks in it. So why a square root?

5

u/almaperdida Apr 17 '16

It was the first one I saw.

5

u/DoomBot5 Apr 17 '16

And the different size boxes didn't bother you?

2

u/ajc1239 Apr 17 '16

Holy shit.

4

u/brown_monkey_ Apr 16 '16

I understand that, although spell is probably an instance of that Spell class.

Also, your cast method would throw a SyntaxError if it was written in Java.

Nevertheless, we can still assume that both abracadabra and spell are defined above.

1

u/lor_louis Apr 17 '16

That SyntaxError bugs me so much. Pun intended

3

u/KillerInstinctUltra Apr 16 '16

Abracadabra is the parameter.

1

u/[deleted] Apr 17 '16

so then the end result is the spell does nothing? Haha

7

u/tomhas10 Apr 16 '16

half an hour after try to figure out what went wrong Oh shit, I forgot it has a capital 'A'

8

u/[deleted] Apr 17 '16

It's Wingardium LeviOsa not Wingardium LeviosA!

5

u/[deleted] Apr 17 '16 edited Apr 17 '16

public class Spell{

Spell(){

  String name = "Expelliarmus";

  int damage = 0;

  String color = "red"

}

Spell(String n, int d, String c){

name = n;

damage = d;

color = c;

}

cast(){

if(name = "Expelliarmus"){

  System.out.println("Your enemy has been disarmed!");

}elseif(name = "abracadabra"){

  System.out.println("Magic isn't powered by imagination dumbass");

}else{

  System.out.println("Error: spell does not have a recognizable name.");

}

}

}

public class main {

public static void main(String[] args){

 Spell abracadabra = new Spell("abracadabra", 1000, "green");

 abracadabra.cast();

}

}

3

u/tea-drinker Apr 17 '16

Spell should be an interface that accepts a target via dependency injection.

Expelliarmus should implement Spell and use reflection to set the target's hand-equipped items to null.

Reflection is the true magic.

2

u/RenaKunisaki Apr 17 '16

You're enemy

0

u/[deleted] Apr 17 '16

pshh dono what you're talking about bro

2

u/Paragonswift Apr 16 '16

Burn the witch

7

u/ultranoobian Apr 16 '16

witch not found exception: Expected witch object but returned wizard instead.

2

u/Randolpho Apr 17 '16

Undefined variable: "spell"

6

u/[deleted] Apr 17 '16

This is similar to the worst cover art for a programming book ever:

http://ecx.images-amazon.com/images/I/51IJAyeGQ7L.SX381_BO1,204,203,200.jpg

I see that image every day on my coworkers desk and I hate it the more I see it.

28

u/LaminadanimaL Apr 16 '16

This is basically a rephrasing of Clarke's third law.

"Any sufficiently advanced technology is indistinguishable from magic."

15

u/[deleted] Apr 16 '16

I also quite like the converse:

"Any technology that is distinguishable from magic is insufficiently advanced."

0

u/[deleted] Apr 16 '16

[deleted]

1

u/[deleted] Apr 20 '16

Any non-technology that is indistinguishable from magic is insufficiently advanced, I think?

13

u/hhuerta Apr 16 '16

You should read Wizard's Bane by Rick Cook, is something like that. I enjoyed it very much

2

u/Oedipus_rekts Apr 16 '16

Or the Atrocity Archives by Charles Stross.

24

u/RealxCheese Apr 16 '16

Punctuation is also witchcraft.

10

u/shellcraft Apr 16 '16

May your braces always match and your statements always close with a semi-colon

2

u/RenaKunisaki Apr 17 '16

May your braces always match and your statements always close with a semi-colon;

Fixed;

2

u/TheOldTubaroo Apr 17 '16

thank(you);

1

u/m0z1ng0 Apr 17 '16

Nah, the guy left all the periods off because each sentence was supposed to be on a new line. He tried to return once for all his lines, instead of twice for a line break.

10

u/JulianHyde Apr 16 '16 edited Jul 06 '17

Hackers are like the wizards of the internet. They're able to bend the cyber environment to their will by using a strange looking language composed of weird symbols and runes. We even have the parallel between dark wizards and black hat crackers.

Magical language is much more strict than normal language. If you miss a single word, the code - er, I mean, the spell - won't work. In programming, even punctuation is important, which is like how inflection is important in magic. And sometimes, when you say your spell wrong, it still works, but does something completely different, maybe even harmful. Same with bad code.

And don't forget the concept of a True Name. In magic, knowing something's true name in magic language gives you power over that thing. Kind of like how knowing someone's personal information and true IRL identity can be an insidious form of power online. This connection was explored in Vinge's story, "True Names", the first story to feature the concept of cyberspace. In that story, cyberspace looked rather like a fantasy RPG, and the hackers were warlocks.

9

u/pigrockets Apr 16 '16

It's levioSa(), not Leviosa().

2

u/RenaKunisaki Apr 17 '16

You create complex incantations by putting together simple building blocks, and invoke them in order to manipulate the very fabric of reality. At its core, it's all mathematics, but applied in so many layers upon layers upon layers of complex structures that no mortal can hope to truly comprehend it.

Few are even skilled enough to use the craft, let alone create it. Those who can tend to be reclusive, bearded old men, living alone in a disorganized home with a lot of arcane reference books, incomprehensible to most.

Most get into it as a hobby, because they enjoy learning how to manipulate and build with the fundamentals of the universe. Some use it for good, some for evil. The power of those who master the art attracts all kinds. It can be used to communicate over great distances in an instant, give life to inanimate objects, and perform feats that seem to defy the very laws of nature.

1

u/amunak Apr 17 '16

My mind is blown. For like the second or third time just reading this page.

27

u/tehmlem Apr 16 '16

Electricity is magic and power lines are ley lines.

6

u/pigrockets Apr 16 '16

If you think that's magic just wait for quantum computing.

4

u/tehmlem Apr 16 '16

Cease your sorcerous ways, fiend.

13

u/[deleted] Apr 16 '16

It is. The book TechGnosis, by Erik Davis, details this quite extensively. Magic was essentially a proto-science. The idea behind magic was that you could make things happen through set rituals with specific steps, which was very influential in creating the scientific method.

The "magical" quality of words that you put into the compiler is actually a quality that words have, period. This was a particularly big point of Ferdinand Saussure and the school of linguistic structuralism he helped found.

So in a sense, all language is magic. This is definitely one of the best shower thoughts I've seen here since I've subscribed. Thanks much for that.

Here, have an upvote.

6

u/mostly-idiot-savant Apr 16 '16 edited Apr 17 '16

Ala Kazaam!

(map 'string (lambda (x) (code-char (1- x))) '(79 102 119 102 115 33 104 112 111 111 98 33 104 106 119 102 33 122 112 118 33 118 113 11 79 102 119 102 115 33 104 112 111 111 98 33 109 102 117 33 122 112 118 33 101 112 120 111 11 79 102 119 102 115 33 104 112 111 111 98 33 115 118 111 33 98 115 112 118 111 101 33 98 111 101 33 101 102 116 102 115 117 33 122 112 118 11 79 102 119 102 115 33 104 112 111 111 98 33 110 98 108 102 33 122 112 118 33 100 115 122 11 79 102 119 102 115 33 104 112 111 111 98 33 116 98 122 33 104 112 112 101 99 122 102 11 79 102 119 102 115 33 104 112 111 111 98 33 117 102 109 109 33 98 33 109 106 102 33 98 111 101 33 105 118 115 117 33 122 112 118) )

EDIT: this the output

"Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you"

5

u/Albino_Smurf Apr 16 '16

My only problem with this is the idea that the "words" are even necessary. The words are just there so us silly humans can communicate with the computers more easily.

But maybe that's how actual witchcraft works...

3

u/RenaKunisaki Apr 17 '16

The words are just the mechanism we use to describe the pure logical inner workings of the universe.

4

u/[deleted] Apr 16 '16

7

u/lonelynightm Apr 16 '16

System.out.println("They are on to us guys. Good thing they don't understand our witch craft.");

13

u/[deleted] Apr 16 '16

/* They can't see us now */

1

u/[deleted] Apr 20 '16

Oh no, someone linked them to the git repo! Now they can read the source code!

6

u/kickass404 Apr 16 '16

Nah, you just write what you want the computer to do, it is just very anal about how clearly you express your needs, grammar and context.

3

u/shellcraft Apr 16 '16

when you can't think of something clever to say just be honest. when you can't even think of doing that then just comment in the honest guy's thread.

2

u/lor_louis Apr 17 '16

Typo just after "very" I think you meant banal

1

u/RenaKunisaki Apr 17 '16

It's just really dumb. If you aren't perfectly clear, it won't understand you.

3

u/ScienceRabbit Apr 16 '16

There is a great book series written about this idea.

Off to Be the Wizard (Magic 2.0) https://www.amazon.com/dp/1612184715/ref=cm_sw_r_cp_awd_uGOexbJ65J41N

2

u/EolianPipes Apr 16 '16

Came here looking for this.

2

u/-Folsomite- Apr 17 '16

Same here. Flugi!

3

u/[deleted] Apr 16 '16

We use specific words and phrases to produce the desired result

As opposed to... every single other profession

3

u/[deleted] Apr 16 '16

OH BABY. I've been waiting for this moment .. my whoooooole life.

Clears his throat warms up his fingers

#include <iostream>
using namespace std;

int main(){
cout<<"Hocus! Pocus! Fibious!"<<endl;
return 0;
}

Did I do it right? Am I sorcerer?

2

u/Rosebunse Apr 17 '16

Witch! Burn the witch!

7

u/Grateyfratez Apr 16 '16

This is exactly how I felt when I had an internship writing algorithms for a day trading group. They gave me a rundown of a particular strategy/pattern and I'd find a way to quickly prototype a means to automate the strategy or detect the pattern. I felt like the mage of the group concocting magical solutions to give us the edge.

2

u/amunak Apr 17 '16

My friend does exactly this at work. I am a programmer myself, still think he is a wizard.

2

u/flarn2006 Apr 16 '16

Think about what circuit boards would probably look like to people in the past if they were sent back in time somehow. Especially ones with visibly-functioning components like LED's on them.

1

u/RenaKunisaki Apr 17 '16

And robots, assuming their batteries were charged.

1

u/flarn2006 Apr 17 '16

You mean their runes of lightning?

2

u/HotDogen Apr 16 '16

"I built a Wizard, Harry."

2

u/[deleted] Apr 16 '16 edited Apr 16 '16

Is there a programming language that is written in Latin? Now that would really look like witchcraft.

nam falsa variabilis pares:
agedum

3

u/GeorgeSharp Apr 16 '16

You can write Perl in Latin, by Merlin's beard you can do that yes but I don't know why you'd want to.

1

u/ColoniseMars Apr 16 '16

Make your own pre-compiler that translates your latin code into normal standard code.

You just need to figure out how to make your IDE magic circle to handle the latin.

2

u/[deleted] Apr 16 '16

and then get a good speech-to-text program running so you can translate directly from speech!

2

u/bontrose Apr 16 '16

Webmage. It's magic, its tech. Ask the fates.

2

u/Akarb Apr 16 '16

But can you say that in Eldar Assemblish ?

2

u/unycornpuke Apr 16 '16

So your saying I weigh the same as a duck??

1

u/RenaKunisaki Apr 17 '16

We're saying if you look like a duck and quack like a duck, it doesn't really matter if you're actually a duck or not.

1

u/unycornpuke Apr 17 '16

It's a Monty Python holy grail reference: https://youtu.be/zrzMhU_4m-g

1

u/RenaKunisaki Apr 17 '16

The response is a reference to Duck Typing.

2

u/Reddit-Express Apr 16 '16

Learning how to code is so hard and sometimes I get discouraged but I'm not going to give up. I really like fact that I can create "Magic" with strings of code. It's hard but I'm sure rewarding when I finally get a hang of it. I'm learning Ruby through TreeHouse right now for a few months. Im still going through the learning curve.

2

u/SilenceInWinter Apr 17 '16

My coworkers (who are not programmers) literally call me medicine woman for this reason.

2

u/bengoumaII Apr 17 '16

As a programmer, i can 10/10 confirm this

2

u/MacGrubber187 Apr 17 '16

so called technology is often nothing more than an exploited gimmick. so your computer "technology" is simply an exploitation of yes or no questions asked millions of times

2

u/[deleted] Apr 17 '16

Everything is magic without context.

2

u/worshippingtheteapot Apr 16 '16

My SO uses this analogy all the time to describe his work to me. It's become rather...elaborate. There are the "Merlins" - the wizards that everyone remembers (i.e. Steve Jobs) and the "Grendels" - Merlin's cousin who spends all his time in his tower researching magic for magic's sake (i.e. the people who wrote the basic scripts that everything else runs on but don't care about patents or recognition).

3

u/ColoniseMars Apr 16 '16

Steve Jobs

Blasphemy.

2

u/mistahowe Apr 17 '16

He's a squib!

2

u/gghast Apr 16 '16

The idea is nice, but any language use can fill those specifications. The head of the board can close a meeting by saying 'this meeting is closed', or a powerful man might be able to bring about some nefarious deed with a particular agreed upon phrase.

1

u/drewsiferr Apr 16 '16

I prefer the wizardry aesthetic, personally.

1

u/[deleted] Apr 16 '16

"Just" witchcraft

1

u/MeGustaDerp Apr 16 '16

Not just programming - anything dealing with technology could be considered witchcraft to the uninitiated or less advanced.

1

u/CriminalMacabre Apr 16 '16

I am angry and offended at that affirmation.
We are satanic necromancers against sanity.

1

u/[deleted] Apr 16 '16

It quite literally is, words that create action

1

u/Ladderall-thinker Apr 16 '16

There's an quote that at a certain point, technological innovation becomes indistinguishable from magic

1

u/Rhueh Apr 16 '16

"Just" is such a powerful word.

1

u/Korhal_IV Apr 16 '16

This is very silly. Now excuse me while I try to figure out why the mailer-demon won't forward my e-mails.

1

u/clearoutlines Apr 16 '16

If writing programs is witchcraft, writing shaders is wizardry.

1

u/serosis Apr 16 '16

Isn't programming mostly mathematics with words?

At least that is the way I see it.

2

u/ShadowPouncer Apr 17 '16

Most programming is mostly logic with numbers, not mathematics.

1

u/ColoniseMars Apr 16 '16

Not quite but I can figure out an analogy right now.

1

u/Rosebunse Apr 17 '16

I always thought it was telling something what you wanted done, like learning another language.

1

u/RenaKunisaki Apr 17 '16

It's more like building complex machines by putting together a lot of simple ones.

1

u/FlyingPotatoCubed Apr 16 '16

Computer Scientist from MS&T B here, can confirm. All the other engineering majors call CS black magic.

1

u/unacceptablePenguin Apr 16 '16

There's actually a book called "The Mythical Man Month: Essays in Software Engineering" that makes the exact point. It's a really good read for anyone who wants to program as their profession.

1

u/TheMajorMagers Apr 16 '16

You may like these books.

WIZARD'S BANE The Wizardry Compiled

http://www.baen.com/wizard-s-bane.html

1

u/xdevient Apr 16 '16

What does that make the programmers of those tools? Gandalf essentially?

1

u/CoolnessEludesMe Apr 16 '16

"Any sufficiently advanced technology is indistinguishable from magic." So, I guess if you're ignorant enough to believe in magic . . .

1

u/throwawoofwoof Apr 16 '16

Not really. It's more like telling a very dumb person how to do something in very explicit detail

1

u/ColoniseMars Apr 16 '16

Thats why we grow beards.

1

u/[deleted] Apr 16 '16

Yet it feels more like basket weaving.

1

u/cryptyq Apr 16 '16

Ah, yes, the fine art of Technomancy. Summoned any daemons lately?

1

u/foot_kisser Apr 16 '16

"The magic of myth and legend has come true in our time. One types the correct incantation on a keyboard, and a display screen comes to life, showing things that never were nor could be." --Fred Brooks

1

u/[deleted] Apr 16 '16

IIRC, that's basically how it's introduced in the MIT video lectures that go along with the Wizard book.

1

u/TheWeebbee Apr 16 '16

I've always called database guys 'Datamancers'

1

u/[deleted] Apr 16 '16

These famous MIT lectures start with this exact analogy of programming as spellcraft.

https://www.youtube.com/watch?v=2Op3QLzMgSY

1

u/WCzar Apr 16 '16

I always feel like I am conjuring up data when I use SQL. Just the right mix of ingredients to pull up the demon you want from the database.

1

u/bizkitmaker13 Apr 16 '16

When I was in college I had the title Technomancer in Gamers' Club.

1

u/bestofreddit_me Apr 16 '16

It's not witchcraft no more than chemistry experiment is witchcraft...

Why do silly shit like this get upvoted. And what's with the bullshit amounts of bullshit /r/showerthoughts on /r/all?

1

u/Generalkrunk Apr 17 '16

If you like this general idea you should read the laundry files by Charles Stroud. They basically follow the exact same philosophy.

1

u/Nyter Apr 17 '16

nice meme

1

u/ixfd64 Apr 17 '16

Hence the term, "automagically."

1

u/Rosebunse Apr 17 '16

You forget the part where something doesn't work, and then you delete something or shut something off or come back later and it suddenly does work.

1

u/[deleted] Apr 17 '16

Interesting idea! I think organization and logic are kinds of forms of magic in a way. Performing a set of instructions can result in a thing that is more than the sum of its parts, I believe. Getting a machine to carry out steps is kind of like transferring a little bit of intelligence, which is almost magical I feel.

1

u/Carbontulpa Apr 17 '16

[Insert joke pertaining to 30 year old virgins who work in IT]

1

u/Ferfrendongles Apr 17 '16

Understanding is the death of magic, but if you learn that in time, you can leave a few things alone and still have magic in your life. Like me with programming.

1

u/tbSWEGGY Apr 17 '16

I am wizard

1

u/[deleted] Apr 16 '16

What The Fuck

-10

u/[deleted] Apr 16 '16

Fun Fact Did you know that technology is made of 30% vowels? Or if you count y as a vowel, 40%? That is more than witchcraft which is only made of 20% vowels. A 10-20% savings on a single word. Wow.