So very, very busy

I’ve got so much going on – this site hasn’t seen me in nearly two/three weeks now (what? 4 weeks? wow…sorry.)

Anywho, I’ve been aweful busy. I’ve got school again, so that’s taking up a lot of time. This quarter is going alright. I’m not really lit up about any of my classes – they’re alright, but they are all mostly business classes, and the business side – while intriguing – isn’t that big a deal to me. shrug

On other fronts, the live request JS has been well recieved. That’s quite exciting for me – yay! I’ve also had several people contact me about miniBlog – I hope to be reviving that project in the future once I get on a server that can use PHP5. I’ll be rewriting it to use SQLite …. mmmm, embedded SQL engine.

Also, I’m going to be looking to put a little more work onto the Color Palette Generator – even though I’m quite happy with it now, I’d like to take the project and enhance it into some other things.

Finally, I’ve been very, very, busy with work. I’m doing a lot of work for them, and will hopefully be helping to move them over to WordPress in the future. Their current CMS is not sufficient, and the person responsible for it’s programming isn’t on-site or responsive to our needs. Sucks, but that’s just the way it is.

So, in prep for needing to be a WordPress whiz, I did something I’ve been meaning to do for a while – hq.servequake.com is now actually a website with content on it! Gasp! It’s the official home of all HQ/tF folks. It’ll be just fer us :D but you can come on in anyway ;-)

Ok, until next month (or so I suppose…)

omg Doom3 Pwns!

So, I was desperate to get Doom3 on ian’s machine so there could be much scary fun demon shooting awesomeness - however, the installer kept on bitching about it not being WinXP, and his hard drives not having enough space.

Waa, waa installer man! Screw you!

So it turns out that Carmack has done what he did with all his games - copy & pasta to play! Sweetness. 1.5gb of network copy later I have sweet sweet fun - l33t h4X0rZ!

All set up!

I believe I’ve pretty much got this thing all set up now. There’s still a few things that I need to change, but it is fully functional now - or at least, it’s not breaking horribly :D

If you’d like an account - hit the “register” link in the side bar and you’ll be put in for consideration. ;)

Welcome!

This is a blog for tf/hq folk to mess round with.

In addition, it’s a nice place to play with wordpress toys that I find here and there.

If you want an account, you can click the link to the left “Register” and I’ll hear bout it.

Awesome!

Second post

I have two posts now.

Because this is the most recent post, it should show up on the home page, however, thanks to some nifty coding, only one post per author shows up on the home page - the most recent one that is. Took me forever to figure out how to achieve this - but it’s a very nifty feature now :D

Peace outside!

Can I get some fries with my American Dream?

I just witnessed a stretch limo go through a drive through at the McDonalds – isn’t that just the American Dream.

How to use liveRequest.js

If you would like to use live request there are three main things you need:

  1. A HTML page with the form.
  2. The liveRequest.js file
  3. A php file that will query your database and return the results

So let's just step through these one by one.

The HTML Special

While the HTML used to create this effect is fairly straight forward there are a few important parts. In your set up you will need a form with an input field, and you will need a div (or p, or whatever content block you wish to use.)

The form will look something like this:

<form action="search.php" method="post">
<input type="text" name="s" id="search" />
</form>

The important parts of this code is the action attribute on the form, and the id attribute on the input. Remember these values, you will use them later. Also, with the way the PHP is set up below, if you want this to work when JS is disabled, you need to keep the name attribute set to "s". If you are not worried about people not having JS, you can scrap the form tags entirely and just have an empty input tag floating there.

The block section might look like this:

<div id="searchresults"></div>

Again, the id attribute is important.

The liveRequest.js Jumble

There is very little you need to change to this file - cause it's made awesome like that. All the things you do need to change are at the top in the "User configured variables" section.

var searchFieldId = 'search';
var resultFieldId = 'searchresults';
var processURI    = '/search.php';
var emptyString   = '';

The searchFieldId is the id of the input tag that you have setup in your HTML.

The resultFieldId is the id of the div block you used where the search results will show up.

The processURI is the location of the script that you are using to search your database or whatever.

Finally, the emptyString is what will be displayed when there is nothing typed in the input area. I would use this for something like "<p>Type a search above and the results will show up here.</p>"

The PHP Magic

This is the most complicated portion of this tutorial (since the HTML and JS are pretty cut and dry.) Unfortuneately, people will probably want to integrate this into either MoveableType, TextPattern, or WordPress, and I don't run any of those - so I don't know exactly how to tie into those systems.

However, here is a basic search.php setup:

<?php
//
$db_cid = mysql_connect('localhost','YOUR-USER-NAME','YOUR-PASSWORD')
	or die("<p><b><font color=red>Oh Crap!</font></b></p>/n<p>It seems MySQL is down. (Mysql Connection Error: " . mysql_error() . ") so please try again later.</p>");
//
function db_query($sql) {
	global $db_cid;
	$result = mysql_db_query('YOUR-DATABASE',$sql,$db_cid)
		or die("<p><strong>Error in MySQL Query:</strong><br />$sql</p><p><strong>MysQL Says:</strong><br />" . mysql_error() . "</p>" );
	return $result;
}
//
$searchQuery = urldecode($_REQUEST[s]);
//
$sql = "SELECT keyword, title, summary, text FROM posts WHERE "
      ."title LIKE '$searchQuery' OR "
      ."summary LIKE '$searchQuery' OR "
      ."text LIKE '$searchQuery' "
      ."LIMIT 5 ";
//
$result = db_query($sql);
//
if(mysql_num_rows($result) > 0) {
	echo("<ol>");
	while($row = mysql_fetch_array($result)) {
//
		echo("<li><a href=/"/url-to-entry/$row[keyword]/">$row[title]</a><br />$row[summary]</li>");
//
	}
	echo("</ol>");
} else {
	echo("<p>No results for /"$searchQuery/".</p>");
}
//
?>

Now, that's a basic setup - and even at that it is pretty intimidating. Be mindful, the above will, almost guaranteed, not work on your setup - whatever it be. That said, if you are running any popular blogging software, are a good hand at PHP, and would like to share your integration please leave a comment! Others will thank you greatly!

Return to the grind

Back to school I go! Hi ho, hi ho, it’s back to school I go!

Uhm, yeah, anyway. :D

Should be a fairly easy quarter – turns out most of the classes are web business classes, so they shouldn’t be too hard. The online class is going well, but it’s only 5.5 weeks long, so that’ll fly by. Oh yeah:

  • DVD Authoring
    Breeze.
  • E-commerce Business
    This should be interesting. First class took place at a pizza shop :D
  • Web Marketing
    Copy writing, web user profiles, and more. I’m glad to have a class that will get into a bit of the use aspect, it’s something very lacking so far.
  • Computer Based Training (online)
    What can I say, the online classes are really a joke. They are too short to effectively teach anything really, the software for interaction is horrendous, and the material is never terribly engaging or challenging. On the flip side, it’s a good, quick way to get a class outta the way.
  • Career Development
    Not sure what’s goin on with this one, won’t be in it till tomorrow, however I have a feeling that I don’t exactly need help learning how to write my resume.

So – I’m looking forward to a good semester. Not sure what kind of portfolio pieces I am going to get out of this, but I think I might be able to work something out.

In other school related news, I am very happy over the fact that

  1. DVD Authoring has replaced Intermediate Scripting. Yahooooo!
  2. Typography has replaced Database Structures (2nd db course)

Both of the replaced classes I did not want to take :)

Live Request XMLHttpRequest and You

First let's start off with the gist of what you can do with this script:

You can have an input field on a web page that will, as you type into it, take the content of the field, pass it to a server side script and be returned to be placed inside a div that you specify.

Using this you can create a live searching feature or, what I will be doing with it, an authentic Textile preview feature.

First things first. I can not give Bitflux's chregu enough credit for the inspiration for this. That code is the basis of liveRequest and as such falls under its license (which is basically do whatever, give credit, retain the same license.)

So, go to the link above, read about how this started, and then come back here.

Now, head off to Apple to skim their guide to XMLHttpRequest.

You may also want to read up on the JavaScript Textile Preview I helped improve.

Give me the actual examples now!

Now, the live search feature with that snazzy XMLHttpRequest got me thinking, "what else could i bring back from the server?"

How about actual parsed Textile code without a page reload ;-)

You can thus see a working proof: Live Textile Preview in action

To create this, I almost completely rewrote a large chunk of the liveSearch.js provided me. In addition to cutting it down to just the request and return portions, I modularized it so that I can take the code from textile previews to live search results with just 4 lines of code.

If this has piqued your interest, both live-search and real-live-textile are free to download.

Golden Gate Park Stroll

In the hopes that going outside is good for you, me and Ian ventured out to the Golden Gate Park today to wander around. I am amazed at how large that place is. Every time I go (which, admitedly, has only been twice) I see a whole different part of the place!

Tree covered walkway in the park

It’s odd going to a place in the city where the sounds of cars, sirens, and bustling people seems to finally rescend a little bit, but knowing that just behind the trees the world is very busy doing very important things.

a duck with chicken like looks

Upon a first glance, Ian thought this might be a chicken – and based on it’s red, fleshy face, that could have been a good guess…for a canadian. However, upon closer inspection it turned out to be a duck – and a rather camera friendly one at that.

The cone in the grass

Finally, I seem to have this thing for cones (Links lost). I think they’re funny for some reason. They always tend to pop up in the weirdest places that don’t really need cones. I mean, “Watch out for this twig!” isn’t really something that demands a great orange warning.

All-in-all though, it was nice to get out and smell something green and real.

Get off the E!

Ditch IE for FireFox

The Internet has outgrown Microsoft’s Internet Explorer. So what are you to do about having a web browser that resembles old man winter? I would highly suggest you go download FireFox by Mozilla. FireFox supports more web pages, runs just as fast, and adds a slew of useful features. Check ‘em out!

5 Reasons For Never Using Internet Explorer Again

  1. Pop-up Blocking Features
    Anyone who has spent more than a few hours on the web has been accosted by the dreaded pop-up (or pop-under) advertisement. The windows that appear out of no where pushing products without your permission. No more! FireFox blocks the major pop-ups by default, and with easy to install extensions, can stop regular banner ads too.
  2. Tabbed Browsing
    Tabbed browsing is a feature that allows you to have multiple web page open in numerous “tabs” inside a single browser window. I can not emphasize what an awesome feature this is. It reduces window clutter and even better it will allow you to open folders of book marks all at once. I use this to open all the web comics I read at once. Then I just close the tab I am on when I am ready, and the next comic is already downloaded and waiting.
  3. Download Manager
    Having multiple file download windows open is a mess. Windows all over the place filling up your bar at the bottom till you can’t read anything. With FireFox you get a single, organized download window which will even remember old downloads so you can find them again.
  4. Themes
    FireFox has the ability to sport different looks with a few clicks. See a theme you like, click to download, click OK, restart the application and ta-da! It’s like getting a new shinny car.
  5. Safer Browsing
    IE’s streak of viruses, trojans, and spyware got your computer infected? No more! FireFox is more secure than IE: to date, there has not been a single virus, trojan, or spyware released that affects FireFox. Compare that to the numerous IE vulnerabilities, the majority of which stem from ActiveX, Microsoft’s proprietary multimedia platform, and you’re going to have a much safer browsing experience.

Finally, FireFox is a free, open-source, and constantly updated browser. With an advanced community-based bug reporting system, you can be sure that bugs will be fixed reliably and quickly. You’ll also find more features, sooner. IE, on the other hand, hasn’t been update since version 6 over 2 years ago and won’t be updated until 2006!

Get FireFox Today!

With the download for FireFox weighing in under 5Mb, why are you still reading this? To download FireFox, you can point your web browser (still IE?) over to http://mozilla.org/products/firefox/

Writing a Cover Letter

