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.

noisytoot , in This is not a meme, I was trying to find content for an OC /c/programmerhumor post and found this

Seven semicolons are the correct way to do indentation (it even alliterates):


<span style="color:#323232;">int main
</span><span style="color:#323232;">(void) {
</span><span style="color:#323232;">;;;;;;;printf("like thisn"); }
</span>
dystop ,

the correct way is to never indent and never use whitespace. Saves memory.

Your goal should be 1LOC every month, no more.

booty ,
@booty@hexbear.net avatar

all code should be written in one line with absolutely no breaks. it’s the most efficient way

brezelradar , in Tell me your real address
@brezelradar@feddit.de avatar

It’s ::1, but also fe80::d00f:foo5

lynx ,

Its a MAC address not IPv6.

emi , in Code that lives forever
@emi@lemmy.blahaj.zone avatar

I have a mental image of 50+ lines that could be replaced with 15 if someone just used a loop.

darcy ,
@darcy@sh.itjust.works avatar

hey depending on the code, it could run faster without the loop

dodslaser , in Object oriented programming

“Not a single problem of the class struggle has ever been solved in history except by violence.”

~ Vladimir Lenin

demonen , in Using linux infront of my friends be like
@demonen@lemmy.ml avatar

I used to do a lot of work in vim, over SSH. Five PuTTY windows, one of which was always showing cmatrix

Shared an office with a Business Analyst, so he was way more impressed with my “matrixing”, than I was with his “spreadsheeting”.

Trashcan , in You can always rely on grandma

I take it chatGPT does not give you windows 10 codes if you ask about it directly? You just have to trick it a little OG Grandma style?😅

Otome-chan ,
@Otome-chan@kbin.social avatar

tbh the keys are probably fake

gkd ,
@gkd@lemmy.ml avatar

There was an article about Barr actually giving people real keys, so they might be…

torafugu ,
@torafugu@kbin.social avatar

You should probably watch Enderman. He unlocked Windows 11 Pro using Windows 7 Ultimate keys generated by ChatGPT. It took 3 regenerations, but a key did pass the online check.

mrmanager ,
@mrmanager@lemmy.today avatar

This is so nostalgic to me. I left windows many years ago and seeing those keys reminded me how I used to try and get those keys etc. :)

torafugu ,
@torafugu@kbin.social avatar

You left it for the better. Anything above Windows 7 is basically spyware now.

mrmanager ,
@mrmanager@lemmy.today avatar

Yup I saw it coming in Win 7 and havent used windows since :)

gnuslashdhruv , in This is not a meme, I was trying to find content for an OC /c/programmerhumor post and found this

Is this some kind of python meme I’m too C++ to understand?

Now, I’m completely willing to start a war about { going on the next line.

TheInsane42 ,
@TheInsane42@lemmy.ml avatar

Totally agree, all my { end up on the next line, 1st spot when starting a function, last character of the keyword when starting an if/for/… section. I even put the closing one on the same line when it’s single line, else either at the end of the closing line (when changing really old code) or same indent.

So indenting varies a lot, which makes most ‘new’ programmers go mental.


<span style="color:#323232;">while (my code)
</span><span style="color:#323232;">    { I'll do it my way }
</span><span style="color:#323232;">
</span><span style="color:#323232;">if (! liked)
</span><span style="color:#323232;"> { toughen-up }
</span><span style="color:#323232;">else
</span><span style="color:#323232;"> { get used to it
</span><span style="color:#323232;">   multi-line can go both ways...
</span><span style="color:#323232;"> }
</span>

That is, unless the font used messes it up. ;)

demonen , in This is not a meme, I was trying to find content for an OC /c/programmerhumor post and found this
@demonen@lemmy.ml avatar

I use tabs because I prefer 4-space indents and others might prefer 2-space indentation or the gross and unacceptable 6-space indentation.

If more than one person is working on a code base, there will likely be more than one preference, and with tabs everyone gets to just set their own tab width.

Yes, even the 3-space savages.

noisytoot ,

Tabs work fine as long as you don’t align stuff. If you do, you have to assume a tab size and mix tabs and spaces.

gun ,
@gun@lemmy.ml avatar

This is a legit observation. However, I would argue that spaces needs a set indentation width anyway, so if tabs had a set indentation width that coders are expected to maintain when aligning code, it wouldn’t make a difference. Enforcing that in practice may be different, but in theory it works.

edward ,

Generally aligning stuff isn’t nice. But if you do, it’s tabs up to whatever level of indentation you’re at then spaces the rest of the way. So you wouldn’t have to assume a tab size. And the tabs and spaces have different semantic meaning (indent vs alignment) so mixing them makes sense. It’s even built into Jetbrains IDEs, where it’s called “Smart Tabs”.

https://lemmy.ml/pictrs/image/2b14b960-5c9c-4d3a-9f54-cc390e991378.png

Although really just adding a level of indent is better than aligning.

https://lemmy.ml/pictrs/image/9aa8acc8-3035-403d-bebc-edcb322418ad.png

UpperBroccoli , in This is not a meme, I was trying to find content for an OC /c/programmerhumor post and found this

[ ] tabs [ ] spaces [x] why would I even care, I press tab and the editor puts either a tab or a number of spaces, couldn’t care less…

Thndrchld , in Code that lives forever

I feel personally attacked.

Ramin_HAL9001 , in Object oriented programming

Object oriented programming is endless class struggle.

Pure functional programming is freedom from state. https://lemmy.ml/pictrs/image/18beec8a-d351-410b-816d-d2ad7f43af12.png

ElectronSoup ,

"In politics, nothing is immutable"

sapient_cogbag ,
@sapient_cogbag@infosec.pub avatar

Based haskell ;p

geopoliticssuck ,

OCaml enjoyers anyone? 🐫

fkfd ,
@fkfd@lemmy.ml avatar

ocaml: the socdem of programming languages

nobodyspecial , in Code that lives forever
@nobodyspecial@kbin.social avatar

As with relationships, if you make a mistake you'll wind up supporting it for life.

I kid, I kid. We all know to job hop every 2 years for better compensation. It'll be someone else's problem after that.

mfz ,
@mfz@kbin.social avatar

Yes, yes, and someone else's problem will be your problem after the job hop! :)

celipon , in Code that lives forever
@celipon@kbin.social avatar

It is always the worst code you wrote that survives. There's a terrible university dorm management software I wrote eight years ago as a student. They still use it. The crazy complicated test framework wrappers for some hardware I wrote five years ago. They still use it. The godawful and crazy complicated communication protocol I whipped up four years ago, still used in medical equipment today.

masterspace ,

The crappy scripts that I wrote while teaching myself to code at an electrical engineering / architecture firm are used more often than the professional software I've built for FAANG and Fortune 500 companies since.

longshaden , in Code that lives forever

oof, this comic hurts so bad it’s funny.

hal_canary , in FizzBuzz: Enterprise Edition
@hal_canary@lemmy.sdf.org avatar

This makes me cry.

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