Tech Tips

Browse our site by category or tag.

Tech Tips

  • Living without antivirus software- Ok, I'll admit it. I've been living dangerously for the last several years. To be blunt: I refuse to install any kind of antivirus or personal firewall software on most of my computers. This includes a Windows XP Home system that was used by my children as a web surfing / email / game system. I've suffered zero infections during this time. (The only time I ever suffered a malware infection was before, when I did rely on Norton Antivirus to protect the kids' computer.) Why do I refuse to use these massively popular products? Simple. I am convinced that they cause more harm than good, and that they foster a false sense of security - leading users to engage in riskier behavior. Further, antivirus software is almost always behind the curve - by definition, the antivirus people are playing catch-up with the malware writers. It's a good living for them, but I choose not to contribute to it. As a software developer, I cannot afford any downtime due to buggy software, and yes - antivirus software has bugs. Not long ago, one major antivirus package ran amok, causing widespread damage by deleting harmless user data and programs.
  • How to evaluate a web site- I found this page over on the UC Berkeley Library site describing a set of steps to use in evaulating web pages - how to determine whether the information on the page should be trusted. The guide offers a list of suggested questions to ask, and the implications associated with the answer to those questions. This can help you develop a critical eye when visiting a web page.
  • Secret Stuff - AdSense competitive filter tool and URL/site ranking and visibility links tool- I've added a couple of handy webmaster tools to the site, but they've been hidden for a while - so it's time to let you all know about them: URL/Site visibility links tool - quick links to SEO tools. I've added this page because I find myself checking these statistics from time to time, and wanted a convenient place to stash my collection of links. Since I went through the trouble, I figured someone else might find it useful. AdSense competitive filter tool - generate list of actual URLs used by the advertisers that are likely to show on any site's URL. Just enter the URL of interest and see what's behind the ads. Uses same data as AdSense preview tool.
  • Know thy enemy- This paper on honeynet.org is an excellent discussion of web application security issues. Read it and weep.
  • Another preinstalled software mop-up operation- I had the 'honor' of rescuing yet another victim of a pre-installed software nightmare. A new co-worker was working with his notebook (a Hewlett-Packard, recent vintage, less than a year old with Vista Home Basic installed). The complaint? Minimum five (yes, FIVE) minute boot time from power-on to desktop interaction. After a cursory examination, I found that it wasn't a hardware problem, nor was it due to memory limitations: the system had 512MB RAM, Vista was using just over 300MB with no other applications running (yes, that's a lot, but this is Vista, after all).
  • Nero 7 Essentials: Stupid Stupid STUPID thing to do to developers.- I was debugging a Windows application that makes use of DirectShow to render media - and for some strange reason, the application would terminate without warning when run under Visual Studio's debugger. No error message, no exceptions, nothing. The application ran fine outside the debugger. I was able to debug the same code base several weeks ago without incident. Poking around a bit, I isolated the line of code causing the silent termination: The DirectShow IGraphBuilder interface's Render method. Digging deeper, I find that the ultimate culprit is Ahead Nero 7 Essentials, which had been installed on my development system several weeks before. Apparently, Nero Essentials installs a variety of DirectShow filters on the target system, and, these filters actively prevent running under a debugger. In this case (on my development system), there was absolutely no error message or other indication of why - just a silent termination. After I isolated the problem, I was able to determine that there is supposed to be a "Nero Protection Error" message box presented to the user, but it never appeared on my system, nor did the system event log contain any useful information. Feh.
    The 'quick' solution: Unregister everything you find in the %COMMONPROGRAMFILES%\ Ahead\DSFilter directory. Alternatively, rename the directory to something else (like DSFilter-disabled) - this will allow you to re-enable them later by renaming the directory back to DSFilter.
    This gets my vote as one of the dumbest stunts I've ever seen. I am pretty sure there's nothing all that special about Nero's DirectShow filters, and, if someone really wants to reverse engineer them or break the protection/licensing, they will. This lame attempt does nothing more than encourage (force?) legitimate users to remove the Nero filters from their machines. Nice going. Did the developers or marketing geniuses stop to think about this use case? Ahead Nero 7 Essentials just cost me an hour or more of productive time. Then there's the aggravation. Lame. Stupid. Did I mention lame? And I used to *like* Nero software.

    ImgBurn - Freeware, and it works!

    Update: I've tried ImgBurn, a freeware CD/DVD image read/write utility, and so far, it looks good. UI is slightly wonky but it's a very good piece of free software - and, best of all, you can install it without Administrator rights. Give it a try!
  • DIY - Silver Lightning cleans silver via electrochemical reaction- OK, this is off-topic but what the heck - it's interesting (to me, anyway). I've seen commercial advertisements for Silver Lightning on various television shows, The product demonstration shows a person placing the Silver Lightning plate under water, then placing tarnished silver on the plate -- and like magic, the silver brightens and the tarnish vanishes. I'm an inquisitive guy, so I assumed this was due to some kind of chemical reaction involving electrolysis, so I searched the web to see what I could find on the subject. It turns out that silver tarnish is silver sulfide, much of which comes from the trace amounts of sulfur in the air. The Silver Lightning product is apparently nothing more than an aluminum plate, which, when placed in a solution of baking soda and water (about 1 cup per gallon) causes an electrochemical reaction that draws the sulfur away from the silver and to the aluminum.
  • Essential Windows Utilities-

    Here's a shortlist of utilities I think are essential for regular users of Windows-based systems.

    Most of these are aimed at keeping your system running cleanly, eliminating problems, or checking the status of hard disk drives or memory hardware.

    If you have a suggestion or find a broken link, please use our contact page to let us know.

  • Essential CSS- If you are working with CSS and you use the FireFox browser, you absolutely must check out the lifesaving Web Developer add-in.
  • lsass.exe - what is it?- LSASS.exe (the 'LSA Shell') is part of the Windows security services, dealing mainly with local security policies. I've seen two major variants: the export version (weak crypto) and the domestic version, which is supposed to offer 128-bit encryption.
  • DLL Error: esent.dll and wuauclt.exe - Access violations and other errors after user logs in- A friend had me check out his ailing Windows XP Home notebook computer last night. Every time he booted the computer, it would display an endless stream of error messages about wuauclt.exe having caused an access violation. This message would reappear every 30 seconds or so. Microsoft has a hotfix (see 'related links', below) that is supposed to address this problem, but I was unable to install the hotfix - the system would display an error message saying that it could not verify the system configuration, and therefore could not install the hotfix. As it turns out, the computer in question had suffered a series of hard disk failures - the system event log showed a series of disk bad block errors dating back over a month. So, I expect that critical files on the hard disk have been corrupted - including, perhaps, the Extensible Storage Engine (ESE) database or related files used by esent.dll.
  • DLL Errors and how to fix them-

    Windows XP Troubleshooting

    When you encounter a Dynamic-Link Library error (DLL error) or related Windows XP error, what can you do about it? How can you track down the source of the problem and, one hopes, fix a Windows XP problem? With a little bit of Windows XP troubleshooting skills one can usually find the problem and fix it. If a Windows error of this type is troubling you, it can be fixed in most cases with some effort.
  • Adware and spyware and how to remove them-

    An epidemic of uninvited guests

    One of the recurring problems I encounter is spyware and adware. When helping home or other casual Windows users with performance problems on their Windows XP systems, I frequently encounter programs that have installed themselves without the users' knowledge - invariably, I hear "I have no idea how that got there." Upon inspection, I often find a variety of 'hidden' program set to run when the computer is started. These unwelcome and uninvited guests pests bring a variety of problems with them, so it's always best to eliminate them from the computer whenever possible.
  • Windows XP Themes- Windows XP supports look and feel customization using 'themes'. Themes are collections of settings and images that provide a complete appearance 'package' for your XP system. When you select a new theme, Windows XP takes on a customized appearance that is controlled by the theme's settings and imagery. The customizations can include fonts, colors, desktop wallpaper, and other Windows XP visual styles elements. You can give your Windows XP system a completely unique look and feel. Of course, you can override the theme's settings, so, if you want to use a different wallpaper/desktop background, or change the font size or title bar color, you can change those settings.
  • D-Link DWL-650 Drivers-

    D-Link DWL-650 Info and Drivers

    Interesting article regarding an external antenna for this card:


    http://c0rtex.com/~will/antenna/

    (older version archived here) http://www.guerrilla.net/reference/80211_mod/dwl-650_ext_antenna/

    Alternative drivers for D-Link DWL-650 wireless network card may be located at D-Link's UK site:

    ftp://ftp.dlink.co.uk/pub/wireless/dwl-650/

  • FTC disclosure guidelines for website publishing- I just stumbled on to this PDF file that provides examples of misleading advertising or claims and how to avoid them when building a web site or page.
  • Remove unwanted items from the Vista Welcome Center- You can remove items from (or add items to) the Vista Welcome Center. If your Windows Vista machine came bundled with a bunch of pre-loaded software and trialware (as do most consumer machines) you are likely to see promotional entries in the welcome center that may be more annoying than useful - for example, if you uninstall the cure-worse-than-the-disease anti virus software or some of the other disk-filler trialware, you will probably still see lingering but non-functional items in the Welcome Center long after you uninstalled the related programs.
  • Programmer Fonts- Here's a great page with a roundup of programmer fonts: http://www.lowing.org/fonts/

    Other resources

    Consolas (Microsoft) Inconsolata Revisiting Programming Fonts
  • Tech Tips- Welcome to Exodus Development tech tips - a collection of stuff I think might be useful to somebody, somewhere, sometime. Please see the list of subjects at the end of this article. Topics covered: Drupal, Apache, MySQL, Windows, Windows XP, etc. 4/14/07 Note: If you arrived here from a search engine result list and can't see what you were looking for, please come back soon. We are in the process of moving content from our old site to this one.
  • URL/site ranking and visibility links for your URL- URL: http:// "; return $output; } function ed_visibility_makeRow($servicename, $descr, $url, $rowcount) { static $attribs = array('target'=>'_blank'); $rowclass= $rowcount % 2 ? 'odd' : 'even'; return "" . l($servicename, $url, $attribs) . "$descr\n"; } $url = trim($_GET[d]); if (empty($url)) $url = "http://exodusdev.com/"; if ($url[strlen($url)-1] != '/') $url .= '/'; // fix relative URL if (strncmp(strtolower($url), 'http://', 7) != 0) $url = 'http://' . $url; $parsed = parse_url($url); $parsed['scheme']='http'; $hostname = $parsed['host']; $hostname_encoded = urlencode($hostname); $domain_only = $parsed['scheme'].'://'.$parsed['host']; $domain_only_encoded=urlencode($domain_only); $url = $parsed['scheme'].'://'.$parsed['host'].$parsed['path']; $cleanurl = urlencode($url); $technorati = $parsed['host'].$parsed['path']; $technorati_plain = check_plain($technorati); $technorati_encoded = urlencode($technorati); $delicious_md5 = md5($url); $hostname_clean = check_plain($hostname); ?>

    Site visibility and ranking links


    Note: URLs may be case-sensitive - be sure to use the same case used on your site!
    This tool provides handy links to various online tools you can use to check a site's ranking, backlinks, and 'visibility' in various search engines, social bookmarking sites, blog trackers, etc.
    Links for URL $hostname_clean?","http://www.alexa.com/data/details/traffic_details?q=&url=$hostname_encoded"), array('Live PageRank', 'Check PageRank across multiple data centers',"http://livepr.raketforskning.com/?u=$domain_only_encoded"), /* array('Links from .edu domains', "Find links to $hostname_encoded from .edu TLDs", "http://search.yahoo.com/search?p=linkdomain%3A$hostname_encoded+site%3A.edu"), array('Links from .gov domains', "Find links to $hostname_encoded from .gov TLDs", "http://search.yahoo.com/search?p=linkdomain%3A$hostname_encoded+%20site:.gov"), array('stumbleupon links', "See what's cooking on stumbleupon.com", "http://www.stumbleupon.com/url/$hostname$parsed[path]") */ ); $count = 0; foreach ($tools as $tool) { echo ed_visibility_makeRow($tool[0], $tool[1], $tool[2], $count); $count ++; } ?>
  • Drupal 4.7 Site and Database Backups-

    How do I keep my Drupal 4.7 site(s) backed up?

    There are several modules to help you:
    • backup.module Creates an on-demand tarball backup of your database and site files, and downloads them to your browser.
    • Database Administration module Allows interactive backup of database tables (among other things.)
    Another approach is to build a shell script that dumps your database tables and site files into a gzipped tar file on a regular schedule, and set up a unix/linux cron job. (Or, if you are Windows-bound, and have control of the task scheduler and other appropriate permissions, you can schedule a batch file to do the same thing, asssuming all the necessary command line utilities are available to you on the Windows machine. YMMV.)
  • Location, gmap, and gmap_location module interactions- If you want nodes to appear on a google map provided by the gmap_location module, you need to set up your system correctly. from gmap_location function gmap_location_node_page() :
    $result=db_query("SELECT oid, longitude, latitude FROM {location} WHERE (longitude!=0 OR latitude !=0) AND type='node'");
    So, the only nodes that will appear in a gmap_location-provided map are those where the type is 'node' and the longitude or latitude are non-zero in the location table. Ok, how do we get a lat/long value in that table?
  • Why can't A Drupal user edit a node they created?-

    Why can't a Drupal user edit a node they created?

    Symptoms: An authorized Drupal user loses "edit" access to nodes they've created, even if they have appropriate node (or other module) access permissions. Or, user cannot edit a node that should be editable by them, based on access control or node access settings. No errors or warnings appear in the Drupal log. Possible Cause: The user does not have permission to use the input filter assigned to the node. (Input filter permissions may have been changed since the node was created. As a result, the user never had, or no longer has permission to use the input filter associated with the node.) This excerpt from Drupal node.module node_access() function tells the tale:
  • Using Event module with jscalendar (jstools)- When using event.module with JSCalendar (part of jstools module), you might experience problems with event times being stored incorrectly. This appears to be due to an obscure configuration requirement when using JSCalendar - apparently, the event module must be configured to use 12 hour format. (This one bit me in the behind today, so I thought I'd jot this down somewhere...) Be sure to set event.module time notation to 12 hour format: administer >> settings >> event >> "Time Notation Preference" = 12h

    Related info:

    http://drupal.org/node/65125#comment-106269
  • Interesting spammer pattern - how they find sites- Some our our sites that feature free classified ads (amadorable.com, goatseeker.com, and bunnytrade.com) have been hit with a few recurring spammers trying to plant ads for various off-topic products (like cell phones, etc.) I guess this is a good sign; our sites are visible and spammers feel it is worth their time and trouble to post an ad (and no, as far as I can tell, these are not bots - they're human-generated spam.) In reviewing the referrer logs, I've noticed that in nearly every case, spammers use search engines to find sites that have been spammed previously using known keywords - or just sites that offer free classified ads or open posting capability. For example, I find these google searches in my logs, just prior to the spammer creating an account and attempting to deposit the spam content.
  • IECacheList Lite-

    Display the contents of Internet Explorer's index.dat files, including 'lost' and hidden content

    Current Version: 1.0.2.0

    Overview

    Have you ever wondered about the contents of the Internet Explorer ("IE") cache? Wanted to know if the cache is really empty when you tell (or ask) IE to delete temporary files? Want to know what's kept in those INDEX.DAT files that are stored in your user profile?

    IECacheList Lite is a command line utility that will examine the contents of Internet Explorer's index.dat files and display them for you. The method used by IECacheList is designed to ensure that no 'hidden' or lost information escapes detection.

    The interesting thing about these files is that the IE cache tends to accumulate dead information, some of which remains even after you tell Internet Explorer to empty the cache, clear the history, delete cookies, etc. This causes the index.dat file to grow over time, accumulating these 'lost' bits of data on your hard drive(s). Another oddity is that IE seems to leave multiple copies of index.dat in different locations on the computer's hard drives, perhaps due to changing configuration or service patches.


    These problems have been attributed to a number of causes: 'bugs' in IE's cache management code, malicious data gathering by Microsoft, etc. See Google search: "index.dat hidden" for juicy details along with a dose of paranoia.

    In any case, it's never a good idea to accumulate bits of your surfing history, cookies, and other information scattered all over your system. Knowing about the information that is stored on your computer is a good way to become better aware of the need to clean this data from time to time. IECacheList is a good way to learn about it.


    Capabilities

    100% Clean!
    • Quickly display Internet Explorer cache, history, cookies index.dat file contents for currently logged in user account.
    • Allows logging of output to a text file for later use.

    Download

    Click here to download the latest version.

    System Requirements

    IECacheList Lite has been tested on Internet Explorer versions 5 through 7, on Windows 9x/ME, 2000, and XP.

    NOTE: Windows NT4 systems may have some problems depending on the installed version of Internet Explorer. We have not tested on Internet Explorer version 4, although it should work. IECacheList Lite does not work with Internet Explorer version 3 or earlier.

    Related links

  • Insert AdSense Ads Automatically in Drupal Nodes and Teaser Lists-

    Here's a useful Drupal module that tweaks a node's body or teaser to insert an inline AdSense ad, when a node is rendered on a full page or teaser list.

    This allows site administrators to enable automatic insertion of an AdSense ad into the page without the content editor having to insert inline [adense] filter tags, or having to edit a site's template.php (or other template files.) This offers a big advantage, as you can change the ad format, group, and channel on the fly without hand-editing each node (which is the only way I can think of doing it if you are using inline filters). Another advantage is that you can enable/disable the inserted AdSense with just a click of the mouse - no need to edit each node.

  • Windows System Tray Scan Utility-

    What programs are running your system tray?

    This command-line utility for Windows XP or Server 2003 will tell you which programs have inserted themselves into your "system tray"*.
    It generates a list of PIDs, the program's location, and the number of visible and hidden icons for each program that has inserted itself into your system tray.

  • Block MySpace.com on Windows: zero cost, no additional software-

    I've been asked how to prevent access to myspace.com on Windows systems without having to purchase or install blocking software. Well, there's a free and simple way to do this.

    Here's a quick trick to block myspace.com on a Windows system. Basically, you are editing a text file on your computer, adding an entry to it. This file is known as the 'hosts' file, and it allows you to block sites using a very simple but effective method.

  • Fast User Switching and Welcome Screen in Windows XP- Originally published 8/15/02

    If you are having problems in Windows XP Home or Pro, with Fast User Switching enabled and you are using the "Welcome Screen" feature, check this out.

  • What time is it?-

    Name that offset

    This page shows various time values and conversions to other units. I find this useful when programming in PHP and other languages.

    Often, I want to run a SQL query to update a time value in a Drupal db table, and I need to know the delta to add to an existing unix timestamp value to push a value out by 24 hours, 90 days, etc. and would rather not whip out a calculator or do the math on paper...



    %s%u%s', $rowclass, $label, $secs, $secs . '000'); } $time = time(); ?>
    UnitSecondsMilliseconds
    Page generated on:
    "; print "GMT Time: $formatted_gmt
    "; print "Unix Time: $time seconds since January 1 1970 00:00:00 GMT
    "; print "Local server time: $formatted_time
    "; ?>
  • WinXP/IE6/Sendmail.dll-

    Updated: 2005.08.18
    Added links to WFP info and tools

    When you click the "Send a Link..." menu item in Internet Explorer 6, Outlook Express 6 attaches a .URL file, but doesn't insert a plain-text version of the link in your email message.

    I don't know who thought that this was a good thing, but it is very annoying.

    Here's some info on how you might be able to fix it. (I had used these techniques on a pre-SP1 XP Pro installation, but there have been some changes since then, so please check the updates below.)

  • User profile spam attack- On Christmas Eve day, several of my sites were 'visited' by what I presume to be a bot, all from the same source IP address. The attack consisted of attempts to register many new user accounts, each having a username containing the term 'DVD': Soccer DVD, DVD Immature, Underworld DVD, Adult DVD, Enigma DVD, DVD shrink, Blues DVD, Trick DVD, Portable DVD Player, DVD Decryptor, Federation DVD The email addresses were all unique of course - since the bot attempted to register multiple user names on each site. The sites were configured to include a text field user profile, so that users can share interests, etc.
  • Paypal payment button images cheat sheet-

    Here's a quick list of payment buttons to help save time filling out forms on Paypal's site.

    I find Paypal's site to be cumbersome at best, and if you are not on a high speed connection, browsing through all the "user friendly" pages to find the information you need can take a long time.

  • When DID you load that page?-

    (0 seconds ago)'; ?>

    When I'm viewing Drupal administration pages, like referrer logs or other time-sensitive pages, I like to know the time of the last 'refresh' (and therefore how stale the page content is).

    So, here's a quick and dirty Drupal block definition. (The javascript is not very idiomatic, but it'll do for now until I can update it. In fact, I plan on making it a pure client-side javascript widget, but that's another post for another day.)

    It will display the date and time the page was last loaded, and the 'age' of the page in seconds - it uses a javascript interval timer to update this every second.

    In order to use this on your drupal site, create a new block, paste the code into the block content text field, configure it to use the PHP input filter (so the php code can be interpreted by Drupal), position it in the left sidebar area of your theme (you can place it wherever you wish), and set it to be shown only on admin and admin/* pages.


    Here's the code:

    <div style="float:right; border: red 1px solid;background-color:orange;color:yellow;text-align:center;padding:.5em;">
    <?php
    // todo: make this all client javascript!
    // but, for now, I use the php/Drupal format_date() function to simplify the process of getting a local date/timestamp
    $t = time();
    echo 'Page generated on ' 
       . format_date(time()) 
       .  '  <span style="color:white;"> <br/%gt;(<span  id="page_render_age">0</span> seconds ago)</span>';
    ?>
    </div>
    <script type="text/javascript">
    var page_render_time=new Date().getTime();
    
    function page_render_format_interval(now,start)
    {
       return parseInt((now - start)/1000);
    }
    function page_render_update()
    {
      var now = new Date();
      var et = page_render_format_interval(now.getTime(), page_render_time);
      var elem = document.getElementById('page_render_age');
      if (elem && elem.textContent) elem.textContent = et; // ff/mozilla
      if (elem && elem.innerText) elem.innerText = et; // ie compatibility
    }
    window.setInterval("page_render_update()", 1000);
    
    </script>
    
    

  • Help for the weary Drupal developer: api.drupal.org and drupal.org OpenSearch plugins -
    I've created some Drupal-specific OpenSearch plugins for Firefox (and IE7, too!). They provide Drupal.org and api.drupal.org search integration in browsers supporting the OpenSearch search plugin protocol. They are useful when searching for Drupal API routines or other Drupal development subjects. Install them as you would any other OpenSearch plugin...
  • Essential JavaScript- If you are working with JavaScript, run, do not walk, over to Douglas Crockford's site and read his writings on JavaScript. We'll be here when you complete the assignment. Back so soon? Now go over to jibbering.com's closures page and read up. Go ahead, it's ok.
  • DLL Error: Illegal System DLL Relocation- If you are running Windows XP SP2 (including Media Center and Tablet Edition), and you have applied the Microsoft updates 925902 (MS07-017) and security update 928843 (MS07-008), and you are using Realtek audio components on your system, you may receive this error message when trying to use ElsterFormular, Realtek HD Audio Control Panel, TUGZip, and CD-Tag.
    {application name} - Illegal System DLL Relocation The system DLL user32.dll was relocated in memory. The application will not run properly. The relocation occurred because the DLL C:\Windows\System32\Hhctrl.ocx occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL.
  • Son of RegClean- In the good (bad) old days, we used to use a Microsoft tool, RegClean which would scrub the Windows registry for dead information (which tended to accumulate if you removed previously installed software, and for other reasons.) This accumulation would cause your system to slow down, use more memory, and be less stable. Microsoft stopped supporting RegClean for anything newer than Windows 98; so, if you have Win2k, XP, or Server 2003, what can you do to maintain system performance? We used to use ToniArts EasyCleaner (older site here) which worked pretty well. I've not felt the need to use this since I don't add/remove software or components very frequently.
  • .REG file allows XP search to operate on unknown file types- This registry file fixes the very broken search function in XP - by default, only known file types are searched, so, if a folder has files with extensions that do not have file associations registered with XP, they will not be searched for the desired text string - and, you won't be told about the files that weren't searched! I've spent countless minutes trying to figure out why a file wasn't found when I know it's in a folder somewhere... Background info: