Posted by Matt at 6 July 2009

Category: running

I’ve now completed seven weeks of my marathon training plan without missing a single run. (I’m tracking my progress using my online training plan and logging all my runs in MapMyRun.com ).

In the last 7 weeks I have run 145 total miles, with my longest run being 14 miles. That was the farthest I have ever run, and it felt great! As the long runs continue to get longer, it is requiring a little more logistical planning. I need to find long enough routes to not get bored, I need to plan loops so I can re-fill my water bottles and get enough fluids, and I need to manage my nutrition before, during, and after the runs. Getting into a routine with these things will help me as I do the even longer runs near the end of my training plan.

I am really enjoying training so far. I look forward to runs, and having a strict schedule has motivated me to go out and run on days when I felt tired or when it was raining or when I just didn’t feel like running that day. I know that I don’t want to slack on the training, because I want to finish the marathon and I want to do as well as I can. I don’t want to have any regrets like "I wish I would have done all my training, maybe I wouldn’t have struggled so much!" I enjoy the solitude of running. It relaxes me and gives me time to think. I don’t run with any music, but I have considered it for at least part of my longer runs because it can start to get boring when I’m running for more than 2 hours.

My first goal is to finish, of course, and my next goal is to finish between 4:15-4:30. I really think this is an achievable goal for me. My pace in training has all been within the range needed for finishing in this time. Technically I am supposed to be doing my long runs much slower than my actual marathon pace, but it’s hard for me to slow down to that speed. I feel like I may not be pushing myself hard enough, and I keep adjusting my pace to see if I can speed up a bit, still avoid injury, and finish with a faster time. I would love to finish under 4 hours, but I also want to stay realistic. I know a lot of things can go wrong on race day, especially after the 20 mile point. I want to be confident, but not naive. I want to finish strong, not shuffling and exhausted, ready to pass out. I’d rather enjoy the race, the people, and the experience and finish 15 minutes slower than torture myself to get a better time and have a miserable experience. Somewhere in there lies a happy medium, and I’m sure I’ll find it in my 12 weeks left of training.

I’ve been reading a lot of different thoughts of strategies and experimenting to see what works for me. I have a plan that’s working for me to get enough fluids (some water, some Gatorade) and nutrition (bananas, Gu packs, etc). I am learning more about salt tablets and might experiment with that. I have put close to 500 miles on my running shoes, so I am considering getting a new pair now for the marathon. I still have 375 miles to run in training, and I want my shoes to still feel good on race day, but also be plenty broken in. I’ve figured out what pair of socks I like the best, I have a Halo visor that works great to keep sweat out of my eyes, and I know where I need body glide to avoid chaffing on long runs (including the bottoms of my feet to avoid the friction burn after a few hours, thanks to my friends’ recommendation). I’ve found that there are a lot of little things to consider when getting to run this distance. It feels like a whole different game than a half-marathon, which I’ve done three times. Sometimes it feels like I’m getting ready for battle as I prepare everything and get ready to go out for long runs.

Since I am expecting my daughter to be born any day now, my upcoming challenge will be to get enough rest and to have enough time to work in my weekday and weekend long runs. Luckily my wife is understanding and supportive, so I think it will work out fine.

Although I have quite a few weeks to go until race day, I am really looking forward to it. I like that I will be running the longest distance of my life repeatedly over the next 12 weeks as my mileage increases. So I am continuing to set my own personal records and really seeing the results of my training. I enjoy the challenge and the good feeling that comes along with conquering a distance that seemed incomprehensible and impossible only months ago. Bring it on!

Posted by Matt at 11 June 2009

Category: Programming, javascript, jquery, web

This is an old issue, but I never looked into it in enough detail to solve it until now.

When using slideUp() and slideDown() in jQuery (and any other animations that animate height) there is often a “flash of content” when the animation starts or stops in IE.

Here are the details you might want to know:

  1. IE 6/7 mishandles a style like “overflow:hidden;height:0px;” (which should show nothing) and instead show the entire contents of the object. But ONLY in quirks mode. This is a bug.
  2. When doing a hide animation, jQuery animates to 0, and when doing show, it starts at 0
  3. So when the value of 0 is set inside the animation, the entire content is flashed visibly on the screen, this causing annoyance and potential epileptic seizures.

A ticket was filed with jQuery 2 years ago about this issue: http://dev.jquery.com/ticket/1726

Unfortunately, they changed it to “wontfix” and instead declared that FX animations are not supported in IE6/7 in quirksmode. I consider this to be pretty lazy on the part of the developers, and I’ve seen this attitude several times with regards to problems that are not so obviously solved or outlying cases. It’s disappointing.

I started a thread in the jQuery Dev group about this, so we’ll see if anything comes of it.

Meanwhile, inserting this fix into the page solves the problem:

jQuery.fx.prototype.originalCustom = jQuery.fx.prototype.custom;
jQuery.fx.prototype.custom = function(from,to,unit) {
        if (this.prop==’height’) {
                to = to || 1;
                from = from || 1;
        }
        this.originalCustom(from,to,unit);
}

It’s simple – when the to or from value in the animation is 0, and we’re animating ‘height’, then just go to/from 1 instead. Problem solved.

Hope that helps out at some point in the future when your content is flashing and you can’t figure out why…

Posted by Matt at 10 June 2009

Category: browser extensions, web

collections

The Mozilla add-ons site has been re-designed, and we finally get the ability to group add-ons together into Collections, which can be installed all at once. Share all your add-ons with others, or make your own Collection to easily install your tools to new instances of the browser.

Now if they would only add automatic sync with my add-ons and settings.

By the way, if you aren’t using FEBE, you should. I have it back up all my Firefox settings nightly to box.net, so if my computer ever crashes I can quickly and easily get everything back. These days, a ton of my stuff is actually stored in the browser, so losing it is quite a hassle.

Posted by Matt at 29 May 2009

Category: running

26.2

I started running a couple years ago, and after surviving three half marathons, I’m finally taking on the big challenge. I have signed up to run the Quad City Marathon in September. 26.2 miles.

I have friends who are endurance athletes (50 mile runs, Iron Man, etc) so I’m surrounded by people who have run this distance a number of times, which is a benefit for me. I have taken their advice and I’m motivated by the insane level of endurance that they can accomplish.

After talking to them and reading as much as I could, I decided to following the Novice marathon training plan by Hal Higdon. It’s one of the most popular training plans out there, and he’s one of the "experts" on the subject. If it’s worked for so many before, it can work for me!

I’ve taken the Novice I training plan and put it up as My Marathon Training Plan on Google Spreadsheets. I will update it as I go for the next 18 weeks. For the first week, I was thinking of following the Novice II plan, so I did a bit more. Then I decided to just follow the Novice I plan as-is, so I adjusted.

Hal Higdon talks about using a walking strategy to complete a first marathon. Although I hesitate to plan to walk during a "run", I have decided to take his advice and walk through each aid station. I did some simple analysis of a Marathon Walk Strategy and was surprised to see that adding in walking doesn’t really affect the final time for the pace I plan to try for, so it’s not like it’s going to add a half hour to my finish time or something. It seems to make sense, so that’s my strategy.

So hopefully 17 weeks from now I will be crossing the finish line, a proud first-time marathoner. Wish me luck!

Posted by Matt at 27 May 2009

Category: search, web

Two new kind of search engines debuted recently, in the increasingly-crowded space of companies trying to search, organize, and present relevant information from the mess of bits on the interwebs.

wolframalpha WolframAlpha is a "computational knowledge engine" rather than a general search engine. It doesn’t just aggregate url’s and match keywords. Instead, it seeks to find relevant answers to real questions using its internal collection of equations, facts, comparisons, and figures. If you put in "weather NYC" it doesn’t just find pages that have those words and show them to you, hoping those pages contain what you are looking for. It understands that you are looking for weather information about New York, and offers you a view of the actual data rather than pages that contain it.

Where Google might be equivalent to asking a librarian "which books contain information about weather, specifically about New York?", WolframAlpha is more like asking a weatherman from New York what the weather is like there. Big difference.

topsy Topsy.com is a search engine trying to capitalize on the popularity of Twitter. Instead of scouring the web for all web pages it can find and indexing the words on each page, it "listens" to all tweets on Twitter and pulls out the keywords and url’s posted with them. It associates the words with the url and aggregates the results.

