RK: John Resig

November 7th, 2007 No comments

One word: jQuery. John, thank you for solving all my JavaScript needs. Cross-browser support, a simple syntax, and all the plugins available have made anything that used to be nasty DHTML a thing of the past. Now I don't flinch when I need to add some sort of client-side scripting to my pages - I just write a few lines of jQuery and move on.

His personal website: http://ejohn.org/

Categories: Respect Knuckles

Rave: KeyTweak

November 7th, 2007 No comments

I'm so sick and tired of hitting F1 and F3 mistakenly when wanting to actually hit F2 (my Dell and IBM keyboards are different, not to mention actual accidental misfires...) and after realizing the simple fact that I can disable the automatic forward/back buttons on my IBM ThinkPad's keyboard, I thought to myself "Hey stupid, why don't you just remap F1 and F3 to F2 so you stop launching the help dialog and the search box all the time." I was afraid it might be a pain in the ass to find a cheap/free reliable utility, but this one actually popped up right away and seems to work great. Thank you so much Travis.

I give you KeyTweak: http://webpages.charter.net/krumsick/

Categories: Software

Upgrading WordPress sucks.

October 30th, 2007 2 comments

It is almost perfect - just tar xvfz latest.tar.gz and let it overwrite the files in the wordpress/ dir... but life isn't easy like that.

A bunch of files have been deprecated from various releases and just sit around getting stale. Currently the installation instructions are to just "remove all files" in various places. I would rather just get a list of files that are safe to remove, and be able to blindly copy the archive using tar (or remotely using FTP, etc.)

That shouldn't be too hard.

Right now I have my WP installs for work and home in Subversion, and I can't just move the files because the SVN metadata and directories get lost. I'd prefer to just get a list and I can manually just "svn del" the files myself. So please, for future WP releases, would someone publish the list of files so I don't have to do all this manual work each time? How about a quick and dirty cheat sheet like so:

List of files deprecated by this release:

  • foo.php
  • bar.php

Database upgrade required: Yes/No

Functions changed or deprecated:

  • wp_insert_post() now does this instead of that...
  • etc...

This might also make it easy for [us] plugin authors to look at the function deprecation list and easily know if something we're doing could be in trouble 🙂

Categories: WordPress

Handling events pre-$(document).ready() in jQuery

October 30th, 2007 3 comments

jQuery is the best thing since velcro. No doubt. However, there is one thing that I've stumbled across that other people seem to have wondered about too. jQuery's got this great $(document).ready() capability to let you know when the DOM is ready and jQuery is loaded. However, what about those events (like a user quickly clicking on something) prior to this happening? If any of those require jQuery's functionality, you're SOL.

For right now, what I figured out is just doing this in the HTML:

<a href="javascript:;" id="somediv">Some link</a>

In the Javascript, it would be this:

$(document).ready(function() {
   $("#somediv").click(function() {
      ... your actions here ...
   });
});

This currently is the only way I could figure it out. This guy had a neat idea basically creating a cache of the events to trigger the minute the DOM is ready. I was thinking of just blindly applying this to all $("a"), but that still requires jQuery to be available, and that's the whole problem to begin with.

This issue makes me nervous because I'm trying to play within the rules that Yahoo! has worked out for optimal performance. However, when you put JavaScript files at the bottom of the page, that means it will be even longer before jQuery is loaded. The more I try to get the pages working with JavaScript files loading at the bottom, the more apparent it becomes that jQuery should still be called at the top/as soon as possible. Unless someone else has figured out a way to make both sides happy...

Categories: Development

jQuery Spy improvements

October 29th, 2007 2 comments

I've made a diff against spy 1.4 to make sure it will not allow multiple spy instances on the page with the same object ID. If .spy() is called again, the old timer will be cleared and the new one (with new settings) will take over. It should still allow multiple *different* spies on the same page, just not two of the same thing (I was having an issue  where it would keep reloading the same ID over and over because of a .click() event changing the configuration settings) - this allows real-time changing of the settings (say, the AJAX URL) without spawning additional timers.

I also added in a Math.random() parameter to force reloads every call and changed $.post to $.get - those can easily be removed if desired. 🙂 Essentially I just create an array that has a list of all the spy IDs that are called, if a dupe is detected, the old timer is disabled and the new one starts like normal. Oh, and I changed the epoch behavior, for some reason on my browser it wasn't reporting the right time. I don't see why it needed the spy.epoch calculation at all.

Here's the patch file:
spy-1.4-diff.patch.txt

Feel free to submit your comments. This was the cleanest method I could figure out.

Categories: Development

A bad credit score can screw you out of more than a loan...

October 23rd, 2007 No comments

I learned some pretty disturbing news from my friend earlier. Looks like he was turned down for a job he was fully qualified for due to his bad credit. That sounded a little bit discrimatory to me. Someone's previous lifestyle should not affect their future employment. Not to mention how many people have crappy credit. How are people with bad credit supposed to advance? Working crappy pizza jobs for years until their credit score is improved?

