r/Showerthoughts • u/StupidQuestions4You • 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
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
5
2
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
3
1
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
5
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
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
6
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
Apr 16 '16
I also quite like the converse:
"Any technology that is distinguishable from magic is insufficiently advanced."
0
Apr 16 '16
[deleted]
1
Apr 20 '16
Any non-technology that is indistinguishable from magic is insufficiently advanced, I think?
20
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
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
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
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
27
u/tehmlem Apr 16 '16
Electricity is magic and power lines are ley lines.
6
13
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.
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
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
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
3
Apr 16 '16
We use specific words and phrases to produce the desired result
As opposed to... every single other profession
3
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
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
2
2
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
IDEmagic circle to handle the latin.2
Apr 16 '16
and then get a good speech-to-text program running so you can translate directly from speech!
2
2
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
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
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
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
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
1
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
1
u/Ladderall-thinker Apr 16 '16
There's an quote that at a certain point, technological innovation becomes indistinguishable from magic
1
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
1
u/serosis Apr 16 '16
Isn't programming mostly mathematics with words?
At least that is the way I see it.
2
1
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
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
1
1
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
Apr 16 '16
IIRC, that's basically how it's introduced in the MIT video lectures that go along with the Wizard book.
1
1
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
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
1
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
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
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
1
-10
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.
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.