programmer_humor

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

Deiv, in When you forget to set a boundary conditions in your logic

You’re special, #6,211,583

🤣

autokludge, in What you are according to you fav language
@autokludge@programming.dev avatar

Thanks nerd

doppelgangmember, in Happy New Year Coders.

Bro what a lie

What birthday gifts ???

BastingChemina, in 4 billion if statements

I’ve lost some of my sanity reading this !

SaltyIceteaMaker, in no.. just no
@SaltyIceteaMaker@iusearchlinux.fyi avatar

got no clue abot sql. what is wrong and how is it supposed to look like?

schnurrito,

SQL is supposed to look like this: SELECT status, name FROM some_table LIMIT 5

ILikeBoobies, (edited )

Different language

Daxtron2,

this basically xml being made to look like SQL. It’s gross and that’s why it’s funny

traches,

SQL is run on the server to communicate with a database. The screenshot is jsx, which is a front-end, UI templating language. Writing SQL this way is cursed

SirQuackTheDuck,

It could be querying the in-browser database (that’s commonly used, such as with WhatsApp web), which would be seeded by a different part of the application

utopianfiat,

Except that’s still a SQL dialect, not JSX. There’s no need to make this JSX.

DarkGamer, in 4 billion if statements
@DarkGamer@kbin.social avatar

This is why every programmer needs to understand the modulo operator.

MxM111,
@MxM111@kbin.social avatar

I would divide by two (floating point) and check the fractional part.

sus,

turns out that 2^53 + 1 is an even number

iknowitwheniseeit,

The article only covers unsigned 32-bit numbers, so floating point division would be fine.

jaybone,

Or bitwise AND.

Reptorian,

This is what I prefer too! I also some times prefer to use bitshift when it comes to division or multiplication of power of 2.

alphabetsheep, in GitHub Desktop or Git CLI?

Ohmyzsh with the git plugin is my fave - gaa & gcmsg “a commit” feels like the right level of verbosity for me.

hypnotic_nerd,
@hypnotic_nerd@programming.dev avatar

Wow what’s the plugin name I wanna try it out.

alphabetsheep,

The plugin is just called “git” it comes with ohmyzsh out of the box. You just have to enable it in your zshrc.

hypnotic_nerd,
@hypnotic_nerd@programming.dev avatar

Thanks 👍

MangoPenguin, in GitHub Desktop or Git CLI?
@MangoPenguin@lemmy.blahaj.zone avatar

I really like Sourcetree, been using that for a long time.

ohlaph,

Same here. Use it regularly at work. For personal projects, I tend to just use the IDE.

WindowsEnjoyer, in what's the difference?

In Lemmy people are not aware that GitHub is not just git server with lots of code. :)

uis, (edited ) in Programmer tries to explain binary search to the police
@uis@lemmy.world avatar

This student should never go to xitter. Or will be canceled instantly.

fl42v,

Sure, fuck xorg knockoff. What’s the connection here, tho?

uis,
@uis@lemmy.world avatar

Binary search. They don’t like it.

ntzm,

Wtf are you talking about?

uis,
@uis@lemmy.world avatar

Binary search

kd45, (edited ) in I'll just be a quick 3h

Oh no! How dare they ask you to do your job? Just get on with it and do what they pay you for

parlaptie,

This is a programming community. The joke is that you’re asked to do something that isn’t part of your job, to do someone else’s job for them.

mariusafa, in every damn time ...

What is that?

Boxman753,

Something that appears in Visual Studio Code, and i assume that in Visual Studio as well.

youCanCallMeDragon, in Bill is a pro grammer
@youCanCallMeDragon@lemmy.world avatar

I wonder if chat GPT can add comments

charliespider, (edited )

Chat GPT is great at writing comments. Usually writes better comments than I do. I’m using copilot which uses Chat GPT so it’s also repo aware.

Landless2029,

I second github copilot

Landless2029,

Try github copilot I’ve canceled my chatgpt for it.

Now I start scripting by doing all my comments. Essentially make a outline like I’m writing a paper.

Copilot suggests the code that matches my comments.

I script legit 3x~4x faster now with full comments. It’s amazing.

glibg10b, (edited )

<span style="font-style:italic;color:#969896;">// Greetings, intrepid explorer, to the magnum opus of verbosity – the exhaustive elucidation
</span><span style="font-style:italic;color:#969896;">// of the venerable "Hello, World!" program in the illustrious realm of C++.
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">// Our inaugural act involves the summoning of external powers through the sacred rite of inclusion.
</span><span style="font-style:italic;color:#969896;">// The venerable  library is invoked, opening the gateway to input and output sorcery.
</span><span style="font-weight:bold;color:#a71d5d;">#include </span><span style="color:#183691;"><iostream>
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">// Brace yourself, noble adventurer, for the initiation of our journey transpires within the sanctum
</span><span style="font-style:italic;color:#969896;">// of the 'main' function – the veritable heart and soul of our C++ odyssey.
</span><span style="font-weight:bold;color:#a71d5d;">int </span><span style="font-weight:bold;color:#795da3;">main</span><span style="color:#323232;">() {
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// Let us forge a pact with the realm of 'std', alleviating the syntactic tribulations
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// through the divine power of the 'using' declaration. Behold the namespace, a sanctuary
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// where the gods of C++ convene, rendering our code free from the shackles of verbosity.
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">using</span><span style="color:#323232;"> namespace std;
</span><span style="color:#323232;">
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// As we stand on the precipice of expression, the 'cout' oracle emerges.
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// This venerable entity, an emissary of the standard output stream, awaits our command.
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// With the '<<' conjuration, we channel the essence of our proclamation, "Hello, World!",
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// and cast it into the void of the console, where it shall resonate for eternity.
</span><span style="color:#323232;">    cout </span><span style="font-weight:bold;color:#a71d5d;"><< </span><span style="color:#183691;">"Hello, World!" </span><span style="font-weight:bold;color:#a71d5d;"><<</span><span style="color:#323232;"> endl;
</span><span style="color:#323232;">
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// The denouement approaches, where our protagonist, the 'main' function,
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// bestows upon the cosmic arbiter – the operating system – a token of acknowledgment.
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// The triumphant 'return 0' is a symphony of numerical reverence, echoing
</span><span style="color:#323232;">    </span><span style="font-style:italic;color:#969896;">// the harmony of a flawless performance in the grand opera of computational artistry.
</span><span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#0086b3;">0</span><span style="color:#323232;">;
</span><span style="color:#323232;">}
</span>
GissaMittJobb,

10/10 literate programming points

Beanie,

Ah yes, #includen. The magical include that simply copy-pastes the entirety of libc’s headers into your source file.

griD, in We've come a long way baby

I really like how my meme proliferates along this 'verse :) I hope the discussions ITT are as nice as in mine.

lurch, in Password requirements are getting out of hand

Pretty unsafe, because it makes people prefer big letters, i.e. W

plistig,

That’s why my password consists exclusively out of Assyrian cuneiform letters, e.g.

https://en.wiktionary.org/wiki/File:Assyrian_cuneiform_U12030_MesZL_293.svg

Yes, that’s one letter.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #