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.

IWriteDaCode , in I am your Scrum Master!

“Help, help, he’s measuring my velocity!” is my new favorite line

CoderKat , in function {}
@CoderKat@kbin.social avatar

I'm sorry, are you saying you indent the braces? Cause if that's not unintentional, those are both horrifying!

Grishaix , in function {}
@Grishaix@feddit.de avatar

<span style="color:#323232;">function {
</span><span style="color:#323232;">}
</span>

Is for cheaters who want to squeeze as much code as possible onto one screen.

zygo_histo_morpheus ,

only good thing about javascript is that it forces people to put the squiggly brackets on the right

bcrussin_dev ,

I thought you could put curly brackets on a new line in js? Although I know when returning an object it has to be on the same line… fuck JavaScript man

snake_case , in function {}

This image is cursed!!

altz3r0 , in Why programmers like cooking
@altz3r0@beehaw.org avatar

You don’t suddenly find out that your peeler is several versions behind

And then proceed to spend 17 hours trying to get it to peel just the way the invetors wanted it to, which is different from the other 987654321 peelers around.

After 20 years in the field, I hate love despise like 'm ok with technology

bad_alloc , in Why programmers like cooking
  • Cannot convert baby carrot to Carrot
  • Index 7 is out of bounds for egg container
  • Boiling water suddenly turns totally black and opaque due to a bug in the bubble shader
anarchist , in When your project manager tells you that you have to support localization 🍪
@anarchist@lemmy.ml avatar

“Compress to Postcode” vibes ala windows 11

lemmyvore , in I know I should... but I just really don't wanna

Here’s my take. In order to be able to write meaningful unit tests the code should be structured in a certain way, with very modular, decoupled units, dependency injection, favoring composition and polymorphism over inheritance and so on.

If you manage to write your code this way it will be an objective advantage that will benefit the project even if you don’t write a single unit test. But it does make unit tests much easier to write, so presumably you’ll end up with more tests than otherwise.

IMO teams should prioritize this way of writing code over high test coverage of non-modular code. Unit tests for deeply-coupled code are a nightmare to write and maintain and are usually mostly meaningless too.

festus , in I know I should... but I just really don't wanna

One rule of thumb I’ve heard and follow is that every time you encounter a bug, you write a unit test that would catch it. I find that does a pretty good job of getting high code coverage, though maybe that’s cause my code is naturally buggy 😅.

bleistift2 ,
  • Writes test to trigger the bug
  • Test is green without fixing the bug.
  • Dafuq?
aport , in I know I should... but I just really don't wanna

That’s why you write the tests first

Jamie , in I love open source game development
@Jamie@jamie.moe avatar

Basically: The game is Cataclysm: Dark Days Ahead. For those not aware of how the game works, it operates in turns, with every character and monster getting 100 turns to perform actions before the other creatures in the game get theirs. Each action takes a set amount of turns, and you can take actions until your 100 turns are used. So walking a tile might take 80 turns, and running that same tile 40, giving you an extra tile before the other creatures get to go.

What happened here is, a commit changed how limb breaks affect turns, but didn’t put a maximum cap. Meaning that players would spend 0 turns moving. If you don’t spend any turns, other things in the game never get theirs. In other words, time stops for everyone but you.

asyncrosaurus , in I know I should... but I just really don't wanna

Not testing is crazy. Once you realize you can actually refactor without ever having the fear you’ve broken something, there’s actually opportunity to make rapid improvments in structure and performance. Taking 2 minutes to write the test can save your hours of debugging. Unless you’re building a throwaway prototype, not unit testing is always the wrong choice.

lonlazarus , in I know I should... but I just really don't wanna

Not writing unit tests just isn’t an option for a reliable app in the long term. But, it’ll take way more than 10 minutes, always.

lobut , in Why programmers like cooking

On a serious note, I love cooking and washing and cleaning. I’m not staring at a screen and the objective is clear.

I’m not contemplating whether this is worth my time or stressed about other things. Although, I don’t cook for many people so I guess my outlook would be different in those cases.

Lysergid , in Community Member++

It’s called replica :)

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