Comments

This profile is from a federated server and may be incomplete. Browse more on the original instance.

magic_lobster_party, (edited ) to programmer_humor in Bill is a pro grammer

I’ve seen code that look like this:

int delay = 15 * 60; // 10 minutes

Even if the comment was on the same line someone forgot to update it. People just ignore comments.

Better solution is to write (in C#):

TimeSpan delay = TimeSpan.FromMinutes(15)

Much more obvious what the code actually means.

magic_lobster_party, to programmer_humor in the myth of type safety

Laughs in Object

magic_lobster_party, to asklemmy in What are Lemmy's unwritten rules?

Mandatory Ubuntu hate as well.

I use Ubuntu btw.

magic_lobster_party, to programmer_humor in Bill is a pro grammer

Chances are that the comments quickly turn out of date and become incorrect. Misleading comments is worse than no comments.

magic_lobster_party, (edited ) to asklemmy in What's the best gaming console and why?

GameCube. Because I have fond memories of it in my childhood. I prefer it over PS2 because it properly supports 4 player games (without any extra gadgets).

Smash Bros. Mario Kart. TimeSplitters. All excellent couch multiplayer games. Even Metroid Prime 2 had quite fun multiplayer.

And Soul Calibur 2 got Link.

magic_lobster_party, to programmer_humor in Let me just move this project to the "unfinished" folder

I’m also glad I did it as a hobby before I started viewing software development as a job. No code from me if there’s no money on the table.

magic_lobster_party, to asklemmy in What's the simplest thing humans are too dumb to grasp?

0.999… means infinitely repeating 9s. There’s no more 9 to add that hasn’t already been added. If you can add another 9, then it’s not infinitely repeating.

magic_lobster_party, to programmer_humor in Bill is a pro grammer

Those cases are rare. Often the most basic solution is good enough.

If you have to write complex code, then you should write a comment (write the name of the algorithm for example).

magic_lobster_party, to memes in I didn’t plan this far ahead

Yes we do

magic_lobster_party, to programmer_humor in Show me a better text format for serializing

JSON for serialization all the way. It’s simple and to the point. It does one thing and does it well. There’s little room for annoying surprises. Any JSON can easily be minified and prettified back and forth. If you want it in binary format you can convert it to BSON.

Yaml is too much of a feature creep. It tries to do way too many things at the same time. There are so many traps to fall into if you’re not cautious enough. The same thing can be written in multitudes of ways.

magic_lobster_party, to memes in A touching backstory

Talent show judges when you haven’t stopped the cycle of reincarnation:

magic_lobster_party, to asklemmy in What do you like about socialism?

Even ants and bees falls into the trap of having one tyrannical leader all the workers are serving.

magic_lobster_party, to asklemmy in What's the consensus on swearing here

Because I can get my fucking point across without them

magic_lobster_party, to asklemmy in What do you like about socialism?

Capitalism takes into account for basic facts like human nature.

magic_lobster_party, to asklemmy in What's the simplest thing humans are too dumb to grasp?

One way to tell if two numbers are equal is to show there’s no real number between them. Try to formulate a number that’s between 0.999… and 1. You can’t do that.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #