Monday, July 6, 2009

Creative Food Art


There are different types of food art that I've found to be very inspirational over the years. I'm not artistic but I've seen a relative of mine put a lot of time and effort into making each one of her masterpieces. They are an absolute work of art. I have included some of the creative food-art photos I've come across over time, but I'm also going to show you the exclusive photos of what one Dallas/Fort Worth Food artist can do, as well as a different perspective on creative food art that may inspire your next party, wedding, get together, etc.














Here are the exclusive ones:

Laila's Monster Pumpkin Carving - Lights Off


Now that might not look like much, but that's because it's not suppose to; not without the lights, anyways. Look at the picture again with the lights (from within it) on.
Laila's Monster Pumpkin Carving - Lights On



Lights, within the pumpkin, are off.
Laila's Kiss Pumpkin Carving - Lights Off


Lights, within the pumpkin, are on (same picture as above).
Laila's KISS Pumpkin Carving - Lights On



Lights, within the pumpkin, are off.
Laila's Baby in the Womb Pumpkin Carving - Lights Off


Lights, within the pumpkin, are on (same picture as above). This one is my all time favorite.
Laila's Baby in the Womb Pumpkin Carving - Lights On


And finally, here the ones that give a different, yet very inspirational, perspective.
















Of course, there are more out there; but that would make for an even longer post.
Should you need contact information for the Dallas/Ft. Worth food artist, please don't hesitate to drop me a note.  ▣


Click here to see other Monday posts (including the current one).


Friday, July 3, 2009

Elephant Slide


I saw this and thought "sweet God, who would design such a thing?"

It's no secret that safety should be the number one factor in designing any toy, playground, etc., which kids will ultimately use. But c'mon! What about appropriateness of theme, aesthetics, taste, design, etc.?

Indoors Elephant Slide


Here's the kicker, it's not the only one! Below is another very similar design. This time, however, it's outdoors!

Outdoors Elephant Slide


Kids these days are extremely inquisitive. What do you say when one asks "Dad/Mom, what's that coming out of the Elephant's XXX?

I was shocked by these, but something tells me that I shouldn't be; and worse, that there are more out there. Perhaps far worse. If you've come across any, please share them in the comments.  ▣


Click here to see other Friday posts (including the current one).


Thursday, July 2, 2009

Happy Thursday - Junior Partner


Junior Partner

  ▣


Click here to see other Thursday posts (including the current one).


Wednesday, July 1, 2009

The [Unusual] Materials Library


George Pendle has done a nice write-up of the Materials Library at King's College London for the Finanical Times. This library is now amongst the places I want to visit should I ever visit London again.

In his article, Mr. Pendle writes:

Deep in the bowels of a brutalist concrete building on the Strand, long shelves are packed – crammed, really – with some of the world’s strangest substances, from the past, present and sometimes, it seems, the future. Take Aerogel: the world’s lightest solid consists of 99.8 per cent air and looks like a vague, hazy mass. And yet despite its insubstantial nature, it is remarkably strong; and because of its ability to nullify convection, conduction and radiation, it also happens to be the best insulator in the world. Sitting next to the Aerogel is its thermal opposite, a piece of aluminium nitride, which is such an effective conductor of heat that if you grasp a blunt wafer of it in your hand, the warmth of your body alone allows it to cut through ice. Nearby are panes of glass that clean themselves, metal that remembers the last shape it was twisted into, and a thin tube of Tin Stick which, when bent, emits a sound like a human cry. There’s a tub of totally inert fluorocarbon liquid into which any electronic device can be placed and continue to function. The same liquid has been used to replace the blood in lab rats, which also, oddly enough, continue to function.

There are turbine jet-engine blades grown from a single crystal and designed to function in the most inhospitable places on the planet. There’s a swatch of the world’s blackest black, 25 times blacker than conventional black paint. There’s a lead bell that refuses to ring, a piece of bone with a saw through it, and the largest blob of Silly Putty you’re ever likely to see.

All these, and more than 900 others, including everyday materials such as aluminium, steel and copper, are here for one purpose – to instil a sense of wonder in the visitor.

