23 points

can I get uhhhhh NullPointer Exception: Object reference not set to an instance of an object.

permalink
report
reply
7 points

sorry we only have Exception in thread “main” java.lang.NullPointerException, is that okay?

permalink
report
parent
reply
2 points

How about

Class lol : Object
{
public static init void main (string args)
{
    virtual void A_Start()
    {
          Java.Print(args)
          break
     }
}
}

In case it’s not clear, I know nothing about Java.

permalink
report
parent
reply
2 points

that’s how I like my coffee

permalink
report
parent
reply
2 points
*

Isn’t NULL a macro in C for 0? So doesn’t that mean these items are free?

permalink
report
reply
2 points

Null is zero in german - so this must be free, it’s a german shop

permalink
report
parent
reply
1 point
*
Deleted by creator
permalink
report
parent
reply
2 points

In a way it’s still the same with more modern languages. Especially OOP, setting an object to Null is just setting the address pointer to to 0x00000000.

Hence NullPointerException / NullReferenceException or similar, depending on the language.

permalink
report
parent
reply
2 points

I’d guess, in context, it’s a floating point price column that hasn’t been set, and the table designer didn’t specify the column to be NOT NULL.

permalink
report
parent
reply
2 points

I guess Rust would have solved the problem as well.

permalink
report
parent
reply
9 points

Item labels only do this when they’re very stressed

permalink
report
reply
65 points

Programmer: “Does that mean it’s free?”

Cashier: stabs you in the face

permalink
report
reply
3 points
*
Deleted by creator
permalink
report
parent
reply
2 points

No, but these nulls might indicate references that previously pointed to memory that was freed.

permalink
report
parent
reply
6 points

I give money to cashier, change comes out of coin dispenser. I say “Looks like I won again!”, cashier dies a little inside.

Every time.

permalink
report
parent
reply
3 points

Long long ago in a callcenter not too far away, I made a guy choke on his drink. As required, I asked if there was anything else he needed before I ended the call, to which he replied “the winning lottery numbers?” I said “if I had those, I wouldn’t be talking to you.”

permalink
report
parent
reply
33 points

Undefined behavior can go bad quickly.

permalink
report
parent
reply
17 points

Could go the other way though. Ask them nicely if they’d be willing to free up their heap of inventory, and if they return you a cart overflow, you know you’ve stumbled upon the ultimate zero day coupon.

permalink
report
parent
reply
2 points

I worked in groceries story when I was younger.

But funily enough, it’s probably one of the rare times I’d have answered “yes”!

We got a policy here where anything mislabelled under 10$ is free for the first item. Anything over 10$ gets a 10$ rebate.

My understanding is that it was put in place a while ago when stores stopped labelling individual items to keep them in check and ensure that consumers had a recourse in case of mistake.

Source: https://www.opc.gouv.qc.ca/en/consumer/topic/price-discount/store/tip-sheet/

NULL being “no money” by any definition, and the regular price for this probably being under 10$… well, it’s probably free!

permalink
report
parent
reply
1 point

Everything is free. The problem is avoiding the cops afterwards.

permalink
report
parent
reply
3 points
*

Unhandled exception leads to panic

permalink
report
parent
reply
16 points

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

  • 6K

    Monthly active users

  • 988

    Posts

  • 38K

    Comments