- 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'd add frist, but the comment ran out of memory.
Admin
Heh. It's a derp! We've all derped at some point, I'm sure.
Admin
It's 68 MB if you know one specification or 64 MiB if use the other. It is 64 MB if you don't know what you are talking about or if you are stuck in the 90s.
Admin
64 Men in Black?
Admin
Mmmm, it was always a WTF. That was never going on the stack.
Admin
Admin
In the QBASIC, an ancient languages targeting 16 bit environment, one could specify an array with up to 60 dimensions. Is it even possible to use half of that (without trivial, one element dimensions) withing 64 kB?
Admin
Not even close, if every dimension was size 2 and the datatype size was 1 byte you would need 1,152,921,504,606,846,976 bytes.
Admin
Why do I have the feeling that the size of this array is the smallest WTF? Is the 3D array representation adequate for the actual data model?
Admin
FYI: That flea would have to have an area of more than 90 square kilometers.
Admin
What if the 90s were correct, though? Let's be honest, "kibi" and "mibi" are stupid words. We should build the world out of powers of two, like the gods intended.
Admin
But if every dimension is only 1, then it's no problem.
Admin
I meant to reply to this:
But if every dimension is only 1, then it's no problem.
Admin
The largest flee is about four millimeters. 4mm^2 is probably excessively generous but will work for the calculation.
Texas is 696,200 km^2 or 696,200,000,000mm^2
So we could fit 174,050,000,000 of the largest hypothetical flee's shoulder to shoulder, so to speak, on the surface of Texas.
The 10K of data however would only fit in the assigned space 6,553 times.
For the statement "trying to kill a flea with an asteroid the size of Texas" to be approximately accurate the flee would need to be 106241416mm^2 or 106.241416m^2... as the average human stands 1.8m... the flee if it could move would be a massive beast. I do not want to know what it would need to eat.
Admin
Oh just stop it all ready. You MiB people are the problem. MB has been expressed as a power of two in our field since um forever. Computer science is hardly the only field to have things that mean something else in common parlance mean something specific and different in the domain specific context. Nobody was confused until the "SI has to powers of 10" thought police came along. So I just like to say go curl up in the corner with a nice dictionary if that makes you happy; but leave the rest of us alone.
Admin
Admin
Texas is 696,200 km^2 or 696,200,000,000m^2 or 696,200,000,000,000,000mm^2
Admin
Funny fact: An asteroid the size of Texas would kill all fleas, worldwide.
Admin
No, the power of two thing only worked as long as computer nerds were people hidden in attics only talking to their own kind. As soon as computers were used by real people en masse the traditional meaning of kilo broke through.
I mean who was so retarded to say "oh, 1024 is nearly 1000, let's misuse the greek word for thousand for it and redefine it to something it doesn't in any scientific area or anywhere else" instead of inventing anything for this?
The problem today is more that the once-leading computer science nation has a tendency to use completely incoherent unit (and value display) systems that no one else in the world uses. So in that country it doesn't matter much when there is another unit that doesn't fit into any system. For the rest of the world it does.
Admin
I recently had to implement sending a firmware image to a microcontroller flash bootloader, from another microcontroller. There was already code to do this on one of our embedded Linux systems. Okay, show me where the code is and I'll use that. In addition to the code being generally WTF-ey (magic numbers all over the place, being buried in the middle of the same .c file as a bunch of message handlers, etc.) the code read the entire firmware image file into memory before even starting the upload.
And even though the image I was working with was 32K, the maximum flash available from the chip vendor in their biggest chip is 1M of flash. So of course the code declared a 1 megabyte array to read the firmware into. Because doesn't every computer come with a gigabyte of RAM these days? Instead of, you know, reading each 256 byte block right before sending it out a serial port. Well, you know, it might be slower to have to read the next block out of flash disk when we're uploading at 115K baud!
It still made a good scaffolding to ensure that I had all the parts there, I guess. Well, except for the original baud rate handshake, which was nowhere to be found.
Virtual memory: a lame excuse for declaring arrays 1000 times bigger than you'll ever use because they don't really take up RAM until you write to them.
Admin
Carry on, citizen.
Admin
MB is a binary erm, end of. The crass stupidity that has led to mibi tibi junk just needs to die. I for one am very stuck in the 90s over this and proud; I will never buckle to the tibi brigade, who will be the first up against the wall come the revolution.
The only people who use decimals in the same context are the liars in the HD marketing departments, who probably have no idea about anything computer or science related anyhow, they just know how to lie to their customers to boost sales.
btw, when it comes to flash drives it's back to good old binary, you would think? But no, those binary sizes are a complete lie too, even a binary array on a silicon chip doesn't work, take a look at the actual number of bytes on any flash drive. They ALL lie.
So, mibi and tibi were invented by liars!
/rant
Admin
Oh, don't be a pedant. 2^(10n) is close enough to 10^(n3).
For people who want to quickly manipulate memory based on the only meaningful size indicator (address space), it's vastly easier. It's not point accurate to the SI definitions, but who cares? We don't need it to be.
1000 bytes makes no sense in terms of how you're going to address it.
Also, I don't really care about the relationship between kilobytes and megabytes and gigabytes. If I'm doing any unit conversion, it's between bits and bytes, which means I want numbers that multiply and divide easily by 8. Powers of two fit that bill (since I'm just adding or subtracting to the exponent).
Admin
Actually, the Greek word μεγα doesn't mean "thousand," it means "large" or "big." The Greek word we use for "thousand" is χιλια. So, maybe we should call them XB for "Chiliabytes"
Then again, "mega" is word chosen for the metric system to denote a factor of a million, inspired, but not defined by μεγα.
Admin
Don't you mean 2^(10n) ~ 10^(3n)?
And it doesn't.
One binary kilobyte is 2.4% higher, so it is pretty close. One binary terabyte is 1,099,511,627,776 bytes which is almost 10% higher than the "metric terabyte". It gets worse as you go higher.
Admin
So a me(ga|bi)byte (2**(210)) is just ten thousand (10(2+2)) bytes? A gi(ga|bi)byte (2(310)) is just a hundred thousand (10**(2+3))? Interesting. I didn't know that. I have gone through 23 years as a programmer thinking a decimal megabyte was a whole million bytes, and a (decimal) gigabyte was a milliard. How wrong I was. Thanks for letting us know that.
(EDIT: bah, beaten to it by Zemm...)
Admin
I had already edited to correct myself. I haven't finished my coffee yet. I can't maths so good.
Admin
And for all those of you thinking that all-decimal versus all-binary is the end of the matter, consider telecoms.
A 2 megabit-per-second connection: is that mebibits or megabits?
Answer: neither. It's two kibikilobits, 2KiKb for short.
Admin
Admin
Obvious WTF is programming in low level languages. Best stick to language like Java and you see less and less WTF every day.
Admin
Addendum (2013-04-29 08:48): As an added WTF, the variable does not uses the “static” modifier, so either it’s a shared global variable (and calling a shared variable “stations” is not very wise), or a stack variable (which would blow the stack when the function it is declared in is called)
Admin
Admin
68MB fits into 32MB for sparsely allocated systems.
Admin
2 Megabit per second is and always was two million bits per second or 2,000,000 bits per second. It never has been anything else. Just like 2 Megahertz is and always was two million cycles per second. And there is a slow process on the way convincing the very last retards that when you copy data at a speed of 2 Megabit per second for eight seconds, you'll have copied eight Megabyte. Not some strange number of pseudo-Megabytes.
Admin
Well, it depends. Do we define Texas as a cone that goes down to the center of the earth, or do we define it as just a surface area? If we define it as just a surface area, then an asteroid the size of Texas would be just one molecule thick, I suppose, and so wouldn't damage much of anything.
Admin
it's like putting a minecraft map on the stack
Admin
Hahaha what
Admin
FAIL. But what's 6 orders of magnitude between friends?
Admin
Oh, we know. We just don't care. I stand unsilently while sitting in silent protest against stupid-sounding data prefixes.
Admin
This ^
Admin
Being one who likes tradition and would usually disdain change, I would tend toward the MB = 2^1000 nomenclature. However, since HDD manufacturers decided to mess that up, and I like being unambiguous as much as possible, I accept that MiB = 2^1000 and MB = 10^3.
Though, during an episode of "Who Wants to be a Millionaire," (late 90's mind you) they asked the question "In computer terms, what size is a kb?" The answers were 1000, 80, 69, and infinity. (or something similar) I always wished the person would answer, "None of them."
Admin
Admin
You people do not understand the beauty of this because YOU DO NOT UNDERSTAND Linux.
Linux will gladly assign you 64MB of VIRTUAL memory on a 32MB platform.
Now if you only store 10KB worth of data on this, Linux will dirty several pages, but most of the virtual memory will not be affected! Therefore, this code will work fine unless somebody starts to increase the density of the storage, leading to using more pages than available.
Admin
And the remaining 2.45% where 1 does not equal to a bit set is just FILE_NOT_FOUND ...
Admin
Admin
Nobody. 1024 was/is represented by upper-case K; SI uses lower-case k. Then came people thinking it should be pronounced 'kilo'. Then came people thinking M/'mega' meant K*K.
The wikipedia page for this debacle makes it quite clear that the older generation of CS people were well aware of the coming nomenclature collision, and tried to introduce new terms to avoid it. Also, 'mega' for HDD sizes comes from the Apple marketing department. Behold your false God!
Admin
If we were going to follow the rules of the gods, we wouldn't be using 2^10 as the base. We should have used 2^8, or 2^16. The system is rotten at the core.
Admin
I have never, /ever/ heard anyone say 'kibibyte' in real life, and I don't expect I ever will. It's plain nonsense.
Admin
Quite the opposite. If a programmer never uses a low-level language to, for example, poke hardware or manage memory, he is more likely to make less efficient software, just because he doesn't understand what's going on beneath the hood.
And I've never heard anyone say "mebibyte". It sounds stupid, and everyone I know just uses Megabyte to mean 1024^2 bytes, not the powers of 10 garbage.
Admin
You even quote the correct spelling, yet still manage to spell it wrong yourself no less than five times.