Tina needs to write some software that integrates with a hardware device. Thatdevice controls access via behind a PIN, and thus Tina's team needs to track the valid PIN, so that they can, via software, update or alter the PIN.

There's just one problem. That device has some opinions about how a Personal Identification Number should be represented:

.comment { border: none; }

/// <summary> /// Gets or sets the department PIN. /// </summary> /// <value> /// The department PIN. /// </value> uint DepartmentPin { get; set; }

I love the useless comments, but even more I love the datatype: uint.

Now, you might think the PIN 0410 and 410 should be considered different PINs, but you'd be wrong.

This gets us back to the old problem in programming: just because something is called a number doesn't mean it's a numeric type. Whether it's phone numbers, zip codes, or PINs.

Tina doesn't share what this device controls access to, but swears: "It's not our fault. We don't make the device that accepts the PIN."

hljs.initHighlightingOnLoad();

[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.

Remy Porter

Source link

You May Also Like

Are These the Worst Smells on Earth? (15 GIFs)

Hendy Source link

When Mom Spoke, Everyone Listened

“This is photo of my family (Me as a baby in the…

Miley Cyrus says her bikini line injury from twerking has healed up nicely

In an exclusive interview with Press Extra, the ever-entertaining Miley Cyrus revealed…

VSCode users be like :

Tags: funny, programmer humor 13 points, 3 comments. Source link