Tuesday, February 24, 2009

ASP.NET AJAX and jQuery

Summary: Brief of the talk and presentation given to Sacramento .NET User Group, plus links to shared resources.

Thanks to all who attended my talk at Sacramento .NET User Group on Tuesday. In case you did not attend the event, the discussion focused on developing intranet applications using ASP.NET AJAX and jQuery. We covered the following topics:
  • Pros and cons of different technologies for building rich internet applications (RIA)
  • Introduction to ASP.NET AJAX and jQuery
  • ASP.NET UpdatePanel and UpdateProgress controls
  • Using UpdatePanel with data-bound controls (such as Repeater)
  • Pros and cons of using UpdatePanel with jQuery (and other alternatives)
  • Adding AJAX and jQuery to an ASP.NET applications (walkthrough)
  • Common problems and solutions for applications using ASP.NET AJAX, UpdatePanels, and jQuery
  • Demos and references (tools, tutorials, videos, and more)
I uploaded the presentation to SlideShare:


You can also download the original PowerPoint slides from Box.net.

To run the demo project, download the ZIP file containing the Visual Studio 2008 solution, extract the files, and open the solution (you will be prompted to create a virtual directory for the project).

UPDATE: The following article by Dave Ward explains the idiosyncrasy that I mentioned in the presentation (firing multiple events after partial postback) and offers ways to mitigate the problem (I will update the presentation and sample):Thanks, Dave!

Here are some additional references that did not make into presentation but you may find useful:

Monday, February 23, 2009

Implementing Windows services in Visual Studio 2008

Summary: How to write a better Windows service in Visual Studio 2008.

Last week I discovered a couple of problems related to porting my Windows service demo project from Visual Studio 2003 to Visual Studio 2008. A minor problem was caused by an obsolete method in the sample Windows service. Another problem was quite embarrassing: once started, it was impossible to stop a service from Service Control Manager. To fix this problem (and a couple of other issues related to .NET 2.0-specific functionality), I made the following changes:
  • Swapped the contents of Start and OnStart methods (now the Start method calls the OnStart method).
  • Moved the contents of the Stop method to the OnStop method.
  • Removed the Stop method (it's really not needed).
  • Modified the IsInstalled method.
  • Renamed the TestService source file in the demo project to CustomService (to reflect the name of the class).
If you have been using the My.Utilities library to implement a Windows service and are planning to upgrade it to the Visual Studio 2008 version, please use the updated projects (see the download link below) and keep an eye on the following:
  1. Move your custom startup logic of a WindowService-derived class from the Start method to the OnStart method.
  2. Don't forget to call the base class' OnStart and OnStop methods in the corresponding overriden methods.
  3. Well... that's it.
One other thing that I could've done would be using the nullable DateTime members and variables when checking for uninitialized date and time values (instead of DateTime.MinValue), but since this would not improve functionality, I left the current implementation as is. If you strive for code elegance, feel free to do it yourself, since you have the source.

Here is the Visual Studio 2008 version of the project, which incorporates all reported bug fixes up-to-date:Let me know if you encounter any problems.

See also:
Write a Better Windows Service by Alek Davis

Thursday, February 12, 2009

To TDD, or not to TDD?

Summary: Some thoughts on Test-Driven Development (TDD).

A few weeks ago, Stack Overflow co-founders Joel Spolsky and Jeff Atwood discussed criticized certain aspects of Test-Driven Development (TDD) and SOLID Principles of Object-Oriented Design (OOD) [the latter advocated by Robert C. Martin, AKA Uncle Bob]. Check out the excerpts from the original podcast and the follow-up talk (you may also want to listen to the Scott Hanselman's interview with Uncle Bob, which prompted Joel's rant):As expected, the discussion criticism triggered rather emotional rebuttals from TDD supporters, including Uncle Bob himself; see (and read comments):And then, a counter-rebuttals by Jeff Atwood:Eventually, Joel, Jeff, and Uncle Bob met for a makeup session, which you can find -- along with the summary -- at:Although all participants of the podcast #41 seemed to agree on many issues, I have a feeling that the opposing sides stuck to their points of disagreement: uncle Bob remained convinced that TDD could do only good (the more TDD, the more good), while Jeff and Joel continued emphasizing that other aspects of software development may be more important than TDD.

I happen to lean more towards Jeff and Joel for the following reasons (in addition to the reasons mentioned in The Stack Overflow podcasts).

First, Joel mentioned the issues related to GUI testing, but it's not just the GUI: the database layer poses another challenge. When unit testing database-driven apps, a common approach is to rely on mock objects (in which case, you totally skip database testing) or use test-specific data in a simplified version of the database (here you will have to figure out how to maintain this database and integrate it into your build process). Even with the 100% code coverage of the business layer, if your unit test skip the GUI and database, about half of the application (more or less) will remain untested, and you'll have to address this gap using functional testing, which will overlap with unit tests. So why spend time writing unit test for the code that will be tested functionally anyway?

Second, claims that TDD improves code quality are rarely, if ever, substantiated by data. You may hear statements like:
"Since I (we) started using TDD, my (our) code has become much better."
I'm not claiming that these statements are false, but without data they are just personal opinions. Even assuming that code did in fact improve, could it be due to other factors, such as better programming experience, tools, team composition, processes?

Analyzing effects of TDD on code quality is extremely difficult. One of the better studies on the subject was conducted by Microsoft and IBM (see the 8-minute interview with one of the researchers and the original paper). The study found that TDD improved code quality, but it also increased development time.

There is a trade-off: either use TDD and spend more time writing, maintaining, and running unit tests now or do not use TDD and spend time fixing bugs later. The question is: how much time? If TDD activities take 2 weeks out of an 8-week development cycle (a typical 25% TDD penalty) to prevent defects that could've been found and fixed in 3 days during functional testing, would TDD give you the best return on investment? By the way, it is worth noting that the team with the smallest test coverage (62%) in the study achieved the best results (90% drop of defects), while the team with the highest test coverage (95%) achieved the "worst" (as compared to other teams) results (40% drop of defects; still not bad when compared to the control group). I would also emphasize that the use of TDD in the study was close to ideal: the projects were appropriate for TDD and the teams were not pushed to achieve the maximum code coverage.

The Microsoft-IBM study had a few problems, though. First, the number of participants was rather small. Second, and more important, it tried to compare similar teams and projects, but there were many difference between them, such as team/project sizes, and project durations, which is expected in a study focusing on real life projects. Studies performed in academic settings -- with undergraduate students of approximately the same grade working on identical projects -- attempted to minimize some of the differences and make experiments more controlled. According to an abstract from one of such studies:
"[T]est-first students on average wrote more tests and, in turn, students who wrote more tests tended to be more productive. We also observed that the minimum quality increased linearly with the number of programmer tests, independent of the development strategy employed."
How this sounds depends on how you interpret the study's findings. If you're a TDD supporter, you may join Phil Haack and announce that Research Supports The Effectiveness of TDD. Or, you can look more closely at the results of the study and come to a different conclusion. For example, Jacob Proffitt suggested (see also post comments) that:
"[W]ithout question, testing first leads to having more tests per functional unit. The question is if this is valuable. This study would seem to indicate that this is probably not the case, at least if quality is your intended gain. But then, I'm not that surprised that number of tests doesn't correspond to quality just as I'm not surprised that the number of lines of code doesn't correspond to productivity."
I would also point that the code in the experiments was not written for database-driven apps with web-based GUI, so again it was an ideal usage of TDD. So I would speculate that if either of these studies focused on database-driven apps with web front ends, the results would probably be even less encouraging.

I'm not an opponent of TDD and agree that it can be valuable when applied to certain types of projects. My gripe against TDD is that it is being often sold as yet another silver bullet and forced into adoption indiscriminately, in the projects where TDD offers minimal, if any, benefits.

I also resent the assumption that TDD always leads to good code. Your My project can have 100% code coverage, but it can still suck. It will pass all unit test, alright, but at the same time it can be unreadable, unnecessarily complex, uncommented, resulting in an app with bad GUI and unintuitive behavior, an app which both the users and support teams hate. But don't you dare to criticize my code: since it's 100% unit tested, it's good by definition. Usability testing? Never heard of it. And as far as everything else goes (like comments, better design, etc), do I have time for this when I spend my better hours working on unit test? Something's gotta give.

Finally, what about all those great apps written by developers, who did not use TDD or any other silver-bullet-like methodology? Take Google developers, who apparently do not follow any software development methodology or approach, but somehow manage to write apps that people love. If they can write great apps (which is one of the goals of good code), why would one want to impose TDD on them?

Now, Google developers are good, but what do you do if your developers are bad? [I'm not talking about developers who make occasional, sometimes serious, errors (this happens even to the best of us); I'm talking about developers who consistently write bad code.] Wouldn't TDD help them write better code? I wouldn't expect it, but if you can share a success story, please leave a comment.

If your organization suffers from bad code, consider adopting TDD (when applied correcly, it may help), but more importantly, consider other factors, such as:Once you the adopt common-sense practices, you may not need TDD after all.

See also:
Hanselminutes Podcast 146 - Test Driven Development is Design - The Last Word on TDD
Hanselminutes Podcast 31 - Test Driven Development
TDD Tests are not Unit Tests by Stephen Walther
Test-After Development is not Test-Driven Development by Stephen Walther

Thursday, December 4, 2008

Newsletters to keep

Summary: Newsletter recommendations for application developers.

Most of the news come to me via RSS subscriptions (Google Reader is my friend), but there are several (technical) newsletters, which I prefer getting via e-mail. These newsletters are not very frequent, so I do not mind keeping them in my inbox until I get a chance to read them. Here are the subscriptions I recommend (to software developers):
  • SitePoint TechTimes (bi-weekly)
    Covers technical aspects of Web development. From the latest PHP techniques to advanced HTML, JavaScript, DHTML, XML, ASP, AJAX, and more.
  • SitePoint Design View (monthly)
    Addresses such subjects as usability, page layout, graphic design software techniques, accessibility issues, and all the biggest challenges confronting web designers today.
  • Windows Secrets (weekly, plus occasional updates)
    Offers great tips on Microsoft Windows, including tools and utilities, security, and more.
  • RedGate Simple-Talk (twice per month)
    Publishes practical, in-depth articles and opinion on SQL Server and .NET development.
  • The Code Project Newsletter (weekly)
    Weekly site news, summary of latest articles, and special announcements.
If you have a newsletter to recommend, please leave a comment.

Wednesday, November 12, 2008

Technobrief #5

Summary: Recent discoveries of software, articles, videos, and more.

Here are some things worth checking out:

Software
  • AutoCollage allows you to create beautiful collages of your favorite pictures in a few clicks of a mouse.
  • AIMP2 is a capable audio player with many options including Unicode support, multilingual interface, audio grabber, audio converter, tag editor, and more.
  • BareTail is a real-time log file monitoring tool, which can handle very large files (over 2 GB), highlight lines with errors, monitor changes in multiple files, and do more.
  • Bullfighter helps you find and eliminate jargon in your Microsoft Word and PowerPoint documents.
  • BurnAware Free burns CDs, DVDs, and Blu-ray Discs.
  • Core Temp monitors CPU temperature (including individual cores).
  • Media Converter SA Edition converts media files (audio, video, documents) from and to different formats (types).
  • Windows System Control Center (WSCC) makes it easier to use system utilities offered by SysInternals and NirSoft. (Note: WSCC does not support access to the Internet over a corporate proxy server, so its usability is limited to organizing local utilities.)
  • UpdateStar informs and makes it easier to find and install software updates for over 135,000 programs.
Firefox add-ons
  • All-in-One Sidebar lets you quickly switch between sidebar panels, view dialog windows (downloads, extensions, and more) and websites sources in the sidebar.
  • CiberSearch adds advanced Google Search capabilities to the Firefox 3 address bar.
  • DownThemAll! lets you download multiple targets (pictures, audio files, etc) referenced on a web page.
  • FoxyProxy offers a better proxy support than the built-in capability.
  • Locator displays highlighted address in a Google Map popup.
Web
  • Dial A Human! explains how to reach a real person when calling support (toll-free) lines of various companies.
  • ErrorKey search engine for error codes and messages.
  • Media Converter allows you to convert audio, video, and document files to different formats online. The free service is limited to 100 MB files and "standard" output quality.
  • MixTurtle is a music search engine.
  • MP3Tunes offers free 2 GB of online space for storing and steaming music. In addition to upload and download capabilities, MP3Tunes offers tools for automatic synchronization of your music between your computer and online storage.
  • MyPictr can convert your uploaded photo(s) to the profile avatars for various social sites, such as Facebook, LinkedIn, Flickr, and more.
  • RapidShare offers free file sharing and hosting for files upt to 200 MB.
  • ShoppingNotes sends you alerts when a price of your bookmarked item drops.
  • Shrink2One converts multiple links into one small (shrinked) link which you can share via an instant messenger service, twitter, email, and so on.
  • TunesBag offers free 5 GB of online space for storing and steaming music. You can upload and download your music tracks to and from TunesBag. (Note: The service is currently in private beta, so you need to submit a request and wait for an invitation to use it.)
  • Twitter Search lets you see what people are talking about, which can be handy if for checking if other people are complaining about technical difficulties with popular web sites (e.g. GMail or Bloglines being down).
  • YopMail gives you a disposable email address for online registrations; you can access this email account without a password or registration.
VideoArticlesBooks

Tuesday, September 23, 2008

Prepare your new PC for a long run

Summary: A few recommendations that can help you get the best out of a new PC.

You just brought home a new laptop (or desktop) and feel an urge to run your favorite programs or download stuff from the Internet. Before you put your hands on the keyboard, take a few minutes to learn how to configure your system for better performance, prepare it for a disaster, and avoid common problems. Here are some recommendations which can help you get the best out of your new PC.

Before connecting to the Internet, do the following:
  1. Complete Windows installation.
    When you first turn the computer on, it will prompt you to complete the Windows setup process, during which you will create a Windows login account, select the region, time zone, language, and define other configuration settings. When creating the login account, keep the blank password for now (the following steps will require you to reboot the system and log on to Windows several times, which will be easier to do with a blank password); you will define the password later. Do not activate Windows, yet, or register the computer (since you are not connected to the Internet, the activation/registration attempts will fail). Follow the setup wizard until you log on to Windows. [Note: You may have heard or read recommendations to replace Vista/Windows 7 with XP. Unless your PC has less than 1.5 GB of RAM, which, for some reason, you cannot upgrade (you can easily upgrade RAM to 2 GB for about $20-$30), downgrading the operating system to XP makes little, if any, sense. Most people who make these recommendations, either do not have much experience with Vista/Windows 7, or base their recommendations on earlier problems, such as software and driver incompatibilities, and many of these reported issues have been resolved. See The Mojave Experiment for some insight on this topic.]
  2. Create the repair disks.
    If your computer came without the operating system and/or repair (restoration) disks (which is most likely), you must create them yourself. Without the repair disks you will not be able to restore the system if your hard drive fails (hard drives are notoriously prone to failures). You may want to rebuild the system for other reasons, e.g. if your kids install a virus which you cannot remove, or the system becomes slow and nothing else you do improves its performance. Check your computer manual or the quick start guide for instructions on creating the repair disks (normally, there is a program that lets you create the disks). Keep the repair disks in a safe place.
  3. Enable Windows firewall.
    Windows Firewall blocks unwanted access to your computer. It is not the best firewall, but it's good enough, so unless you are using something else, make sure that Windows Firewall is turned on.
At this point, you are ready to connect your computer to the Internet. If you use a wireless router, configure the wireless settings to let your PC connect to the wireless network (make sure that your wireless network is secure); otherwise, connect the network cable to the network port on your PC. After connecting your computer to the Internet, perform these tasks:
  1. Get Windows updates.
    Although your PC is new, it's probably missing the latest Windows Updates and therefore more susceptible to virus infections and other exploits. Before you start browsing the Internet, install the latest Windows updates.
  2. Uninstall crapware.
    New computers, especially the cheaper ones, come filled with crapware that a typical user does not need. These include trial versions of software that you will not purchase, toolbars that you will not use, applications that have better free alternatives, and programs that slow down your system (see the list of common crapware). The free PC Decrapifier tool can help you remove most crapware from your PC.
  3. Install anti-virus software.
    Most new PCs come with a preinstalled anti-virus application (normally, Norton or McAfee). Keep in mind that, unless you purchase a license, these trial versions will stop working after 1-3 months. If you do not intend to purchase a license for the pre-installed anti-virus, uninstall it and get a free alternative, such as Avast Home Edition, AVG Free Edition, or Avira AntiVir Personal Edition. I'm not sure about AVG and AntiVir, but I have been using Avast on my home PCs for a few years and have no complaints (if you use Avast, make sure that you register it with a valid registration code, which you should get via e-mail; otherwise, it'll stop working after one month). UPDATE: For a free anti-virus software, I now wholeheartedly recommend Microsoft Security Essentials (read why).
  4. Change your Windows login password.
    If your Windows login password is blank, change it to a strong password (use Password checker to test password strength). If you leave your login account with a blank password and someone steals your computer (or gets access to it), s/he may be able to read your sensitive documents, access your online bank accounts, steal your secrets, and do other damage. If your computer supports hard drive passwords, it may be a good idea to set up one, too (hard drive password can be defined via the BIOS settings).
  5. Install your favorite programs.
    Reboot your system and install your favorite programs. Keep in mind that some older programs fail to install on Windows Vista/Windows 7. You may be able to find a workaround, get/buy a newer version of the program, or switch to an alternative. For example, if you have trouble installing Microsoft Office 2003 on Vista/Windows 7, try these workarounds (see post by Dominic), but if it does not help, check free alternatives, such as Open Office (another option is to get Microsoft Office Home and Student 2007 for around $100). You may be surprised how many excellent programs are available for free (see my free software recommendations).
  6. Register your computer.
    There is no rush to do this, but when you get a chance, register your computer with the manufacturer, so you can get support. You should be able to register the system directly on the manufacturer's web site, or using a built-in registration program (if it is installed by the manufacturer). If you haven't done so, registered your other hardware devices: printer, router, etc.
  7. Activate Windows.
    Follow the Windows activation procedure (Windows activation must be completed within 30 days after installation).
Once you get your new PC running, perform the following steps every few months or so:
  1. Check Windows updates.
    Make sure your system is patched with the latest Windows updates.
  2. Check anti-virus software updates.
    Keep an eye on your anti-virus software to make sure that updates the virus database.
  3. Remove unnecessary programs from the startup list.
    Check if the Windows startup program list contains any applications that don't need to start up automatically, and if so, block them (do you really need Skype to run all the time?). Some programs allow you to remove themselves from the startup sequence; for others, use the System Configuration utility.
  4. Defragment the hard drive
    A fragmented hard drive can significantly slow down your system. Use the built-in Windows Defragmenter (if your disk is badly defragmented, you may need to run Windows Defragmenter a couple of times) or a better alternative, such as Smart Defrag, UlimateDefrag, Defraggler, Ultra Defragmenter, or some other defragmenting tool to defragment the disk. Before defragmenting the drive, it is a good idea to delete unnecessary files using Disk Cleanup.
  5. Install the latest firmware updates.
    If your PC runs smoothly, you do not need to worry about this, but if it crashes or causes problems, which cannot be solved by regular software updates, check if updates to the system BIOS and drivers (video/audio/network/wireless/etc) are available from the PC manufacturer. You can get updates directly from the manufacturer's web site, or via a built-in program (if your computer comes with one).
Finally, a couple of tips, which can extend the life of your PC (these mostly apply to laptops):
  1. Use laptop cooler.
    Overheating (which is more common in laptops that one may wish) can cause anything from performance degradation to hardware failure (motherboards are especially prone to failures caused by overheating). To prevent your laptop from overheating, invest $10-$20 in a notebook cooler.
  2. Do not carry a running notebook.
    If you carry a running laptop from one place to another, you are increasing the chances of the hard drive failure. Unless you wish to spend $100 or so on a new hard drive, before moving the notebook, switch it to a sleep mode (it takes just a couple of seconds to turn the system to and from the sleep mode).
Okay, don't go, yet: here is one more piece of advice. While you're enjoying your new PC, keep in mind that sooner or later, you may need to replace it with something else. To make your next PC replacement easier, address the data migration strategy now (by data migration I mean the process of moving your data -- such as documents, photos, music files, Internet bookmarks, e-mail messages, and so on -- from one system to another). A common recommendation is to perform frequent backups using an external hard drive or an online backup service such as Mozy. In addition to backups, you can use other strategies. One option is to keep your important files online. For example, you can store your photos at photo sharing sites, such as Flickr and Picasa. Your office documents can go to Microsoft Office Live Workspace or one of the file hosting services, such as Adrive, SkyDrive, or Box.net (file hosting sites can be used for storing not only office documents, but other files, too). You may also consider moving from the desktop-based office suite, such as Microsoft Office or Open Office, to a web-based office suite, such as Zoho, Google Docs, or ThinkFree. There are many file synchronization services that can make your files available for easy migration, such as Dropbox, Microsoft's Live Mesh and FolderShare, Syncplicity, or SugarSync. You can use one of these file synchronization programs to back up (or synchronize between multiple computers) your Internet Explorer favorites. Firefox users can greatly benefit from the Foxmarks Bookmark Synchronizer. Or you can use a social bookmarking service, such as Delicious (or one of these), which has certain advantages over traditional bookmarks. For e-mail, I always recommend GMail because it is free, offers lots of space, can be used with most e-mail client programs (such as Microsoft Outlook), and it is the only service which allows you to redirect your e-mail to any other e-mail account for free (Hotmail only supports redirection to Microsoft-hosted e-mail services, while Yahoo!'s e-mail forwarding feature is not free). I haven't figured out where to keep my music (MP3) files, yet; most services, such as Imeem and Deezer, allow you to upload and listen audio files, but I cannot find an option to download my own files from these services (if you have any recommendations, please leave a comment).

UPDATE: For additional recommendations, see the Managing files and personal information online post.

Additional references:
How to set up a new PC in one easy session
10 things you should do to a new PC before surfing the Web
Things to do first on your brand new PC
First ten things to do with your new computer
10 things you should do to every Windows PC
MUO Polls: Do you Backup Important Files? How?
Reinstall Windows and outfit your system with all freeware programs

Friday, September 19, 2008

More fun with Yahoo! Pipes

Summary: A few advanced techniques for building Yahoo! Pipes.

In the previous post, I explained how to use Yahoo! Pipes for monitoring hot deals. In this post, I'll cover several techniques which can help you get the best out of your pipes.

Before I get to the the good parts, let me share a couple of problems, which I discovered. Understanding these issues can help you avoid some frustration.

Problem #1: Changes appear not to be saved.
If you create a new pipe (or make changes to the existing pipe), save the pipe, and then try to run it (or open it for edit), you may get an error saying that the pipe was deleted. If you re-open the My Pipes page, the new pipes may be missing, and if you open a modified pipe in the editor, you may not see the changes you just made. Don't panic, yet: your new pipes (or modifications) are there. Just refresh the page until the error message goes away (you will need to refresh the page a few times). I'm not sure what causes the problem, but to me it looks like there is a synchronization issue on the Yahoo! side (maybe your changes are saved in one database, but when you switch a page, you hit a different server to which your changes have not been replicated). After a couple of hours the problem will go away and you will not see the errors. I reported this problem to Yahoo! (and others did too), so hopefully, it will be fixed (no word on this, yet).

