Programmer Humor

This magazine is not receiving updates (last activity 54 day(s) ago).

dejected_warp_core , in got him

One nit: whatever IDE is displaying single-character surrogates for == and != needs to stop. In a world where one could literally type those Unicode symbols in, and break a build, I think everyone is better off seeing the actual syntax.

JK_Flip_Flop ,

I love ligatures but much prefer the ones that preserve the proper width of all the characters for this exact reason

baod_rate ,

are there ligatures for monospace fonts that don't preserve the width of the characters?

PlexSheep ,

I think it's a lineature. FiraCide does that for example, and I like it very much. My compiler and lsp will tell me if there is a bad char there. Besides, the linea tires take the same space as two regular characters, so you can tell the difference.

It's not the 90s anymore. My editor can look nice.

Oinks ,
@Oinks@lemmy.blahaj.zone avatar

If your build fails because you can't track down the literal in the code I would recommend just looking at the compiler error. I understand the concerns about == vs = more but the vast majority of LSPs (and some compilers) will catch that too.

I have also yet to see any IDE enable ligatures by default, at least VS Code and the JetBrains suite both require opting into them even though their default fonts support them.

savedbythezsh ,

In a world where your IDE and maybe also compiler should warn you about using unicode literals in source code, that's not much of a concern.

VSCode (and I'm sure other modern IDEs, but haven't tested) will call out if you're using a Unicode char that could be confused with a source code symbol (e.g. i and ℹ️, which renders in some fonts as a styled lowercase i without color). I'm sure it does the same on the long equals sign.

Any compiler will complain (usually these days with a decent error message) if someone somehow accidentally inserts an invalid Unicode character instead of typing ==.

Juice , in got him

Broad generalizations aren't for the people who make them, they're for the suckers who consistently fall for them

justcallmelarry , in Added Bugs to Keep my job

Fix tpyo

fibojoly , (edited ) in Best constant in all of iOS!

That has to be because in Chinese there is a single word for it, like for so many other relative nouns.

... I think I found it : 老表 (laobiao)
Defined as "male cousin (on the maternal side or on the paternal aunt's side)"

baseless_discourse , (edited )

I think this is just 表弟 (younger male cousin). 老表 is too casual to be used as a tag in phone book.

kevincox , in The perfect way to round out your career
@kevincox@lemmy.ml avatar

I would definitely go for Irish sheep farmer. You get to live in a cute little house in a green pasture by the seaside and the sheep feed themselves. What do you need to do? Sheer them every once and a while? I'd take that over Terraform any day of the week.

odium ,

Terraform the earth to grow plants, not AWS.

Nighed , in got him
@Nighed@sffa.community avatar

This posts entire comment chain is an interesting example of people that have extensive knowledge in completely different areas of programming to me. And have some concepts I had never heard/thought of.

dariusj18 , in got him

The number one thing that gets in my way of refactoring to function is figuring out what to name the functions takes too long.

victorz ,

Then perhaps the code you are trying to extract doesn't make a clear and cohesive procedure. Maybe include more or less of the code, or rework the code into logical pieces or steps. Write the algorithm in human language first, then implement the steps using functions.

🤷‍♂️ Or fnck it.

Feathercrown , (edited )

Sometimea the smallest logical unit of an algorithm uses more than 3 levels of indentation

skullgiver ,
@skullgiver@popplesburger.hilciferous.nl avatar

Maybe this will be the biggest contribution AI will do for programmers: figure out good names. I should try that some time!

On the other hand, AI will only generate output as good as its input, and most large code projects (including Linux) are terrible at naming things.

dariusj18 ,

I had a similar thought

zea_64 ,

Pick something and change it when inspiration strikes. Sometimes you need a big picture view of something to get the right abstractions or even just name things.

Anamana , in Users

User Research: Exists
Devs:

racketlauncher831 ,

User Research: Exist

Me: hhhhh

KillingTimeItself ,

