June 2007 Archives

Ultimate Flash Protest Video

| | Comments (0)

Is this a parable of man vs. machine or just a developer having a nervous breakdown dealing with the Flash Interface?

Animator vs. Animation

It is a reminder of why I both love and loathe Flash.

Hexadecimal to Decimal in FileMaker 7+

| | Comments (0)
This page revised. You can see revised formulas at the Got Unicode Blog. The new formulas allow you to convert numbers even if they have variable lengths.

FileMaker can do many things, but alas does not include a built in hexadecimal to decimal converter. But I managed to build one...even in the standard version without the custom function writer.

If you're interested, here's how I did it. In this case, I had to work with 5 digit Unicode Code Points. If you're working with 2 digit color codes (2 digits per color), it's much easier.

Note: This requires the use of tables and relations, so this solution only works in FileMaker 7 and above.

  1. In the main table, I created a field for the Hexadecimal value. I'll call this HexValue for now. It must be a Text field. You can create a Decimal field (Calculated), but you won't be able to fill in the formula yet.
  2. Then I created a second table to store the correspondence between a hex digit (0-F) and its decimal value (0-15). The HexValuefield is Text, but the DecValue field is a Number. See the sample table below (some values skipped).
    HexValue (Text)DecValue (Number)
  3. To do all the conversions, you need some intermediate values. I created fields to extract the value for each place in the hex number (four digit FFFF) as follows. In case you're wondering, the name of the places are semi-inspired by Roman numerals and algebra.
    • Rightmost digit Units (n) : nhex = Right(HexValue)
    • Third digit Tens (t) : thex = Middle(HexValue;3;1;)
    • Second digit Hundreds (c) : chex = Middle(HexValue;2;1)
    • First digit Thousands (m): mhex = Left(HexValue)
  4. I need to set up some Relationships so that each extracted digit can look up the decimal equivalent. For each of the intermediate digit fields above, I created a link to an instance of the Hexadecimal Lookup table (there are 4 instances total). It's important to make sure each instance has a name you can remember later; mine mention which digit I am working on. See the Relationships diagram below.
  5. Now we can finally get that decimal value! If you haven't already, create a DecimalValue field and make it Calculated.
  6. Here's my calculation. I'll explain what the parts mean below
    HexLookup N::DecValue + 16*HexLookup T::DecValue + 256* HexLookup C::DecValue + 4096*HexLookup M::DecValue
    • "HexLookupN::DecValue" means give me the equivalent decimal value column based on the hex value in the "HexLookupN" (units digit) table instance.
    • "HexLookup T::DecValue" does a look up for the tens unit. I multiply the value by 16 an add it to the ones value. Remember the hex #FF (F=15) means 15*16+15
    • I look up the hundreds place decimal value and multiply it by 256 (16^2), then the thousands place decimal and multiply it by 4096 (16^3).
    • I add up the results of each converted decimal digits times its appropriate power of 16.The calculation is complete.

Now at this point, you may be wondering if it's worth the effort, and my answer is "Heck yes". Before I got this toy, I had to open my Hex calculator for each value (and Unicode has millions of possible values).

If the Hex Math is Confusing...

I strongly recommend finding the lyrics of Tom Lehrer's song "New Math". It cleared up some mysteries for me.
Now, that actually is not the answer that I had in mind, because the book that I got this problem out of wants you to do it in base eight. But don't panic! Base eight is just like base ten really - if you're missing two fingers! Shall we have a go at it? Hang on...


Now instead of four in the eights place
You've got three,
'Cause you added one,
That is to say, eight, to the two,
But you can't take seven from three,
So you look at the sixty-fours...

Sixty-four? "How did sixty-four get into it?" I hear you cry!
Well, sixty-four is eight squared, don't you see? (Well, ya ask a
silly question, ya get a silly answer!)

A Really Memorable Physics Class

| | Comments (0)

Here's a page full of quotes from one semester in a physics course.


As you can see, few of them deal directly with physics... except maybe for

"It's like unshooting your anti-grandmother... well, I don't want to get sued by the anti-grandmothers association."

I had a (basic) physics class like this once, and truthfully all I remember now is

  • "If you don't want to do physics...don't come and waste my time."
  • "Coal power isn't as safe as nuclear power, but it can't wipe out the state of Pennsylvania if something goes wrong."
  • "Speed and velocity are different...Velocity always has a vector."

And although I wasn't sure of what I was doing at the time, I did ace my subject SATs in them.

And the guy posting his quotes is still in physics. Something else must have stuck.

So...if you've never had a memorable course like this, you really are missing out on a very important educational experience. Even if you think you don't remember everything.

How Many Blogs?

| | Comments (0)

The Movable Type system at Penn State allows you to create multiple blogs for multiple topics. Which is best?

If you want your blog to be a journal or diary, maybe one blog is best. Some of the "hottest" blogs are based on people writing about their lives in interesting ways.

But there may be times when you may want more targeted blogs. For example:

* You may want one blog to discuss your research or hobbies, but another for your friends and family talking about your wedding or pet.
* Another tip: If you're interested in hits, then a specific topic blog may also be a good idea. Many users like to follow blogs on specific topics and want to find other "experts" or "enthusiasts" in their interests.

Fortunately, Movable Type gives the option for either.

Do Students Need Blog Guidelines? Of Course!

| | Comments (0)

Blogging in an academic context is relatively new, so students may not be sure what to expect. And don't forget that younger students may equate blogs to their Facebook account.

Unless your course topic touches on what parties your students attended, guidelines are generally recommended. Blogs and threaded discussion share similar features, so many guidelines are similar.

Some guidelines I might recommend

1. List topic parameters for students.
2. Suggest students avoid writing anything they don't want a future employer (or their parents) to read.
3. Suggest post lengths and tone. Do you want blogs to be semi-formal reflections, professional news stories or formal research notes?
4. If students are commenting on posts, then avoid personal attacks.
5. If you want each student to post, then make a certain number of posts required.
6. Don't grade in public - many blogs may be viewable by the public, so grading information must be kept confidential as always.
7. If topics are sensitive, allow students to post in a private space. ANGEL bulletin boards are still a good option for that.
8. Most users use correct punctuation and grammar on blogs, but it doesn't hurt to remind students to use it.

P.S. Blog guidelines should not be too surprising. Guidelines have been needed for every new communication technology including chat, e-mail and threaded discussion.

Intrigued by Multitouch Computing

| | Comments (0)

Popular Mechanics has a cool demo of the cutting edge "multi-touch computing" technology from Windows and other vendors (including Apple's iPhone).


Basically it's a computerized table top with a touch sensitive screen that lets you shuffle your digital library collection, zoom in and out on virtual maps and even suck photos from your compatible digital camera. You might even be able to do virtual jigsaw puzzles and board games. In vertical mode, it looks like it can pool off the on the coolest Power Point presentation ever - it would be great for demos.

Educationally, I can see the engineering and digital design folks getting very excited about this. It might be good for some project management tasks as well. If you can implement the digital napkin feature at local restaurants, you might strike creative gold.

As NY Times tech guru David Pogue notes, it won't replace your keyboard or digital pen, but then again the laptop hasn't really replaced my flatscreen TV yet either.

It's definitely the kiosk of the future. I really can see a day when everyone will want one of the smart "card tables" in every house...along with their laptop and cell phone.