Anyone up for this mug?

๐ŸŽ™๏ธ HaulCozen ยท 5755 points ยท Posted at 16:40:14 on March 11, 2015 ยท (Permalink)


Saved comment

seakeg ยท 726 points ยท Posted at 20:31:14 on March 11, 2015 ยท (Permalink)

Even funnier: Get a co-worker one that says #1 and then pull this one out after you give it to them.

You: I got you a mug! It says #1 programmer on it.

Co-worker: Oh thanks!

You: Yeah, I got one for myself as well.

Pulls out #0 Programmer mug

Co-worker: Oh...

๐ŸŽ™๏ธ HaulCozen ยท 169 points ยท Posted at 20:47:58 on March 11, 2015 ยท (Permalink)*

I kek'd

Edit: You can get it here. I made it on zazzle, if you want one that says #1 you can change the text yourself.

okmkz ยท 217 points ยท Posted at 21:14:57 on March 11, 2015 ยท (Permalink)
self.kek()
pimp-bangin ยท 89 points ยท Posted at 21:37:46 on March 11, 2015 ยท (Permalink)

this.setKekking(true)

okmkz ยท 55 points ยท Posted at 21:40:34 on March 11, 2015 ยท (Permalink)

That's an awfully verbose state machine

Splitshadow ยท 171 points ยท Posted at 22:18:19 on March 11, 2015 ยท (Permalink)
Main.Kek.GetKekkingSetterFactory().MakeKekkingSetter().SetKekStrategy(KekStrategies.SIMPLE).SetKekking(this, true);
okmkz ยท 112 points ยท Posted at 22:25:37 on March 11, 2015 ยท (Permalink)
this.setTriggered(true);
Pascalius ยท 32 points ยท Posted at 22:30:26 on March 11, 2015 ยท (Permalink)

Watch out, it's a boolean trap!

function setTriggered(bool nottriggered)

odraencoded ยท 9 points ยท Posted at 22:41:07 on March 11, 2015 ยท (Permalink)
AddTrigger(this);
[deleted] ยท 43 points ยท Posted at 23:05:50 on March 11, 2015 ยท (Permalink)

I know HTML.

legofranak ยท 5 points ยท Posted at 01:38:56 on March 12, 2015 ยท (Permalink)

<s>impressive</s>

amdc ยท 1 points ยท Posted at 09:42:29 on March 12, 2015 ยท (Permalink)

That's the tag I haven't seen in eons

DatGDoe ยท 1 points ยท Posted at 12:22:17 on August 10, 2015 ยท (Permalink)

How To Meet Ladies...

Bromlife ยท -1 points ยท Posted at 03:02:19 on March 12, 2015 ยท (Permalink)

"Oh you program?" "Yeah I just leant HTML"

SUPERSMILEYMAN ยท 0 points ยท Posted at 00:54:00 on March 12, 2015 ยท (Permalink)

All I know is I have never been so triggered before in my life.

iopq ยท -1 points ยท Posted at 10:59:30 on March 12, 2015 ยท (Permalink)

<td valign="top">kek</td>

Hexorg ยท -2 points ยท Posted at 23:32:51 on March 11, 2015 ยท (Permalink)

<div>kek</div>

[deleted] ยท 4 points ยท Posted at 01:59:56 on March 12, 2015 ยท (Permalink)

where's your p tag breh

[deleted] ยท 8 points ยท Posted at 03:32:31 on March 12, 2015 ยท (Permalink)

Shudder. You're reminding me too much of my Enterprise Architecture class.

IgnitedSpade ยท 13 points ยท Posted at 03:48:40 on March 12, 2015 ยท (Permalink)

What? All I see is normal Java code

[deleted] ยท 3 points ยท Posted at 03:52:38 on March 12, 2015 ยท (Permalink)

It's just the Factories and the unnecessary setting of generator objects and DEAR LORD THERE IS SO MUCH UNNECESSARY TYPING AND REDUNDANCY.

Don't get me wrong, I love Java. But this is just....awful...it's just...awful.

GeneralSchnitzel ยท 28 points ยท Posted at 22:30:31 on March 11, 2015 ยท (Permalink)*

[self.stateManager setState:StateKekking isKekking:@YES];

God I hate you Objective-C.

slipperier_slope ยท 4 points ยท Posted at 02:25:40 on March 12, 2015 ยท (Permalink)

That should be @YES.

(or worse [NSNumber numberWithBool:YES])

[deleted] ยท 18 points ยท Posted at 00:55:17 on March 12, 2015 ยท (Permalink)

sum(lambda kek: kek*kek, [kek for kek in KEK])

DaemonXI ยท 11 points ยท Posted at 05:47:25 on March 12, 2015 ยท (Permalink)
def top_kek():
    return max(all_keks)
[deleted] ยท 1 points ยท Posted at 17:20:55 on March 12, 2015 ยท (Permalink)

repeat kek

feartrich ยท 1 points ยท Posted at 05:29:25 on June 16, 2015 ยท (Permalink)

4019 reviews

From reddit to commercial success...

๐ŸŽ™๏ธ HaulCozen ยท 1 points ยท Posted at 05:34:10 on June 16, 2015 ยท (Permalink)

That's actually for the mug itself. Like, without the design. Just the quality of the mug and the printing.

I did get around $50 in total for royalties up to this point though. Not much, but I can buy things on Zazzle with it.

crazy_eric ยท 9 points ยท Posted at 00:01:34 on March 12, 2015 ยท (Permalink)*

I would love to do this to my co-worker but I couldn't find these mugs anywhere.

[deleted] ยท 1 points ยท Posted at 01:13:42 on March 12, 2015 ยท (Permalink)

There's a few places where you can create your own mugs. I imagine you'd pay a small premium but it might be worth it.

Harakou ยท 0 points ยท Posted at 00:32:02 on March 12, 2015 ยท (Permalink)

Probably could have them custom-made on zazzle or something like that.

Chizbang ยท 1 points ยท Posted at 02:18:48 on March 12, 2015 ยท (Permalink)

Lua mug!

l3e7haX0R ยท 1 points ยท Posted at 17:52:32 on March 12, 2015 ยท (Permalink)

Upscale level: (unsigned long long) -1;

FenixR ยท 0 points ยท Posted at 20:58:36 on March 11, 2015 ยท (Permalink)

Then watch other non programming knowledgeable coworkers go whoosh when they see the mugs.

freethinkaa ยท 126 points ยท Posted at 18:01:29 on March 11, 2015 ยท (Permalink)

world.programmers[0]

thelehmanlip ยท 53 points ยท Posted at 18:20:29 on March 11, 2015 ยท (Permalink)

World.Programmers.First()

freethinkaa ยท 106 points ยท Posted at 18:34:13 on March 11, 2015 ยท (Permalink)

the capital letters irritate me

thelehmanlip ยท 90 points ยท Posted at 18:41:34 on March 11, 2015 ยท (Permalink)

Sorry, .NET coder here :)

phaseMonkey ยท 39 points ยท Posted at 19:00:48 on March 11, 2015 ยท (Permalink)

Don't apologize... I suck without Intellisense too.

Nonthares ยท 22 points ยท Posted at 19:22:42 on March 11, 2015 ยท (Permalink)

Don't listen to him /u/thelehmanlip. You can apologize if you want to!

phaseMonkey ยท 6 points ยท Posted at 19:47:28 on March 11, 2015 ยท (Permalink)

Ahaha

slipperier_slope ยท 7 points ยท Posted at 02:36:04 on March 12, 2015 ยท (Permalink)

Please do apologize. It's mandatory.

sk_2013 ยท 3 points ยท Posted at 02:44:10 on March 12, 2015 ยท (Permalink)

Oh gosh. I use eclipse, and for some stupid reason the college I'm taking wants everyone using NetBeans.

This semester I learned that I don't know how to code. At all.

freethinkaa ยท 10 points ยท Posted at 18:45:48 on March 11, 2015 ยท (Permalink)

Still, in what language do instance variables and methods get capitalized? That's normally reserved for classes. What language in .net are you writing in?

FrostedWalrus ยท 29 points ยท Posted at 19:00:29 on March 11, 2015 ยท (Permalink)

C#

All public fields, properties, methods, events, constants, classes, enums, namespaces, delegates and structs are UpperCamelCase. Private fields and local variables are lowerCamelCase which is the only exception to this rule, but privates are nobody else's business so who cares.

thelehmanlip ยท 13 points ยท Posted at 19:10:12 on March 11, 2015 ยท (Permalink)

Yup. I thought it was weird when I first started doing C# but I like it a lot now. I think part of it is the functional aspects of C#. Since you can have local functions and actions (Func<T>) it helps to see what is a "local" function call and what isn't.

davidNerdly ยท 13 points ยท Posted at 20:07:25 on March 11, 2015 ยท (Permalink)

C# was my first language so it was all normal to me. I do a lot of javascript now and at first I was like "wtf, this style is so weird" but now since I mix about 80/20 time spent in js/C# my entire world is confused.

I like both styles in their respective languages but sometimes I just end up hating parts of both because they conflict a lot.

And that was my pointless rambling comment for the day, I hope you all enjoyed it.

Gbyrd99 ยท 10 points ยท Posted at 20:28:42 on March 11, 2015 ยท (Permalink)

Try working with C# only to regress back to vb6... i hate my job. Feel like my programming skills are regressing here.

davidNerdly ยท 6 points ยท Posted at 20:48:54 on March 11, 2015 ยท (Permalink)

Ewww... I'm so sorry... Get a new job.

bacondev ยท 3 points ยท Posted at 23:10:10 on March 11, 2015 ยท (Permalink)

Try working with C# only to regress back to VBAโ€ฆ Wait. I forgot. My company decided they didn't like that and that they should go one level deeper. VBScript. Fuck that. Yeah, I don't work there anymore.

Gbyrd99 ยท 1 points ยท Posted at 02:59:23 on March 12, 2015 ยท (Permalink)

Yeah I gotta practice again I feel like I'm so rusty.

IgnitedSpade ยท 1 points ยท Posted at 03:51:53 on March 12, 2015 ยท (Permalink)

Next company meeting: starting next month we will be switching entirely to Scratch

thelehmanlip ยท 2 points ยท Posted at 20:47:31 on March 11, 2015 ยท (Permalink)

Yeah, I know that game. I'd have to say what I hate the most is working with SignalR, because then you have references to the same method that are spelled camelCase and PascalCase. Infuriating! (I'm not sure if this is actually required...)

svenM ยท 1 points ยท Posted at 07:39:27 on March 12, 2015 ยท (Permalink)

I always understood it to be because the rules are different between c# en js, but I understand perfectly what you mean.

grumbly ยท 1 points ยท Posted at 21:01:43 on March 11, 2015 ยท (Permalink)

I just started back up with Java after a 15 years with C#. My first reaction still is "What slack jawed programer started everything with lower case? Oh, right, not in Kansas."

freethinkaa ยท 2 points ยท Posted at 19:20:06 on March 11, 2015 ยท (Permalink)

That belongs in /r/mildlyinfuriating :P

[deleted] ยท 1 points ยท Posted at 01:15:21 on March 12, 2015 ยท (Permalink)

Ah, that makes sense. Is there any convention to using variables prefixed with an underscore? I've seen some classes where the private properties are underscore'd, but it's by no means consistent.

pcopley ยท 7 points ยท Posted at 19:03:54 on March 11, 2015 ยท (Permalink)

Method names are capitalized in C#

shvelo ยท 3 points ยท Posted at 20:11:07 on March 11, 2015 ยท (Permalink)

And that's literally the only thing I hate about C#

Xorg_Xalargsky ยท 11 points ยท Posted at 23:33:32 on March 11, 2015 ยท (Permalink)

Why Is That? I Was Bothered At First, Like Yourself, But I Learned To Appreciate C# In Its Wholesome Glory.

[deleted] ยท 3 points ยท Posted at 13:32:06 on March 12, 2015 ยท (Permalink)

If Our Code Isn't Real How Can Eyes?

shvelo ยท 1 points ยท Posted at 23:49:51 on March 11, 2015 ยท (Permalink)

Because it's different from every other language. It needs to get used to, and once I do, I start doing it in other languages

slipperier_slope ยท 7 points ยท Posted at 02:38:24 on March 12, 2015 ยท (Permalink)

the_worst_is_when_c_sharp_devs_do_python.

YouEndUpWithVariablesLikeThisWhichAreHarderToRead.

Beakerbite ยท 6 points ยท Posted at 04:47:53 on March 12, 2015 ยท (Permalink)

its bttr thn c++ whr evry thng is mnmzd.

guyAtWorkUpvoting ยท 2 points ยท Posted at 13:21:12 on March 12, 2015 ยท (Permalink)

cnjIf prnYou vrbWnt prpTo vrbCmpln prnWe vrbUse adjHngrn nouNttn prpAt nouWrk.

freethinkaa ยท -1 points ยท Posted at 23:22:40 on March 11, 2015 ยท (Permalink)

shudder :P

hk__ ยท 5 points ยท Posted at 19:36:39 on March 11, 2015 ยท (Permalink)

Itโ€™s also true for Go.

[deleted] ยท 0 points ยท Posted at 22:39:31 on March 11, 2015 ยท (Permalink)

happy cakeday!

hk__ ยท 2 points ยท Posted at 22:59:11 on March 11, 2015 ยท (Permalink)

Ha thanks :)

TarMil ยท 2 points ยท Posted at 19:58:48 on March 11, 2015 ยท (Permalink)

That's the norm for all of .NET. Even F#, despite the OCaml heritage.

1what1 ยท 0 points ยท Posted at 18:47:12 on March 11, 2015 ยท (Permalink)

I am guessing Entity Framework?

phaseMonkey ยท 2 points ยท Posted at 18:55:42 on March 11, 2015 ยท (Permalink)

Shudder!

CoderHawk ยท 0 points ยท Posted at 19:24:33 on March 11, 2015 ยท (Permalink)

That doesn't even make sense as a reply.

zmanalpha ยท 5 points ยท Posted at 21:02:44 on March 11, 2015 ยท (Permalink)

Funny the amount of different styles there are in programming languages.

albatrossnecklassftw ยท 2 points ยท Posted at 03:26:36 on March 12, 2015 ยท (Permalink)

The guys at my new job asked me why I only sparingly used C# before joining the team (and rarely use it outside of work), I straight up told them I hate the camel case convention that C# uses.

Niles-Rogoff ยท 8 points ยท Posted at 23:28:31 on March 11, 2015 ยท (Permalink)

World.Programmers.FirstOrDefault()

thelehmanlip ยท 2 points ยท Posted at 02:17:42 on March 12, 2015 ยท (Permalink)

Should be a pretty safe assumption that First() will have a value, but I guess you can never be too careful :)

tskaiser ยท 6 points ยท Posted at 08:34:32 on March 12, 2015 ยท (Permalink)

"Should be a pretty safe assumption" -> cause of null reference exceptions EVERYWHERE!

Modevs ยท 3 points ยท Posted at 19:24:29 on March 11, 2015 ยท (Permalink)

Maybe a really succinct sort method would help.

thelehmanlip ยท 8 points ยท Posted at 20:50:15 on March 11, 2015 ยท (Permalink)

World.Programmers.OrderBy(x => x.Rank).First()

Dlgredael ยท 22 points ยท Posted at 18:24:36 on March 11, 2015 ยท (Permalink)

Or you can do it like I did when I started - programmer1, programmer2, programmer3, programmerfour, programmer5

crowbahr ยท 8 points ยท Posted at 20:16:40 on March 11, 2015 ยท (Permalink)

Why didn't you type 4?

Dlgredael ยท 13 points ยท Posted at 20:38:40 on March 11, 2015 ยท (Permalink)

Because I had no standards at all when I first started programming. In all honestly, I'd be lucky to have programmer1 - they were usually some sort of code word for the variable name, pgrmr1 or something.

crowbahr ยท 20 points ยท Posted at 20:40:50 on March 11, 2015 ยท (Permalink)

pr1

Because it's a very self explanatory variable you'll never forget the meaning of, right?

No need to comment it.

novel_yet_trivial ยท 12 points ยท Posted at 18:26:12 on March 11, 2015 ยท (Permalink)
sorted(world.programmers)[0]
JunkyMonkeyTwo ยท 8 points ยท Posted at 19:32:30 on March 11, 2015 ยท (Permalink)
sorted(world.programmers, key=hacker.level, reverse=True)[0]
jspenguin ยท 13 points ยท Posted at 19:54:13 on March 11, 2015 ยท (Permalink)
max(world.programmers, key=lambda p: p.hacker_level)

O(n) instead of O(n log n)

[deleted] ยท 1 points ยท Posted at 22:40:27 on March 13, 2015 ยท (Permalink)

Counting sort: O(k+n) = O(n) in this case though.

And that is fishy because you are looking where you are, then you are first, rather than you are first because you assume.

kirakun ยท 3 points ยท Posted at 21:56:03 on March 11, 2015 ยท (Permalink)

Sorting the full list then taking the first element is too wasteful. Use selection sort instead

rank(world.programmers, 0)
Bux87 ยท 5 points ยท Posted at 22:18:43 on March 11, 2015 ยท (Permalink)

$programmer = current($programmer)

I'm not even sorry

[deleted] ยท 1 points ยท Posted at 01:16:46 on March 12, 2015 ยท (Permalink)

That's the sort of code that will result in a bug. You don't know how, you don't know when, you just know it will.

[deleted] ยท 3 points ยท Posted at 18:54:51 on March 11, 2015 ยท (Permalink)

world.findSubTree(programmers).root

LevitatingSUMO ยท 3 points ยท Posted at 19:11:03 on March 11, 2015 ยท (Permalink)

I'm assuming you sorted the list first ;^)

freethinkaa ยท 1 points ยท Posted at 19:18:52 on March 11, 2015 ยท (Permalink)

Ha, yes

CeramicLight ยท 1 points ยท Posted at 02:58:14 on March 12, 2015 ยท (Permalink)

You bring back my nightmares of getting large .sort() functions to work

SolenoidSoldier ยท 1 points ยท Posted at 13:23:53 on March 12, 2015 ยท (Permalink)

Pretty sure that position's value is Ada Lovelace.

Google "first programmer"

jakewp11 ยท 295 points ยท Posted at 16:43:45 on March 11, 2015 ยท (Permalink)

I've been doing a lot with hex code colors... and I was thinking #000 = black coffee until I read "world's" and "programmer"

I could probably use some coffee.

tuddrussel ยท 112 points ยท Posted at 17:33:47 on March 11, 2015 ยท (Permalink)

I'm with ya, my first idea was that it meant to read "world's blackest programmer".

Like with many things, I'm wrong.

junta12 ยท 43 points ยท Posted at 19:31:57 on March 11, 2015 ยท (Permalink)

It does beg the question though:

Who is the world's blackest programmer?

[deleted] ยท 28 points ยท Posted at 20:57:12 on March 11, 2015 ยท (Permalink)*

[deleted]

junta12 ยท 4 points ยท Posted at 20:58:36 on March 11, 2015 ยท (Permalink)

Woah. I forgot he was even that movie!

lachryma ยท 26 points ยท Posted at 19:44:33 on March 11, 2015 ยท (Permalink)

Given our industry, do you really want to ask?

junta12 ยท -36 points ยท Posted at 19:55:03 on March 11, 2015 ยท (Permalink)

I know some black programmers, but they're all really terrible.

They're basically what we are to indian programmers.

lettherebedwight ยท 56 points ยท Posted at 19:57:07 on March 11, 2015 ยท (Permalink)

That's the most shamelessly racist thing I've seen on reddit all day.

cefarix ยท 7 points ยท Posted at 23:09:10 on March 11, 2015 ยท (Permalink)*

Actually if you understand it as it's written, and with the assumption that "we" are much better than "indian" programmers, then his statement actually evaluates to "black" programmers are much better than "we".

EDIT: And so "black" programmers are really terrible, "we" are really, really terrible, and "Indian" programmers are really, really, really terrible. He couldn't even get his "joke" right.

junta12 ยท -26 points ยท Posted at 19:59:22 on March 11, 2015 ยท (Permalink)

if you read it seriously, then shame on you

lachryma ยท 35 points ยท Posted at 20:02:59 on March 11, 2015 ยท (Permalink)

"Ha ha, I was trolling all along! Ha! Ha? Guys?"

Skyfoot ยท 24 points ยท Posted at 20:08:07 on March 11, 2015 ยท (Permalink)

Racism lesson number 7. Nobody cares if you're being ironic.

junta12 ยท -18 points ยท Posted at 20:11:05 on March 11, 2015 ยท (Permalink)

Irony lesson number 1. Know the definition of irony.

_teslaTrooper ยท 5 points ยท Posted at 20:44:50 on March 11, 2015 ยท (Permalink)

Racism lesson number 8: nobody cares if you're being sarcastic either.

junta12 ยท -5 points ยท Posted at 20:49:41 on March 11, 2015 ยท (Permalink)

My god....

You know that sarcasm and irony follow have a very similar looking rule number 1. See irony, and extrapolate from there...

maru-fan ยท 6 points ยท Posted at 21:06:39 on March 11, 2015 ยท (Permalink)

Racism lesson number 9: nobody cares if you were not being serious as well.

junta12 ยท -4 points ยท Posted at 21:07:29 on March 11, 2015 ยท (Permalink)

Racism lesson number 10: It takes a while to get here.

Skyfoot ยท 3 points ยท Posted at 21:10:44 on March 11, 2015 ยท (Permalink)

Okay, let's try this a different way. You were being racist, and nobody cares why. Please stop.

junta12 ยท -3 points ยท Posted at 21:16:32 on March 11, 2015 ยท (Permalink)

Apparently not. And yet here we are, at the very bottom dregs of a thread, arguing semantics.

Skyfoot ยท 1 points ยท Posted at 23:52:16 on March 11, 2015 ยท (Permalink)

Alright. That was an unconstructive way for me to put it, and I can see where you're coming from. Firstly, here is a post explaining why the "asians are all smart" thing is hurtful to a lot of people. Secondly, there is a problem where people see making racist jokes as something which is okay, because they're not being serious, or they don't really mean it. Unfortunately, that doesn't matter. If you say black people are dumb, which is a thing you said, then it just adds to the weight of anti-black dialectic. Proper out-and-out racist folk, for example, read it and think you agree with them, and that the majority opinion is still with them. Everyone else reads it, and thinks you genuinely think that, because the joke doesn't make any sense if you don't.

Do you see what I mean?

junta12 ยท 1 points ยท Posted at 16:08:55 on March 12, 2015 ยท (Permalink)

That post is too emotionally charged to be unbiased, all it takes is one person to take a comment not directly aimed at them and turn it into personal crusade.

Secondly, racist jokes are fine if the vast majority of the group in question don't take any offence. Unfortunately there's always one or two individuals who like to spoil a good rape joke....

And I believe you misquoted me; I never said black people are dumb. I said I know some black programmers, but they're not very good. I then used that same sub-comparison between caucasians and asians in a self-deprecatory way such that all races would intentionally get butthurt: i.e. africans, caucasians, and asians. That was the intent of the joke.

When comedians such as Frankie Boyle or Chris Rock say the horrific things they say about their or other races, no one bricks their windows for adding to the weight of anti-<insert race here> sentiment -- except obviously one or two nutters, but they exist in all walks of life.

Proper out-and-out racist folk probably watch family guy and agree with everything Peter says, even though that is quite clearly not the intention of its creator.

Do you see what I mean?

maru-fan ยท 1 points ยท Posted at 00:09:28 on March 12, 2015 ยท (Permalink)

Semantics are irrelevent. You posted a racist comment. End of story. Accept the consequences and move on.

Quintary ยท 2 points ยท Posted at 20:53:19 on March 11, 2015 ยท (Permalink)

Sarcasm is a form of verbal irony, which is saying the opposite of what you mean.

junta12 ยท -3 points ยท Posted at 20:56:47 on March 11, 2015 ยท (Permalink)

But I wasn't.

I was making a self-deprecating joke, that places asians above caucasians, and caucasians above africans.

To assume I was being sarcastic would be to assume the opposite, which is just as bad.

(and obviously to assume I was being ironic would make no sense)

heartles ยท 1 points ยท Posted at 03:38:58 on March 12, 2015 ยท (Permalink)
junta12 ยท -13 points ยท Posted at 20:08:06 on March 11, 2015 ยท (Permalink)

Really confused.

People make horrible jokes on reddit all the time, but race is somehow off the table?

lettherebedwight ยท 18 points ยท Posted at 20:37:30 on March 11, 2015 ยท (Permalink)

What you've got here is a really racist joke, that also isn't funny. Sometimes, albeit rarely, there is an intersection of racism and humor. This was not one of those times.

junta12 ยท -1 points ยท Posted at 20:43:34 on March 11, 2015 ยท (Permalink)

So all jokes on Reddit must be funny in order to be posted? Cmon that's never how it works.

People post dead baby jokes, jokes about the holocaust, rape, murder, and all kinds of things that are offensive to a group of people -- to deny race is a double standard

Edit: But thanks for at least engaging me in conversation, even if you disagree with me

lachryma ยท 7 points ยท Posted at 20:50:14 on March 11, 2015 ยท (Permalink)

So all jokes on Reddit must be funny in order to be posted? Cmon that's never how it works.

No, but they will be voted on accordingly. When you're making a controversial joke, it had better be funny. Yours wasn't even funny, so the inherent racism came through. Comedy is also the science of understanding when to "punch up," to borrow a social justice concept, and how best to approach "punching down."

You're performing an awful lot of work to avoid that you might have a race problem, which interestingly comes back to the very point I made at the beginning of this thread about our industry.

Step one is admitting you have a problem. We all do.

junta12 ยท -1 points ยท Posted at 21:06:00 on March 11, 2015 ยท (Permalink)

Ah, hahaha but inherent to who though? I have no problem with race, which is why I use it so crassly

Comedy is also about shock factor. Imagine I was Frankie Boyle or Chris Rock, or someone who publicly says the most vulgar thing that springs to their mind. People applaud them because they know that they are joking, and that to assume otherwise would just be horrible.

I tend not to assume the worst about people I don't know, so how anybody can take what I said as anything more than a shocking joke reflects more on them than it does on me

lettherebedwight ยท 2 points ยท Posted at 21:42:21 on March 11, 2015 ยท (Permalink)

Note that you are not either of those people, and very few actually get to that level of no one gives a fuck what they say by starting out supremely controversial.

junta12 ยท 0 points ยท Posted at 21:44:50 on March 11, 2015 ยท (Permalink)

no, I reckon it's the opposite: they start out as controversial as possible to gain an audience, and then as they rise through higher and higher pay grades and popularity they're told to tame it down in exchange for cash incentives and fewer death threats.

metaphlex ยท 2 points ยท Posted at 21:24:44 on March 11, 2015 ยท (Permalink)

You just really don't understand comedy, do you?

junta12 ยท -1 points ยท Posted at 21:29:14 on March 11, 2015 ยท (Permalink)

...that's a funny looking question...

metaphlex ยท 2 points ยท Posted at 21:37:28 on March 11, 2015 ยท (Permalink)

So no, then.

junta12 ยท -1 points ยท Posted at 21:39:57 on March 11, 2015 ยท (Permalink)

no. you?

lettherebedwight ยท 2 points ยท Posted at 21:37:42 on March 11, 2015 ยท (Permalink)

You're allowed to post all the jokes you want, but for them to be upvoted(and not downvoted), they have to be funny to the audience. Keeping in mind that the audience here is completely different from the audience in, say, /r/imgoingtohellforthis, which is the subreddit built for not so thinly veiled racism, or /r/blackpeopletwitter, which is the subreddit built for very thinly veiled racism.

junta12 ยท 1 points ยท Posted at 21:39:02 on March 11, 2015 ยท (Permalink)

True. I completely agree, wrong subreddit. Lesson learned.

metaphlex ยท 6 points ยท Posted at 21:23:13 on March 11, 2015 ยท (Permalink)

It's not really a joke, though. You are just stating racist views as truths. The only way what you wrote could be close to a joke was if it was said by someone like MLK that we all know is not racist. Then there at least exists the irony of who said it.

junta12 ยท 0 points ยท Posted at 21:27:58 on March 11, 2015 ยท (Permalink)

that we all know is not racist

But then surely that means you automatically assume the worst about people

metaphlex ยท 2 points ยท Posted at 21:33:03 on March 11, 2015 ยท (Permalink)

No, I look at everything on a case by case basis. In this instance you either get to be racist or have a shit sense of humor. Take your pick.

junta12 ยท -2 points ยท Posted at 21:35:52 on March 11, 2015 ยท (Permalink)

The audience sucks.

metaphlex ยท 2 points ยท Posted at 21:49:56 on March 11, 2015 ยท (Permalink)

No, buddy. Are you trolling or dense? I'm 100% in favor of and enjoy controversial comedy, but what you said was completely lacking in humor. It simply wasn't funny.

I'm not even saying that you are racist like other people here. I'm taking your word for it that you were trying to be funny. But you failed, my friend, and I'm trying to help you understand this.

junta12 ยท 0 points ยท Posted at 22:03:03 on March 11, 2015 ยท (Permalink)

But, my dear friend, comedy relies a lot upon who said the joke and to whom - never mind the actual content of the joke.

I could make a dead baby joke to a group of bikers and get an encore, yet make the same joke to at an abortion clinic and probably get stabbed.

It's audience, and I picked the wrong one - that's all.

metaphlex ยท 2 points ยท Posted at 22:07:03 on March 11, 2015 ยท (Permalink)

Well I look forward to your comedy album.

tdogg8 ยท 1 points ยท Posted at 01:47:22 on March 12, 2015 ยท (Permalink)

Nope, pretty sure it was a shit joke.

skunk_funk ยท 4 points ยท Posted at 21:01:26 on March 11, 2015 ยท (Permalink)

At least you didn't delete it like some karma pussy.

junta12 ยท 1 points ยท Posted at 21:14:21 on March 11, 2015 ยท (Permalink)

Negative karma is still karma I guess...

throwapeater ยท 2 points ยท Posted at 20:41:40 on March 11, 2015 ยท (Permalink)

One cannot admit to being a racist. doing so will shatter one's self esteem.

Based on the news articles that I have read, the blackest programmer is probably torvalds.

Edit: Reddit is down-voting you for supporting juntas, not for your racist comments

lachryma ยท 2 points ยท Posted at 21:03:20 on March 11, 2015 ยท (Permalink)

Based on the news articles that I have read, the blackest programmer is probably torvalds.

The only reason you would say this is a stereotype, so I look forward to your failure to explain it.

junta12 ยท 1 points ยท Posted at 20:54:14 on March 11, 2015 ยท (Permalink)

Phew thanks, good to know. For a second there I thought it was the number 12 or something.

And how so with Torvalds? I mean he hurts the GNU cause, but the guy's whiter than Romney in a snow storm.

throwapeater ยท 1 points ยท Posted at 21:02:38 on March 11, 2015 ยท (Permalink)

well...the number 12 is a problem but i didn't want to admit to being a dodecanist.

Yeah, torvalds is white, but he's the only programmer with soul.

junta12 ยท 2 points ยท Posted at 21:13:20 on March 11, 2015 ยท (Permalink)

Well if it's any consolation I wanted '3', so I could do "Jun two three" but someone already had the account :(

I don't know about Torvalds. On one hand I can see that he doesn't want the linux kernel to suffer from the restrictions of GPL3, but on the other hand he's undermining the free software movement by letting corporations use his code.

Stallman's a bit of insufferable on that front, and though I don't like the guy - I like for what he stands for and what he's trying to protect

[deleted] ยท 7 points ยท Posted at 21:46:27 on March 11, 2015 ยท (Permalink)

[removed]

junta12 ยท 3 points ยท Posted at 21:52:32 on March 11, 2015 ยท (Permalink)

Yeah, I'd have to agree. Anyone who's capable of calmly and quickly emailing the fire dept during a fire instead of running out of the building clearly has his priorities straight.

We have these constant fire drills at work, and my work machine is awesome. Really not sure what I'd do in the event of an actual fire.

[deleted] ยท 6 points ยท Posted at 22:04:22 on March 11, 2015 ยท (Permalink)

[removed]

music2books ยท 3 points ยท Posted at 02:14:08 on March 12, 2015 ยท (Permalink)

"I'll just put this over here, with the rest of the fire."

ModusPwnins ยท 159 points ยท Posted at 17:50:46 on March 11, 2015 ยท (Permalink)

It's odd how programming alters our default interpretation of certain written characters. When I saw #, I immediately tried to interpret it as a comment. When that failed, I looked for a c# joke. It took me like fifteen seconds to realize # was not being used in a programming sense, but the joke was with the zero.

Bobshayd ยท 35 points ยท Posted at 19:38:16 on March 11, 2015 ยท (Permalink)

The only reason I didn't do that is that I saw the 0 first, from the thumbnail, and realized it must be a programming joke about 0 before I read anything else. I managed to extrapolate the meaning of the mug from the correct symbol, then thought # was a weird symbol. Maybe @0 would have been a better choice?

jellyberg ยท 23 points ยท Posted at 20:53:50 on March 11, 2015 ยท (Permalink)

Maybe @0 would have been a better choice?

# is usually used by non programmers as shorthand for number. @ less so in my experience..

Bobshayd ยท 30 points ยท Posted at 20:57:58 on March 11, 2015 ยท (Permalink)

Ah, but this is a mug for programmers. 1 is used by non-programmers to represent the beginning of a list. 0, less so.

Edit: maybe I'm the [0] programmer.

dexx4d ยท 24 points ยท Posted at 21:25:56 on March 11, 2015 ยท (Permalink)

I like [0], as it's an array index and a subtle /r/trees reference.

Mejari ยท 15 points ยท Posted at 22:37:51 on March 11, 2015 ยท (Permalink)

var programmers = ['best', 'worst', 'sexiest'];

console.mug("World's " + programmers[0] + " programmer");

[deleted] ยท 17 points ยท Posted at 23:42:25 on March 11, 2015 ยท (Permalink)

Hahahahahahaa console.mug();

Bromlife ยท 1 points ยท Posted at 03:06:12 on March 12, 2015 ยท (Permalink)

I would expect mug.printf

eros123 ยท 1 points ยท Posted at 01:48:07 on March 12, 2015 ยท (Permalink)

I like this a lot!

Bobshayd ยท 2 points ยท Posted at 21:29:48 on March 11, 2015 ยท (Permalink)

I was giggling a little bit about the highness.

[deleted] ยท 3 points ยท Posted at 21:59:02 on March 11, 2015 ยท (Permalink)

programmer[0]

alexriga ยท 1 points ยท Posted at 08:50:19 on April 23, 2015 ยท (Permalink)

What about No?

jaspeh ยท 1 points ยท Posted at 17:30:39 on March 12, 2015 ยท (Permalink)

The "World's" part did it for me. Seems out of place.

nignogatron ยท 2 points ยท Posted at 21:29:26 on March 11, 2015 ยท (Permalink)

Yup. I totally thought it was an include statement. The downfall of the mug would be having to explain it to people like me. Still awesome though.

FennekLS ยท 1 points ยท Posted at 23:02:38 on March 11, 2015 ยท (Permalink)

Wait, it's about 0 being the first location in programming, right?

slipperier_slope ยท 1 points ยท Posted at 02:28:09 on March 12, 2015 ยท (Permalink)

Yes, 0 is the mecca of computers. That why all ethernet cables eventually lead to 0.

FennekLS ยท 1 points ยท Posted at 07:24:25 on March 12, 2015 ยท (Permalink)

I didn't get the last part

Plasma_eel ยท 27 points ยท Posted at 19:20:21 on March 11, 2015 ยท (Permalink)
xkcd_transcriber ยท 18 points ยท Posted at 19:20:41 on March 11, 2015 ยท (Permalink)

Image

Title: Color Codes

Title-text: (It's the TMBG Dial-a-Song line, to save you some time.)

Comic Explanation

Stats: This comic has been referenced 2 times, representing 0.0036% of referenced xkcds.


xkcd.com | xkcdย sub | Problems/Bugs? | Statistics | Stopย Replying | Delete

slipperier_slope ยท 7 points ยท Posted at 02:30:03 on March 12, 2015 ยท (Permalink)

Wow, only referenced twice.

jellyberg ยท 12 points ยท Posted at 20:55:43 on March 11, 2015 ยท (Permalink)

I have now ceased to be amazed by the fact that there is a relevant xkcd for everything under the sun, and started being amazed that people like you remember them all.

Plasma_eel ยท 4 points ยท Posted at 21:55:05 on March 11, 2015 ยท (Permalink)

oh you

[deleted] ยท 19 points ยท Posted at 17:04:00 on March 11, 2015 ยท (Permalink)

I think it's because in programming language 0 is a place holder higher in the number line then 1.

I could be wrong though.

jakewp11 ยท 25 points ยท Posted at 17:05:04 on March 11, 2015 ยท (Permalink)

That's definitely what the joke is, my mind was just in a different place initially

[deleted] ยท 6 points ยท Posted at 17:16:00 on March 11, 2015 ยท (Permalink)

[deleted]

nermid ยท 21 points ยท Posted at 17:25:57 on March 11, 2015 ยท (Permalink)

vertebrae

Autocorrect knows what you meant. It just doesn't care.

[deleted] ยท 2 points ยท Posted at 17:57:13 on March 11, 2015 ยท (Permalink)

[deleted]

Cheesemacher ยท 2 points ยท Posted at 18:48:27 on March 11, 2015 ยท (Permalink)

I don't know why some people even have autocorrect enabled. It often does more harm than good.

likesdarkgreen ยท 4 points ยท Posted at 19:44:15 on March 11, 2015 ยท (Permalink)

With Swype, it's not so much autocorrect. It's that it has to guess pretty much the whole time. Sometimes it's wrong, but it's still worth it because my fingers are fat.

slipperier_slope ยท 1 points ยท Posted at 02:31:51 on March 12, 2015 ยท (Permalink)
[deleted] ยท 1 points ยท Posted at 13:19:34 on March 12, 2015 ยท (Permalink)

[deleted]

likesdarkgreen ยท 1 points ยท Posted at 16:31:06 on March 12, 2015 ยท (Permalink)

I see what you did there.

Lyqyd ยท 3 points ยท Posted at 21:32:43 on March 11, 2015 ยท (Permalink)

Some people love autocorrupt. I find it handy because it'll fix all the small misses I make without issues. For instance, I had typed "handy" with a U as the last letter instead of a Y. I don't usually end up with it having to choose vertebrae two entirely different words and guessing wrong though.

likesdarkgreen ยท 1 points ยท Posted at 19:47:00 on March 11, 2015 ยท (Permalink)

And besides, if it weren't for autocorrect, we wouldn't have those hilarious mistyped text messages that we love so much.

DrLuckyLuke ยท 10 points ยท Posted at 17:16:51 on March 11, 2015 ยท (Permalink)

0 is the lowest and thus first number you can represent using binary. Thus, the first element of something always has the index of 0 (except for some scripting languages which start at 1, but internally they just subtract 1).

[deleted] ยท 3 points ยท Posted at 23:05:24 on March 11, 2015 ยท (Permalink)

It really is the offset into the array. The first object had an offset of zero from the start, so its index is 0.

foo[0] is nothing but *(foo + 0) (on mobile, too lazy for proper markdown. Monospace it in your head)

Ran4 ยท 1 points ยท Posted at 23:27:39 on March 11, 2015 ยท (Permalink)

foo[0] is nothing but *(foo + 0)

In c, sure. But that's not the case in many other languages.

[deleted] ยท 3 points ยท Posted at 23:33:09 on March 11, 2015 ยท (Permalink)

There are more?

slipperier_slope ยท 2 points ยท Posted at 02:32:54 on March 12, 2015 ยท (Permalink)

Yes, they're implemented in C though.

barsoap ยท 1 points ยท Posted at 14:06:09 on March 12, 2015 ยท (Permalink)

It's also nothing but 0[foo]. And yes I'd kill you in a code review for that one.

amazondrone ยท 3 points ยท Posted at 19:17:32 on March 11, 2015 ยท (Permalink)

0 is the lowest and thus first number you can represent using binary.

No it's not. It's the lowest non-negative integer you can represent using binary, which is what's relevant when you're indexing arrays.

recursive ยท 10 points ยท Posted at 19:34:11 on March 11, 2015 ยท (Permalink)

It's the lowest non-negative integer you can represent using binary

Seems a little redundant.

pcopley ยท 5 points ยท Posted at 18:07:42 on March 11, 2015 ยท (Permalink)

The joke is definitely funnier when you explain it.

[deleted] ยท 2 points ยท Posted at 18:38:17 on March 11, 2015 ยท (Permalink)

Thank you my good man and or woman.

junta12 ยท 4 points ยท Posted at 19:30:35 on March 11, 2015 ยท (Permalink)

Definitely AND

grumbly ยท 3 points ยท Posted at 20:56:53 on March 11, 2015 ยท (Permalink)

Logical or biwise?

junta12 ยท 2 points ยท Posted at 21:14:46 on March 11, 2015 ยท (Permalink)

Definitely logical. Definitely.

[deleted] ยท 2 points ยท Posted at 22:37:06 on March 11, 2015 ยท (Permalink)

I've never seen so many properly spelled "Definitely"s in a row. Not sure why everyone I know can't spell that word correctly, but it was satisfying to see this.

junta12 ยท 2 points ยท Posted at 16:10:39 on March 12, 2015 ยท (Permalink)

wow, normally I'm pretty anal about this -- I'm surprised I missed it

slipperier_slope ยท 1 points ยท Posted at 02:34:31 on March 12, 2015 ยท (Permalink)

There's only a finate number of ways to misspell it.

ghillisuit95 ยท 1 points ยท Posted at 00:21:09 on March 12, 2015 ยท (Permalink)

man XOR woman

pcopley ยท 0 points ยท Posted at 21:15:13 on March 11, 2015 ยท (Permalink)

man << woman

IrateGod ยท 9 points ยท Posted at 17:07:19 on March 11, 2015 ยท (Permalink)

Most programming languages are 0-indexed.

What this means is if we have an array (using JavaScript syntax; a collection of values) like this:

var arr = [1,2,3,4,5,6,7];

Then arr[0] produces 1 even though in reality you wouldn't say "the 0th element of this array has the value 1" -- you would call that the first element.

Tomarse ยท 23 points ยท Posted at 17:27:24 on March 11, 2015 ยท (Permalink)

Array's are zero indexed because the first element is zero elements away from the start of the array.

minno ยท 6 points ยท Posted at 17:38:35 on March 11, 2015 ยท (Permalink)

I prefer Python's BDFL's explanation. Half-open intervals are great, it's better to omit the high bound than to omit the low bound, and zero-indexing works naturally with those intervals.

More info.

Bobshayd ยท 1 points ยท Posted at 21:50:17 on March 11, 2015 ยท (Permalink)

Except that it glosses over that turning 1 to 0 means that element i is at array[i-1]. You're trading one off-index for another; we're just used to it and we arrange our code to avoid ugly off-by-one errors for both aesthetics and ease of coding. On the other hand, it still holds true that array[n] = *(array + n).

junta12 ยท 1 points ยท Posted at 19:29:51 on March 11, 2015 ยท (Permalink)

Yeah, though it's purely a convention nowadays

CaptainJaXon ยท 1 points ยท Posted at 00:58:01 on March 12, 2015 ยท (Permalink)

It's because arrays use the index as how much of an off set to look up. If 1 represented the first element the it'd have to do an extra operation, subtracting 1 from the index, every array operation then do the normal stuff (multiplying the index by the size of the type then adding it to the address of the pointer).

bdjenkin ยท 1 points ยท Posted at 21:08:49 on March 11, 2015 ยท (Permalink)

I also take my coffee #000

joealarson ยท 1 points ยท Posted at 21:10:36 on March 11, 2015 ยท (Permalink)

"I like my coffee #000"

roh8880 ยท 0 points ยท Posted at 22:23:20 on March 11, 2015 ยท (Permalink)

I read the "#" as "operand".

xiipaoc ยท 195 points ยท Posted at 17:30:11 on March 11, 2015 ยท (Permalink)

World's programmer? I don't get it.

[deleted] ยท 77 points ยท Posted at 17:37:46 on March 11, 2015 ยท (Permalink)*

"First"*

*When not using ALGOL 68†, AWK, BASH, Bourne shell, C shell, Maple, R, Tcl, Windows PowerShell, Curl†, Cobra, Lisp†, Scheme†, Perl, Ruby or Seed7 **or Lua

assume there's another hash on the other side for a block comment

xiipaoc ยท 474 points ยท Posted at 17:44:32 on March 11, 2015 ยท (Permalink)

Where are you getting that from? I just see "World's" and "Programmer" on the mug. The stuff in the middle is commented out.

Mr_Viper ยท 100 points ยท Posted at 17:46:00 on March 11, 2015 ยท (Permalink)

sigh.......

tru3gam3r ยท 37 points ยท Posted at 18:11:39 on March 11, 2015 ยท (Permalink)

this guy

[deleted] ยท 23 points ยท Posted at 17:56:45 on March 11, 2015 ยท (Permalink)

Oh you!

I've updated for clarity.

abchiptop ยท 3 points ยท Posted at 14:40:15 on March 12, 2015 ยท (Permalink)

They should have deleted that line before sending it to production.

shirtandtieler ยท 7 points ยท Posted at 18:16:55 on March 11, 2015 ยท (Permalink)*

You forgot to add Lua ;)

e: removed a letter

[deleted] ยท 5 points ยท Posted at 18:34:39 on March 11, 2015 ยท (Permalink)

Ah yes, definitely don't want the length of 0 there. Thanks!

Lyqyd ยท 2 points ยท Posted at 21:35:38 on March 11, 2015 ยท (Permalink)

That, and the built in functions assume 1-indexing when using tables as arrays!

jfb1337 ยท 5 points ยท Posted at 18:23:20 on March 11, 2015 ยท (Permalink)

Huh? Lisp and scheme use 0 indexing.

[deleted] ยท 18 points ยท Posted at 20:01:35 on March 11, 2015 ยท (Permalink)

I think it's languages that use # for comments.

khmeroldiez ยท 7 points ยท Posted at 23:03:22 on March 11, 2015 ยท (Permalink)

We are Python.

bacondev ยท 4 points ยท Posted at 23:07:32 on March 11, 2015 ยท (Permalink)

Ah. The lack of PHP, Python, and MySQL confused me.

[deleted] ยท 4 points ยท Posted at 19:19:09 on March 11, 2015 ยท (Permalink)

Or WordPerfect macro script. Don't ask me how I know this.

Skest ยท 2 points ยท Posted at 20:00:40 on March 11, 2015 ยท (Permalink)

And my boy Fortran, which is one of the few compiled languages in the list.

Fortran array indexing caused an error that took me 6 months of my PhD to find and fix.

caadbury ยท 3 points ยท Posted at 18:25:09 on March 11, 2015 ยท (Permalink)

Ruby starts counting enumerables with 0.

>> array = [0, 1, 2]
=> [0, 1, 2]
>> array[0]
=> 0
kernalphage ยท 12 points ยท Posted at 19:37:00 on March 11, 2015 ยท (Permalink)

#but '#' starts a comment in those languages.

[deleted] ยท 4 points ยท Posted at 20:02:28 on March 11, 2015 ยท (Permalink)

I think it's languages that use # for comments.

caadbury ยท 1 points ยท Posted at 22:06:29 on March 11, 2015 ยท (Permalink)

That would make sense

jspenguin ยท 1 points ยท Posted at 19:51:59 on March 11, 2015 ยท (Permalink)

Lua uses "--" for line comments, like SQL. "#" is the "length" operator in Lua.

Actually_Saradomin ยท 1 points ยท Posted at 22:24:44 on March 11, 2015 ยท (Permalink)

You forgot css

angrypotato1 ยท 1 points ยท Posted at 10:58:33 on March 12, 2015 ยท (Permalink)

Languages

Actually_Saradomin ยท 2 points ยท Posted at 12:01:30 on March 12, 2015 ยท (Permalink)

Css is a language.

jettrscga ยท 1 points ยท Posted at 02:01:49 on March 12, 2015 ยท (Permalink)

Also Matlab. Bastards.

angrypotato1 ยท 1 points ยท Posted at 10:58:40 on March 12, 2015 ยท (Permalink)

Languages

[deleted] ยท 1 points ยท Posted at 17:26:07 on March 12, 2015 ยท (Permalink)

Lispโ€ , Schemeโ€ 

Huh, I figured comments in those languages were denoted by ;โ€”I know CL uses # for some namespace stuff, i.e. (mapcar #'lol foo-bar-list)

[deleted] ยท 1 points ยท Posted at 18:50:12 on March 11, 2015 ยท (Permalink)

You forgot MatLab

[deleted] ยท 8 points ยท Posted at 17:58:38 on March 11, 2015 ยท (Permalink)

I was thinking "crunch null.. hash null.. maybe it means something in hex"

TheTerrasque ยท 2 points ยท Posted at 18:44:36 on March 11, 2015 ยท (Permalink)

yup, it means 0 in hex.

crowbahr ยท 2 points ยท Posted at 20:15:46 on March 11, 2015 ยท (Permalink)

Blackest of the black.

joequin ยท 7 points ยท Posted at 17:34:18 on March 11, 2015 ยท (Permalink)

Blackest?

Code_For_Food ยท 24 points ยท Posted at 19:35:49 on March 11, 2015 ยท (Permalink)*
feedmemorescrubs ยท 8 points ยท Posted at 20:43:52 on March 11, 2015 ยท (Permalink)

I'm a novice programmer (freshman Computer Science and Digital Forensics majors) and I understand that it is widely used, but I was never taught why. Teach me, why is it used and why is it useful?

jocamar ยท 26 points ยท Posted at 21:39:48 on March 11, 2015 ยท (Permalink)

Arrays are usually stored in a contiguous location in memory and you access its values by counting from the starting address where they're stored. So, the first element is 0 places away from the start (initial address + 0) the second element is one position away from the start (initial address + 1), etc.

In fact, at least in C, the [] notation can be entirely replaced with addition. Since the array variable actually stores the address to the beginning of the array, array[0] is actually the same as *array (the first address of the array) and array[1] would be the same as *array+1 (the initial position plus one element). As for why it's still used, at this point it's mostly arbitrary, especially in higher level languages, but all programmers are familiar with it so why not.

mirhagk ยท 1 points ยท Posted at 23:56:29 on March 13, 2015 ยท (Permalink)

Actually it's not because of C, it's earlier than that. It originated from a language that had only compile time arrays. And they did it to perform faster, but it was actually for compile time performance.

Yes we use this today because someone decided they needed to save a couple adds from the compilation time.

feedmemorescrubs ยท 1 points ยท Posted at 21:40:46 on March 11, 2015 ยท (Permalink)

So we just do it because?

paperhat ยท 14 points ยท Posted at 21:45:44 on March 11, 2015 ยท (Permalink)

Yes. We do it just because of what /u/jocamar said.

feedmemorescrubs ยท 2 points ยท Posted at 21:47:36 on March 11, 2015 ยท (Permalink)

I'm just a little disappointed that it's now "mostly arbitrary." I wanted more reasons dammit!

QAOP_Space ยท 17 points ยท Posted at 22:16:28 on March 11, 2015 ยท (Permalink)

its not mostly arbitrary, the operator [] means, essentially how many jumps to make from the start address.

feedmemorescrubs ยท 1 points ยท Posted at 22:30:35 on March 11, 2015 ยท (Permalink)

That makes a little more sense. I was quoting the guy when I said that is was arbitrary.

minno ยท 2 points ยท Posted at 05:34:27 on March 12, 2015 ยท (Permalink)

This is an argument for 0-based indexing that isn't based on ancient C history.

Quxxy ยท 9 points ยท Posted at 02:01:13 on March 12, 2015 ยท (Permalink)

