Archive forMarch, 2006

WTFbrb ranks technologies.

With technology being so popular, WTFbrb assesses various technologies based on how useful they are to people, how fun they are to use, how dangerous they are, how well implemented they are, and how cutthroat they are.

Use Fun Danger Imp. Throat
Cell phones 5 4 3 1 5
Web 5 5 2 4 1
Contacts 5 2 2 5 2
Paper 5 5 4 4 2
Robots with a xaser 10 10 100 0 1

WTFbrb hopes this helps.


Who decided 0 means octal!?

Well, I had the whim to program late tonight, sometimes my mind is just thinking way too ‘logical’ to say no. (use of adjectival form is intended, kinda like “Think different” but sillier).

So I was programming and thinking hell of logical.

So (Kids, never begin two paragraphs in a row with “so”, or even a sentence with it, also ask your parents if you are allowed to read this if you really are a kid, I sometimes curse and reference “h - - - - p - - - “), JavaScript has a function (parseInt) to parse a string for an integer. It’s a nice function, and you can use various bases, too. (like parseInt(”10″,2) returns the integer 2, and parseInt(”10″) uses a default base of 10, and returns the integer 10).

But now, take a random guess (without having read the title of this post, hehe cheater) at what parseInt(”09″) returns. No, not 9, but rather, 0! WTF right? My thoughts of logical were upset by this event.

Turns out a ‘0′ in the beginning of a string fed to parse int means the number will be octal. Even if this is some sort of standard (although I don’t think it is true for Java… but I am not in the mood to check it out now), it is a dumb standard. I mean, this behavior is only ‘wrong’ for strings starting with “08″ and “09″, as “01″ through “07″ return 1 through 7 as valid octal strings. So it took me a while to notice it. (Incidentally it took until 2:09 as I was parsing the “09″… tee hee).

Anyways, integers in strings can often end up as “09″ without necessarily being octal, so why not use something like the “0x” used for hex. Maybe “0o” although that is confusing, or “8x” for octal… who knows.

No, it is not hard to fix. Just change it to parseInt(”09″,10) and it gets it right. But it still just feels wrong. I mean (weak argument follows) who uses octal? And, (stronger argument follows) if you are parsing both decimal and octal numbers from strings with the same line of code, your code is working its way towards unreadable, use a damn ‘if’.

Whoa, that was a rant… brb.


Kids should be taught wikis

Firstly IANAEd.D. That out of the way, kids should be taught to use wikis. (Kids meaning way little kids… the ones who can read but can’t change themselves)

Wikis (and super advanced things that are like wikis) are for real the future of the internet as a non-vehicle-for-commerce. Almost all major software projects have them, and of course there are many Wikis for other collections of knowledge, the most famous by far being Wikipedia.

Sure, whatever, I don’t want my kid reading about horse porn on wikis. But y’know, have schools set up wikis, use horse-porn filters and what-not when viewing Wikipedia, have a figure of authority monitor the kids passively.

The real reason kids should learn how to use wikis is to give them a good shot at seeing what is out there. If we set them free in the wonderful world of wikis, they might just learn how to learn things, or even more shockingly, how to share their own knowledge. Remember how exciting it really is for a kid to get a chance to run free through a library? It only gets better.

We don’t live in a world where you just can’t find stuff out anymore. That was called the mid-90s. (tee hee). Most kids are taught that you can get information from teachers, maybe. Some get to use textbooks too. The lucky ones get to use libraries, or even cite news-related sources on the internet. But really, kids are waaay smarter than adults—they just don’t know it yet. If we gave them a head start at being able to learn and contribute to the internet, it might catch on. The most amazing thing about Wikis is how much you end up reading about when you just look up like… “cereal” (I am so serious).

Oh yeah also dont’ worry about Wikipedia being wrong sometimes. It’s not like no kid was ever told something wrong by a teacher or textbook. They’ll recover from the blow, especially if you remind them not to believe everything they read.

I’m not saying replace textbooks, teachers, or libraries, that would be kinda dumb for reasons that are beyond the scope of this blog post.

So find a little kid and show him the article about his favorite TV show on Wikipedia. Tell him how to click on the links. (S)he’ll probably have learned all about DNA, the declaration of independence, and some underground ny rappers before you can say “fun, huh?”.

Comments (3)

How can it happen?

He’s not like this. He reads dozens of novels a year, and some other stuff too. He usually has one novel and maybe something else going at once. He knows you know: all-consuming fiction on one hand and like programming or comics or poker or who knows on the other hand: something that takes less dedication. But then it happens, his whole world turns upside down and he opens a third book.

This the answer to the question of how a man ends up in the middle of 6 books all at once.

He can begin with the 9th book (Water Sleeps) in a previously amazing and now completely shitty fantasy series. He’ll pick up the sequel (The Smoke Ring) to a sci-fi book he previously read and start that, in hopes that he’ll gain some momentum to later finish the shitty book with.

Then he’ll get Woody Allen’s Getting Even for his birthday. And he has to start that, it is Woody Allen.

But then he’ll realize he really doesn’t know enough about the major events of the times, and he’ll also be a trial member of Amazon Prime (trial membership is so worth it! haha) and on a whim buy The Assassin’s Gate, which turns out to be pretty interesting after all, so he gets into that. The real world is important, so fiction and humor can wait.

Then, as he’s programming a poker odds calculator to see which hands really are the best in Omaha8 (AA23 or A234 or A236 or A2KQ or AKQJ they are all so good!), he’ll decide he needs to refresh some of his poker knowledge so he’ll break back into The Theory of Poker. This project will lead him to slow down his reading of other books, after all, it takes focus.

Then he’ll find the library’s comic book section, and check out The Sandman, the first 4 volumes at that. He’ll start reading a “chapter” before bed each night, taking that time away from finishing other books. Now as they all sit stacked on his bedside table…

Comments (1)

So simple, you’ve thought of it.

Ok, first off, I seriously know many people have thought of this, and probably done it from time to time. But that doesn’t mean I can’t blog about it.

The idea is that chocolate soy milk (CSM for those in the know) is for some reason pretty popular. (For me, that reason is that I actually am not a huge fan of the beany taste of plain soymilk, and vanilla is just too sweet. As you may have previously heard, I do like Rice milk but that doesn’t always work in this following thing). Where was I.

Yeah so CSM is popular. So is coffee. So is instant. So why not instant coffee with chocolate soy milk? See I told you people had already thought of it, but still, why not. It is good. Its not like a Cafe Mocha. It just has a little chocolatey taste.

Also, connoisseurs, it doesn’t ruin the taste of the coffee, because it is instant coffee anyways, it just tastes like instant coffee with chocolatey goodness.

The best thing is that chocolate soymilk is actually really tasty, and you don’t need to worry about it going bad before you use it up in coffee. You can just drink it by the glass!

Edit: Wow I’ve thought of more I forgot to point out.

What is especially fun about this idea is that since instant coffee usually is made from the robusta bean, it tends to develop “crema” (how classy!). When combined with any type of soymilk, the crema sort of puffs up underneath a layer of soy foam, creating a really fun chocolatey coffee foam for the top of your coffee. That is fun!


« Previous entries