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.

programmerhumor

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

johnhansarick , in XKCD 1172

Reminds me when I was working with a guy and he named a database table recieved . I had adapted my code to that, and then one day without warning he renamed it to received - and it took us an hour to figure out why everything broke.

gbhorwood ,

had a co-worker once who called the variable holding the first record in a complicated workflow "rec1st" and the last record "reclst", unaware that in every font used by every code editor except his, a lowercase l and number 1 look identical.

i spent a day debugging that after he quit.

kartonrealista ,
@kartonrealista@lemmy.world avatar

Lesson for the future: stop using crappy illegible fonts in a code editor, and use something nice like Fira Code or even Fira Mono or Sans if you don’t like ligatures.

https://lemmy.world/pictrs/image/19a86e94-fc0c-4633-96de-7dbee4ec353f.png

https://lemmy.world/pictrs/image/87277cd5-aa1f-4b4e-b6cc-549fbb0d53b8.png

Edit: In the middle of writing this I realized it was a confusion between “1” and “l”, which makes the font choice even more bizarre. What kinda garbage font doesn’t distinguish between the two? I could understand if it was capital “i” and lowercase “l” since they look extremely similar in most sans serif fonts, but “1” and “l”?

Also it takes like 10 seconds to change the name of a variable across the whole file with a modern code editor like VSCode or an IDE for the specific language you were working with. If they were confusing you, you could have just changed “reclst” into “last_record” and that would save you a day of work.

Bankenstein OP ,

No good code font would make 1 and l look identical. Character differentiability is like the most important thing.

Look, JetBrains did it right.

https://feddit.de/pictrs/image/c8de74b2-d81e-419a-b864-ee75cc7d8213.jpeg

Black616Angel ,

Our Python virtual environments at work on all Linux-servers are in the directory /opt/vens instead of /opt/venvs so when some intern corrects that, we will be screwed!

db0 , in XKCD 1172
@db0@lemmy.dbzer0.com avatar

The fact that they mention using EMACS makes it even funnier

Hexarei , in Even better than waiting for a compile

“GitHub is down? Guess that means it’s time for a quick game break.”

MyNameIsRichard , in Even better than waiting for a compile
@MyNameIsRichard@lemmy.ml avatar

First one, then the other!

Kerb , (edited ) in It do be like that (Not OC)
@Kerb@discuss.tchncs.de avatar

Don’t forget the CSV files which despite the deliverers insistence on it being the same keeps changing in formatting.

HopeOfTheGunblade , in Sometimes good to know, you're not alone!
@HopeOfTheGunblade@kbin.social avatar

I have to wonder what sort of model of the world someone who makes this sort of request has. How do they think mirrors work? Screens? Images?

oranges OP ,

I have given up on Logic when dealing with clients… Trying to figure out what they actually mean is never what they actually mean.

It seriously blows my mind that some of these people are like CEO status of huge companies. How they even function in every day society and remember to breath is beyond me.

OUTRAGED_MILLENIAL , in Finally "done" for the day!

I don’t like that I am in this picture. I thought it’d be different in video games.

miroppb , in Whoops
@miroppb@kbin.social avatar

Especially when it happens on Friday at 4:59

bigbluealien ,
@bigbluealien@kbin.social avatar

Eh, it can wait till Monday

tias , in "This does not work in the Nintendo 3DS browser"

Still better than IE

Kerb , in Modernizing code be like
@Kerb@discuss.tchncs.de avatar

There are Bluetooth versions of these cassettes,

In case you want to future proof it for the day apple releases a portless iphone

CanadaPlus ,

Nah. Just plug a Bluetooth USB port onto the end.

(I joke, but my laptop is currently plugged into an external wifi device because it was easier than fucking with the built-in chip)

Kerb , in My goals are beyond your understanding (Not OC)
@Kerb@discuss.tchncs.de avatar

Import pandas as np
Import numpy as tf
Import matplotlib.pyplotlib as pd
Import tensorflow as plt

Or if your more of a c++ guy:

true false
false true

CannotSleep420 , in I still have nightmares (not OC)

I once had a professor ask to solve the tower of hanoi using only 2 pegs.

illectrility OP ,
@illectrility@lemmy.world avatar

How did that turn out?

CannotSleep420 ,

It was a trick question.

illectrility OP ,
@illectrility@lemmy.world avatar

Yeah of course but what did he expect to happen?

CannotSleep420 ,

Realize it was impossible I guess?

Xanvial , in Cosmic Rays?

You should add returns ray detected outside of while loop

flambonkscious ,

That resembles some of my PowerShell waaay too much. If it wasn’t for the cosmic ray thing, I thought this was my GitHub…

vis4valentine , in Working at PornHub
@vis4valentine@lemmy.ml avatar

You can always say that you work for a mayor streaming company called “mindgeek” and hope they don’t google what the hell mindgeek is.

chkno , in Cosmic Rays?

Any sane compiler will simplify this into


<span style="color:#323232;">    function cosmicRayDetector() {
</span><span style="color:#323232;">      while(true) {
</span><span style="color:#323232;">      }
</span><span style="color:#323232;">    }
</span>

C++ may further ‘simplify’ this into


<span style="color:#323232;">    function cosmicRayDetector() {
</span><span style="color:#323232;">      return
</span><span style="color:#323232;">    }
</span>
LuciferMorningWood ,

Iirc the issue was that while(true) would be removed while it should be replaced with ret and this caused a bug where the binary would execute next function

But I believe this way of cosmic ray detection would work


<span style="color:#323232;">volatile bool condition = true;
</span><span style="color:#323232;">while(condition) {
</span><span style="color:#323232;">}
</span><span style="color:#323232;">printf("Cosmic ray detected");
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines