Recent Coded Smorgasbord

Inspired by the Pop-up Potpourri, the examples presented here aren't necessarily "bad" code nor do they imply the miserable failure that we're all used to reading here. The examples are more-or-less fun snippets of code like ones that we've all written at one time or another.

Jun 2024

Mostly In One Line

by in Coded Smorgasbord on

Today's a day for a smorgasbord. We're going to start with a classic kind of bad code, from astephens:

pbUpdates.Value = int.Parse(Math.Truncate(percentage).ToString());