1 point

Rust mentioned!

permalink
report
reply
1 point

Instead of

if let Some(a_) = a{
    ()
} else if let Some(b_)=b{
    ()
} else {
    dostuff 
}

you could just use

if a.isNone()&&b.isNone(){
    dostuff
}

Also if you don’t use the value in a match just use _

permalink
report
reply
0 points

Also you can use enums insteas of string literals

permalink
report
parent
reply
0 points

I’m not sure how I would go about this in an elegant way since I’m matching the string I get from a message…

permalink
report
parent
reply
0 points

If the message used enums for actions/procedures like SPAM_MEMES, then using enums would be more performant

permalink
report
parent
reply
3 points

Typical Computer science vs typical computer engineering

permalink
report
reply
1 point

Inside me are two wolves I guess…

permalink
report
parent
reply
2 points

I have to say, I’m getting more and more frustrated by the bad code I have to write due to bad business circumstances.

I want clean, readable code with proper documentation and at least a bit of internal consistency and not the shoehorned mess of hacks, todos and weird corner cases.

permalink
report
reply
1 point

todos

I found a simple trick against this: just remove them. Accept it ain’t gonna happen man.

permalink
report
parent
reply
0 points

Well, yes, but the underlying issues still persist, so it’s not exactly a sustainable strategy.

permalink
report
parent
reply
2 points

A MONAD IS A MONOID IN THE CATEGORY OF ENDOFUNCTORS

permalink
report
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.3K

    Monthly active users

  • 803

    Posts

  • 12K

    Comments