Tuesday, November 20, 2007

google power search

Sometimes I am amazed by how much google knows about. Other times, I am deeply saddened by what it can't find. This reminds me of the riddle about a tree in the forest. This comparison often true for the more obscure things that I am looking for. Google has become so popular and common that if google doesn't index it, it might as well not even exist. Occasionally I use yahoo because they index different pages. Yet another example of why competition is good. I digress.

I wanted to share some tips that will hopefully help you find things quicker with our beloved, but flawed google.

Add site: in front of a domain you are interested in. This quickly returns all pages from that domain, even ones you thought were hidden. The only drawback is that they are only as recent as the last time google indexed the site. This means that it isn't as useful for news sites or others that update frequently.

Search myspace quickly and visually, without using myspace's slow & clunky search:
site:myspace.com designer
or for my single nephew site:myspace.com female single

Add ~ in front of words (~design) that aren't as broad in meaning as you would prefer. This will do a synonym search. Which means google will return pages related to construction, architecture, and design.


An added bonus is that most of these conventions have been adopted by the other search engines; like yahoo, ask, and live. I've had plenty of people comment on my clairvoyant like ability to find things on the web. Using these tips and others, you too can look like a wizard. Happy searching.

Thursday, November 15, 2007

Stupid Interaction Designs: 2

"Num lock"
Why the heck would i never want Num Lock not enabled? I don't even know what num lock is/or was designed for. The only thing I know about this key on my keyboard is that it is the stupid thing that I need to push in order for me to enter my password. I've never needed to turn it off and I have no idea why I would want to turn it off. I hate using the number keys across the top of the keyboard the ten key pad is way better for entering numbers. Why must i push this button everytime my computer reboots? I have no idea, I only know that I think it is a sign of stupid and inconsiderate software.

As you probably know, if you've been following my posts, that I've been reading About Face 3 (
by everyone, I mean everyone who can fit into a small 2 person sized closet). I've gotten about half way through this weighty tomb, and it has gotten more enjoyable to read. I'm not sure if I've just gotten used to the writing style or it's just gotten more interesting, but I'm learning stuff. Learning stuff is good. Anyway, they believe that good software should be like a considerate assistant or considerate person. A considerate person thinks of others, namely your user. A considerate person remembers that you like your num lock on, that you visit the same site all the time, and you like to read about Markie Post. This software will look for ways to use this information to help you achieve your goals. I agree, and I'd just like to say "Num lock, you're an inconsiderate jerk"

Tuesday, November 13, 2007

Silly Interaction Designs

I have been reading "About Face 3" and I am about half way through it. It has crystallized some concepts I already have and introducing a few new ones. One of the early points that they made was that software should work (or at least appear to do so to them) how people think it works and not how it actually does. IQ blog has another good example of this, although I have never seen the example he uses in the states.

Another good example is Apple's beloved trash can. This crazy little character has been around since the beginning (history lesson via kernelthread). Initially it was only used to delete files; poof, gone goodbye. Nice, that makes sense and it even works pretty well as a metaphor. Kinda simple & pretty cool.

But wait, someone decided that I should also eject media (cds, disks, mounted drives, etc) by putting it in the trash! Huh? But why would I put the disk that contains the only copy of my dissertation in the trash! I don't want to delete it, I just want to get the physical disk out of my mac take it to the lab to print it out. How on earth does putting something in the trash equal ejecting media?

Via kernelthread:
Since the original Macintosh had no hard disk, and a single floppy drive, it was expected that users will typically use several diskettes while working on the Macintosh. A convenience feature of the system was that it cached (in memory) the list of files on a diskette even after it had been ejected. This was indicated by a grayed-out icon for that diskette on the Desktop, clicking on which would prompt the user to insert the appropriate diskette in the drive. If a user wanted to free-up the memory used by a diskette's cache, he would have to drag the grayed-out icon to the trash.

Thus, even if a user intended to
permanently eject a diskette, two actions were required: the eject command, and dragging an icon to the trash. The redundancy was removed by combining these actions to a single action: dragging an "active" (non-grayed-out) icon to the trash caused the disk to be ejected, and its cache to be deleted.

They designed it to help explain the implementation model, simplified it as technology and usage patterns changed, but never bothered to explore a better way. Leaving us with the illogical and strange idea of throwing away things that we want to keep. They have tried to make it better by changing the trash icon into an eject symbol when you drag mounted media, but who is gonna look at the trash for a place to physically eject something. Which brings up another point, why would you think you needed the softwares permission to get your disk back. I can imagine sitting there thingking "okay, how do i get my disk out of this machine." Reminds me of the zoolander bit about files inside the computer.



Don't even get me started on "ctrl alt delete" as a way to lock my computer. I may be considered an expert user because I employ this shortcut, but that doesn't mean that my fingers don't make mistakes. There have been a few times when the only button my finger manages to connect with is the delete key. What usually follows in quick succession is the enter key. In photoshop, in a hurry, "shift alt delete" enter and I just deleted a layer. Talk about dumb. Why would you include delete in that sequence? Talk about "Which one of these things doesn't belong". Should call it bunnies, rainbows, and hellfire missiles.

I can imagine the developer saying; "Awe come on. It's totally safe and easy, they only have to get all three keys right!"

Friday, November 9, 2007

Useful javascript Snippets

Just a collection of javascript code that I find useful.
As I don't know much javascript code yet, I hope to add more to this list as i find more useful stuff.

alert() : alert('string or '+variable);
Alert can be pretty useful when debugging your code. Throw one in to see a variable's value or into a function and if/else statements to see if the code is executing. Alert has lots of good uses. One note here though; if there are a lot of things you need to debug, you should use document.write to a text area in your project instead.

I hope to add more soon and feel free to contribute some of your own.

Thursday, November 8, 2007

Tip: Posting Code on Blogger

Blogger is lacking a feature. That feature is posting and displaying code. I've seen plugins that can do this for other blog systems but after a little searching, I haven't found a good solution for this problem yet. Some people are going to great lengths just to get their code to show up.

Here is the tip to get javascript and other code to show up on the post. Wrap the code in < pre > < / pre > tags. I think you will have to switch to the edit html tab to do it, but it works the best. You will still have to deal with escaping "<" html like tags.

Wednesday, November 7, 2007

Silverlight Experiment: movement

This took me longer to do partly because I don't know trigonometry and because silverlight/blend doesn't really have a concept of fps (frames per second) or enterframe like flash does. Flash movies are like merry go rounds, they just keep going around and around until you stop them. You use this fact to tell flash to do "stuff" every time a certain horse comes around again. "Stuff" usually involves moving, fading, scaling, etc. Say you wanted an object to move horizontally across the screen by 1 pixel every time your movie looped.

In flash it might look like this:

item.onEnterFrame = function(){
"bob" every time i see you, i want you to:
---> this._x += 1;
---> advance a step from the last place you were.
}

Blend doesn't really have an onEnterFrame ability built into it. Flash is timeline based at its very core (like a movie) but Blend is static (like a webpage). So you can either use javascript's setTimeout() function or you can employ a storyboard timer workaround, via Stegman & Andy. I did some brief tests and it seems that the storyboard timer is faster. I will post some examples of this in action when I get some time. Until then, here is the basic setup and javascript:

the xaml:
{Canvas xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="350" Height="150" x:Name="Page" Loaded="onLoaded">
{Canvas.Resources>
{Storyboard Completed="timerCompleted"
x:Name="timer" Duration="00:00:0.02" />

{/Canvas.Resources>
{/Canvas>


the Javascript:

function onLoaded(sLight)
{
root= sLight.findName("Page");
plugin = sLight.getHost();
var timer = sLight.findName("timer");
timer.begin();
}

function timerCompleted(sender, args)
{
///// DO STUFF HERE. Like take a step.
var ball = sender.findName("ball");
ball["Canvas.Left"] = ball["Canvas.Left"] + 1;

// restart the timer

sender.begin();
}
You can use this approach for creating your casual game or just to move stuff around.

Monday, November 5, 2007

Beautiful brain indeed!

I suppose that I am a little late to the party with this one. Daniel Tammet is capable of amazing mental feats, with what appears to be little effort. Daniel has a super brain that can perform complex mathematics in a single bound, memorize enormous amounts of data with laser like vision, and learn a new language faster than a speeding bullet. Not that I want autism, but it would be nice to have a super brain!