There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

excel , in Typescript
@excel@lemmy.megumin.org avatar

What this shows is how terrible raw JS is, when all of this crap is required to fix all of the edge cases and make things actually work the way it’s supposed to.

fidodo ,

It only looks like this if you want compression and backwards compatibility. All compiled languages have output that is optimized for those things and not readability, but if you turn off minification and use a modern language target then the compiled typescript code will look almost identical to the original code.

muhanga , in It's that time of year again

There is no love if you dont constructor it. Then you would need to initialize it or use existing instance to borrow. You can even extend from Respect or Humor as a starting point, there is no need to implement Love from scratch.

Turun , in Can someone explain why authors do this?

It’s a more easily readable drop in for A and B. And it being convention helps remove one unfamiliar element from a new topic.

ValiantDust ,

Not only more readable than A and B but I would argue it’s also easier to remember who did what a few sentences or paragraphs earlier since Alice and Bob invoke slightly less generic mental images than A and B. For example one is a woman and the other one is a man, maybe even some person or character you know.

And now that I’m thinking about it, the different gender also makes it easier to keep track of who does what because different pronouns are used (at least in English and many other languages).

exocrinous ,

Fun fact: the problem this is a solution to is known as the gay spock problem

ValiantDust ,

I’m afraid I’m not following. The solution to what?

Edit: Sorry, I misread your comment.

charolastra ,

Took me a few reads

jnplch ,

I tried to look this up and while there were many many results, none of them seemed to really fit with OP’s question, so would you kindly tell us more about the gay Spock problem?

exocrinous ,

The gay spock problem is when you have two characters interacting who have the same pronouns, and it gets confusing. For example,

He brushed his hair aside and spoke gently into his ear, “you are my one true love, my light and laughter, my reason to live.”

Who’s the one speaking? Kirk or Spock?

Likewise, if Alice and Barbara or Adam and Bob are your two example people, you’ll run into the gay spock problem.

Wirrvogel ,

Thank you for your explanation. Google gave me a lot of insight into a lot of things and none had to do with this problem. :D

CosmicTurtle ,

If you ever go to r/relationship_advice and read posts where their friend T did S with P and then A (23 F) got into with G, then yeah…Alice and Bob suddenly makes a lot of sense.

sawdustprophet ,
@sawdustprophet@midwest.social avatar

T did S with P and then A (23 F) got into with G

“This B needs a C in her A”

EatATaco ,

Old guy moment here. . .why the fuck is the camera moving all over in the place in that video? Literally unwatchable to me.

GregorTacTac ,
@GregorTacTac@lemm.ee avatar

Oh, I didn’t even notice. Probably some artistic stuff, but I would prefer if it was more stable.

reverendsteveii ,

this, but doubly so with Eve. You’ll notice that we often skip over Cindy and Dave and go right to Eve, so often that I don’t even know off the top of my head whether Charlie and Deandra are the conventional names for persons 3 and 4 in this construct. That’s because this construct is used a lot when talking about secure communications and the convention is that “evil” “eavesdropping” Eve is the person trying to destroy, intercept or alter the communication between Alice and Bob. Her role is built into her name.

PapstJL4U , in Can someone explain why authors do this?
@PapstJL4U@lemmy.world avatar

A,B,C,D - A talks to B, C listens to A,…

Alice, Bob, Charlie,…

For this reason the first persona in my software is always Alice Litte, [email protected]. Easier than “asfgg afshd”

Ciel , in Can someone explain why authors do this?
@Ciel@lemmygrad.ml avatar

okay, writing and computer science have a common problem: names are hard

vrek ,

There are two hard challenges in computer science cache invalidation and naming things

lhamil64 ,

And a second problem, off-by-one errors

oo1 , in Can someone explain why authors do this?

Someone tried "April & Bob" once, but MS excel converted it to date.

Witchfire ,
@Witchfire@lemmy.world avatar

Incels 🤝 Excel
Falsely assuming something is a date

Vast_Emptiness , in Typescript

Idk man. I use python ;)

xmunk , in Can someone explain why authors do this?

Cue the fiddler on the roof music…

Tradition!

There’s a helpful wiki article breaking down the full convention en.wikipedia.org/wiki/Alice_and_Bob

jerrythegenius ,
@jerrythegenius@lemmy.world avatar

”Tradition is just peer pressure from dead people”
— some fella on the internet

IndiBrony ,
@IndiBrony@lemmy.world avatar

“Never forget to attribute your quotes to George Carlin” - Leonard Nimoy, probably

ReplicantBatty ,

Don’t believe everything you read on the Internet. -Abraham Lincoln

xmunk ,

“Only a fool would quote anyone but me.” - Oscar Wilde

mrkite ,
@mrkite@programming.dev avatar

Tradition is just dead people’s baggage. Doug Stanhope.

baggachipz , in Typescript

Typescript is verbose training wheels for JavaScript, change my mind

fidodo ,

All higher level programming languages are training wheels for programming

CodexArcanum , in Can someone explain why authors do this?

I used to have a big list of gender ambiguous names I’d use for examples. So I’d use “Alex” and “Blake” or something like that. It also had some non-anglo names on it, just to spice things up.

In comp sci papers there’s a few other common example people. “I” for intruder or imposter (Irene, Isaac). “M” often for malicious or middle-person (Mal). There’s a few more im forgetting now.

AeonFelis ,

There’s a few more im forgetting now.

‘E’ (Eve) for “eavesdropper”.

onlinepersona , in Can someone explain why authors do this?

Same as foo, bar, baz 🙄

CC BY-NC-SA 4.0

verstra ,

why do you provide a link to creative commons license? Ive seen such links few times on lemmy.

gallopingsnail ,
@gallopingsnail@lemmy.sdf.org avatar

This guy licenses his comments under creative commons for some reason.

wurstgulasch3000 ,

Tryin to make a change :-/

onlinepersona ,

Thank you for recognising that.

verstra ,

But whats the point of giving out a license along the comment? Are you giving permission to use your comment?

k110111 ,

Maybe it has to do with people stealing content to train AI? Atleast now if there is an opportunity to be a part of a lawsuit or smth they can claim they provided a licence. I dunno just a guess

onlinepersona ,

For non-commercial use, yes. Aka no closed-source AI.

verstra ,

Aaah, AI training data. That makes sense now

OneCardboardBox ,

Same as foo, bar, baz, bizzle, and bebop 😋

Adapted from [email protected], no endorsement of this comment is implied.

CC BY-NC-SA 4.0

Owljfien ,

I hate foo bar etc, seems like a joke that was cringe that has gone on too long. When I was trying to learn programming I was like what the actual hell does this shit mean?

onlinepersona ,

Same. Really thought it was a joke until I saw it all over the place. It really isn’t that hard to think of random names.

CC BY-NC-SA 4.0

spongeborgcubepants ,

It’s better to have a convention that makes it easy to spot example names

me_jumper , in Can someone explain why authors do this?
Zoop ,

Thank you! I had no idea what this was talking about but was curious, so this is perfect. I appreciate it!

gareppa , in rule
@gareppa@programming.dev avatar

This is what happens when you wrongly use pipes to redirect cat to dev/null. Happy now?

Rusty , in Can someone explain why authors do this?
blindsight ,

Alt text:

Changing the names would be easier, but if you’re not comfortable lying, try only making friends with people named Alice, Bob, Carol, etc.

XKCD isn’t complete without the alt text.

LinearArray ,
@LinearArray@programming.dev avatar

I love XKCDs for these

pheeef , in rule

That looks like a WatchGuard XTM 5 Series. A Router/Firewall not a switch. 🙃

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines