RSS ? Recent Blog Posts

Blogs ยป Archive for April, 2005

Ten good practices for writing JavaScript in 2005

by Stuart Langridge

Bobby van der Sluis has put together a guide to Ten Good Practices for Writing Javascript in 2005. I suspect that most of my readers here will already know that we should be doing this stuff: Bobby talks of making your pages accessible using unobtrusive Javascript, writing scripts that are easy for other developers to apply, future-proofing your work with object detection. This is all sensible stuff; read his article for more. The key point is that there is a difference between knowing that we should be doing this stuff and actually doing it. All too often I find myself quickly and temporarily chucking in an onclick attribute on a tag, rather than attaching the event handler properly from JavaScript, and I’ll bet a nice shiny Bank of England pound that I am not alone. Using proper techniques, rigorously, does make the initial construction of a project a bit more complex, a bit more laborious. It’s (and you know this bit as well) when you come back to it in six months and you have to walk through the HTML fixing it to add new functions that you’ll think: I wish I did this properly the first time around.

That is, …

 

Character Encodings and Input

by Thomas Rutter

Ever run your database-driven PHP site through an HTML validator and encountered an error message such as this?

Line 9, column 3: non SGML character number 145

Even worse, have you ever run your XHTML site through an XHTML validator as XHTML and encountered an error message such as this?

Sorry, I am unable to validate this document because on line 9 it contained one or more bytes that I cannot interpret as utf-8

If so, then you have the character encoding blues.

Text formats use character encodings to map characters to their binary representation. When using only characters in the ASCII range (US English), character encodings seem to ‘just work’. You may never even be aware of the character encoding you are using. This is because the ASCII characters are represented the same way in all of the popular character encodings used on the Web, so if you never need a foreign character you won’t ever encounter a problem. However, once you deviate from this common denominator of ASCII characters and start using characters from foreign languages, their representation in binary form may depend on the character encoding used, and if you get the encoding confused you can …

 

Panoramas Made Easy

by Alex Walker

This is pretty slick stuff.

Matthew Brown is a PhD from University of British Columbia who worked on Microsoft’s photo-stitch software as an intern over 2003/04.

He now applies the experience he gained there with his knack for AI to produce his own impressive ‘Autostitch’.

The demo is free at this stage (but possibly not for long).

Using it is so simple that there is almost no user interface. Grab your digital camera, walk out outside and spin around clicking off shots at random (50 is a good number to work with).

Then simply start ‘Autostitch’, go to ‘File/Open’, select all your pics (holding ’shift’) and click ‘Open’. About 20 seconds later the software has automatically matched every edge, shape and color and given you back a finished panorama. There are other options that can be adjusted, but the default setting is so slick I wasn’t motivated to change them.

My camera battery was dying, so I only had time to shoot about 20 shots for the test below — ideally it needs about double the data that I gave it — but the effect is still pretty impressive.

In short, if you can imagine yourself working on real estate, …

 

The Reverse Sell, Per David Sandler

by Andrew Neitlich

A good intro book to sales is David Sandler’s, You Can’t Teach a Kid to Ride a Bicycle at a Seminar. Sandler launched a franchise system that teaches people to sell. It’s a very expensive system, but many professionals say good things about it. Personally, I found it a bit “salesy” when I took it, and not as geared to building professional relationships as I would have liked. It was better for product sales or one-time sales, in my judgment.

However, the system includes some terrific ideas that make sales easier. One of them, which may come across as a bit gimmicky when you read it in his book, focuses on what he calls the reverse sell. The reverse sell is all about stepping back and not being too anxious to sell your services. At its best, it even means encouraging the prospect NOT to buy. For instance, “Well, it sounds like you aren’t interested in moving forward with me…”

