- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Oh dear. Once more we have an instance of a thing called a "$SOMETHING number" where it is just a digit string rather than an actual number, and a misguided(1) programmer thought it was appropriate to store it in a variable suitable for storing, well, actual numbers. Y'all know what I mean, right?
Examples:
And now:
(1) Coded politeness. I'll leave it up to the readers to decide which word I really had in mind.
Admin
I like "misguided". Nothing wrong with a little politeness now and again, coded or otherwise.
Admin
Excel is an amazing tool which nonetheless has many sins to pay for, not the least of which is it's continued insistence on treating any collection of digits as a number with no easy method for the user to insist that no, it ISN'T a number you bloody fool, so stop displaying it in scientific notation!
Admin
It's been a while since I've done work in Excel, but IIRC all it takes is a ' prefix to tell Excel that yes, this bit of data really is text despite any appearances to the contrary.
Admin
"Nivel" means "level". I'm not an English speaker, but I believe I never saw "degree" to say how well you know Spanish.
I may stand corrected, of course...
Admin
Preceding the number with a single quote (') should do it.
Admin
Wikipedia tells me that the French dip was invented in Los Angeles, not Buffalo, by two different restaurants as it happens.
Admin
They're referencing Beef On Weck, which did originate in Buffalo. And they're delicious. Trivia: it used to be called "Buffalo Wild Wings and Weck", but they eventually dropped the last part.
Admin
Once again the appropriate rule of thumb is: "Are you going to be doing arithmetic with it? No? Then don't store it as number.
Admin
A leading 0 should also be sufficient (but isn't) to indicate that the input field is a digit string, not a number.
Admin
How about ISO MMMMMMMMDCI: MMXXII-VI-XXIVTXVII:XXXVIII:LVII
Admin
Thing is though, XXXX doesn't mean 40. XL does though. XXXX could be meant to say 2020 (yeah, yeah, I know)
Admin
If leading zero indicates it is not a number, then how do you indicate the number is octal?
Admin
I agree absolutely, whence my use of "misguided".
Admin
Nonsense. Everyone knows that a leading zero indicates an octal numeral.
Admin
If you're typing your data in by hand, the single quote will do it. But if someone is typing all this data in by hand into Excel, then Excel is not TRTWF.
Excel can actually do a pretty good job of importing data and not turning the strings of digits into numbers (or worse, dates). The trouble is, they've made it increasingly hard to find and invoke, to the point that even most people who wrangle data professionally don't realise it's there because all of the conventional ways of doing it don't even give you a clue that it's an option. Several decades of documented effort that that the frictionless methods of importing CSVs (etc.) into the world's most popular data handling tool cause significant problems and refusing to do anything to mitigate the issue is TRWTF.
Admin
I should write a customer service system where reference numbers are of the form X.XXXXXXXXXE+Y
11 digits plus a check digit. The first digit can be a selector even.
So Selector dot 9 digits case number E(separator) +/-(parity) check digit.
If you need more than 9 selectors, you can add a +/- in front of that too, so 20 selectors. Or misuse the parity to be another selector bit, so 40 selectors.
Only lame people will assume it's a floating point number.
Admin
what's with the hbo max?
Admin
The movie description seems to be for a different movie. I think the author is assuming we all know the plot of Ready Player One.
Admin
Yeah, as a long-time data-wrangler who knows many of the tricks, one of my favourite sayings is "Excel is where data goes to die".
It doesn't help that they're slowly phasing out some of the simpler methods. Yes, PowerQuery can import data and you can tell it not to guess data types, but the simple text import wizard could do it in a few seconds, so that had to go.
Admin
The wizard is still there. You just have to explicitly invoke it and your file can't have the CSV extension...