There's also that it simplifies the math of some common operations. For example, assume you have zero-based indexing and exclusive upper bounds. If you want to split an array of length n so that the second part starts at element i, the bounds of the two parts are 0..i and i..n. Easy!

On the other hand, if you're using Lua, which uses 1-based indexes and inclusive upper bounds, the two parts are 1..i-1 and i..n-1. Ick. Not only is it less beautifully elegant, but it uses math which means more instructions which means slower, longer code, which means it's less cache-friendly, which means it requires more power, which means millions of people will die from global warming which means Lua is pure evil.

Well, it's maybe not that bad, but it all adds up, y'know? :)

feedmemorescrubs ยท 1 points ยท Posted at 03:26:22 on March 12, 2015 ยท (Permalink)

That makes a lot of sense. I like this.

DaemonXI ยท 1 points ยท Posted at 05:49:43 on March 12, 2015 ยท (Permalink)

That second paragraph isn't true any more.

barsoap ยท 1 points ยท Posted at 14:09:56 on March 12, 2015 ยท (Permalink)

Anecdotal case in point: The only time I ever wished for 1-based indices was when implementing binary heaps. In all other cases, either 0 makes more sense or both are about equivalently ยฑ1-prone

๐ŸŽ™๏ธ HaulCozen ยท 1 points ยท Posted at 03:33:40 on March 12, 2015 ยท (Permalink)

SHAMELESS PROMOTION

My first calculus teacher always said that the analogue clock face is wrong, because it starts from 12 instead of 0. An example he always uses is when you count down before a rocket launching. You don't launch on 1, you launch on 0.

cptavatar ยท 44 points ยท Posted at 18:58:57 on March 11, 2015 ยท (Permalink)

Convenient! I looking for a mug that went...

World's NaN Programmer

zeus_is_back ยท 9 points ยท Posted at 04:02:54 on March 12, 2015 ยท (Permalink)

Who is #1?

You are #6.

I am NaN, I am a free man!

Xavierxf ยท 2 points ยท Posted at 11:38:37 on March 12, 2015 ยท (Permalink)

Just saying it in my head sounds so weird. It throws of the rhythm so much.

๐ŸŽ™๏ธ HaulCozen ยท 1 points ยท Posted at 03:32:11 on March 12, 2015 ยท (Permalink)

I have it here, you can hit "Customize" and change #0 to NaN. Or change it to #1 and insult your co-worker.

[deleted] ยท 60 points ยท Posted at 17:54:29 on March 11, 2015 ยท (Permalink)*

[deleted]

junta12 ยท 37 points ยท Posted at 19:34:33 on March 11, 2015 ยท (Permalink)
World's
# greatest
# cunt of a
Programmer
okmkz ยท 15 points ยท Posted at 21:15:45 on March 11, 2015 ยท (Permalink)
# TODO: resolve with product team
Insomn ยท 11 points ยท Posted at 21:15:03 on March 11, 2015 ยท (Permalink)

Rails dev with an awful temper reporting in, put me down for one mug.

MediocreRedditor ยท 2 points ยท Posted at 19:49:07 on March 12, 2015 ยท (Permalink)

Seems like your a frontend dev.

errortype520 ยท 15 points ยท Posted at 17:29:31 on March 11, 2015 ยท (Permalink)

I would buy one, where are you selling it?

[deleted] ยท -3 points ยท Posted at 22:14:36 on March 11, 2015 ยท (Permalink)*

I made a zazzle product if you're interested: http://www.zazzle.com/worlds_0_dev_mug_dual_sided-168927621265505172

simplisto ยท 13 points ยท Posted at 20:22:27 on March 11, 2015 ยท (Permalink)

Judging from the replies here, this mug would make the greatest damn conversational piece ever.

[deleted] ยท 11 points ยท Posted at 20:04:24 on March 11, 2015 ยท (Permalink)

How many of you actually enumerate everyday things beginning with 0?

๐ŸŽ™๏ธ HaulCozen ยท 54 points ยท Posted at 20:39:58 on March 11, 2015 ยท (Permalink)

I whisper 0 before counting things.

HomemadeBananas ยท 17 points ยท Posted at 17:17:24 on March 11, 2015 ยท (Permalink)

Dude, I want this. Where can I buy it?

๐ŸŽ™๏ธ HaulCozen ยท 6 points ยท Posted at 03:13:34 on March 12, 2015 ยท (Permalink)

here

I'll be honest and tell you that I make $1 for every mug, but it's only because zazzle has a minimum royalty percentage. I have no interest in reaping a profit from my reddit fwends.

iKhaledR ยท 1 points ยท Posted at 02:38:29 on March 12, 2015 ยท (Permalink)
๐ŸŽ™๏ธ HaulCozen ยท 1 points ยท Posted at 03:35:53 on March 12, 2015 ยท (Permalink)

Yes, ^ that link points to my other comment that points to my zazzle product page.

[deleted] ยท 0 points ยท Posted at 22:17:38 on March 11, 2015 ยท (Permalink)*

Just made one on zazzle, tell me what you think: http://www.zazzle.com/worlds_0_dev_mug_dual_sided-168927621265505172

JTorrent ยท 1 points ยท Posted at 01:22:25 on March 12, 2015 ยท (Permalink)

Why which it to dev...

Modevs ยท 16 points ยท Posted at 19:27:03 on March 11, 2015 ยท (Permalink)

It's almost an immediate litmus test for programming skill...

If they laugh, they know how to code. If they nitpick about how the first element is not necessarily the best, they're hired!

dexx4d ยท 13 points ยท Posted at 21:32:36 on March 11, 2015 ยท (Permalink)

If they ask about the sorting algorithm used and debate the merits and flaws and O() measurement of several, they get flex time and vacation, because the should really spend some more time outside?

robisodd ยท 22 points ยท Posted at 18:20:10 on March 11, 2015 ยท (Permalink)

Explaination:

Zero-based numbering is a way of numbering in which the initial element of a sequence is assigned the index 0, rather than the index 1 as is typical in everyday non-programming circumstances.
Under zero-based numbering, the initial element is sometimes termed the zeroth element, rather than the first element.

...

In computer science, array indices also often start at 0, so computer programmers might use zeroth in situations where others might use first, and so forth.

http://en.wikipedia.org/wiki/Zero-based_numbering

0hmyscience ยท 73 points ยท Posted at 18:45:15 on March 11, 2015 ยท (Permalink)*

If someone needed an explanation for this, they probably don't belong here.

hellshot8 ยท 29 points ยท Posted at 20:20:15 on March 11, 2015 ยท (Permalink)

To be fair, I found this on /all, so some people might not know

kingcoyote ยท 7 points ยท Posted at 20:39:55 on March 11, 2015 ยท (Permalink)

Same here.

I'm a programmer, so I got it, but I found it on all.

hellshot8 ยท 5 points ยท Posted at 20:47:41 on March 11, 2015 ยท (Permalink)

Indeed. I'm not a fan of the "they don't belong here" mentality

slipperier_slope ยท 1 points ยท Posted at 02:41:05 on March 12, 2015 ยท (Permalink)

We don't like your kind around these parts.

novel_yet_trivial ยท 5 points ยท Posted at 20:55:56 on March 11, 2015 ยท (Permalink)

I needed it explained. My mind kept reading "World's sharp null programmer".

junta12 ยท 6 points ยท Posted at 19:36:37 on March 11, 2015 ยท (Permalink)

But how else will people learn the bleeding obvious

MmmVomit ยท 5 points ยท Posted at 21:20:12 on March 11, 2015 ยท (Permalink)
FenixR ยท 2 points ยท Posted at 21:00:32 on March 11, 2015 ยท (Permalink)

We get some common (Programming) sense punch them in the face obviously.

QuickMouse ยท 2 points ยท Posted at 22:57:34 on March 11, 2015 ยท (Permalink)

There are a bunch of languages that index starting at 1. Especially older languages and mathematical programming languages (R, mathematica, etc.). I first learned to program in ADA and then spent a lot of time using R and Python. For a while I thought zero indexing was something unique to Python.

sloth_runner ยท 2 points ยท Posted at 06:07:26 on March 12, 2015 ยท (Permalink)

I'm still somewhat new to programming and love this subreddit specifically because when I don't get the joke, I learn something new.

Doesn't mean people don't belong...

crowbahr ยท 6 points ยท Posted at 20:19:27 on March 11, 2015 ยท (Permalink)

You would literally have to have never taken a single programming class ever to not know this.

I mean, even codeacademy.org teaches that 0 is the first index in their JS class.

You'd have to be browsing /r/ProgrammerHumor either out of (morbid) curiosity or out of some twisted sense of sadism where you try to impart your stupid to others via inane text comments.

[deleted] ยท 8 points ยท Posted at 22:38:08 on March 11, 2015 ยท (Permalink)

[deleted]