I’ve found that this reverse sell works excellently when it happens naturally (not as a gimmick or technique). It lets the prospect believe they are in the driver’s seat, and also sets you up to be on equal footing with them (because …

 

Adobe aquires Macromedia

by Alex Walker

Not it’s not a joke. Adobe and Macromedia will be one.

“Adobe Systems Incorporated (Nasdaq: ADBE) has announced a definitive agreement to acquire Macromedia (Nasdaq: MACR) in an all-stock transaction valued at approximately $3.4 billion.”

How bizarre. It’s like your brother marrying your aunty — you may well be fond of both, but the thought of them ‘together’ is sort of… oogey.

Can this be legal? I thought there were anti-competitive laws that stopped direct competitors aquiring each other.

Other than Quark in page layout applications, this would put one company in control of the entire design software market and their data formats:

Multimedia/Director, Image Editing/Photoshop, Web Vector Graphics/Flash, Vector Drawing/Illustrator & Freehand, Web Design/DreamWeaver,
Publishing/PDF etc.

This can’t be good.

And exactly what is the ‘the complementary functionality of PDF and Flash’? They’re both software?

I’m sure we’ll be hearing a little more about this before the end of the week.

 

Making a dropdown with DOM scripting

by Stuart Langridge

Aaron Gustafson is putting together a series of articles on how to make select elements stylable. In essence, what his work does is take the select out of the DOM and replace it with a ul, and then add script and CSS to make that ul work like a dropdown list. The advantage this gives is clear to everyone who’s ever complained about how selects aren’t stylable! The series has only just started, and there are a few concerns — the new element can’t be tabbed to, and doesn’t respond to keyboard events — but Aaron promises that part 2 will cover accessibility issues.

The script uses similar techniques to the Suckerfish dropdowns, applying “hover” and “selected” classes to various parts of the ul to provide hooks for styling (since IE doesn’t support :hover on things that aren’t links). This should be a useful technique to watch!

 

WebBase Picks up Where Google Left Off

by Blane Warrene

The WebBase Project at Standford.

Google founders Larry Page and Sergey Brin spawned their world-class technology at Stanford and a new group has taken over and plan to focus on the development and testing of new algorithms for clustering, searching, mining, and classification of Web content.

The repository they are building is available to retrieve web pages from using online documentation. Additionally, one can run a local server that crawls web content and feeds it to the WebBase repository, a cool way to contribute if you have the bandwidth and server time available.

 

Back in the Saddle

by Andrew Neitlich

Well, some time in my schedule has unexpectedly freed up and I’ve re-committed to blogging for Sitepoint. Your kind words during my last blog were a factor, and I appreciate your support. And thank you to Sitepoint management for their support as well. So let’s get back into it.

Today let’s discuss a case study presented by a consulting client of mine.

He found that 20% of his design/development business was dedicated to small clients, while 80% was dedicated to bigger business. He hired someone to take on the smaller clients, but was finding that his service was slipping as more and more of those clients came to him. What should he do?

My advice:

1. He has a good problem, not a bad problem. Too much demand is a good thing and presents many opportunities.

2. Every professional, if they grow their practice well, reaches a point where they have the opportunity to move on to bigger clients or raise prices.

3. Providing bad service, even to smaller clients, is not a good idea. Word spreads fast, and will reach bigger clients.

4. I suggested to him that, since he has wisely hired someone to handle the smaller clients (leverage for him, assuming he makes a …

 

IBM Looks to Contribute to Firefox

by Blane Warrene

Reported through several outlets yesterday — IBM is looking to hire a developer for its advanced technology group who can contribute to the upstart web browser.

IBM is seeking to insure Firefox works with all of its applications across multiple platforms as well as shoring up its Workplace initiative. Workplace , which according to CNet IBM is spending $100 million on just to insure Linux computers can utilize it, is a project that brings IM, office suite and other applications to a central server through which users across various platforms access solely via web browser.

 

Free Stock Imagery

by Alex Walker

Robin is Good. Free is good. In fact, it’s all good with Robin Good’s impressive and exhaustive list of free stock photography archives. Not all are available for use in commercial work, but plenty are.

Although I’ve always assumed there would be plenty of free imagery out there if you were prepared to look, I think the most impressive part is the quality. Most of the sites listed are professionally presented and the stock they contain is mostly high quality.

In reality, it won’t replace the large commercial photo stock companies. The availble selection is probably still not wide enough to cover all situations, and the times when you need a very specific photo quickly, the large stock sites like Corbis and Creatas are still going to be your best bet.

Still, when all you’ve got to lose is time, it’s a nice place to start.

 

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.

The Web Site Revenue Maximizer
The Ultimate HTML Reference

Book: The Ultimate HTML Reference

The most complete and up-to-date HTML Encyclopedia money can buy.

Free eBook! Firefox Revealed