this post was submitted on 26 Mar 2024
425 points (92.8% liked)

Programmer Humor

18958 readers
1083 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
425
Gamedev is Easy (programming.dev)
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]
 

Transcript

var game = new Game()
  .EnableMultiplayer()
  .EnableSpatialAudio()
  .SetPerformance(Game.Performance.HIGH)
  .ForEachBug(Bug::AutoFix)
  .GetWishlists(7000);

game.Release();
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 32 points 4 months ago* (last edited 4 months ago) (2 children)

I smell a NotImplementedException somewhere.

[–] [email protected] 55 points 4 months ago (1 children)
catch (Exception e) {
    Exception.autofix(e);
}

Done!

[–] [email protected] 1 points 4 months ago

Perfect! Don’t forget to assert the same exception in all the tests.

[–] [email protected] 4 points 4 months ago (1 children)
[–] [email protected] 2 points 4 months ago

I don’t know, at least ‘SetPerformance()’ could throw an argument out of bounds exception.