Stupid Trolls

January 24th, 2008

Valleywag keeps trolling me. I can’t help it, they make up crazy non-true things and its like a traffic accident, I can’t tear my eyes away.

IE=edge

January 23rd, 2008

After reading the article on ala about IE8 I have to say I think that despite their insistence that the  IE=edge flag should not generally be used I think it is the solution for most developers. If you code to the standard you shouldn’t cripple your site by targeting an obsolete browser. The whole point of web standards is that a new browser, if it follows the standard, will not break your layout.

However, I don’t think the meta tag is a necessarily bad idea. I think most developers working on consumer-facing apps should avoid it. But there is a good reason to use it: intranets and other custom web applications. These are apps that are business critical, but delivered in an environment where IT can make requirements so that users can access internal apps. Providing a way of targeting a specific browser version makes sure that those apps don’t break when users upgrade their browsers.

I would hope that this will actually encourage more IT departments to speed deployment of IE8 if they can be sure it won’t break access to mission critical internal tools. This is great for us, the developers of the consumer web, because we can target our apps to the standard without fear of users stuck in ancient browsers just so they can use Peoplesoft. 

Yahoo Joins OpenID

January 17th, 2008

Hooray for openness! Yahoo has decided to support openID. This is great news for developers, OpenID and users. Simple login that isn’t controlled by one company is good for everyone. Of course, the way yahoo is doing it its especially good for yahoo, because with the y! userbase suddenly all having valid openID credentials yahoo will become the ID provider for a lot of sites.

Mobile Widgets!

January 8th, 2008

I love the idea, I love that yahoo is going to be supporting them. But I hate the idea of calling them “midgets.” I get that it is supposed to be cute…but no major company is going to use a word like that!

So

December 31st, 2007

I am at the office, alone. I somehow thought we had work today, I mean, it is not even a bank holiday. But everyone else seems to have known, because I am the only one here. So I drove down to Santa Clara just for thrills. What do people do down here? Right now I am considering making the geek pilgrimage to 1 Infinite Loop to look at the sign, which is sadly something I have always wanted to do. 

Bye bye mybloglog

December 28th, 2007

I took off the widget for now, I don’t have the time to make delayed loading work right. Might try again later.

Wonderful

December 21st, 2007

The mybloglog widget takes 2 seconds to load. I am going to delay it.

Sloooow

December 21st, 2007

Performance on this blog sucks. Right now I am caching the home page to disk, which is quite fast. I got really ambitious and was planning on using apc user cache to keep the homepage in memory, but dreamhost makes me run my custom compiled php as fastcgi…which means no shared memory space and no apc user cache.

Oh well, at least the disk cache homepage is nice. For the tiny amount of traffic I get disk cache should do the job. Cache refresh is really hacky, and comment posting remains slow. (also the stylesheet is busted for the comments page…) But I have a day job…

New Stylesheet

December 21st, 2007

So I made a new style sheet for this blog, so now it doesn’t look like every other wordpress blog on earth. Enjoy!

Wrong

December 12th, 2007

I stumbled across this widely linked post about arrays in javascript. The author, who I believe is generally well respected in the webdev world, goes on about how you shouldn’t use arrays in JS as hash tables, because an array in JS is just an extension of object. Now, clearly, the Array() constructor is generally to be avoided for the reasons noted in the article.

However, if you use var myHash = [] in any world other than prototype, you will be able to happily use it as a hash table, because it is an object and in javascript objects ARE hash tables. So sure, creating a var as an array doesn’t strictly mean anything if you are using it as a hash table, but I think it is actually good practice, because when a developer sees a variable declared as [] they generally expect it to be an array or a hash of key=>value pairs. I just don’t really see the problem here.

Maybe on his team the author would rather use object literals for hash tables. Fine, but that doesn’t make it harmful to declare an object as an array and populate it as a hash. Further, in the comments several people seem to complain about for…in, which is totally insane because it is the only form of object reflection available in javascript! Its completely essential. I suppose people just need to be careful about “considered harmful” articles, because in a flexible, dynamic language you can do whatever you want. Some things might be slower, something might be worse practice in most cases, but its a flexible language, use it how you like.