Wednesday, November 19, 2008, 05:29 AM - General, Technology, QA, Web, Open Source, JavaScript, Apple
So while I wait for WordPress to upgrade, so that I can blog on AdamChristian.com I decided that I would drop by t0asted and throw out an update. This last weekend Matt Eernisse and Jeff Olds were both in town and it was Jacob Robinsons birthday so we all ate some delicious Persian food and wandered from bar to bar in Berkeley.Saturday we all golfed Lake Chabot (the three above including Mikeal Rogers). One of the nicest golf days I have had since I moved to California EXCEPT for how darn early it gets dark. I really could have forged on for another 3 hours in the perfect temperature. I have some pictures on my phone that I will be uploading to picasaweb.
Sunday we hiked around for Cronkhite, which is one of the most scenic places I know of in the bay area. You are up in the hills on an old army base looking back towards the golden gate and down at the beach. On a nice day, I can't think of a place I would rather be.
Lots of blogging about Windmill and Mozmill going on, currently writing some tests for the Firefox Worker Threads feature which will be released in Firefox 3.1.
Now that I am dilirious and just flat out ranting, life is good, I can't wait for snow boarding season. I am considering the Epic Pass which would allow me to ski some serious pow in Colorado... $89 bucks each way to Denver, is it worth it?
Ahh, now the little duck is bouncing on my dock -- apparently it's time to go blog about some serious stuff over at my grown up blog.
Cheers!




( 2.9 / 656 )
Friday, August 1, 2008, 02:25 PM - Technology, QA, Web, Open Source, JavaScript, Travel, News, Work, Events
At the moment, I am sitting in the lobby of the Westin Hotel & Spa in Whistler BC. I first must preface this entry by saying that I have had an amazing week, and a great time here. I thank Mozilla for putting on a really cool experience, and I do not regret coming up here one bit. Also in between each of the following paragraphs I was attending some really cool sessions, eating great food and hot tubbing.Monday we took a flight from Seattle to Vancouver, minus the screaming kids it was relatively painless flight. Meg was planning to meet me up here, and crash in my room... somehow she left SF that morning and still beat me here. I have no idea how that happened. Anyways she was here waiting when I arrived, and I quickly had to check in and get to dinner. Huge buffet with all kinds of delish foods, a pretty impressive spread with a solid bar.
Tuesday was a good day.
Wednesday morning I wake up and turn on the news and find out that the only reasonable road between Vancouver and Whistler (highway 99) has been closed due to a rock slide. Not only was it a rock slide, IT WAS A FREAKING HUGE ROCK SLIDE: http://www.ctv.ca/servlet/ArticleNews/s ... VNewsAt11. Apparently it wrecked the entire road, and the train tracks and to remove it they will have to BLAST the van size boulders with dynamite. I didn't panic until they told us that it would take a bare minimum of 5 days to start getting the road back open. As you can imagine, poor Mozilla crew organizing all this must be pretty stressed. Two funny things happened as a result of this incident, during the "Travel Update", Mike Schroepfer yell out "Have we determined if Microsoft is responsible for the rock slide?" which under the circumstances broke the intensity in the air. The second was that a bug was logged in the Mozilla Bugzilla which marked the messed up road with severity:blocker, and that we may want to look into convincing Google to "Come pick us up".
Thursday, we woke up to silence, no lights, TV's, dead laptops and the quick realization that the power was out for the whole hotel. As you can imagine, this is a slight problem for a "Tech Conference". I actually slept in a bit later in the nice quiet darkness and caught up in probably a month of lost sleep. In the lobby they had posted that the hotel transformer had been "hit by a laundry truck"... UHM, are you kidding me? The giant green metal box sitting in the woods next to the hotel was "hit by a laundry truck". This HAS to be Micorosoft's doing, I can't image any other way something insane like this could possibly happen. We got to spend half the day without computers or A/V doing presentations off of notepads and then discussing in the dark. This did make for an interesting dynamic, and in a lot of ways was still pretty productive albeit very strange. Fortunately right before our 5:45 presentation of GristMill, our firefox automation framework "Talk" the power came back on so that I could give my sweet demo. I really like doing talks at conferences because people immediately have ideas, and uses for whatever it is you are doing. It's very gratifying to know that people are going to go home and start playing with your stuff.
Thursday night dinner we jumped on the gondola and headed up to the top of the mountain for a pretty rockin shin dig. A beattles/elton john/other cover band was playing, it was snowing outside, and they put on a huge spread. John Lilly talked, Mitchell Baker talked and after many toasts and rounds of applause Shrep went up and clearly fighting his emotions, thanked everyone for the last few years.
A wise sage told me, that when you go to a conference/event it's always a good idea to make a list of the people you want to worm your way into a conversation with. So this time around, I made my list. During the day people have been crazy running around all over, but last night people were a bit more relaxed and in a social mood so I had the chance to introduce myself to some folks and have a couple conversations I had been waiting to have all week.
Today is friday, its 11:58 AM, my float plane was supposed to take off at 11:45 AM... clearly this is a problem. The word I was given was that the planes couldn't fly because of the high tide and that the planes weren't able to land safely at the moment. Well, the way I feel about this is that we basically have tides mapped out like clock work... someone booked a flight to leave at a time when they would be landing during an unsafe high tide? I don't think so. There is a massive cloud cover, but mostly I think it just makes sense that the trend of insanity would continue.
I am feeling a little bit burned out, pretty tired, sick of eating, drinking, and talking frankly. Please someone send your private jet and get me the hell out of this beautiful, tree covered resort town before I do something insane like deciding to go backcountry snowboarding on the glacier in the middle of the summer!
Please leave your base.
Today was an interesting day, I resigned from Rearden Commerce.. and now I am announcing a new blog.
For the last few years t0asted has been my only blog, so anything I wanted to write about -- be it professional, silly, etc. all came here. However I have seen a growing need recently to separate the two different kinds of content.
T0asted.com is now going to return to being my personal blog, for fun blog and all around whatever comes to mind place to rant. If you want to read my career/professional ideas about business, technology and all things 'more' serious, feel free to go check out my new website at Adam Christian on Life, Business and Technology.
The full story on my career changes and new projects can be found in the latest post: http://adamchristian.com/archives/20.
I thank you all for keeping up on me, I hope this makes it easier to find what you think is interesting.
For the last few years t0asted has been my only blog, so anything I wanted to write about -- be it professional, silly, etc. all came here. However I have seen a growing need recently to separate the two different kinds of content.
T0asted.com is now going to return to being my personal blog, for fun blog and all around whatever comes to mind place to rant. If you want to read my career/professional ideas about business, technology and all things 'more' serious, feel free to go check out my new website at Adam Christian on Life, Business and Technology.
The full story on my career changes and new projects can be found in the latest post: http://adamchristian.com/archives/20.
I thank you all for keeping up on me, I hope this makes it easier to find what you think is interesting.
Wednesday, April 23, 2008, 12:37 AM - Web
As a web developer you are probably aware of that sinking feeling in the pit of your stomach that you suffer when posed with the idea of testing your freshly written JavaScript that works perfectly in FireFox. For years now, we have had to 'suck it up', and pour a glass of scotch to get through an afternoon of testing in IE. As I am now a Web Developer at Rearden Commerce who currently caters to an audience of enterprise users instead of your standard bay area geek population -- I have to make sure everything I commit works nicely in IE.
Last week after a few hours of IE testing, and dirtying my code I worked so hard to organize with alerts, I decided that there HAD to be a better way to do this. I went ahead and spent many hours searching the web, installing everything I could find that promised to make IE development easier and happily I can say -- it was a success.
First and foremost however, there are a few tips I can give you right off the top that will make your life easier. Before you take the plunge into line by line alerting, go through your code and do the following;
1. Remove unnecessary commas in your data structures:
( FF ignores this one, but IE will give you an error that isn't helpful )
ex.
var superNinjaObject = {
me: 'adam',
home: 'oakland',
};
2. Don't try to access characters in a string as if it was an array:
( Works in FF, but IE will simply give you undefined and not tell you a thing )
ex.
var myString = 'Welcome to the Jungle';
$('mynode').innerHTML += myString[14]; //Broken in IE
$('mynode').innerHTML += myString.charAt(14); //Compatible alternative
Now we can get to what you are really interested in, the new tools:
1. Internet Explorer Development Toolbar
URL: http://www.microsoft.com/downloads/deta ... laylang=en
This is Microsoft's best stab at a firebug equivalent. This gives you all the flexibility you need to inspect the DOM tree, look at CSS, Scripts, Images, Network etc. To put it simply, it makes IE development something you can swallow. I can't image going back to IE development without this. Unfortunately it is missing two things, the first is the absolutely necessary JavaScript shell. This can be solved by using the IE JS Bookmarklet that you can find at http://blog.monstuff.com/archives/000287.html. Add this to your favorites and then whenever you need a JS shell, pop this up and hack away ( I agree it would be nicer if it was built in ). The second is the ability to set breakpoints and step through your code debugging and introspecting objects and variables. I do have a solution for this, see new tool number 2.
2. Visual Web Developer 2008 Express Edition
URL: http://www.microsoft.com/express/vwd/
This is the solution to your break pointing, stepping, introspecting needs. The way you use it is a bit awkward, but it does complete the development experience. To use this you need to create an empty web project and then start debugging. This will launch IE and bring you to a blank server page off the local MS web server instance. At this point you can go ahead and plug in the URL of the app you are wanting to test. Additionally if you have set any 'debugger;' statements in your source it will pick that up and automatically ask you if you want to start debugging there, or continue on. When you stop the debugging session in VWD it will kill your browser, so beware if you have to navigate to some deep point in your app you are probably going to get frustrated if you write buggy code. :) At it's 1.4 Gb space requirement it's hardly a comparison with firebug -- but it's certainly a step up from alerts all day long.
Update:
If you don't already have it installed, a good midpoint between nothing and Visual Studio Express is the Microsoft Script Editor which comes with office 2003, heres a video on how to use it, http://www.jonathanboutelle.com/mt/arch ... _jav.html. Thanks for the feedback blogosphere.
I hope this made your life at least a small amount easier, happy IE developing.
Friday, October 26, 2007, 05:01 PM - Web
We have had a couple weeks discovering interesting problems in Javascript, and one that I had been seeing for a long time but finally had a chance to dig into a couple weeks ago before the Windmill 2.0 release was a problem in Safari 2 with Math.random().This first showed it's gnarly teeth in an algorithm I had written to generate a random user every time you ran a test suite, so I didn't have to think about conflicting users and I didn't want to remove the user at the end of every test run because it is important for us to grow that database and see how it performs.
Here's the code that enabled the problem:
var getRandomKey = function () {
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
var len = 16;
var str = '';
for (var i = 0; i < len; i++) {
var rnum = Math.floor(Math.random() * chars.length);
str += chars.substring(rnum, rnum + 1);
}
return str;
};
(excerpt from fleegix_js/trunk/plugins/hash.js)
This worked great on every browser except Safari, where I had to delete my user from the last session every time I ran the test suite. The Math.random() in Safari uses the same starting point and same algorithm to generate the random number used, so that each time you start your browser and generate a Math.random() you get the same value, not very random is it?
Our solution to this problem is demonstrated below, you make want to tweak it even more dependent on your requirements.
var getRandomKey = function () {
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
var len = 16;
var str = '';
var mls = new Date().getTime();
for (var i = 0; i < len; i++) {
// In Safari 2 Math.random returns the same random
// sequence after firing up the browser -- return
// something randomish
if (navigator.userAgent.indexOf('Safari/41') > -1) {
rnum = (((mls / (i + 1)) + mls) % chars.length);
}
else {
var rnum = (Math.random() * chars.length);
}
rnum = Math.floor(rnum);
str += chars.substring(rnum, rnum + 1);
}
return str;
};
My original fix was to simply rip a piece of Date().getTime() and append it to the string in Safari, but mde's implementation above is a bit more elegant and generates a string of the same length for every browser.
A week later we were investigating a bug in the Cosmo UI breaking intermittently in Safari which finally brought us right back to this bug. Over time Safari users were generating event's in the DB and the code to do this obviously used Math.random() as part of the algorithm to generate the event's ID, as these were propagated to the DOM when building the UI to display these events we wound up with multiple events with the same ID which caused some serious problems.
Hope this helps someone out there with their terrible Safari bug they haven't figured out yet!
Next

Avatar





