- 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
I'm surprised that more IDEs do not simplify it for you.
Admin
Maybe some IDEs display octal numbers in a different color than decimal (I just checked, and the one I normally use doesn't), but perhaps "warn me if octal ever happens" could be a compiler option. The problem is that the people who understand what it is and why to turn on such a warning are the only ones who would know to turn it on. The rest will be completely clueless even when the compiler throws an error on "009".
Admin
Admin
Nah, just wait for the next round of redundancies. Better still, if he's that loud and forceful, he'll ace his next job interview. Pretend to be a recruiting agency, hunt for a competitor company you don't like, and introduce them to each other.
Admin
What goes: "Pieces of ten, pieces of ten, pieces of ten!" An octal parrot. What goes: "Pieces of eleven, pieces of eleven, pieces of eleven!" A parroty error.
Admin
I think there's a real business idea here. Start a recruiting company, but your business plan is a little different: for a s̷m̷a̷l̷l̷ moderate fee, we get your annoying co-workers hired away to somewhere else.
It's beautiful - think of the repeat business! "Hey guys, we've got Ted Jones again - third time this year."
Admin
Mark's Boss: "The timeout is too short." Mark: "FINE! I'LL MAKE IT LONGER!!"
Mark's Boss: "The timeout is still too short." Mark: "FINE! I'LL MAKE IT EVEN LONGER!!" Mark's Boss: "The timeout is still too short. Don't just extend it, refactor it this time." Mark: "FINE! I'LL MAKE THE TIMEOUT REALLY REALLY LONG!!" Head, meet desk.Admin
Then maybe use specific prefix for octal numbers? Like 0x denounces hex numbers, maybe 8x should denounce octals?
Admin
That would be 0o prefix, since the 'x' is 0x is what signifies hex (newer versions of Java also support 0b for binary). And I believe some languages do use a 0o prefix, but unfortunately, most C-family languages have inherited the unfortunate 0 prefix behaviour...
Admin
To be honest, if someone wants to add leading zeros for intending reasons to enhance readability, I have no issue with that.
Very simple example:
I can imagine scenarios where this can avoid errors.
Admin
0o or even just o is already used in some languages, likewise 0b is used for binary-coded numbers (in pretty much every language based on or deriving from C). Although, each language seems to think it can be confused with something else
I can only imagine the progression of dialogue that lead back to using 0o, and probably around and around a few more times.[tation needed]
Admin
It's a surprising bug lying plain sight: $var2 is assigned 19 in decimal. 023 is octal notation.
Admin
Admin
Meanwhile, [image] is a bigger leading zero.
Admin
Admin
Admin
Can something be longer without being larger?
Admin
Admin
Admin
I can't believe we still need 0s in the 21st century
Admin
I would not be callin' him octal, even though each element can only be 0-7 (and some of them numbers not be much use)
Admin
http://weblogs.asp.net/scottgu/visual-studio-2005-service-pack-1-sp1-released The service pack itself is a fairly large download (431Mb), and can take 30-90 minutes to update your Visual Studio 2005 installation depending on which versions of VS you have installed, and what features are enabled. So you should plan ahead and not expect it to be a few second operation (note: it is a good task to kick off before lunch or in the evening).
Admin
Oh good grief. TRWTF is implementing telephone numbers as integers. One of the stupidest of the common misdesign decisions ever. Nearly as stupid as implementing zip codes as integers.
Admin
Over here in Dutchland, it's not easy to get rid of employees. But there is usually a sort of trial period of 1 or 2 months when starting in a new job, during which either side can simply terminate the contract. Back in the zeroes, during the first "dotcom crisis", there were some recruiting companies that would recruit (for a fee) employees you'd want to get rid of, to have them fired on or even before their first day in the new (fakeish) job.
Problem is, when the word gets out, business ends.
Admin
It depends entirely on where those numbers come from and where/how they are to be used.
I'm always suspicious of any statement that has always in it and never trust one with a never.
Admin
Incompetent and a dick. The full package.
And he's single, ladies!
Admin
Are you going to use arithmetic on them? No? Then they should not be implemented as numbers. You are going to use arithmetic on phone numbers and zip codes? What on earth for?
Admin
Admin
Oops, implementing. My brain interpreted that as storing. I never seem to get that right and always make that mistake.
CAPTCHA: ideo(t)
Admin
The order of magnitude of 0 is undefined, I suppose. But assuming that the value of timeOut is 100, you could accurately say that the total was off by two orders of magnitude from its intended value.
Admin
100 is two orders of magnitude off 1, three orders of magnitude off 0.1, four orders of magnitude off 0.01, ... the more zeros you have before you reach a 1 digit, the more orders of magnitude difference there is; 100 is infinitely many orders of magnitude off 0, which is 0.000... (a 1 digit never occurs).
captcha: distineo
Admin
Admin
There's an old saying, "Twice nothing is still nothing." Usuaully refers to my paycheck, but can apply elsewhere too.
Admin
And again zero's order of magnitude is undefined, not negative infinity -- infinitely small isn't the same as zero.
Admin
lim (log10 100 - log10 x) = ∞ x → 0+
Admin
I mean, if the compiler does not strip the + 0 it does get longer to compute this.
Given enough useless adding maybe it'll succeed (if this is actually done in another thread as the actual install).
Admin
You're also correct, in that the total difference was only a couple of orders of magnitude. But the article specifically said that the number of milliseconds in a second was what was being compared, not the total result of the expression.
Admin
Admin
Auto-dialer.
Admin
Admin
[quote user="QJo"][quote user="Ziplodocus"]Oh good grief. TRWTF is implementing telephone numbers as integers. One of the stupidest of the common misdesign decisions ever. Nearly as stupid as implementing zip codes as integers.[/quote]It depends entirely on where those numbers come from and where/how they are to be used.
I'm always suspicious of any statement that has always in it and never trust one with a never.[/quote]Are you going to use arithmetic on them? No? Then they should not be implemented as numbers. You are going to use arithmetic on phone numbers and zip codes? What on earth for?[/quote]Array indices. Not always, but not never.
Or they might get hashed and the hash values will be array indices. Not always, but never.
I always never recommend absolutes.
Admin
Come off it. A man of his calibre is bound to have done something even stupider. You just haven't looked hard enough.
Admin
Admin
It's common enough -- if you make a code change and don't test it (because "it's such a simple change that no test is necessary") then you won't notice that the code is not actually working. :^P
Admin
An order of magnitude is a factor of 10 (canonically, although I suppose it could be a factor of any number if you weren't so picky).
How many times do you multiply zero by ten to make it similar in magnitude (within a factor of ten) of 0.0001?
Good luck with that. I'll be sitting here counting until you figure out that your zero isn't getting any bigger.
Admin
You must have failed Chemistry (and/or Math) 101.
"100."
Both zeroes are significant.
Admin
Admin
captcha: damnum damnum, I gotta explain all this?
Admin
Admin
"100" != "100."
"100" means that only the 1 is significant, so it could be 101. "100." means that all three are significant digits, so it can't be 101.