crowbahr ยท 2 points ยท Posted at 23:40:04 on March 11, 2015 ยท (Permalink)

It had, like, 400 upvotes when I posted that.

okmkz ยท 1 points ยท Posted at 21:16:42 on March 11, 2015 ยท (Permalink)
Option Base 1
[deleted] ยท 5 points ยท Posted at 23:04:49 on March 11, 2015 ยท (Permalink)

Worlds #NaN programmer

๐ŸŽ™๏ธ HaulCozen ยท 13 points ยท Posted at 20:18:27 on March 11, 2015 ยท (Permalink)

HOLY SHIT

I go to class in the morning, come back and check in the afternoon and I have 1000+ upvotes.

Thanks guys, I'm actually considering making this with Zazzle now.

Edit: also I just realised it's probably supposed to be "#1 dad", without "world's"

feedmemorescrubs ยท 10 points ยท Posted at 20:42:50 on March 11, 2015 ยท (Permalink)

make it. I've been scouring this goddamn thread for links to buy one.

๐ŸŽ™๏ธ HaulCozen ยท 5 points ยท Posted at 03:15:45 on March 12, 2015 ยท (Permalink)

http://www.zazzle.com/worlds_0_programmer_mug-168058019583682256

Didn't post it quickly because I had to take care of some stuff... And then my main laptop's hard drive failed so it took me a while to get my second laptop.

[deleted] ยท -1 points ยท Posted at 22:15:50 on March 11, 2015 ยท (Permalink)*
[deleted] ยท 1 points ยท Posted at 02:21:21 on March 12, 2015 ยท (Permalink)

You just made it and it already has 3880 reviews! Impressive!

๐ŸŽ™๏ธ HaulCozen ยท 3 points ยท Posted at 03:15:29 on March 12, 2015 ยท (Permalink)

No, that's just for the mug, like, the reviews are about Zazzle's customizable mug, not his particular design.

dexx4d ยท 6 points ยท Posted at 21:30:41 on March 11, 2015 ยท (Permalink)

I would pay for a set, with #1 programmer and #0 programmer, so I could give out the #1 programmer one and then pull out the #0.

ickyfehmleh ยท 1 points ยท Posted at 23:51:53 on March 11, 2015 ยท (Permalink)

Shut up and take my money!

DroolingIguana ยท 3 points ยท Posted at 19:54:53 on March 12, 2015 ยท (Permalink)

World's what programmer? The line is commented out.

๐ŸŽ™๏ธ HaulCozen ยท 1 points ยท Posted at 21:00:50 on March 12, 2015 ยท (Permalink)
Fingebimus ยท 3 points ยท Posted at 13:56:50 on March 13, 2015 ยท (Permalink)

World's sharpo programmer?

wllmsaccnt ยท 3 points ยท Posted at 20:03:10 on March 11, 2015 ยท (Permalink)

I prefer to think of it as an enumerated value, following the convention that 0 is always the unset / unknown.

Athox ยท 3 points ยท Posted at 02:05:38 on March 12, 2015 ยท (Permalink)

Doesn't make sense. If #1 meant "first" then it would make sense. But it means "number one" as in "the best" or top of the pile. Not "first" as in counting.

0-index only works in a list capacity, not as a ranking.

Now get back to work you lazy fucks.

๐ŸŽ™๏ธ HaulCozen ยท 11 points ยท Posted at 03:10:56 on March 12, 2015 ยท (Permalink)

But I'm compiling

thisusernameisnull ยท 1 points ยท Posted at 05:47:19 on March 13, 2015 ยท (Permalink)

Oh. Carry on then.

makeswordcloudsagain ยท 6 points ยท Posted at 19:37:36 on March 11, 2015 ยท (Permalink)

Here is a word cloud of all of the comments in this thread: http://i.imgur.com/XNmnAqy.png
source code | contact developer | faq

erilol ยท -1 points ยท Posted at 20:07:43 on March 11, 2015 ยท (Permalink)

Are these clouds just bullshit? Because at the time of me writing this, literally no one has mentioned the words xkcd, represent, Title, or joke. (Although 'jokes' does appear on the sidebar.)

GregTheMad ยท 2 points ยท Posted at 21:00:36 on March 11, 2015 ยท (Permalink)

Well, better a zero than a null.

mericaftw ยท 2 points ยท Posted at 22:41:11 on March 11, 2015 ยท (Permalink)

This just makes me angrier about having to write in MATLAB for work...

Megacherv ยท 2 points ยท Posted at 00:08:24 on March 12, 2015 ยท (Permalink)

Couldn't you also do

Programmer me = Programmers.FirstOrDefault(p => p.State == ProgrammerState.Best);
[deleted] ยท 2 points ยท Posted at 01:23:25 on March 12, 2015 ยท (Permalink)

Try fitting it on a mug

Megacherv ยท 1 points ยท Posted at 01:37:42 on March 12, 2015 ยท (Permalink)
Programmer me = Programmers.FirstOrDefault
(
    p => p.state == ProgrammerState.Best
);

That could maybe ft across a whole mug? :P

rinnip ยท 2 points ยท Posted at 02:03:07 on March 12, 2015 ยท (Permalink)

I like it because I understand it.

q-_-p ยท 2 points ยท Posted at 03:31:21 on March 12, 2015 ยท (Permalink)

World's [0] programmer?

tenmilez ยท 4 points ยท Posted at 19:16:29 on March 11, 2015 ยท (Permalink)

I think I would prefer World's [0] Programmer, but that's just me.

nimbusfool ยท 2 points ยท Posted at 18:35:03 on March 11, 2015 ยท (Permalink)

congratulations you are octothorp zero!

SOQ_puppet ยท 2 points ยท Posted at 19:57:19 on March 11, 2015 ยท (Permalink)

You'reโ™ฏ

cheeselord99 ยท 5 points ยท Posted at 21:27:07 on March 11, 2015 ยท (Permalink)

Don't fret if you didn't get the joke.

killersquirel11 ยท 2 points ยท Posted at 22:31:11 on March 11, 2015 ยท (Permalink)

I promise I won't cause any treble

NekuSoul ยท 2 points ยท Posted at 18:44:14 on March 11, 2015 ยท (Permalink)

Reminds me of the time when I was getting my drivers license. The teacher told me to leave the roundabout at the second exit and ended up taking the third exit since I mistakenly started counting at zero.

OrpheusV ยท 1 points ยท Posted at 21:38:29 on March 11, 2015 ยท (Permalink)
SELECT prog_id, prog_name FROM Programmers
ORDER BY prog_id ASC
LIMIT 1;

Also, shaddap, I know it's not normalized (probably)

[deleted] ยท 1 points ยท Posted at 22:50:00 on March 11, 2015 ยท (Permalink)

[deleted]

anotherbrokephotog ยท 2 points ยท Posted at 23:00:23 on March 11, 2015 ยท (Permalink)

Some programming languages index from zero. So #0 is equivalent to #1

rinnip ยท 1 points ยท Posted at 02:04:02 on March 12, 2015 ยท (Permalink)

Proper counting starts at 0, making it better than being #1.

giantsalike ยท 1 points ยท Posted at 00:03:55 on March 12, 2015 ยท (Permalink)

Yeah, I'd say I'm down for it.

Hugotohell ยท 1 points ยท Posted at 03:21:58 on March 12, 2015 ยท (Permalink)

No one is.

abchiptop ยท 1 points ยท Posted at 14:37:02 on March 12, 2015 ยท (Permalink)

nevermind, i wrote this but didn't check the comments

throwapeater ยท 1 points ยท Posted at 20:44:37 on March 11, 2015 ยท (Permalink)

HERES THE JOKE: "WORLD'S NUMBER ONE PROGRAMMER"

[deleted] ยท 0 points ยท Posted at 18:23:33 on March 11, 2015 ยท (Permalink)

Shouldn't it be:

World.Programmers[0]

kamnxt ยท 1 points ยท Posted at 20:38:27 on March 11, 2015 ยท (Permalink)

Why uppercase?

[deleted] ยท 3 points ยท Posted at 20:39:45 on March 11, 2015 ยท (Permalink)

Language-dependent naming practices, I suppose.

f3lbane ยท 0 points ยท Posted at 17:51:27 on March 11, 2015 ยท (Permalink)

An ex coworker of mine had a mug that said g_astProgrammers[0].

phaseMonkey ยท 0 points ยท Posted at 18:53:38 on March 11, 2015 ยท (Permalink)

Can I get one that says NULL?

trick315 ยท -2 points ยท Posted at 22:29:32 on March 11, 2015 ยท (Permalink)

WorldProgrammers[0]... if you're going to make it a programming joke make it a good one...

rang501 ยท -1 points ยท Posted at 19:20:32 on March 11, 2015 ยท (Permalink)

For some reason I'm spelling #0 as 'first' in my mind... weird