Tuesday, October 28, 2008
Microsoft joins AMQP enterprise messaging effort
The news is surprising to me because Microsoft have their own proprietary messaging protocols that they have been pushing (which I have yet to see deployed on a large scale), and supporting AMQP will in many cases mean Microsoft on the client side and something else on the server side.
I've personally never had major issues with MQ, RV or EMS (except for the occasional trade message RV loses:)), but I always wecome choice. So go Redmond!!!
Monday, October 13, 2008
$1 trillion in subprime == a $62 trillion financial crisis? wtf?
Here are a few sums, if I can believe Wikipedia:
- The U.S. mortgage market is estimated at $12 trillion
- Approximately 9.2% of loans either delinquent or in foreclosure through August 2008
- Subprime ARMs only represent 6.8% of the loans outstanding
Our suspicions may be confirmed by this article talking about how the Wall St quants and traders built a pyramid of debt on top of relatively few assets (ABS, CDO), and then used the speed and power of computers to disguise the true value of the assets:
Somehow the genius quants — the best and brightest geeks Wall Street firms could buy — fed $1 trillion in subprime mortgage debt into their supercomputers, added some derivatives, massaged the arrangements with computer algorithms and — poof! — created $62 trillion in imaginary wealth. It’s not much of a stretch to imagine that all of that imaginary wealth is locked up somewhere inside the computers, and that we humans, led by the silverback males of the financial world, Ben Bernanke and Henry Paulson, are frantically beseeching the monolith for answers.
Tuesday, September 30, 2008
Eight reasons CIOs think developers are clueless
1. Developers Don't Think Practically
Developers often look for an elegant or slick solution to a problem, but they don't always look for the practical one.
2. Developers Still Don't See the End-User Perspective
"A development team can create an application that does everything from balance your checkbook to burning your toast, but if the user interface sucks, no one will use it-period. No amount of training or re-training will make users sign on to an application with a difficult UI. That simple concept seems to be a struggle for developers to understand."
3. Developers Can't Get Away from the "Wow" Factor
Developers love the "cool" or "wow" factor of applications. CIOs seek stability and standardization.
4. Developers Don't Think About ROI, TCO, and Other Business Priorities
"The developers have a limited number of tasks to do and can pretty much concentrate on one item. Many have spent their career focusing on the development of simple working units, not running a business."
5. Developers Don't Get the Underlying IT Value Proposition
The executives that CIOs have as customers are trying to get an answer, perform some function and get their jobs done. "IT to them is like electricity: they need it, but they don't appreciate it."
6. Developers Don't Have (or Want) Corporate Skillsets
"I think a survey would show that 80 percent of the CIOs that came up through IT to be a CIO came through the operations side."
7. Developers Aren't Into "Group Think"
"Each technical person is different and when asked individually you will find that they do not all share the group opinion, thus solving for the group's suggestions won't bring about all of the desired results."
8. Developers Don't Understand Staffing
One CIO says that developers think that profitable companies shouldn't have layoffs, which the CIO feels is clueless. "That's like saying as long as the flowers are growing, you shouldn't prune," the CIO says. "Efficient companies need prune back in areas they grow out of to preserve the strength of the overall company."
I don't agree with many of the above generalisations (are you surprised by that? :) ).
Some developers take a deep interest in a business, others may consider the work as just another job. That is not particular to developers.
It is in the interest of management to facilitate getting developers and end-users working closely togther as it usually results in better outcomes. However, in many highly hierarchical and/or highly political work environments it is common practice for managers to keep developers and end-users apart so that all issues and decisions must flow through the manager; the manager often has an incentive (bonus, promotion, etc) to be seen as the driving force of an initiative.
I wasn't surprised by the suggestion that 80% of CIOs come up through the operations side of the businesses.
It's often useful to consider the other point of view :)
Tsunami Invisibility Cloak
A really exciting invention is the above water "invisibility cloak". Based on research with bending waves of light around an object to make the object invisible, the same principles have been applied to bending waves of water around an object.
This technology could be applied on a medium scale to protect things like oil rigs from Tsunamis, and I wonder if a large variation of this could protect small islands?
The US government is behind the Nigerian email scam!
From: Henry Paulson
Date: 9/23/2008
Subject: Urgent transaction - need your helpBright Greetings Dear American:
I need to ask you to support an urgent and important business relationship with a transfer of funds of great magnitude.
I am Ministry of Treasury of the Republic of America. My country has had a crisis that has caused the need for a large transfer of funds of 700 billion dollars US. If you would assist me in this transfer, it would be most profitable to you.
I am working with renowned Mr. Phil Gram, lobbyist for UBS, who will be my replacement as Ministry of Treasury in January. As a Senator, you may know him as the leader of the American banking deregulation movement in the 1990s. This transaction is 100% safe.
This is a matter of great urgency. We need a blank check. We need the funds as quickly as possible. We cannot directly transfer these funds in the names of our close friends because we are constantly under surveillance. My family lawyer advised me that I should look for reliable and trustworthy person who will act as a next of kin so the funds can be transferred.
Please reply with all of your bank account, IRA and college fund account numbers and those of your children and grandchildren towallstreetbailout@treasury.gov so that we transfer your commission for this transaction. After I receive you’re information, I will respond with detailed information about safeguards that will be used to protect the funds.
Wonderful salutations to you cherish friend from Republic of America.
Yours Faithfully,
Minister of Treasury Paulson
Tuesday, September 16, 2008
Using your mobile phone to automate proximity computer actions
Integrating it with a clock and calender could lead to other possible applications such as auto-emailing people when you are headed to a meeting, emailing/IMing the wife when you are heading home, etc.
Anti-Theft Lunch Bag Deters Sandwich Thieves
It reminds me of people I've met in the past who write disgusting things all over their favourite basketball or make their bikes ugly to deter people from stealing them.
I wonder if there are benefits to uglifying code? Hhhmmm...
Saturday, September 13, 2008
US election hots up: Palin in a bikini, Battlestar Galactica stars enter the race
Last year it looked like Bush and Cheney would ignore the constitution and make run for a third term.
Recently McCain made a bold choice in selecting a young-ish, female, gun-toting outsider as his Vice Presidential running mate.
And now inspired by McCain's Vietnam war experiences and hard line on terrorism a couple of the characters from Battlestar Galactica have thrown their hat into the ring.
Monday, August 25, 2008
Nearly Half of Employers Have Caught a Lie on a Resume
- Claimed to be a member of the Kennedy family
- Claimed to be a member of Mensa (duh!)
- Claimed to have worked for the hiring manager before, but never had
- Claimed to be the CEO of a company when the candidate was an hourly employee
- Listed military experience dating back to before he was born
- Included samples of work, which the interviewer actually did
- Claimed to be Hispanic when he was 100 percent Caucasian
- Claimed to have been a professional baseball player
Just as interesting are the keywords that employers use to search for candidates (SDLC, e-commerce and n-tier are no longer in vogue!):
- problem-solving and decision-making skills (50 percent)
- oral and written communications (44 percent)
- customer service or retention (34 percent)
- performance and productivity improvement (32 percent)
- leadership (30 percent)
- technology (27 percent)
- team-building (26 percent)
- project management (20 percent)
- bilingual (14 percent)
Build your own Charging Station
What is a charging stand? Its a place where you can plug in all your gadgets for charging overnight.
If you think about it a "typical" family has lots of gadgets, say a mobile phone for every member of the family, mp3 players, gameboys, iPhone for daddy, portable DVD players, laptops, etc. Instead of having chargers lying all around the house I could see a dedicated charging station as a useful way to tidy things up.
As one of the comments to the above charging station points out all of the chargers draw power even when their gadgets are not plugged in, so it would be a useful improvement if the charging station turned off when no gadgets are connected.
The Agile Elevator Pitch: It's all about Low Risk
You see, agile means you don't get everything you wanted.
The remark surprised me since this manager had been heavily involved in the planning of the application, including prioritising which functionality got built every sprint.
This got me to thinking once more how I often have to describe agile in 30 second "elevator pitches" to non-technical people. In the past I've tried to describe agile using terms like "hyper-productive environments" and "delivering increments of functionality", but that never seemed to convey the meaning behind agile. More and more agile seems to me to be all about risk, so I think my elevator pitch is evolving into something like:
Agile is a set of low risk practices for delivering working software within the usual constraints of project management (scope, resources, time and quality).
What do I mean by low risk? The opposite of high risk :) High risk practices include spending too much time on analysis, not recognising that requirements will change as people get a chance to interact with the application, trying to build a complex solution based on possible future requirements instead of just what you need for now, putting people in strict roles instead of allowing them to freely interact with each other, and many more. Of course a project may still succeed using high risk practices, it just has a lower probability of doing so.
So back to the remark that started this train of thought. How would I respond to "agile means you don't get everything you want"? Simply: Regardless of whatever practices or methodologies you use you are still constrained by the usual project management variables (scope, resources, time and quality). Agile or not you will have to make choices.
Tuesday, August 19, 2008
Thursday, August 07, 2008
Verizon gives someone the Libshitz
The sad story of Herman Libshitz who, when he tried to upgrade from AT&T dial-up to Verizon DSL, was told by Verizon they couldn't do it because his last name contained a naughty word. It turns out their account software had some sort of profanity filter, so Verizon managers suggested Mr Lipshitz deliberatley mis-spell his name instead of going to the effort of requesting the development team in India make a change to the account software.
As a side note, I've often hoped for the opportunity to write a profanity filter. The actual implementation should be just a basic list matching algo, but it will be fun putting together a list of profane words, variations (e.g. one of two character differences), multiple languages, etc!
Buzzword Survivor - 36 hours straight of meetings!
Wednesday, August 06, 2008
DoubleClick (Google) to serve ads using Silverlight
Sunday, July 27, 2008
Completion Bonds for software projects
A completion bond, also known as a completion guarantee, is a legal undertaking by the guarantor to the film's financier(s) that the film will be completed and delivered to the specification agreed (i.e. based on the agreed script, featuring the agreed principal cast, being of roughly the agreed length etc.), by the date agreed in their contracts with the producer and within the agreed budget. The guarantor works closely with the films producer and may "step in" (take over) one or more aspects of the film if things are not going according to plan. Corrective action could involve anything from minor tweaks to the budget to bringing in a new director. In the worst case the guarantor will repay the film's financiers, but usually it is usually in everybody's interests to deliver a film, even if it does not meet the full original vision. The guarantor of course charges a fee, which is typically 4% - 6% of the film's budget.
As a side note, big budget Hollywood films are "self-guaranteed" :)
It is interesting to contemplate if such a bond could work for IT projects. Some of the pros I can think of:
- Assuming you can find a guarantor with enough IT experience, the guarantor can validate whether the scope/budget/deadlines of the project are realistic or not. (If they are not realistic then the guarantor will sell the bond for a very high price!)
- Many financial clients would be comfortable with the concept of insurance and terms like "strike price" ("production price")
- A guarantor would have the authority to force the hard decisions to keep a project on track
- I could see the temptation for a guarantor to mainly tweak the budget, rather than guiding major aspects of the project (depends on the skill set of the guarantor I guess)
- Giving regular updates to the guarantor could add significant overhead to small (3-5 people) projects
Saturday, July 26, 2008
Using multi-threaded javascript to simplify AJAX
For example, a typical asynchronous XMLHttpRequest (AJAX) flow that looks something like this:
var req = new XMLHttpRequest();
req.open("GET", url, true);
req.onreadystatechange = callback1;
req.send(null);
function callback1() {
if (req.readyState == 4) {
if (req.status == 200) {
alert(req.responseText);
} else {
alert(req.statusText); // Error
}
}
}
could alternatively be implemented in a synchronous way like so:
<script type="text/javascript" src="Concurrent.Thread.js"></script>
<script type="text/x-script.multithreaded-js">
var req = Concurrent.Thread.Http.get(url, ["Accept", "*"]);
if (req.status == 200) {
alert(req.responseText);
} else {
alert(req.statusText);
}
</script>
The synchronous code appears more compact, which could help make large application more readable.
How does Concurrent.Thread implement multi-threading in single threaded browser JavaScript engines? By simulating threads with time slicing.
Any downsides to using Concurrent.Thread? I suspect it will be a little slower due to simulating threads. It is also a very large download at 500k! (gzip it!)
Friday, July 11, 2008
Agile Smells - Do you need agile deodorant?
Let me contribute a few other smells I've come across:
"Can you change that estimate? / Can you revise the remaining estimates DOWN?"
This is a variation of Executive Pressure. After a few sprints the teams velocity stabilizes and it becomes clear the hoped for project deadline can not be met. Instead of adjusting the usual project management variables - time, scope, resources (and quality, although quality should be the last variable to be sacrificed) - the initial reaction is to apply pressure to the developers to work longer hours . In most cases it was not the developers who set the original project deadline. A more constructive approach is to and adjust the usual variables as the project progresses.
Sign-Off
"You can't change your mind. It's been signed off!" You're still thinking waterfall. Accept that the business owners will change their minds - for any number of reasons - even after the corresponding story has been completed. Any changes become a new story, which of course has to be prioritised.
"What is a chicken?"
Although people may say they have committed to using agile it is often not a priority for them to do some basic reading on the subject. For example, I've lent people the very thin and straight-to-the-point Agile Software Development with Scrum, but if a few days later they can't tell me the story of the Chicken and the Pig then I know they are not that interested in the subject.
150 Funniest Resume Mistakes, Bloopers and Blunders Ever
- “Career break in 1999 to renovate my horse”
- Hobbies: “enjoy cooking Chinese and Italians”
- Candidate wrote résumé as a play - Act 1, Act 2, etc.
- “Skills: Strong Work Ethic, Attention to Detail, Team Player, Self Motivated, Attention to Detail”
- Why Interested in Position: “to keep my parole officer from putting back me in jail”
- Experience: “Have not yet been abducted by aliens.”
- “Consistently tanked as top sales producer for new accounts.”
- “It’s best for employers that I not work with people.”
- “Personal interests: donating blood. Fourteen gallons so far.”
- Skills: “I have technical skills that will take your breath away.”
- Accomplishments: “Brought in a balloon artist to entertain the team.”
- Personal: “My family is willing to relocate. However not to New England (too cold) and not to Southern California (earthquakes). Indianapolis or Chicago would be fine. My youngest prefers Orlando’s proximity to Disney World.”
- Background: “28 dog years of experience in sales (four human).”
- Objective: “I am anxious to use my exiting skills.”
Thursday, July 03, 2008
Google/Yahoo! may soon be able to "search" your Flash applications
Those Search Engine Optimization (SEO) consultants you've hired to look over your website probably told you to go easy on the Flash animations. But that may be about to change. Adobe announced a couple of days ago that they will be working closely with Google and Yahoo! to provide technology to extract indexable content from Flash files:
"...We are giving a special, search-engine optimized Flash Player to Yahoo and Google which is going to help them crawl through every bit of your SWF file. This Flash Player will act just like a person would in some cases. It will click on your buttons, it will move through the states of your application, get data from the server when your application normally would, and it will capture all of the text and data that you’ve got inside of your Flash-based application..."
That sounds pretty grand. Google have posted a more down-to-earth explanation of what they expect to index from Flash files, which includes text-based stuff like blocks of text and URLs. (You can hide text from Google by turning it into an image :))
So how do you get your Flash-heavy site to the top of Google? Nobody knows since the Google rank algorithm is proprietary and constantly being tweaked. [NOTE TO SELF - Which reminds me, I must get around to doing a blog post on SEO since I've seen many clients come up with a grand vision for a website, only to have to make radical changes once SEO is considered.]
Equally interesting is the fact that Microsoft was not mentioned in the press release. Was Microsoft given the opportunity to participate? Did they not want to participate as that may give Flash an advantage over their own Silverlight RIA technology? Or maybe Microsoft are interested in promoting a non-keyword based way to search.
Saturday, June 28, 2008
Is Iona finally in the deadpool?
Iona was an early implementer of CORBA in both the C++ and Java spaces with their Orbix product. Typical of early implementations of new technologies they did proprietary extensions to fill obvious gaps in the CORBA specs, and just as typical of early implementors they got lazy and failed to keep up with cleaner ways of doing things as the specs evolved. gggrrrr. Orbix became one of those license fee legacy cash cows.
I got some perverse enjoyment replacing Orbix with the open source omniORB (solid as a rock!) whenever I had the chance. Its poor performance inspired a colleague and myself to begin writing a "real-time" ORB, but we never finished the product.
On a scary note I mentioned the Iona acquisition to a mid-level developer colleague of mine and he asked "What is CORBA?". I'm getting to old for this sh... shell scripting.
Although Iona is no more I'm sure Orbix will live on in legacy systems for a while. We'll meet again :)
UK students "outsource" their IT coursework to India
"A-level and university pupils are logging onto computer coding websites and farming out their work to foreign IT graduates...
The majority of these students are studying an IT-related course and about one third are from the UK.
Students contract their work to the lowest bidder, with prices ranging from £5 for simple undergraduate coursework, to £100 for postgraduate dissertations...
Lancaster and fellow City lecturer Robert Clarke are calling on the government to set up a national database of university assignments so they can be matched against contract requests on coding websites and traced back to students."
Saturday, June 21, 2008
Yahoo! Rezinr - a Do-It-Yourself Resignation Letter
Never mind the email Spam, watch out for the SPIT (SPam over Internet Telephony)
Semi-related: DIY Wiretapping (including recording VoIP calls).
Friday, May 30, 2008
The end of the set-top box, powered by Java (true2way)?
The hardware interface is governed by the CableCard standard, and true2way is the Java-based middleware software used to control services.
True2way was previously known as OpenCable. true2way specs, Java sdk, etc are here; developer community site here.
The real goal behind these standards is to prevent any one set-top company from dominating and dictating to the cable companies. Currently Motorola and Scientific Atlanta (owned by Cisco) are the two leading set-top providers in the US.
I'm curious to see if adoption of these standards will create a market for small content providers, or will the cable companies who control the "gateways" to your TV restrict access like the telcos did when they adopted WAP? Or will the convergence of PC/Internet/TV kill cable?
Thursday, May 29, 2008
Reduce your server load by using Google hosted open source javascript libraries
If you are using one of the common open source javascript libraries like Dojo, prototype or jQuery you'll have to bundle a copy of said library with your application, which of course will be downloaded to the browser from your website because browsers are not smart enough to realize that "I already downloaded and cached Dojo version 1.1 from another website I looked at recently".
Wouldn't it be great if a company with a reputation for high availability and lots of bandwidth hosted some of the common javascript libraries so that your website and others could benefit from caching? Well, Google AJAX Libraries API provides such a service. A downside of course is that Google could track some of the users of your website :)
Real-time stock quotes soon to be free over the internet?
Then along came the internet and you could get real-time quotes for a fee from your broker's website or for free with a 15-20 minute delay on sites like Yahoo! Finance and money.cnn.com.
Now, Bats Trading, one of the larger ECN alternatives to the NYSE and Nasdaq has agreed to stream real-time quotes direct to Yahoo! Finance.
Gotta love competition in big markets like the US :)
Update: Now the Nasdaq have agreed to provide real-time quotes to Google Finance, the Wall Street Journal, CNBC and Xignite.
Sunday, May 25, 2008
Cisco Etch - a replacement for SOAP, or just another CORBA? And why is there still no binary protocol version of SOAP?
- RPC protocol without the compatibility and complexity issues of SOAP
- Mappings across many langauges (C# and Java to begin with, Python and Ruby later)
- IDL based
- IDE support
In a testbed environment where SOAP was managing around 900 calls a second, Etch generated more than 50,000 messages in a one-way mode, and 15,000 transactions with a full round-trip, company officials stated.
Although not mentioned in the article I'm willing to bet Etch is a binary protocol (implied by performance and Cisco's network heritage). So if it is cross-language, IDL based and binary, what is the difference between Etch and CORBA?
The performance of SOAP is something that constantly disappoints me whenever I develop a large-scale web service. After many years debating the topic the SOAP standards people still haven't come up with a binary version. Because text based XML is a 'standard' there is little you can do to boost SOAP performance other than throw more hardware at it, usually by running many instances of the web service.
I haven't had the cash to try xml hardware acceleration :)
Microsoft have a proprietary .NET-to-.NET binary version of SOAP, and Hessian is a notable open source binary SOAP (benchmarks here).
When I get the time I'm curious to see if the VTD-XML parser can help boost application performance. The doco for this project implies that the author first tried to patent his XML parsing techniques and sell them to the likes of Sun, but for some reason nobody bought it. Now the author has released C, Java and C# implementations under the GPL license, but he won't release the source code :)
Thursday, May 22, 2008
Build your own Java CMS?
My thoughts on CMS have been drifting towards a CMS core that is only a core, much like Lucene is just a core search engine without being tied to a particular UI or data store. Today I might have stumbled across such a CMS core - riotfamily.org. I'll definitely look into it in more detail.
The downside of using a core is, of course, that you have to build supporting infrastructure around it - which is no big deal for someone like me who writes custom applications for a living :)
The CMS Matrix has a pretty extensive comparison of CMS products.
Moody's coding error gave AAA rating to CPDOs?
The story sounds a little suspicious to me (I smell a scapegoat) because Standard & Poors, the other major ratings agency, gave the same AAA rating to the instruments. Did both agencies "arrive" at the same rating under pressure by various financial institutions? (It takes rating from two agencies before a new instrument can be traded.)
If the subprime crisis hasn't already reminded people that you can't blindly trust the ratings agencies...
Thursday, May 15, 2008
eBoostr - bring Vista's ReadyBoost and SuperFetch to XP
The eBoostr software allows you to use a USB drive as a memory cache. As a number of people have commented, for the price of the software ($39) plus the cost of the USB drive you could get on board memory for cheaper. However, I might have a use for this: In the past some of my clients have been reluctant to supply PCs with enough memory to run a full development environment (e.g. Java + Eclipse + JBoss + MS Office) , so instead of making an issue of it a nice solution would be to install eBoostr :)
Speaking of USB drives, I'm tempted to try out MojoPac which allows you to carry around your own XP data files, applications and environment on a USB drive :)
Google Doctype - web developer resource encyclopedia
Google Doctype is an encyclopedia for web developers, containing pretty complete HTML, DOM and CSS references as well as some useful javascript snippets and HOWTOs on security, style, DOM manipulation, etc.
If you have a Google account you can also hit the Edit link, wiki style :)
I'll have to try out this reference with my next web project. I looks like it could save my time trawling through the verbose w3c specs or the poorly designed (but still useful) w3schools site.
Tuesday, May 13, 2008
Who is the Fifth Cylon?
Of course it can't be one of the Centurions from the original series...
And it can't be one of the new Centurions...
And allegedly it is someone who is not in the "last supper" promo picture...
My money is on either Baltar (or else they better explain those hallucination sequences with the Six) or Rosiland. But I love the theory that everyone is a Cyclon except for the tribe that originally fled to Earth :)
Monday, April 28, 2008
Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords
Tuesday, April 08, 2008
Microsoft release XAML/WPF Specifications
The specs are released under the Microsoft Open Specification Promise license, which basically says that if Microsoft has a patent on a covered specification, then the patent will never be enforced against any implementation of said specification.
Wednesday, March 19, 2008
FlatWire : Wire your house without drilling holes in the wall
Wednesday, March 12, 2008
CSS tricks that target specific browsers
Any good web designer will tell you the "proper" way to lay out web elements is to use DIVs and SPANs and CSS instead of TABLEs.
CSS, however, does have its challenges since different browsers render CSS differently.
Right now the three major browsers by market share are IE6, IE7 and Firefox 2. Firefox and IE7 render CSS pretty much the same way (more standards compliant), while IE6 often does its own thing. The good news is that if you can get a page to render the same in IE6, IE7 and Firefox then the page will probably look the same in other browsers such as Safari and Opera.
No matter what you try, however, it is sometimes impossible to use the same CSS for IE6, IE7 and Firefox. However, although it can get a little messy, there are some CSS syntax tricks you can use to apply specific styles to specific browsers.
Before we talk about those tricks, however, lets talk about the different rendering modes used by browsers.
Quirks mode and Standards mode
In the beginning Internet Explorer was playing catch up to the disruptive technology that was the Netscape browser. IE added many IE-specific features and only half-heartedly supported new web standards like CSS and XHTML. Netscape too was also slow to adopt the w3c standards. Eventually IE killed off Netscape. Microsoft was then left with a choice: Do they change IE to render according to web standards, thereby breaking many web sites that came to rely on the pre-standards way IE rendered, or ignore w3c standards?
Microsoft decided to support both. The old rendering was dubbed quirks mode while the new rendering was dubbed standards mode (sometimes called strict mode).
Similarly Mozilla, the successor to Netscape, also supports a quirks mode and a standards mode.
So how does IE and Firefox know which mode to render a page in? By default it is assumed a page should be rendered in quirks mode, unless the HTML 4+ or XHTML 1.0+ doctype appears at the top of the page, in which case the page will be rendered in standards mode. e.g.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Hello Title!</title>
<link rel="stylesheet" type="text/css" href="hellostyle.css" />
</head>
<body>
<div class="hello">
Hello Style!
</div>
</body>
</html>
Wikipedia has an excellent table showing doctypes and how they effect the rendering mode of various browsers.
To make matters more complicated IE7 is more standards compliant than IE6 but still not as compliant as it should be; in other words IE7 has an "almost-standards" mode.
For the upcoming IE8 Microsoft are still skittish about making IE more compliant and "breaking the web" that relies on existing IE rendering behavior, so they plan to have a quirks mode, an IE7 almost-standards mode and an IE8 standards mode. IE8 standards mode will be the default standards mode in IE8. To trigger IE7 standards mode in IE8 the web page must contain the HTML or XHTML doctype and an additional META tag specifying IE7. e.g.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Hello Title!</title>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link rel="stylesheet" type="text/css" href="hellostyle.css" />
</head>
<body>
<div class="hello">
Hello Style!
</div>
</body>
</html>
So, on to some CSS tricks.
Update: Joel has an opinion on IE8 and its standards mode. I wouldn't be too surprised if his prediction about the IE team reversing at the last minute the decision to make IE8 standards mode the default given the number of websites that currently look ugly in IE8.
Update 2: Yes, it looks like MS have broken the standards mode promise with the release of IE8 beta 2. Compatibility Mode is the default, and if a web page is marked as standards compliant then IE will show a "broken page" icon :(
Internet Explorer Conditional Comments
Introduced in IE5, conditional comments are an IE-specific hack to standard HTML comments that allow IE to render part of an HTML page if the specified version matches, while all other browsers will ignore what is inside the HTML comment.
For example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Hello Title!</title>
<link rel="stylesheet" type="text/css" href="hellostyle.css" />
<!--[if IE 7]>
<style type="text/css">
body {
background-color: #00AA00;
}
</style>
<![endif]-->
</head>
<body>
<div class="hello">
Hello Style!
</div>
</body>
</html>
All browsers will read styles from the file hellostlye.css, while only IE7 will override the body background color.
While this can be useful, conditional comments only work inside HTML files. What would be more useful is conditional behavior inside CSS files or style blocks.
Internet Explorer: The Underscore Hack and the Asterisk Hack
Let's set up a CSS example.
Say we have an HTML file with the following contents:
hellostyle.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Hello Title!</title>
<link rel="stylesheet" type="text/css" href="hellostyle.css" />
</head>
<body>
<div class="hello">
Hello Style!
</div>
</body>
</html>
and a companion CSS file with the contents:
hellostyle.css
.hello {
text-align: center;
background-color: #FF0000;
*background-color: #00FF00;
_background-color: #0000FF;
}
If you are familiar with CSS you'll understand all of the syntax except for the "*" and "_" in front of the background-color properties. What do they do?
The CSS specs say that browsers should read any property names they know about and ignore any property names they don't know about. In the above CSS the spec compliant browsers know about a property named "background-color" but don't know about properties named "*background-color" and "_background-color".
To cut a long story short, the Internet Explorer CSS parser is overly aggressive at trying to discover the names of properties and will in fact ignore leading non-alphanumeric characters. From my testing this appears to be the case from at least IE5 onwards.
It became convention amongst web developers to used an underscore in front of property names when targeting CSS for IE, although any non-alphanumeric character will work. However, the CSS 2.1 spec made underscore a valid character in a property name, so IE7 specifically removed underscore from their aggressive parsing. From IE7 onwards web developers have been using an asterisk instead of an underscore when targeting CSS at IE, although any non-alphanumeric character will do. Interestingly, the removal of the underscore hack in IE7 allows you to target CSS at pre-IE7 (using underscore) and post-IE7 (using asterisk or some other non-alphanumeric character) browsers.
So with this background knowledge here is how the above CSS would be interpreted by different browsers:
- Firefox, Opera, Safari and all non-IE browsers would correctly parse "background-color", fail to parse "*background-color" and "_background-color", and will set the background color of the div with class "hello" to red.
- IE6 and earlier versions of IE will successfully parse "background-color", "*background-color" and "_background-color". The background color value will come from the last successfully parsed property, so the background color of the div with class "hello" will be set to blue.
- IE7 and later versions of IE will successfully parse "background-color", "*background-color" but fail to parse "_background-color". The background color value will come from the last successfully parsed property, so the background color of the div with class "hello" will be set to green.
IE8 CSS Extensions
Microsoft have listed the CSS extensions available with IE8. The main change is that previous IE-specific extensions will now be required to be prefixed with '-ms-'. e.g. "overflow-x" now becomes "-ms-overflow-x".
Firefox CSS Hacks
There are plenty of CSS hacks for IE, but what about Firefox?
I've found one hack that allows you to target Firefox 2 or Firefox 3, but some versions of IE also pick up the CSS intended for Firefox. Extending our CSS file above:
.hello {
text-align: center;
background-color: #FF0000;
*background-color: #00FF00;
_background-color: #0000FF;
}
/* Target Firefox 3 */
.hello, x:-moz-any-link, x:default {
background-color: #FFFFFF;
}
/* Target Firefox 2 */
.hello, x:-moz-any-link {
background-color: #FF00FF;
}
In Firefox 2 the background color of the div with class "hello" will be pink, but strangely it will also be pink in IE5 and IE7 (they will pick up the last CSS property intended for Firefox), and blue in IE5.5 and IE6 (they don't pick up the CSS intended for Firefox).
If you find any Firefox CSS hacks that will only be applied to Firefox please let me know.
The closet thing to official CSS extensions for Firefox is here.
Other Browser CSS Hacks
http://www.webdevout.net/css-hacks contains a good summary of the known CSS hacks.
Useful Tools to test Browser Rendering
If you have IE7 installed but want to test earlier versions of IE then use Multiple-IE to install and test standalone versions of IE from IE3 to IE6.
If you have IE6 installed and want to use IE7 then try IE7s. Beware that, at the time of writing this blog post, pop ups and combo boxes don't work in IE7s.
Firebug is a Firefox add on that allows you to, amongst many other things, inspect and change CSS on-the-fly.
Internet Explorer Developer Toolbar provides similar functionality to Firebug for IE.
Friday, March 07, 2008
ADO connection string reference
Tuesday, March 04, 2008
Powerpoint Karaoke
(This craze was invented by Holm Friebe (Zentrale Intelligenz Agentur) and held for the very first time in Berlin on January 25th, 2006.)
You can use the Slideshare Karaoke webapp to randomly choose from public domain presentations.
What will those wacky Germans think of next? MS Project Karaoke, where somebody makes up tasks and dates for a project? Wait, that's called project management...
How to answer the "What salary are you looking for?" interview question
Another tough question is when they ask you what salary you want for the job. This article offers some good advice on how to negotiate salary:
The right answer to the question, “What’s your salary range?” is almost always some version of “I’m not telling you.”
The person who gives the first number sets the starting point. But if that’s you, you lose... The more times you can fend off the question, the less likely you will have to be the one to give the first number...
What did you make at your last job?
“This position is not exactly the same as my last job. So let’s discuss what my responsibilities would be here and then determine a fair salary for this job.” It’s hard to argue with words like “fair” and “responsibilities”—you’re earning respect with this one.
What are you expecting to make in terms of salary?
“I am interested in finding a job that is a good fit for me. I’m sure whatever salary you’re paying is consistent with the rest of the market.” In other words, I respect myself and I want to think I can respect this company.
I need to know what salary you want in order to make you an offer. Can you tell me a range?
“I’d appreciate it if you could make me an offer based on whatever you have budgeted for this position and we can go from there.” This is a pretty direct response, so using words like “appreciate” focuses on drawing out the interviewer’s better qualities instead of her tougher side.
Why don’t you want to give your salary requirements?
“I think you have a good idea of what this position is worth to your company, and that’s important information for me to know.” Enough dancing–this is one last attempt to force you to give the number first. Hold your line here and you win.
Tuesday, February 19, 2008
Will using ASP.NET MVC confuse developers?
David Heinemeier Hansson, the creator of Ruby on Rails, says: "The proposed MVC extensions to ASP.NET bear more than a striking resemblance to the way we implemented things in Rails. That's, of course, flattering to have a giant like Microsoft attempt to copy many of the ideas that we've been championing for years now, but they do appear to be a little late to the party."
Joel Spolsky, author of the popular Joel on Software blog and the man responsible for integrating Visual Basic into Office, adds: "It’s clear that the ASP.NET team is trying to clone some of the popular benefits of Ruby on Rails. I’m disappointed that Microsoft forces you to choose whether your app is MVC or not before you write the first line of code. It’s a very different way of organizing code than traditional ASP.NET, and the way it looks now in the CTP [Community Technology Preview], it’s going to confuse new developers who now have one more decision to make about how to build an ASP.NET site. It does address one of the weaknesses of ASP.NET, which was how to organize large sites."
Oh, and you have to upgrade to IIS 7.0 in order to use ASP.NET MVC.
Digital photo frames contain viruses????
Long term the only viable solution is probably to print out the photos onto decent quality photo paper.
Short term I have been considering buying some digital photo frames, loading them up with photos and sending them to family members - until I found out some hackers have managed to load viruses onto photo frames that are sold in large US chain stores.
Friday, February 15, 2008
Wednesday, February 13, 2008
World-wide Outsourcing Pay Rates
Wednesday, February 06, 2008
Kerviel is not a computer genius?
A few things of note in the article:
- Kerviel was a junior trader, supposed to be doing riskless arbitrage, not making large bets.
- Kerviel worked in the risk management department, so he may have been able to explain away some of his fictious trades as "we're working on the reports right now, the numbers in them are not quite right".
- Being part of the risk management department he might have also had direct access to systems or been told "super user" passwords, allowing him to bypass security.
Update: It appears Mr Kerviel was able to commit the fraud with low-tech techniques like using his colleagues' access codes, sending fake emails used to open accounts and disabling warning systems that might have alerted people to what he was doing (probably just by hacking the production spreadsheets). We'll see if he can develop a fool-proof way to prevent others from using similar techniques at his new computer security consultancy job :)
Thursday, January 31, 2008
Amazon "cloud" web services use up more bandwidth than Amazon.com
Adoption of Amazon Elastic Compute Cloud (EC2) and Amazon Simple Storage Service (S3) continues to grow. As an indicator of adoption, bandwidth utilized by these services in fourth quarter 2007 was even greater than bandwidth utilized in the same period by all of Amazon.com’s global websites combined.
Build your own operating system in .NET with Cosmos
The magic happens by compiling .NET CIL bytecode to x86 assembly.
The core is written in C#, but you should be able to use any .NET language to add your own extensions.
You can deploy your build as an ISO or PXE, or run it under a number of emulators like QEMU, VMWare and VirtualPC.
The project is still in the early stages, providing just console interaction. Future releases will add PCI enumeration, Ethernet, TCP/IP, extended file system support and maybe even GUIs.
UPDATE: There appear to be a couple of competitors, the open source SharpOS (very, very early stages) and Microsoft Singularity (available only to academic institutions).
Monday, January 28, 2008
Web service to clean your computer screen
(Original link was here, but I guess the site got too much traffic and was removed.)
Alternative Dictionaries
- Reverse Dictionary - describe the concept to get the word. Checkout the matches for "computer programmer"
- Visual Dictionary - click on the images that describe the category, etc, drill down to the word
- Abbreviation and Acronyms Dictionary - checkout the matches for CEP
Sunday, January 13, 2008
How long does is take to get from "Here" to "There"? 7 hours 51 minutes
(This trivia courtesy of Digg)