Besides, a person in need might even work harder! Most people probably want their credit to improve, I'd imagine.

Something about this really rubs me wrong. Like, write-to-my-senator-or-congressman wrong. We already have things like the Fair Credit Reporting Act and all this privacy around our credit, why should our employer have access to information about how we spend our money? As long as the work gets done, that is all they should care about.

I do agree however that criminal background checks are a good thing. But credit? What's next? We won't be hired if we have poor bowling skills or some other equally personal detail?

Categories: Consumerism

Are you getting the most out of your DVI port?

October 16th, 2007 3 comments

Did you know there are five types of DVI connectors? I didn't. DVI-D dual link, DVI-D single link, DVI-I dual link, DVI-I single link, and DVI-A. Of course, I learned this the hard way, and I bet most people still haven't. I don't have much previous experience with DVI, but now that I have a Macbook Pro and an HDTV, I wanted to connect it at 1080p once I realized I could (using an HDMI port on the TV, not the VGA connection.)

I thought it would be as simple as going and picking up an HDMI to DVI cable. Not even close. After I picked one up at a local shop and brought it home, I realized it was "missing" pins. It would function still, but not at its full potential. I wondered about this and hit up Wikipedia, and sure enough, there are multiple types of DVI connections.

After shopping at five different stores (including the Apple Store and the Mac Store) I realized that nobody actually sells DVI-D or DVI-I dual link cables (or even adapters) which is what is required for 1080p. I had to go down to Fry's in Wilsonville and finally was able to pick one up. 15 feet for $24.99, actually much cheaper than most of the single link options at all the other stores (and those were shorter cables, too.)

Sure enough, DVI-D dual link saves the day. I can now use the Macbook at full 1080p on my 47" Vizio GV47LF, although I have to say the text is pretty small. Using Front Row and watching movie trailers through it using all 47" is pretty neat though.

Categories: Consumerism, Toys

Windows key "stuck" in Remote Desktop...

September 19th, 2007 22 comments

You think keeping up to date is a good idea, however, the last version of RDC now has an annoying bug. It seems if you use the Windows-L combination to lock your machine (in person), the next time you connect via Remote Desktop the system acts like the Windows key is stuck. I don't know if this happens 100% of the time, but this has been happening to me now consistently for over a week and I finally remembered to see if it is truly an issue or not.

Sure enough, tons of other people have complained, but there doesn't seem to be a permanent fix. There are a couple options - a "soft hack" method where you use the On-screen Keyboard and just click the Windows key on/off, a registry hack that will disable the Windows keys altogether, and quite possibly downgrading to the slightly older RDC version.

Here's some relevant threads. The OSK idea works simple enough; however it shouldn't be an issue no matter what, especially since the Windows key is not passed through RDC anyway.

Hopefully there will be a proper fix soon. I'd rather not have to disable keys or manually have to click buttons every time I connect via RDC...

Categories: Software

NTFS - an even bigger piece of crap than I thought

September 14th, 2007 No comments

Wow, once again NTFS has ruined my day by invalidating an entire external USB drive's data. The filesystem looks fine, passes all checks, I can copy the data even using Linux but it acts like it is corrupt. So I try some NTFS recovery software and it's showing me all this "EFS" stuff - like this stuff has some Encrypted File System related issue. Sure enough, I picked up an EFS decryption tool (if you know the password) and it shows every file as being encrypted. Did I ever encrypt it? No. I don't even have EFS readily available in my right-click menu. Even if it was encrypted for some odd reason it would have been using one of only a couple passwords I've used on my desktops... and none of them work.

Meanwhile now I am stuck with a perfect directory listing of these thousands of files that are now digital rubbish. The least NTFS could have done was just corrupt itself like usual and let me try to recover pieces of them. Always something new out of Redmond. Sigh.

Categories: Consumerism, Software

AOL suspends Active Virus Shield, gives us McAfee instead

September 2nd, 2007 2 comments

Updating the definitions keeps failing on my Active Virus Shield installation. Why? Quickly Googling it I find out that it's suspended and is being replaced with a special version of McAfee VirusScan. This comes only a couple months after I just removed Norton off all my computers and the people I support (family, friends) since it was becoming more of a resource hog as time went on.

Originally I discovered AVS through CPU Magazine, and in their tests Kaspersky Anti-Virus ranked #2 (IIRC) - which was a bonus - it was free, and it was basically the best. Now if I want a free "supported" copy from AOL, I have to change to McAfee, which is already scaring me with its 25 meg download and extra programs like "SecurityCenter" - at least I was able to unselect the firewall.

Instead of a single program with a smaller footprint, I now have SecurityCenter AND VirusScan running. I highly doubt this will run as clean as AVS did. Currently it is struggling to update the windows even. Feels like Norton all over again... sigh.

Categories: Consumerism, Software