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.

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.

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 :)

pe1uca , in Why programmers like cooking

Also your stove is last generation so the pan can only get warm but not boil.

ndotb , in Job interview vs job
@ndotb@programming.dev avatar

A more honest code test:

interviewer: ā€œsee if you can get this project my nephew made in high school to runā€

job: getting the next project their nephew made in high school to run

simple , in Job interview vs job
@simple@lemmy.mywire.xyz avatar

The difference is, in the job interview youā€™re writing it from scratch yourself. On the job you have to take over from the guy who left 10 years ago and that button was designed in such a way that resizing it will add garbage data to all tables in the database and also send an email to all your customers telling them to switch providers.

kevincox , in Community Member++
@kevincox@lemmy.ml avatar

Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;)

  • Torvalds, Linus
psilocybin , in rule

So a syntax highlighted comment

canpolat OP , in The Password Game
@canpolat@programming.dev avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • ā€¢
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines