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.

Aceticon , in New language

I would say that over a decade of my career was coming in as a freelancer to fix codebases where a couple of people tought they knew better than the previous ones and proceeded to add yet another very different block to a codebase already spaghetiffied by a couple such people.

Sometimes it was coding style, sometimes it was software design, sometimes it was even a different language.

I reckon thinking that just deploying one’s EliteZ skills on top of an existing code base without actually refactoring the whole thing will make it better is a phase we all go through when we’re still puppy-coders.

ChickenLadyLovesLife ,

The majority of puppy-coders I’ve encountered (including myself) actually want to refactor rather than just add onto. They are fundamentally correct in this, but they don’t grasp that 1) few companies want to acknowledge that the code base which is their greatest tangible “asset” is actually complete shit, and 2) that due to their inexperience, their refactored replacement is probably going to end up as bad as or worse than the original.

lightrush , in Rebase Supremacy
@lightrush@lemmy.ca avatar

git merge --no-ff

SrTobi ,

git config --global merge.ff no

maynarkh , in It's always semicolon, God damnit.......

Joke’s on you, I use semicolons in Pythpn

mariusafa ,

How? For real I hate python not having ; and { and depending on tabs and spaces (PAIN)

maynarkh ,

You can end any statement in Python with a semicolon, you can also put multiple statements on the same line, putting a semicolon between them.

dustyData ,

Python supports both, it’s just not pythonic. It’s not the way it’s meant to be written but you can write them if you want/are a masochist, because of the syntax’s flexibility.

jaybone ,

You should try ruby.

fl42v ,

May I interest you in tushar.lol/post/cursed-for/

mariusafa ,

Nice, my lovely C syntax. Thank you!

gamermanh , in Three monitors, and i feel insulted

The blinky lights make it compile faster!

I’m getting older but nah, fuck it, I like RGB lighting in my build. I have a cool mostly open case with a glass front that you can wall mount Pretty sure it’s an older version of this thing. if not it’s a very similar setup and making all my components glisten red or react to explosions in an FPS just feels cool to me.

I turn down the brightness though cuz holy shit they come set to 2x the sun by default

Kurokujo ,

Same. I also have one of the older models in that family of cases. I love the thing but need to put in a water cooling loop.

ProfessorProteus , in Three monitors, and i feel insulted
@ProfessorProteus@lemmy.world avatar

It’s a shame some of the better components have baby-sensory RGB lights tacked on. I’d have bought my parts plain if that was a convenient choice.

Oh also

mmmaaadddeee wwwiiittthhh mmmeeemmmaaatttiiiccc

fidodo , in Three monitors, and i feel insulted

I only have one monitor… It’s an ultra wide.

SpaceNoodle ,

🤮

naught ,

how does it feel to be wrong!!!

SpaceNoodle ,

Did you iron out all your question marks?

naught ,

Yes i like to keep tidy ty for noticing :>

ripcord ,
@ripcord@lemmy.world avatar

I upvoted both of you :)

turing_spider574 , in Computer components cheat sheet

TIL printers are computer components

bdonvr , in Computer components cheat sheet

Hey my inkjet with refillable tanks isn’t so bad

Emtity_13 ,

Stage 1: Denial

Micromot ,

Which one is it? The one I have still has an overflow/nozzle cleaning sponge that bricks the printer when it’s full

bdonvr ,

Oh yeah that whole thing is fucking stupid but bypassable depending on model

melpomenesclevage ,

So you need to hack it and violate warranty to make it work? And this is just fine? On a product you paid for?

Micromot ,

Yeah will see what I can do once it starts complaining

jaybone ,

HP will brick your shit remotely on these.

exocrinous , in I just ask my problem bro...chill....

I love it when the top Google result for a problem is a thread saying to Google it. Exactly what I needed, thanks asshole.

fckreddit , in Aaargh....my eyes......my eyes......

This is getting absurd, variable names have become variable sentences.

magic_lobster_party ,

Variable essays is the future!

Restaldt , in You can certainly change it. But should you?

const…ish

Synthuir ,

constn’t

Slotos ,

I’m giggling like a kid that finally got the candy from the top drawer. It’s beautiful.

Ephera , in True Story

Gotta love the

short loop = 0; // loop counter

and then just:

short amt;

What the hell is “amt” supposed to abbreviate?

RecluseRamble ,

“amount” maybe?

Ephera ,

Ew.

I mean, I was gonna respond with that, no matter what it might mean, but that’s such an unnecessary abbreviation.

ornery_chemist , in Functional bros be like

you mean let.

and then letting Hindley-Milner do the rest

Magnetar ,

let there = “light”

loxdogs , in Functional bros be like

can someone explain please?

noli ,

In functional programming, everything is seen as a mathematical function, which means for a given input there is a given output and there can be no side effects. Changing a variable’s value is considered a side effect and is thus not possible in pure functional programming. To work around this, you typically see a lot of recursive and higher order functions.

Declaring all values as const values is something you would do if you’re a diehard functional programmer, as you won’t mutate any values anyway.

loxdogs ,

thanks, kinda understand

Mir ,

What is the best practice then when you want to update a variable’s value?

Nomecks ,

j = i + something

noli ,

Depends on how deep down the rabbit hole you want to go :p

  • creating a new variable that contains the updated value
  • recursion (e.g. it’s not possible to make a loop that increments i by 1, but it is possible to turn that loop into a function which calls itself with i+1 as argument)
  • avoiding typical types of operations that would update variable values. For example instead of a for loop that updates every element of a list, a functional programmer will use the map function, which takes a list and a function to apply to each element of that list to create an updated list. There’s several more of these very typical functions that are very powerful once you get used to using them.
  • monads (I’m not even gonna try to explain them as I hardly grasp them myself)
DaforLynx ,

You just dropped a mind bomb on me. Suddenly things make sense :o

shield_gengar ,
@shield_gengar@sh.itjust.works avatar

A monad is just a monoid in the category of endofunctors, what’s the problem?

astraeus , in Kubernetes dev moment
@astraeus@programming.dev avatar

Me seeing this as I have a CloudFormation template pulled up in the background

Unreliable ,

CDK or bust

astraeus ,
@astraeus@programming.dev avatar

I’m trying to get my folks onto Pulumi, but we’re now just getting somewhere with CFN. Baby steps

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