Searching Topsy for "weather nyc" gives you back nothing useful. But that’s because it’s not meant for that. Instead, Topsy is a view into pop culture and the stream of public consciousness. Searching Topsy for "obama" won’t give you a summary of the President’s actions or all the important news of the day. It will give you a view into what url’s people think are interesting and related to Obama right now. It will also show you who is mentioning the search terms, how many there are, etc. This is a great way to monitor a brand, a current event or issue, or a technology. These things will be tweeted about often, and the way Topsy aggregates the information and presents it can be very interesting.

Posted by Matt at 7 May 2009

Category: Programming, javascript, jquery, web

screenshot-1.3.2I finally updated my jQuery Cheat Sheet to match jQuery 1.3.2. I hope people find it useful!

Posted by Matt at 27 April 2009

Category: twitter, web

twitter-bird I’ve officially started tweeting (username – @matt_kruse) if for no other reason than to stay current with web trends and pop culture. I also created a short presentation that I will use to introduce some others to the joy that is Twitter.

So, is Twitter useful? I don’t know yet. Search seems interesting. But I’m not sure I have much interest in following users and seeing what they are eating for breakfast. From a purely technical perspective, I’m currently using TweetDeck to follow #js OR javascript, jquery, and igoogle. It’s interesting, and I’ve replied to a few people to answer questions and get a feel for how this all works. I’ll have to wait and see if and how I continue to use Twitter as time goes on…

Posted by Matt at 13 April 2009

Category: browser extensions, web

firefox Like many Firefox users, I have a number of add-ons installed that customize the browser and make my work/browsing easier. Since these are very useful to me, I thought I would share my list in case anyone is interested in trying them out.

I’ve used an add-on called "Extension List Dumper" that makes it simple to dump a list of all installed add-ons. Enjoy.

Posted by Matt at 9 April 2009

Category: Programming, browser extensions, javascript, web

greasemonkey-logo GreaseMonkey is a Firefox extension that allows you to insert javascript into any web site you browse to in order to customize the interface or add/remove/change functionality.

I’ve known of its existence for a long time, but I’ve never used it, despite my interest and experience with javascript.  A recent change in iGoogle gadget functionality made me take another look, and now I’m hooked.

GreaseMonkey is not complicated, like I assumed. It’s simple. Very few API functions to learn, and you don’t even need to learn them to do most things. If you know enough about javascript, you can be up and running in no time.

Once its installed, I found the GreaseFire extension is also useful. It keeps a local database of GreaseMonkey scripts from userscripts.org and lets you know if there are any existing scripts available for the sites you are viewing.

For my first proof of concept, I created a user script for Facebook that will pin the notifications window to the upper right corner for easy access. No need to go down and click on it when it’s red. The script can be accessed here:

http://userscripts.org/scripts/show/46272

Most scripts out there are primitive, from what I can tell. The first thing I looked for was an existing library to easily manage user preferences, so a single script could offer the user multiple options. For example, what to hide, what to show, colors to use, etc. Unfortunately I couldn’t find anything that already existed, so I guess I’ll have to build my own. Maybe.

I also assumed there would be an easy way to upload and maintain scripts on userscripts.org, but it doesn’t look like that’s the case. It’s manual upload, so if I update my local version I have to go in and manually update the site. What a pain! Hopefully someone will improve this so updates to local scripts can be mirrored to the repository quickly and easily.

I’ll post more as I create them, I assume. I have more ideas for Facebook and for iGoogle, for sure…

Posted by Matt at 26 February 2009

Category: Programming, javascript, web

The other day I had the need to scramble text on a page so I could capture a screenshot and send it to someone without them seeing the page content. I looked around for a Firefox Add-On that would do it for me but came up blank. So I wrote this quick:

javascript:function%20scramble(el){if(el.nodeType==3){el.nodeValue=el.nodeValue.replace(/[a-zA-Z]/g,function(x){return%20String.fromCharCode(((x.charCodeAt(0)<97)?65:97)+Math.floor(Math.random()*26));});}else{for(var%20i=0;i<el.childNodes.length;++i){scramble(el.childNodes[i]);}}};scramble(document.body);

Give it a try on this page to see how it works. Warning! You’ll have to reload, because you obviously won’t be able to read the text once this runs!

Scramble Text

You can drag this link up to your Links toolbar or into a bookmark to make it easily available on any page.