just follow the research, people have already built shit like ncurses for you to shit a shitty UI into, that way you can proclaim that it's at least 50% good because it's ncurses, ez pz

KillingTimeItself ,

real

lowleveldata , in Callbacks

Definitely do call. It'd be hell to debug if it only calls sometimes.

Dunstabzugshaubitze , in I just love pain

sometimes i like that a lot of my work is typical enterprise stuff. nothing gets to prod without some poor soul working through a huge test catalogue on a seperate environment and/or a higher up signs off on it.

it's also annoying because, you cant "just ship" a small fix or change without someone signing off on it.

azulavoir ,

I just had to deal with a situation where someone planned to go live with something on Monday, but was refusing to make a small change to make it work on Friday.

I feel this.

YurkshireLad , in The perfect way to round out your career

I can see how decades of working at Microsoft can turn someone into a goose farmer. I've been using their products for decades and some days I never want to see their products again.

Kimano , in got him

My personal code readability axe to grind is nested complex ternary operators.

Every now and then I'll see something like this

return (checkFormatType(currentObject.type==TYPES.static||currentObject type==TYPES.dynamic?TYPES.mutable:TYPES.immutable)?create format("MUTABLE"):getFormat(currentObject));

And I have a fucking conniption because just move that shit into a variable before the return. I get it when sometimes you just need to resolve something inline, but a huge amount of the time that ternary can be extracted to a variable before the ternary, or just rewrite the function to take multiple types and resolve it in the function.

lud ,

That example looks like the PowerShell equivalent of piping complex things around 20 times before actually doing something with the results.

dejected_warp_core , (edited )

In a one-liner competition, sure.

In my codebase? I'd pull a "let's linger after standup about your PR" and have the coder sweat through a 10 minute soapbox about nothing before laying down the law.

Kimano ,

Yeah, the annoying thing is the people who I generally have found to be the worst about stuff like this are old school Senior C developers, who still program like it's 1987 and we have to fit everything into 4K of RAM.

Fortunately there's nothing like that in my code base, I just run into stuff like that periodically when I'm digging around in other team's server code looking for something.

Skullgrid ,
@Skullgrid@lemmy.world avatar

no but bro, the code complexity tool says that this scope has 14 complexity instead of 13, we gotta cram it in a single ternary for code legibility

cobra89 , in There's no place like `[::1]`

adopted globally

Lol yeah, okay. Talk to me when you can actually get to most sites with IPv6.

JustBrian7872 ,
skullgiver ,
@skullgiver@popplesburger.hilciferous.nl avatar

Last time I checked my router's statistics, IPv6 destinations were a bit over 50%. That included torrents, though, actual website traffic is much better.

The only website I can think of that I can't reach over IPv6 is Github.

cobra89 ,

twitter.com
wordpress.com
nytimes.com
paypal.com
soundcloud.com
ebay.com
imdb.com
twitch.tv
stackoverflow.com
imgur.com
w3schools.com

skullgiver ,
@skullgiver@popplesburger.hilciferous.nl avatar

Hmm, didn't know IMDB and StackOverflow were still stuck on IPv4. Not surprised Paypal and Twitter are still shit, but I rarely interact with them.

I can't say I use the other domains.

pooberbee , in Like getting 9 women pregnant and expecting a baby in 1 month

It always grates on my nerves to read laypeople's opinions of how software development should happen. So much unfettered stupidity.

SkyNTP , in Interview tips

Asking your employer for more compensation because you are exerting more effort due to inexperience isn't so different than a AAA studio charging high fees for a crappy product because of corporate bullshit and inefficiency.

In fact, these two things tend to be two sides of the same coin.

EinfachUnersetzlich ,

What is AAA? Name resolution for IPv5?

thatsTheCatch ,

I think they're referring to video games. AAA games refer to games made by large companies with huge budgets: think Assassin's Creed, GTA, Call of Duty, etc.

They've been pumping out some trash games for the last while

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines