[ad_1]

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.
[ad_2]

Remy Porter

Source link

You May Also Like

My Friend’s Hairstyle Is Still Legendary Over 30 Years Later

[ad_1] “My friend Mike’s rock star mullet when he was two years…

r/funny – The struggle is real

[ad_1] This is a friendly reminder to read our rules. Memes, social…

Something Tells Me These Weren’t Licensed Characters

[ad_1] “My mother and I went out to meet some friendly characters…

NASA’s DART Spacecraft Successfully Collides With Asteroid

[ad_1] NASA’s DART mission has successfully slammed a spacecraft into the asteroid…

Top Slots

[ad_1] Picking random items without repetition is its own special challenge. It’s…

Mommy and Me

[ad_1] Trifecta Presents: Mommy and Me From our live sketch comedy show…