Problem #2: RSS reader is slow to report new posts.
I do not know if it affects all RSS readers, but I saw this problem on Bloglines, as well as Google Reader: matching posts returned by your pipes may appear in the RSS reader several hours after they have been posted in the original feed. This is not a big deal for regular posts (like your favorite blog subscriptions), but if you want to be notified about a product returned by your pipe faster, you may want to use the pipes' built-in notification mechanisms instead of relying on the RSS reader.

Update: A few weeks ago, Bloglines stopped retrieving RSS posts from almost all of my Yahoo! Pipes. Due to multiple issues with Bloglines (also reported by others), I no longer recommend using it (I switched to Google Reader).
And now, the good stuff.

Hint #1: Reuse your pipes.
Say, you want to build several pipes with something in common. Instead of duplicating the common functionality in every pipe, you can build a special pipe containing the shared logic, and then pick this pipe as any other module from the module library (you will find your pipe under the My pipes heading in the library panel of the editor). For example, I created the following pipe defining the input sources and transformation rules for all of my shopping-related pipes:


My other pipes use this pipe as input, and apply additional filters to specify pipe-specific conditions. Now, if I find a better way to define input sources and transformation rules, I just need to change one pipe and all pipes that use it will pick up the modifications automatically.

Hint #2: Use regular expressions for more precise matches.
Say, you are shopping for a ring, so you define a filter with the following rule:
item.title contains ring
What you may not realize is that this pipe will return posts with titles containing the following words: spring, boring, ringtones, and so on. To make sure that your filter finds exact matches of the whole word ring, instead of the Contains condition, use Matches regex.

Tips: For non-programmers: Regex stands for regular expression, which is a sophisticated mechanism for finding (and replacing) more complex matches. For programmers: In case you wonder, Yahoo! Pipes use the Perl-like regular expression syntax with certain caveats. For example, to look for case-insensitive matches, you need to prefix the search string with (?i) (I thought it would be /text/i). For all: Here are some great resources for learning, building, and testing regular expressions:And this is some informations specific to Yahoo! Pipes:
To search for the exact word match, you need to use the following pattern:
(?i)\Wtext\W
As you may have noticed the \W tokens surrounding the search string specify the word boundaries, while (?i) indicates case-insensitive search. Here is an example of the search filter one may use for baby-related products (notice that it uses another pipe as input):


Once you get a grip on regular expressions (if you are so inclined), you will be able to build more efficient filters, but in the meantime, the information I provided should get you one step past the novice. If you stumble upon a problem you cannot solve, check the Message Boards for Pipes (this is where I found how to implement case-insensitive search).

Additional references:
Yahoo! Pipes Documentation
Yahoo! Pipes Tutorials