Skip to main content

Posts

Wow... it's late

do { if(time_of_day >= midnight && time_of_day { int i; for(i = 0; i punch(monkeys[i]); eat(Food.BANANAS); taunt(monkeys[0]); sleep(1000); } else break; } while(true); Why would I post this code on my blog? Because I felt like it. I kind of feel sorry for monkey zero... :(

Micro$oft is FAT!

Judge Kathleen Kottler-Kavein ruled that Microsoft must be broken up into two companies. The name of the two companies will be MICROS~1 and MICROS~2. HAHA!! The Bug: (not in reference to the car or the insect) So... today I stumbled upon something weird with FAT16 partitions. Why FAT16? Because the manufacturers of the SD memory card formatted the card with FAT16... your own USB flash drive might also be FAT16. Anyways... here's what happened: I had 126 files (totaling over 1.4 GB) on the SD card. If I added one more file, Windows would complain, saying that it could not create the file. And, here's the strange part... if I deleted a 4 MB file and copied a 1 MB file, it would still not let me create a new file. And, even stranger... if I deleted all of the files and created 1000 small files, it would let me. So... the problem doesn't seems to be a file size limit or a # of files limit. What is it then? WTF, mates? Here's a strange bug in FAT16: http://www.cocoa...

Java is Disappointing Sometimes...

What's Java's number one problem?  If you said "efficiency," then you win!  Why do we still use C and C++?  If you said "efficiency," then you also win! And so... yesterday, we learned about templates and generics and so forth, and I was able to ask a question that's been bugging me for quite some time.  "When you declare an ArrayList<Integer>, are Integer Objects being stored internally, or are primitive ints being stored?" Prior to yesterday, I had given this quite a bit of thought, actually.  I'd say about a year ago, I determined that since the classes like Integer, Byte, Float were final, non-inheritable classes, that Java could actually optimize the language by artificially storing primitive ints, auto-unboxing and auto-boxing them, as appropriate.  But, as it turned out, I was wrong! Java does not do that.  Instead, when you store a bunch of "primitive ints" in an ArrayList<I...