Archive for the ‘Programming’ Category
Search Engine Friendly Web Development Tips
Wednesday, February 18th, 2009Lots of useful information in here. I learned things about why 301s are the best way to redirect users from non-www to www or vice versa, how to create a video sitemap, and that Google has a whole bunch of webmaster tools to help analyze every aspect of your web site and it’s search engine visibility.
Fed finally cracking down on H-1B Abuse
Tuesday, February 17th, 2009It’s reassuring to hear some progress is being made in way of monitoring and cracking down on those who abuse their outsourcing laws and rights to provide truly equal opportunity employment.
http://arstechnica.com/tech-policy/news/2009/02/feds-finally-cracking-down-on-h-1b-abuses.ars
Let’s say that an H-1B-free labor market has set a price on a year’s worth of work from a programmer with a bachelors degree and two years experience at US$35,000 + $12,000 (benefits like health insurance for a family of four) = $47,000. Now let’s say that companies acquire the ability, via the introduction of the H-1B program, to import foreign labor of comparable quality. The average imported worker is willing provide the same work for $35,000, but instead of benefits she wants health insurance for herself only ($3,000/year) plus a green card. Thus the promise of a green card to the H-1B worker is valued by the market at $9,000/year, and you can and must factor this in to account for the H-1B employee’s total compensation.
The cost of the green card to the employer is much less than the cost of the American worker’s insurance coverage, plus the foreign worker is obligated to work for the employer for a set period if she wants to get the promised green card. This is a win-win for the employer and the H-1B worker, but not for the American employee, to whom the green card is worth exactly US$0. The American has been priced out of the market because the H-1B will sell her labor at what amounts to a steep discount in exchange for a green card.
An annoying doubleclick ad + firefox bug
Wednesday, October 15th, 2008I hope I’m not the only one who consistently experiences this annoying behavior when browsing specific web sites. I have been able to reproduce the issue both at home and at work, so I doubt I’m the only one.
Update
Kev (below) has identified that this is caused by a conflict with firefox. Sounds logical. Switching to version 1.2.0b4 or disabling firefox reportedly fixes the problem.
The Issue:
When browsing a site with one of Doubleclick‘s ads on it, sometimes the ad will take over the whole page (likely due to malformed HTML in the iframe or some type of javascript error), effectively rendering the page useless. The back button doesn’t work because it just keeps taking over the page when you press ‘Back’. I usually end up just closing the tab and forgetting about it. That being said, I imagine other annoyed users are doing the same. This behavior is occurring across multiple very large sites (list below). It makes me wonder if these publishers are aware of potential dollars they are wasting by compromising the user experience in such a big way.
Over the past month, I have taken screenshots of this issue across various sites. It could be a conflict with a FireFox plugin (although I only use Web Developer Plugin and Firebug), but that’s unlikely. This issue seems to be caused by firebug. This issue has been recorded in firefox 2 and 3. By looking at the status bar text which reads something like ‘Transferring data from m0.2mdn.net’ or ‘Read m1.2mdn.net’, and by a quick glance at the source of each of these broken pages, I can quickly conclude that the problem lies somewhere within Doubleclick’s ad code.

yelp, YouTube, Gizmodo, and LinkedIn have all been captured with this problem.
I also wonder if Doubleclick is aware of this issue. They deal with very large advertisers and I can’t imagine something like this going unnoticed for too long.
Has anyone else seen this bug while browsing popular web sites?
YUI MenuCreator : generic show/hide code
Wednesday, August 27th, 2008At work I frequently encounter designs that utilize a mouseover show/mouseout hide menu that usually consists of a trigger (often an A tag, or LI element) and a menu (often a DIV, or a UL). Due to the browser inconsistencies between event handling and mouseout/mouseover DOM detection, it can be cumbersome to create a menu that is quick to implement (thus cost effective) and most importantly, stable. It also has support for a delay threshold, and the ability to animate show and hide events.
YUI CustomEvent subscriptions
Sunday, August 10th, 2008Recently at Ajaxian there was a post describing Custom Events and how they could be used to better structure an event-driven application by ‘subscribing’ or ‘binding’ certain actions to an event. At Pint we use YUI as our main library, so I’ve ported the author’s example into a version that uses YUI.
Here is the code:
YAHOO.util.Event.onDOMReady(function() {
document.body.event1 = new YAHOO.util.CustomEvent();
YAHOO.util.Event.on('colorchange', 'change', function(e) {
if (this.checked) document.body.event1.subscribe(changeColor);
else document.body.event1.unsubscribe(changeColor);
});
YAHOO.util.Event.on('contentchange', 'change', function(e) {
if (this.checked) document.body.event1.subscribe(changeContent);
else document.body.event1.unsubscribe(changeContent);
}
});
YAHOO.util.Event.on(document.getElementById('leftchoices').childNodes, 'click', function(e) {
document.body.event1.fire(e);
});
});
Categories
-
Archives
-
You are currently browsing the archives for the Programming category.
About This Site
DylanButler.com is the blog and portfolio of Dylan Butler, a San Diego web developer and consultant.


