Friday, May 20, 2005

I have a love/hate relationship with those CAPTCHA tests on websites.  I understand why, and am fascinated at just how good the human mind is at pattern resolution.  Yet, they're additional typing.  Anything to foil a spambot I guess.

I was looking into adding a test into a project of my own, and I came across these references.  Examples of the first article are shown beneath it.

15 Seconds : Fighting Spambots with .NET and AI

This article explains how intelligent applications from Carnegie Mellon University and Berkeley researchers counter auto registration spam programs and how to build your own using ASP.NET & XML Web services.

 

A Generic CAPTCHA Image Tester

What's unique here is my implementation - it's generic enough to use in a classic ASP page, or in an ASP.NET page, it does NOT require the use of Session State, and that's what makes it more useful. The key here is that we use an aspx page to generate the image, and we simply make our image tag's src property point to this page.

The Code Project - CAPTCHA Image - ASP.NET

This article demonstrates how to create such an image and employ it within an ASP.NET web form.

The CAPTCHA Project Website - CMU School of Computer Science

CAPTCHA.NET is the homepage of CMU's CAPTCHA Project

Formshield is a free .NET CAPTCHA control available at http://dotnetfreak.co.uk/blog/archive/2004/11/06/166.aspx.

Many thanks to Kevin Gearing!  There are some samples as well--very cool.

FormShield started out as a simple project with just one aim - to prevent automated form submission using dynamically generated images.

Not exactly a new idea - dynamically generated images requiring the user to enter the text found on the image have been around for quite a while (see http://www.captcha.net/), preventing automated sign-ups to free e-mail services such as HotMail and Yahoo, and automated whois lookups on domain names on sites such as Network Solutions.

Whilst some code exists on Code Project (http://www.codeproject.com/aspnet/CaptchaImage.asp), there didn't however seem to be a free, easy-to-use and customisable control for ASP.NET with full designer integration that could generate the relevant images. So, looking for an excuse to delve into GDI+, FormShield was born and my idea of a 'simple' control was dropped...

Friday, May 20, 2005 8:35:51 PM (Eastern Standard Time, UTC-05:00)

This has been dragging on for a couple of years, and I'm glad to see the USPTO has come to its senses somewhat.  I'm no lawyer, but I would think having your patent overturned due to “obviousness” would sort of put a damper on all those IP lawsuits you've been filing:

Patent Office issues initial rejection of patent claims in PanIP suit

Following a reexamination, the U.S. Patent and Trademark Office has issued an initial rejection of claims in a patent it had earlier granted to technology developer Pangea Intellectual Property on payment processing technology used at e-commerce sites. It is one of two patents held by PanIP whose validity is being challenged by a group of 15 e-retailers PanIP had in a separate action sued, claiming it was due licensing fees. PanIP has since settled with those retailers. A second patent on which the retailer group, the PanIP Group Defense Fund, also is challenging PanIP still is under review by the Patent Office.

PanIP has two months to respond to the Patent Office’s Action document, says Jonathan Hangartner of Sheppard Mullin Richter & Hampton LLP, the retailer group’s attorney, who terms the preliminary findings “a critical first step.” However, overcoming the initial findings will be “very difficult for PanIP. The Office Action is very well reasoned and strong,” he says.

Hangartner notes that nine of the 10 individual claims in the patent were rejected on the basis of “anticipation” in “prior art.” That essentially means that the Patent Office examiner determined that every element that the patent holder claimed to originate actually predated the patent and could be found in a single reference, such as an article, according to Hangartner. The remaining claim in the patent was rejected on the basis of “obviousness,” meaning that most elements of the claim existed in prior art and that the remaining elements would have been obvious to someone skilled in the art.

“The Patent Office has rejected the 10 claims that we challenged. That means that if that rejection holds throughout the process, the result will be the patent itself is invalid,” Hangartner says. The attorney representing PanIP, Kathleen Walker, said that while the action is ongoing, PanIP would have no comment. “We have 60 days to respond and we’ll make the appropriate responses,” she said.

The group of e-retailers formed a defense fund at http://www.youmaybenext.com.

Update 2005-08-19: YouMayBeNect.com has not been active for a while, apparently, and the retail group has disbanded after their victory.  No peep from PanIP yet. 

Friday, May 20, 2005 8:29:24 PM (Eastern Standard Time, UTC-05:00)

As good as ASP.NET's adaptive rendering is, I sometimes find myself needing to do some fairly substantial client-side scripting.  I used to sniff browsers, but that was getting tedious, and most common scripts are written upside down anyway.

The best method I've seen is to use 'object sniffing'--testing browsers for support of different objects and methods.  This saves a considerable amount of time, since all browsers will fall into 3-4 categories of object support, and you don't have to parse out a zillion different browser types and subtypes and still run the risk of excluding one that may work on your site.

My guide was http://developer.apple.com/internet/webcontent/objectdetection.html.  The article is a couple of years old, but it's still useful to me today.

The pace of new browser releases may be slower than it was in the early days, but developers must still confront a bemusing array of browser versions and brands that support some JavaScript features but not others. To combat the problem, scripters commonly provide two or more code branches so that a browser follows an execution path containing statements that it supports. Browser sniffing — the task of inspecting navigator object properties for version information — has become largely unmanageable given the browser version permutations available today. This article presents details on an alternative solution — object detection — that frees JavaScript developers from most of this versioning mess.

I haven't played around with custom server controls, so I don't know how applicable this is for that purpose.

Friday, May 20, 2005 8:25:57 PM (Eastern Standard Time, UTC-05:00)

This article came up on the news today: Allowing Only Numbers in ASP.NET Textboxes.  In this article, Bipin uses a custom validator to enforce input.  I usually like Bipin's ideas, but this one seems to be a little more difficult than it needs to be.

I think there's a better way to do this--use a regular expression validator.  To test this, create a page, and add a textbox, regular expression validator, and a button.  For the validation expression, enter the following:

^[0-9]+$

Compile your page and test with some diffrerent inputs.

A quick explanation of the expression:
^ indicates the start of the input
[0-9] indicates a range of allowable characters.  You could do [0,1,2,3,4,5,6,7,8,9], but that's not lazy.
+ indicates 'match preceeding one or more times'
$ indicates the end of input

If you wanted to enforce a length of input, you could do something like:

^[0-9]{6,12}$

which would enforce a minimum of 6 characters and a max of 12.

I think regular expressions are too often overlooked, but they're very powerful and simple once you work with them a little bit.  For a good basic overview of regular expressions, check out

The Web Professional's Handbook

 

 

And a more in-depth RegEx reference in:

Pure JavaScript: 2nd Ed. (an absolute steal if you buy it used)

 

 

Regular Expressions with .NET [DOWNLOAD: PDF]

Downloadable e-bok in PDF format, from Amazon.

 

 

 

Mastering Regular Expressions, Second Edition (The Owl Book)

 

<edit>

Thinking about Joseph's comments below, one could extend Bipin's idea and use a regular expression instead of parsing the string and checking to see if each character is numberic or a period.  You could also add in a check to see if the field was blank, and save on the second validator.

</edit>

Friday, May 20, 2005 8:21:23 PM (Eastern Standard Time, UTC-05:00)
 Thursday, May 19, 2005

Using XP Pro on two different computers (Dell Dimension and Sony Vaio).  After installing a series of MS patches, my system hangs when I right-click on a file or shortcut.  I ripped all the patches off both computers, and right-click worked again (uninstalled them--forgot to set system restore point).  Put the patches back on the Dell, right click hangs the system.  Taking them off one at a time will be time consuming, but I'm about to start.

Anyone had similar problem that figured out which patch caused this, or how to fix the problem?  Taking them off one at a time will be time consuming, but I'll do it if I have to.  I used Windows Update on both systems.

Microsoft Workaround Fixes Problem!

After much Googling, I found two articles covering the issue (Windows XP right click gobbles up CPU time and Microsoft confirms XP right click memory hog problem) and the Microsoft KB Article Temporary Decline in Performance Occurs When You Right-Click a File or Folder in Windows Explorer.  Running a couple tests confirmed I was experiencing the same problem.  And, after following the workaround in the KB article, I can right-click again.

Thursday, May 19, 2005 9:23:11 PM (Eastern Standard Time, UTC-05:00)

Well, bummer.  I checked with Sierra Wireless today about installing Windows Mobile 5 on my Voq A11 SmartPhone, and here's their sad response:

The Windows Mobile 2003 Second edition is built in the phone, and it is not possible to upgrade the phone to Windows Mobile 5.0.

That's a real bummer.  This is one thing I dislike about devices with embedded OSs.  My Axim can't be upgraded to Mobile 2003, and now my SmartPhone can't be upgraded to Mobile 5.  But, the cost of the hardware is so high that it's impractical for me to buy a new device every couple of years.

Thursday, May 19, 2005 9:11:09 PM (Eastern Standard Time, UTC-05:00)

When my neighbors saw me mowing my lawn and listening to my iPod, I usually get asked which version is the best.  I have a feeling iPods are going to be popular Mother's Day and graduation gifts this year.  Anyhow, I ask a few questions about how the device is going to be used and make a recommendation based on that.  This is for my neighbors so I can get the yard done before dark.

(note: updated version at http://www.rjdudley.com/blog/Which+IPod+Is+Best+2005+Edition.aspx).

iPod Shuffle
This is the smallest iPod--roughly the size of a pack of gum--and comes in 512K (approx. 120 songs) and 1GB (approx. 240 songs) versions.  It's miniscule size and small capacity make this version practical only for working out or short commutes, IMHO.  Although 240 songs is enough for a full workday, and either model could store an audiobook or two, you won't have much variety from day to day, and the lack of a display makes choosing a specific song next to impossible.  Rearranging the songs on your device every day or so to provide workday variety kind of defeats the purpose of having a large capacity player, and I think the love of the device will be greatly reduced having to do so.  For a spinning class or even tae-bo session, this is the perfect model.  This model is flash-memory based, so there are no moving parts to damage during a high impact workout.

 

iPod Mini
For an average music collection, this is the iPod to get.  It's 2 in wide by 3.5 in tall, so it's very compact, and holds 4GB, or roughly 1000 songs.  1000 sings is far in excess of the playlist of any commercial radio station these days.  Because it's so small, this player can easily be used for a low impact workout, and it's larger capacity makes it practical for all-day use at the office and longer commutes.  This model has a display, so you can quickly navigate to the specific song, artist or playlist you want.  A number of audiobooks can fit on here for plane trips or long commutes, and still have room for a day's worth of music.  This player is hard drive based, so it's not a good idea to wear for high-impact workouts, since you could damage the drive platters.

20 GB iPod
If you have a large music collection, or love audiobooks, this is the model to get.  This version holds approx. 5000 songs, so there's plenty of room for large CD collections and audio books.  It's about the size of a deck of cards, so it could still be used while on a treadmill or a spinning class, but just a little large and heavy for other workouts.  Currently, the 20GB is the only original iPod offered--for larger capacities, you'll need to get an iPod Photo.  Although this is tagged as an “original“ iPod, it's actually a fourth generation (4G) iPod, which is the latest version.  There are plenty of other capacities in older versions available which will work just as well as the current version, but I definately don't recommend a used one.

 

60 GB iPod Photo
The 60 GB version holds approx. 15,000 songs or 25,000 photos (or some combination) and is also available in a 30 GB model (approx. 7500 songs or 25,000 photos, or some combination), although there are still some other capacities of slightly older models available.  The major difference is larger capacity and a color screen on which you can display photos.  Yawn.  If you have an absolutely gigantic audio collection, this is your model for capacity reasons only.  However, if you take a lof of digital photos, you can connect this iPod directly to your camera, and download photos right onto the device.  Very handy if you need a lot of storage when away from your computer.  The tiny screen is very sharp, but you're still looking at photos on something the size of a matchbook.  You can hook it up to a TV and show your vacation photos to your friends, but that's so last century--real men photoblog.  There is a rumor of a video-compatible iPod with Tivo-like capabilities.  If you want to watch stuff on your iPod, wait for that version.  There is a very good chance that the 60 GB model has a larger hard drive than your computer, so you'll be unable to store your complete music or photo collection on your computer, which is where you need to put it in order to get the stuff onto your iPod.  Even the 30 GB model probably exceeds the free space on your hard drive.  Unless you absolutely need the photo capabilities or larger capacity, I think th 20 GB original (above) is your better option.

No matter what version you buy, I definately recommend a protective case of some sort.  You're about to drop at least a couple hundred bucks, and you don't want butterfingers to destroy that purchase.

Thursday, May 19, 2005 9:06:37 PM (Eastern Standard Time, UTC-05:00)