King's College London Materials


The library's current top ten materials are:
current Top Ten

1. Aerogel- lightest solid on earth
2. Aluminium Nitride Wafer - cuts ice like butter
3. Bioglass Scaffold.- cells turn into bone on contact
4. Rapid Prototpye Nylon Chainmail - the ultimate in machine art
5. Silicon Nitride Ball Bearing - smashes concrete without a scratch
6. Ferro fluid - a liquid that is not a liquid
7. Thermochromic Paper - a retake on the colour of heat
8. Tin Stick - a metal that cries
9. Shape Memory Alloy - metal that remember its shape
10. TV Rock - a natural version of transparent concrete

You can read more about the materials by the library's very own Dr. Mark Miodownik at no other than than the King's College London site itself here.  ▣


Click here to see other Wednesday posts (including the current one).


Tuesday, June 30, 2009

Bookmarklets (p3): The Basics of Writing Bookmarklets


Continuing this series on bookmarklets, this week I wanted to cover the basics of writing bookmarklets.

I must assume that you are familiar with JavaScript. If not, then I highly recommend that you get quite familiar with it first; especially with the document object model (DOM). Many of the issues that JavaScript (JS) encounters, and therefore so does bookmarklets, are browser compatibility issues. In other words, your JS code would work in one browser, but not in one or more of the others. Writing universally correct JS code is important and key to a very successful bookmarklet.

It is also assumed that you understand HTML quite well, and that you are comfortable with such things as the HTML tags, what is a URL, secure vs. unsecure protocols, HTML entities (ISO 8859-1), etc. In addition to the DOM, which I mentioned above, you also need to know about certain HTML features and how to interact with them --Like frames and framesets. There are many HTML tutorials out there, which are only a google away.

Luckily, hardly anyone uses frames these days. Where I would have insisted that you detect frames in the past, it's rather safe to skip that now.

I don't want to go into the DOM, but it's worth mentioning that bookmarklets references the top-level object in a browser, which's the window object. From there you can browse to all other objects your browser supports. The window object is implicit, so window.document and document are the same thing. Another one of the basics of the DOM worth mentioning is that a window always contains a document object. From the there, the document contains the page elements, such as links, forms, etc.

Let's dive right in.

If I wanted an alert window/box to pop up with "Hello World" in it, I would simply do
alert('Hello World');
Of course, if you're writing this for a web page, you would include <script language="javascript"> before it and </script> at the end of it. However, when writing a bookmarklet, and since it goes directly in the URL field, you simply precede the alert call with a javascript:.

Let's go ahead and try that. Go to the URL field and type javascript:alert('hello world'); and then hit your ENTER (or Return) key. What you should get immediately after hitting the ENTER key is a pop up window that said "hello world" in it.

You've officially now written your first bookmarklet. The rest is making it more complex by calling on page elements, and then manipulating them as you see fit. There are a few rules to remember, but we'll get to that here shortly. For now, let's write one that really does something. But let's make it fun, shall we?

It's a bit more advanced, but I figured it would touch on several key things of writing a bookmarklet. We're going to write a bookmarklet that will take English as an input and then return Morse code. In other words, I want to know what would "Welcome to Ahmadism.com" be in Morse code (or your own name, etc.)? Let's find out.


Let's get started by writing the things we do know. We know that we will be taking in an input, and in JavaScript that's prompt call. Let's do that, but let's also assign it to a variable so we could so more with it should the need arise.
var myEngStr=prompt("Please type your English text here: ");
Next we need to map each character we could receive from that input to its corresponding Morse code. For instance, the letter A is ".-" in Morse code (without the quotes of course). There are several ways one could go about doing that, but the easiest is definitely to create an array. Again, if you don't know what that is, I strongly recommend that you look into JavaScript and get quite familiar with it. In short, though, an array is kind of like a table (as in a spreadsheet table). Without diving too deep into that, I think going through this example will help clarify it.