A friend asked me for advice on how to write his cover letter and it got me thinking. Most people can write a decent enough cover letter, but what makes yours stand out?

A fairly common, straight-forward cover letter:

Hi!
I’m awesome. I’ve done really cool stuff like this thing and the other thing.
In addition, I’m a great team member and everything else you are looking for.
Thanks!

While this kind of cover letter is acceptable, it is not stellar. This kind of writing doesn’t tell the reader anything that your resume doesn’t say. (If your resume doesn’t say these things, you have a problem.)

If you really want to impress, you need to focus on results.

Employers may be impressed by Cool Widget #24, but they are going to be more impressed if you tell them that Cool Widget #24 helped the company increase sales 18%. Thus, you would be better to write:

Hello,
My ability to create dynamic interfaces really shined through at Company X when, after a redesign by myself, user productivity was positively impacted in all aspects.
Thanks!

This still shows that you can, and have, done what you say – but more importantly, it shows how well you did it.

Qualifications are always important, but to really impress quantify your awesomeness

There is one last step to writing a good cover letter – make it personal.

Don’t forget that you are applying for a specific position and they want you to have certain skills. Do research into the company and carefully read what they are looking for. Now tailor your letter to include relevant experiences that match their needs:

Dear Mr. Jones,
I’m writing to apply for the position of Lead Developer. With 6 years of experience in software engineering, you can expect to see outstanding results. As Senior Developer of Intercore Inc., there was a 10% increase in product development cycles.
Emails, phones calls, and smoke signals will receive a prompt reply. Thank you for reading.
Regards,
Joe Johnson

Forever Geek

Forever Geek

Go read. It rocks! ;-)

pst, don’t tell anyone, but they are using gmail invites to get links. how low can you go….geez ;-) hehehe

Beach Trip

I took a trip to the beach the other day with Kazz and Ian, and we met Aaron there.

The three other guys

We brought along a frisbee to throw around, but it turns out we could only use the football cause it was too windy. However, this guy seemed to be thuroughly enjoying the windy situation.

Three wheeled cart pulled by a kite

Then Kazz decided to re-live his child hood days of digging holes in the sand. Needless to say, we made fun of him.

Kazz giving the camera the finger

He didn’t like that.

Live Comment Previews

Looking to upgrade my blog with live previews I came across several methods, however, since my comments allow for Textile formatting, I wanted to see if that could be processed on the fly.

I googled and was surpised to see that someone had already started working on it. I was quite pleased with the solution I found, but it was missing a few things:

  • h tag support
  • br tag support
  • proper html syntax (a few tags were being closed incorrectly.)
  • Various small fixes

So I went and upgraded the JS to include those things and made a demo paged. Check out the Live JS Textile Parsing in action. All of the source code is on there and free for use. I would like credit through, and I am sure Stuart Langridge would appreciate keeping his ;-)

Useage warning

Everything looked great. I had it ready to go, tested it locally and it worked fine...

...until I made the code live of course.

I kept on getting this crazy JS error in FireFox that went something a little like:

@Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.creatimation.net/textile.js :: reloadPreviewDiv :: line 67" data: no] @

Anyway, I figured out what the problem is: Apparently Gecko has issues with using the javascript property "innerHTML" when the mime type of the page is "application/xhtml+xml".

Solution? Turn the site back to "text/html" and it works great. Bummer about having to turn it off - I'll see if I can find another way to do this while still allowing for the use of the correct mime type for these pages.

Update: This error occurs because there is no innerHTML varaiable in XHTML because it is a proper XML derivitive. This means that any inserted code must be done so with proper dom intserting elements. This, however, would either require an incredibly smart function to take a string and convert all the HTML to dom objects, or a complete rewrite of the function to be DOM friendly in the first place -- neither of which is a really happy idea.

So, for the time being, the "turn off mime type" is still the best I've got.

Let me know if you find it useful!

 

JM

  1. Posts
  2. Images
  3. Status
  4. Videos
  5. Audio
  6. Links
  7. About
  8. Contact