First, however, we need to list all the characters before we forget ... like so:
var letters="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,:?'-/()\"";
If you pay close attention to this variable, which's appropriately named "letters", you'll notice two things: There's a space after the 9, and that's because we want the space-character. Also, that towards the end we have two quotes. Allow me to quickly explain this as it is key to writing bookmarklets, and good JavaScript altogether. The quote right after the equal sign means the contents of the variable "letters" start here. And the quote at the end means the contents of that same variable ended there. But we want amongst the contents of the variable to have a quote as a character. To do so, you have to escape that character; otherwise, the JavaScript interpreter will think that the variable declaration ends with the first quote it sees. To escape something and make it where the interpreter reads it literally we use a backslash.

As a JavaScript guru, I'm sure you know that you can write JavaScript with either quotes or single quotes. In other words, alert('hello world'); works just fine, as it did in our first example. And alert("hello world"); is just the same. There are times, when I've had to use both quotes and single quotes to differentiate between strings. I highly recommend that you make it a habit to use single quotes when writing all your JavaScript/bookmarklets. Back to the topic at hand, let's say that you wanted to say alert('I'm the Ahmad in Ahmadism.');. The interpreter will read that first single quote, and will stop at the apostrophe (since it's the same character) and throw out an error since it expected a closing of the parenthesis followed by a semicolon. Instead, the interpreter sees a bunch of characters and attempts to process them as code, and hence the error. To circumvent that, we could easily escape that apostrophe and everything will work. It would look like this:
alert('I\'m the Ahmad in Ahmadism.');

Back to the Morse code bookmarklet we're creating. We've created a variable called "letters" and we now need to create the corresponding Morse code. As I had mentioned earlier, the best option for this is an array. I already have the Morse code in alphabetical order (along with the extra needed characters) so you don't have to go hunting for it.
var morse=new Array(".-","-...","-.-.","-..",".","..-.","--.","....", "..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-", "...-",".--","-..-","-.--","--..","-----",".----","..---","...--","....-",".....", "-....","--...","---..","----."," ", ".-.-.-","--..--","---...","..--..",".----.", "-....-","-..-.","-.--.-","-.--.-",".-..-.");


I didn't want to fiddle with uppercase and lowercase letters, so if you have noticed the "letters" variable we declared earlier is all uppercase. We now need to make the input that we get from the end-user converted to all uppercase; otherwise, things won't match. After all, the character A and the character a are two different characters. Here's the code we need to help us do that:
var input=myEngStr.toUpperCase();

I don't want to get side-tracked and talk about what is and why we initialize certain variables. Just know that it's good practice to "clear the air" and make sure that a variable you're going to use, especially to reset its value or append to it, will need to be (for certain) blank or empty up front. So, I know I'm going to need an output to return back to the user; which will house the Morse code; so ...
output="";

The next part is the most complicated part of writing this. You need a "for loop" to loop through each character and, more or less, replace the English letters (and characters) with the corresponding Morse code ones. Let's get to it:

for(count=0;count<input.length;count++){
daChar=input.charAt(count);
for(i=0;i<letters.length;i++){
if(daChar==letters.charAt(i)){
output+=morse[i]+" ";
break;
}
}
}

Now the "output" variable contains the corresponding Morse code of whatever was typed in the prompt. You could have it all pop up in an alert, but a much clearer and more presentable way is to pop up a window and then write to that window (and I want to show how we do that for the purposes of this bookmarklet tutorial).

w=window.open('','Links','scrollbars,resizable,width=450,height=250,top=0,left=0');
w.document.write(output);


The first line is your basic run of the mill window open command. A quick Google search should show you thousands of examples on that one. Since we popped up the window in a variable we assigned (the variable was "w" but you could call it myWin or whatever), we now can write to it. What are we writing to it? Well, how about posting the resulting Morse code in there? And that variable, if you recall, was "output" and that should explain the whole process.

We're not quite done yet, however!

In order for you to make all of this a bookmarklet, you must have it all on one line. No line breaks. No returns. Nothing. Although JavaScript interpreters are forgiving, that's where it's absolutely essential to be syntactically correct and including the semicolon at the end of each line. When you concatenate all the lines of code together, the javascript: runs your one-line JavaScript bookmarklet through the interpreter for that page (and only that page). In the case of the Morse code bookmarklet, we're not really doing anything to the page itself. We're simply using the URL to pop up a question, collect the answer, swap out the characters with corresponding Morse code and spitting the result out to a pop up window.

In addition to having all of your JavaScript code onto one line, which will condense it and make smaller (and therefore faster to run), you also need to encapsulate it with either a void to catch all return values, or ... a neater trick ... an empty function. I could spend hours describing that, but that would be outside the scope of bookmarklets. But to help drive the point home, take the code in this article and put it in the "editor" at http://subsimple.com/bookmarklets/jsbuilder.htm

This bookmarklet "builder" already provides you with "javascript:" in the textarea, and with buttons to help you encapsulate (put the empty function name around) your bookmarklet.
When you first add it to the text area, you should have it all look something like this:

javascript:
(function(){
var myEngStr=prompt("Please type your English text here: ");
var letters="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,:?'-/()"";
var morse=new Array(".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..", "--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-", "-.--","--..","-----",".----","..---","...--","....-",".....","-....","--...","---..", "----."," ",".-.-.-","--..--","---...","..--..", ".----.","-....-","-..-.","-.--.-","-.--.-",".-..-.");
var input=myEngStr.toUpperCase();
output="";
for(count=0;count<input.length;count++){
daChar=input.charAt(count);
for(i=0;i<letters.length;i++){
if(daChar==letters.charAt(i)){
output+=morse[i]+" ";
break;
}
}
}
w=window.open('','Links','scrollbars,resizable,width=450,height=250,top=0,left=0');
w.document.write(output);
}
)()


Name it first (on top) and then simply select the "Compress" button and voilĂ . Test it by clicking on the name that the tool made into a link for you to make sure it works. If all's good, just drag that linked name to your browser's toolbar (see last week's article on how to organize your bookmarklets) and you're set.

Since there may be issues with scrolling on this article (characters going behind other elements on the page), I wanted to make sure to post the bookmarklet here. Feel free to add the English to Morse Code bookmarklet to your collection.

Now, the questions is, can you make a "Morse Code to English" bookmarklet (the reverse)?
Perhaps you want to expand this to include numbers, punctuation or even non-American letters. Well, if you do, please share your code back with me.

You could make bookmarklets do all kinds of things. There are bookmarklets that will turn the background of a page to black to make it easier to read after its designer did a horrible job with font & background color combos. Other bookmarklets allow you to manipulate the URL so that you could do more. And many many more. Next week, I hope to list a few of my favorite bookmarklets for your use.

Next week's post, and part 4 of the bookmarklet series, can be found here.  ▣

Click here to see other Tuesday posts (including the current one).


Monday, June 29, 2009

The Ghost in the Machine - Put Your Old Tapes to Good Use


Erika Iris Simmons (iri5) is an amazing artist who
specializes in using non traditional media... old books, cassettes, playing cards, magazines, credit cards... whatever [she] can find. [She works] with strange, older materials. Things that have a mind of their own. Most everything [she] uses has been thrown away or donated at some point.


Personally, I would love to have a photograph or two done of my wife and I in this manner. It wouldn't just be cool in the full sense of the expression, it would be down-right amazing, a centerpiece in my office and as HGTV casters would "a conversation piece."

Check out some of Erika's work below, and don't forget to subscribe to her posts on Flickr.

These are some of the "Ghost in the Machine" collection, which you can find on Flickr here.

Ghost in the Machine: Jimi Hendrix


Ghost in the Machine: You Talkin' to Me? ... recreation of young Deniro from Taxi Driver made from old film and reel


Ghost in the Machine: Bob Dylan


Ghost in the Machine: Robert Smith from The Cure


Ghost in the Machine: Audrey Hepburn


Ghost in the Machine: Betty Page


Ghost in the Machine: Betty Davis


There are more, of course, but I wanted to give you a glimpse of the inspirational work "iri5" does.  ▣


Click here to see other Monday posts (including the current one).


Friday, June 26, 2009

[Geek] Excuses For The 2000's



  ▣


Click here to see other Friday posts (including the current one).


Thursday, June 25, 2009

Happy Thursday - Limo Check For Fatcats


Fatcats in Limo


A sign on the back windshield of a limo that reads "This Limo checked for sleeping fatcats."  ▣


Click here to see other Thursday posts (including the current one).


Wednesday, June 24, 2009

Flight 447 Or A Scene from Lost?


In their rush to air exclusive photos of Flight 447’s destruction, no one in this Bolivian newsroom stopped to ask such questions as:
  1. How did the camera make it? and ...
  2. Why are the photos in wide-screen format?
The answers, of course, are:
  1. Because the footage is from Lost. And,
  2. Because the footage is from Lost.


iPhone users: http://www.youtube.com/watch?v=5MPOJSsggjs

Here's the funny part: Among much of what the newscaster says, she at one point explains that the camera was destroyed, but the memory card was somehow recovered/saved.

Here's the original footage, which starts at approximately 8:05

iPhone users: http://www.youtube.com/watch?v=6PteH2A1Pw0  ▣

Click here to see other Wednesday posts (including the current one).


Tuesday, June 23, 2009

Bookmarklets (p2): How To Best Manage Them


Last week we covered a brief introduction and description of what are bookmarklets, their benefit and how they're typically added to one's browser.

This week, I wanted to go over how to best organize your bookmarklets in a manner that maximizes their use and usefulness.

You've now collected a decent number of bookmarklets, but like the rest of your bookmarks, they're all over. Create a new sub-folder in your "Bookmarks Toolbar" folder in Firefox, and "Favorites Bar" in IE, and move all your bookmarklet links into this folder. You can even create sub-sub-folders to help you organize your collection by category, functionality, etc.

For me, given the sheer number of bookmarklets I've collected and/or created, organizing them in folders was a must. Creating a Google-specific folder helps me find those bookmarklets in a snap. Similarly, having a QA-specific folder helps me with those tasks when they're needed. Honestly, I could use a few more folders like a blogging-specific one, a social-media-specific one, a print-specific folder and I'm sure one or two more.

Bookmarklets Folder on the Bookmarks Toolbar

Once you've created the "bookmarklets" folder within the "Bookmarks Toolbar" (along with any sub-folders you need) you now can organize the links by dragging & dropping them or by sorting them alphabetically from the "Organize Bookmarks..." option. The latter, my personal choice, requires that you keep that in mind and have the discipline to name each one as you add it accurately.

Organize Bookmarks

Organize Bookmarks - Sort by Name (Alphabetically)

Now that you've organized and are managing your bookmarklets as you like, the rest is gravy. Since they're now on your "Bookmarks Toolbar" and in one easy to find folder ("bookmarklets"), you simply find & click the bookmarklet of choice to run it on the page you're on.

Allow me to go down a relevant side point briefly ...
As a collector of free alternatives to commercial software, I've downloaded one of the free software options out there to allow me to print to PDF. Personally, I use PrimoPDF. In basic terms, it installs as a printer and you simply print the page you want to it. Instead of it going to a printer and ultimately be on paper, it saves what I sent it as a PDF file. Given how I like cloud computing and all, I simply add it to my Dropbox folder and access that print out from anywhere I have an internet connection including my phone.

But what if you didn't (or couldn't) install something like PrimoPDF? There are websites out there that allow you to do the same thing. Amongst such web sites is PDFDownload.org. The site simply allows you to convert any web page you're on into a PDF file. You can save it on your hard drive, put it in your Dropbox folder to access from anywhere, read it later (on a plane), etc. PDFDownload.org even provides the bookmarklet for you. Unfortunately, they also provide you with an add-on, but if you've read the bookmarklet introduction, you'd know why I don't recommend add-ons or toolbars at all. I have taken their provided bookmarklet and made it into a pop-up window instead of a new window/tab. This made it easier for me to continue doing my thing while it's "working." I've also slightly changed its name and added a keyword --In this case, I gave it the keyword "pdf." Keywords?

Keywords are something specific to Firefox; although IE gives you an option to create a shortcut key to use in a similar but less useful fashion. As your bookmarklet collection grows, you'll find that you use 20% of them more frequently than the rest. And despite your organized folder structure and naming convention, it's still hard to find the one bookmarklet you want to use; especially if you have similar bookmarklets that do the same thing but in different ways, and you find yourself using one more than the others.

Unlike regular bookmarks, your browser cannot associate image icons with bookmarklets as these are simple JavaScript commands and not web addresses. And unlike IE, Firefox, doesn't allow you to manually add an image icon. Personally, I don't care about the image icon much.

Bookmark Keyword Use in Firefox


Right-click the properties of any bookmarklet and associate a keyword that defines the action or task associated with that bookmarklet. In the PDF example above, I have set "pdf" as the keyword for my Download PDF bookmarklet. Now whenever I need to save a web page in PDF format, I simply type pdf in the browser address bar and hit Enter - there’s no need to hunt for the bookmarklet in the bookmarks toolbar.

One of my frequently used bookmarklets is a URL-shortner, which allows me to post sites, images, etc. of interest with ease on Twitter. The bookmarklet, which is provided by the service (bit.ly), is located alphabetically towards the top and is easily accessible. However, I'm more of a keyboard person than I am a mouse user; and it's therefore easier for me to type the bookmarklets' assigned keyword "shorten" than it is for me to navigate with the mouse to the Bookmarklets folder and then down to the link itself.

Like typing "pdf" in the URL, typing "shorten" in the URL, while I'm on a page I'm visiting, automatically shows bit.ly right nav with the URL, the title & shortened URL in the field and a button (if I'm already signed on to bit.ly with my account) to post directly to my Twitter account ... without me having to leave the page I was on.

Bit.ly as a service is down right awesome. You can get stats of how many people clicked on the shortened URL you created allowing you to measure effectiveness among other things. I highly recommend it for all social media users, but especially for Facebook and Twitter users. Heck, I even use it when I want to link to something when I'm answering & participating in forums. Again, it's a good way of measuring your effectiveness on domains and URLs you don't own. As I normally do, I digress.

One of the biggest advantages of bookmarklets is that at the basic level, they are bookmarks/favorites. That means that any tool that syncs your bookmarks for you across different machines & locations will automatically sync your bookmarklets as well. The same cannot be said about add-ons & toolbars (not with the same ease any ways).

My favorite bookmark-sync tool, hands down, is Xmarks. Formerly known as Foxmarks, Xmarks syncs all your bookmarks (and bookmarklets of course) across all computers. As a fan and advocate of cloud computing (with some personally-put restrictions), Xmarks simply puts all your bookmarks & bookmarklets into the cloud so you can access them from any other computer connected to the internet. In addition to online backup, Xmarks is available for Firefox, Internet Explorer (IE) and Safari; so if you add a bookmarklet in one browser, it will automatically become available in your other browsers as well.

Xmarks

Xmarks has many other features that go beyond the scope of this bookmarklet-specific post. One worth mentioning, however, is that Xmarks offers profiles allowing you display certain bookmarks at certain locations (you may not want certain bookmarks, for example, to automatically be shown and/or available at work). For me, this is an absolute must, since bookmarklets I have created cannot become property of the company I work for; or disputed at any point to be so. Should you leave a workplace for which you had a profile location, you simply disable that location in your profile and they're gone once you sync up.

Now that I've covered what are bookmarklets, how to use them (at a high level) and how to best manage & organize them, I hope to see you next week when I dive a bit more into the topic and perhaps offer some useful ones for your collection.

Next week's post, and part 3 of this series, can be found here.  ▣


Click here to see other Tuesday posts (including the current one).


Monday, June 22, 2009

Demotivational "Posters" - Underachievement


As I had alluded to in the past, something about demotivational "posters" makes me smile, or even chuckle at times; which I find to be uplifting and inspirational. Perhaps it's the reverse-psychology thing; I don't know, but I hope you find the same in them.

Demotivational Posters - Underachievement


A few days are left on the most number of submitted inspirational material/media. To find out more, go here.  ▣


Click here to see other Monday posts (including the current one).