DevelopmentNow Blog
 Tuesday, February 10, 2009

Check out As Button Generator to make shiny buttons for your web sites. No PhotoShop for you!

February 10, 2009    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, September 23, 2008

I stumbled across two lightweight web-based database administration tools: php Mini Admin and QDBA. Both are single PHP files, so you can just upload them to a server, specify your database login information, and be able to browse tables, edit data, and do other administrative tasks without installing the effective-but-heavy phpMyAdmin or allowing direct remote database access to your MySQL server.

Note that you should still take proper security measures when using these web-based tools (SSL, restrict access using ACLs or IP, don't let users log in as root), but overall they're easy & helpful. Of the two, QDBA is more attractive & usable, but is primarily used to view and edit data. phpMiniAdmin is spartan but offers many additional built-in features like import/export, table optimization & repair, and other "DBA" tasks. Both tools offer a SQL query window were you can execute raw SQL commands against the server.

phpMiniAdmin Screenshot:

 

QDBA Screenshot

September 23, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, May 14, 2008

I was unable to temporarily stop AVG antivirus in Vista until I saw this tip from highmastodon:

  1. Shut down AVG Control Center by right-clicking the AVG icon in your taskbar & choosing Quit.
  2. Now click the Vista start button and type "AVG" in the search box. AVG Control Center should appear.
  3. Right-click AVG Control Center and choose "Run as Administrator"
  4. Now you can open up AVG Control Center, double-click Resident Shield, uncheck "Turn On Resident Shield", and save the changes.
May 14, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, April 10, 2008

We don't branch or tag super often, usually just on major releases, experimental code, or not-yet-ready code. But sometimes you'll have changes in a branch that you want to merge back into the main development trunk.

So assume your project's trunk is at myproject/trunk.  You then create a branch for a major release in myproject/branches/1.0-release. After a few weeks, you have to fix a bug in the 1.0-release version of your project, so you make the changes to the /myproject/branches/1.0-release branch. Then you build, test, & deploy that fixed version to production or whatever.

But now you want to merge that fix into your trunk. The main thing to remember is that the only changes you want to merge are the ones you made after the branch was created. You don't want to merge the entire branch into the trunk, otherwise you'll end up merging old code (from the branch) into the trunk, too.

BTW you might ask why I use "branches" instead of "tags" in the above example. That's because tags and branches are the same as far as SVN is concerned, and the main difference is that a "tag" is supposed to be a "snapshot" of your code that you don't make changes to (i.e. a static archive), while a "branch" is a version of the code that people might change. Since there's always a chance that we'll need to make changes to a major release (without accidentally including any not-yet-ready trunk changes), all our major releases are branches, not tags.

Ok so enough of all that. Below are some links on this topic that I suggest you read.

  1. SVN Book Chapter 4. It's a quick read, explains the principles, and shows the commands. You can skip through some of the beginning if you already know about branching, but sections "Copying Changes Between Branches" and "Common Use Cases for Merging" have good overviews on merging changes and branches. I'd suggest first reading the explanations and skipping the actual commands, so you know what's going on from a high-level.
  2. SVN Branch Merging from Michael Sepcot. Nice easy SVN commands to follow, now that you understand what's going on. If you're using Subversion from a command line, that is.
  3. How to Merge using Tortoise SVN. If you're a Windows developer, you're probably using TortoiseSVN. This guide explains how to perform the merge. Remember that the changes are merged into your local copy, so you can confirm they're ok and then commit them into SVN.

Happy merging!

April 10, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Monday, April 07, 2008

The easiest way I've found involves two steps:

Adjust SSMS Settings

  1. Go to Tools->Options
  2. Query Results->SQL Server->Results to Grid
  3. Check "Include column headers when copying or saving results"
  4. Click OK.
  5. Note that the new settings won't affect any existing Query tabs -- you'll need to open new ones and/or restart SSMS.

Now next time you run a query, do this

  1. Make sure the results are displayed in a grid (CTRL+D or Query->Results To->Results to Grid)
  2. Right click in the grid, and click Select All
  3. Right click in the grid again & click Copy
  4. Open up a new Excel spreadsheet, and paste the data in
  5. Do a global search & replace, replacing "NULL" with an empty string.

Voila!

I had tried before with SSMS's export to CSV feature, and it just didn't escape data the way I needed it to.

April 7, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, March 04, 2008

Office Live Workspace, the online document collaboration service from Microsoft, is now out of closed beta. It allows you to share and edit Office documents with others over the web, control permissions, and other online collaboration features. It also supports Firefox 2 on Mac OS X. You need Office to actually edit the documents (since editing occurs offline), but anyone with a browser can view and comment on the docs.

I've been using Google Docs for over a year now, and while it works decently, I sometimes miss the advanced features from Office, and it can be slow at times. I tried out Office Live Workspace this morning, and it definitely let me keep my desktop app experience. In fact, it felt mostly like WebDAV, albeit a slicker, better, easier-to-use version. Which isn't necessarily a bad thing, as long as all your editors have Office installed.

There's a web portion that lets me preview documents, and invite others to view and/or edit them. There's also an Office add-in that I installed, which added "Save To Office Live" and "Open From Office Live" to all my Office programs, allowing me to interact with the service. I was pleased to see that Offie Live stores the revisions of your documents across changes, but I didn't see a way to compare revisions. You can get email notifications of when someone edits documents, but there's no RSS feed. Anyone with a browse can comment on documents, but all the comments are just stacked on the right-hand side -- you can't position a comment over a particular item in the document.

I'm looking forward to when Live Documents comes out of closed beta, because that service will allow you to edit documents online, or using Microsoft Office or Open Office.

So, Office Live Workspace isn't bad. If everyone involved is a Microsoft Office user, it's definitely better than emailing documents back and forth. And you do get the full power of your desktop apps when managing documents, which is a big plus for power users or less web-savvy users. And since you can view and comment on documents using a browser, even non-Office users can contribute to a small degree. But the lack of online editing and robust features mean that upcoming services like Live Documents pose a real threat as the web world gets more cross platform and online only.

You can view more some screenshots of Office Live Workspace here.

 

March 4, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, February 22, 2008

Unfuddle's forums has a discussion on alternate Subversion clients for Mac users.

SCPlugin is a free Subversion plugin that integrates with the Finder, and works similar to TortoiseSVN (a Windows SVN explorer plugin). Syncro SVN is a commercial standalone SVN client ($60) that works on Mac, Windows, and Linux.

Most Mac users use the svn command line program, but I know from experience how handy TortoiseSVN is for me to visually view the state of my working folder, compare files, and other operations.

 

February 22, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [4]



 Monday, February 18, 2008

Another helpful page, using the Unfuddle API. Now users can submit a ticket into an Unfuddle project without having to log in.

submitticket.zip (4.23 KB)
Other | Tools
February 18, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, February 05, 2008

We've been using Unfuddle for a while and have been pretty happy with it, although we always felt that the built-in RSS feeds didn't have enough information. Recently they released an API, and so we decided to make a new Unfuddle Project RSS feed, using PHP, that displayed richer information like times, people, and comments.

To install, edit the settings near the top of the PHP page to use your domain name, login, project id, etc, then load onto a friendly local PHP server. It requires PHP 5 due to use of the SimpleXML extension.

One thing to note -- the file doesn't contain any caching mechanism because different PHP hosts have different things available. So feel free to add in caching support, or lmk & I'll upload a version with caching included.

unfuddle_rss_0.21.zip (3.62 KB)
February 5, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, July 27, 2007

You can now scroll more easily through data in Excel 2007, as told in IM chat form (inspired by 37 signals' Fireside Chat posts). BWS = me, DSM = Scott.

[08:46] BWS: heh Excel 2007 has a cool new feature
[08:46] BWS: when you're dragging a cell down
[08:46] BWS: you know how the further you move your mouse, the faster it drags & scrolls?
[08:46] DSM: yah
[08:47] DSM: and then you whizz past where you want to go
[08:47] BWS: yes
[08:47] BWS:
well in older Excel I would always end up scrolling too fast & going way beyond the last row of data
[08:47] BWS: well
[08:47] BWS: it now automatically slows down the scrolling
[08:47] BWS: when you get to the end
[08:47] DSM: nice
[08:47] BWS: kinda like how at a gas pump, if you prepay for an amount it automatically slows down
[08:47] DSM: yeah
[08:47] BWS: I think I will blog about this new scrolling thing

 

Other | Tools
July 27, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, July 09, 2007
TIP: You can edit your photos easily online using Pixenate or Snipshot. Snipshot feels a bit more user-friendly, but Pixenate has a few more features. The big plus for me is you don't have to register or anything.
July 9, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, June 28, 2007

A new version of Fiddler came out recently. From the Fiddler home page:

Fiddler is a HTTP Debugging Proxy which logs all HTTP traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more.

I use Fiddler all the time in my work. I find it invaluable for debugging AJAX requests, performance metrics, file sizes, and more. I've used it to see what web service calls Flash applications make. I like the fact that it works with any web browser. It also supports FiddlerScripts that allow you to impersonate user agents, simulate a dial-up connection, execute performance tests, or modify HTML as it's downloaded.

If you need to debug HTTPS/SSL traffic, or you want to save browsing sessions as Visual Studio WebTest files, you can install Fiddler2. I wish they didn't name Fiddler2 "fiddler 2", because it makes it sound like it's a new version of Fiddler 1.2, when it's not. Fiddler2 is just a fork of Fiddler that's been ported to .NET 2.0 & allows for debugging SSL.

Screenshot of Fiddler Chart
fiddlerchart.png

June 28, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, May 21, 2007

A few Web 2.0 apps I've noticed recently

  • SlimTimer is a time-tracking web site.
  • BlinkSale lets you send invoices. You can import data from Basecamp.
  • Cashboard lets you track time and send invoices. It integrates with Basecamp.
  • Freshbooks also has time tracking and invoicing. It can also do online invoicing/payment. It integrates with Basecamp.

There are probably plenty of others, but anyhow. [edit: like the FOSS BambooInvoice for CodeIgniter]

BTW, is everything Web 2.0 written in Ruby on Rails lately? :)

May 21, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, May 07, 2007
I wrote about being able to use TFS with Visual Studio Pro before, since the typical instructions are to uninstall VS Pro, then reinstall VS Team Suite. However, I am happy to announce that the instructions in my previous post are correct & do work. So I saved, oh, like 4 hours.
May 7, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, March 23, 2007

I've been using Webmin to manage my Linux server, but I wanted the backup files to be timestamped so that subsequent backups didn't overwrite them. Since I didn't see an option for that, I created a simple Linux shell script that will prepend a timestamp to a filename. So for example, if the shell script is called stamp_file, then running the command

./stamp_file /var/backup/apache_config_backup.tar.gz

will make a copy of /var/backup/apache_config_backup.tar.gz file, and call it something like like /var/backup/20070323142367-apache_config_backup.tar.gz. Note that the original file is maintained, and that the copy starts with YYYYMMDDhhmmss.

Anyhow, here's the script

#!/bin/sh
# timestamp a file
# args: <fullfilename>

echo -e "\n\n"

# check arguments
if [ $# -ne 1 ]; then
        echo -e "Usage: $0 <fullfilename> \n\n"
        echo -e "e.g. $0 /var/backups/apache_backup.tar.gz \n\n"
        exit 127
fi

echo -e "Timestamping $1 \n\n"

# get file, directory, and new filename
fname=$(basename $1)
newname="$(date +%Y%m%d%H%M%S)-$fname"
dname=$(dirname $1)

# make a copy
cp -vf $dname/$fname $dname/$newname

echo "\n\nDone, created $dname/$newname\n\n"

Now for all my backup tasks I can just run the stamp_file script to make sure that I don't overwrite older backups, which means I can do daily or weekly backups & go back in time when I need to. Ideas for future expansion might be to have the script make folders for each month, copy the backups into those.

Linux | Tools
March 23, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



This was inspired by a form post over in startupping, where people were discussing doing projects in ASP.NET or PHP (specifically, LAMP: Linux, Apache, MySQL, and PHP).

I do both ASP.NET (.NET 2.0, C#, SQL Server) & PHP development (LAMP). PHP is pretty easy to pick up (especially if you've programmed in classic ASP), and there's a lot of information, libraries, etc. out for it. For an IDE you could use Zend Studio ($99-$300), PHP Designer ($50+), or free ones like SciTE or PSPad (both are good).

If you just want to try out some PHP development, I'd suggest getting a cheap hosting account from GoDaddy, Dreamhost, or somewhere else. Or even e-rice.net ($10/year). While you could install Linux locally & play around with shell access & administering Linux, Apache, MySQL, and PHP, you could end up spending a lot of time being a Linux sysadmin -- time that you could have instead spent strengthening your PHP & MySQL skills. One step up from a cheap hosting account would be to run LAMP as a virtual machine by downloading the free VM player and ready-to-go LAMP packages.

Once you get beyond coding some basic stuff, you may want to look into better PHP frameworks to help accelerate your development. I like Code Igniter, but here's a list of other frameworks you can read about.

FWIW, I develop in both environments b/c I have a range of clients & projects w/ different needs. One of my current projects is a site that includes a lot of features (social networking, wiki, CMS, data management), but the client wanted to leverage existing open source libraries & avoid building everything from scratch. So LAMP was a natural way to go. Other clients are Microsoft shops, so they want .NET apps built that their existing IT staff can take over.

Like any project, I think deciding on a technology involves many factors -- how skilled are you in it? Do you want to learn a new technology? What does the technology cost? Are there things about this technology (language features, environmental features, pre-existing libraries & applications) that will help the project to be more successful?

Lastly, if it's costs that you're concerned about, IMO Microsoft projects aren't as expensive as some may think. You don't need to spend a lot of money on the IDE -- there are cheap or free IDEs you can develop in, or (if you qualify) you can enroll in the MS Empower for ISVs program for $375, which gets you an MSDN Universal license w/ OSes & dev tools. The .NET framework is free, and you can run IIS on XP Pro. SQL Server Express is free & has (almost) all the features that you'd be using in SQL Server Workgroup/Standard/Enterprise. I have a client that didn't have a very large database, so their production site runs on SQL Express.

Also, if you're using a hosting provider for your site (which you usually should), choosing a Windows OS & SQL Server for your hosting account isn't usually significantly more expensive than Linux.

Still, obviously LAMP is cheaper (free, unless you pay $$ for a better IDE), and Microsoft costs can add up if you're looking at big server farms or are buying your OS & SQL Server licenses outright (for some reason). But of course switching frameworks has its own cost in terms of time & mistakes made while learning. If I were building something simple from the ground up, I might just choose the platform I was strongest in.

March 23, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, March 09, 2007

Brian Benzinger put together a big list of developer-oriented sites listing things about project collaboration, code control, bug/issue tracking, etc.. Basecamp is of course on there, but I saw a bunch of new sites that seems interesting.

His post merges well with this one.

March 9, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, March 07, 2007
Ok Zend Studio Standard is only $99, not "hundreds of dollars" like I said before. It comes with debugging, code-completion, & some other stuff. So maybe it's not a bad (non-free) alternative to PHP Designer, TruStudio, etc.
March 7, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, March 06, 2007

Let's say you already have Visual Studio 2005 Professional, but you now want to be able to connect to Team Foundation Server from within Visual Studio. Let's say you have a Team Suite CAL (needed to access TFS), but you want to connect to TFS using your existing VS Professional install, and avoid the "traditional" route of spending 3+ hours uninstalling VS Pro, SQL 2005, and everything else, then reinstalling VS Team Suite.

You could probably use the MSSCCI provider, but I sortof wanted to use the cool Team Explorer as a Visual Studio addin. So to do that, I believe you can

  1. Download & install the Office 2003 Primary Interop Assemblies. Per this post, even though Team Explorer requires Office Project, the interops are all that's needed.
  2. Download & install Team Explorer

Now you should be able to connect to TFS using Visual Studio Pro with the Team Explorer addin. This is untested (so far), but I'll be testing this theory extremely soon & letting you (my two faithful readers) know.

Mild rant: why is Team Explorer a 250mb download as an .IMG file? You'd think it could be way smaller if we only want the add-in version (instead of the standalone client), and in a ZIP file, too. Oh well.

Edit: I recently tested this process and it does indeed work. :)

March 6, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



FYI, if you're in the Microsoft Empower for ISV program, you don't get a Visual Studio Team Suite license, even though you do have a pretty good MSDN subscription. This was news to me, & was a bummer. I've read that one way to get Team Suite licenses at a discount is become a Certified Partner (fill out some info, get a certification, and pay $1300 or so), but that still hurts.
March 6, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, March 05, 2007

FYI I started a GoDaddy VDS (Virtual Dedicated Server) wiki at

http://godaddyvds.wikispaces.com/

My $0.02 on wikispaces: you can create a free, basic wiki there. It's not bad, although slow. I'd like to be able to set my preferences so that when I edit a page it starts with the text mode editor instead of the WYSIWYG editor, b/c
it takes considerably longer to edit a page using the WYSIWYG editor than the text editor. Also, the lack of any AJAX on the site is noticeable...everything you do involves a page load or page refresh (this is why the WYSIWYG editor is so slow, since it uses a number of popup windows).

So, if your audience is non-technical and/or you want a hosted solution, Wikispaces is fine. Or try StikiPad which is pretty similar (thx Scott).

Otherwise, if you have your own Linux host and/or you're more of a techie? Pick a different wiki. :) Moin Moin is easy to install, Giki is really easy to install (no search feature though), TWiki is easy enough...there are a lot of wikis you can compare. A number of hosting providers (e.g. DreamHost) offer various wikis as one-click installs, which is even easier. :)  And of course there are a few ASP.NET Wikis you can install, too.

Other | Tools
March 5, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, March 02, 2007

I updated Project Timer a bit. Projects are now grouped by day (each day has different projects), you can record notes for a project, and all your data is saved on your local machine.

Future ideas would be to let the user have a master project list, export data to Excel, and integrate with sites like SlimTimer.

 

March 2, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, March 01, 2007

If you want a better administrative panel on your GoDaddy VDS/VPS, and you have PHP5 installed, you can install WebMin. SSH into your box using PuTTY.

First we want to install Perl's Net::SSL library, which allows Webmin to run under SSL. But first we need the OpenSSL source code:

su - root

cd /usr/local
wget http://www.openssl.org/source/openssl-0.9.7f.tar.gz
tar xvfz openssl-0.9.7f.tar.gz
mv openssl-0.9.7f openssl

Next we install perl's Net::SSL library via RPM:

wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/extras/4/i386/perl-Net-SSLeay-1.26-3.fc4.i386.rpm
rpm -i perl-Net-SSLeay-1.26-3.fc4.i386.rpm

Now test to make sure Net:SSLeay works. When you run the below command you should get no response. If you get an error then it's not installed correctly:

perl -e 'use Net::SSLeay'
Ok, now we can download and install WebMin:

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.330-1.noarch.rpm
rpm -U webmin-1.330-1.noarch.rpm

Now you can log into webmin at https://yourserver:10000. Log in under the same account as your PuTTY account.

Note the above assumes you're installing version 1.330 :)

Hosting | OS | Tools
March 1, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



activeCollab is a free, open source competitor to Basecamp, a very popular online project collaboration tool. It's been getting good buzz & good steam, but I was bothered to read this on their blog a few days ago (edited):

There will be no 0.7.5 or any other major version in 0.x branch. Next major release is activeCollab 1.0 and it is scheduled for summer 2007. Code in 1.0 branch is not compatible with 0.x code so parallel development is not possible.

To keep the development process focused as possible there will be no public beta versions.

activeCollab 1.0 and future core development will be developed exclusively by company that [Ilija Studen, the activeCollab founder] started, and [the] community will be able to contribute by developing plugins, themes and translations.

Note that the above are exerpted from the full blog post. When asked about licensing, Ilija responded with

Can’t tell much about licensing, but we will most probably go with something used by profit oriented open source projects (MySQL, SugarCRM…) One thing is for sure – there will be a free and open source version that match current feature set so current users will not be let down when 1.0 gets launched.

Whole point of this transformation is to provide more value to users, not to drive them away. We are aware that some people will now like the idea of profit oriented open source project, but still being able to provide good support, dedicated development team and guaranty that we’ll be here next year is something that we find really important. Hope that most of the users agree with us on that.

So...hmm. To me it sounds like activeCollab is privatizing the project, disappearing for several months before the next release, and focusing more on profit. Not a good sign, really...I felt it had potential to move ahead, fueled by contributions from the community, but whether for money-seeking and/or project management reasons, that sounds like it's going to change. It might work out well, but I could also see the project disappearing for months while the community waits patiently for summer 2007. The community asks about progress, but since the source & beta are closed, no one can monitor progress. The deadline slips to fall 2007, then winter 2007, and ... well, could be bad.

Granted, I could be wrong .. I don't know Ilija or the team he's assembled, and 37 signals did very well with a small team & closed source when they built BaseCamp. Of course, one of activeCollab's strengths (IMO) is that it's not BaseCamp.

I wouldn't be surprised to see some of the activeCollab community forking off the source code on their own & keeping a separate open source version of activeCollab under a new name. It happens with wikis a lot, I know. :)

Edit: this thread in the activeCollab forums is worth reading if you want more background on Ilija's motivation. It seems like Ilija wants to work on activeCollab, wants it to remain free, and wants it to be a successful product that's still around 5 years from now. But, he wants to earn a living on it, and he feels like having a controlled (not open?) project with a small team (ideally in the same physical space) is the right way for him to achieve that. Not that there's anything wrong with his goals & opinions, but I think the activeCollab community was definitely (IMO) caught off guard.

March 1, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [3]



Read/Write Web has a writeup on software for virtual teams. Stuff for project collaboration, VoIP, screen sharing, source code repositories, etc.

Also see my other tools roundup post, or the Tools category.

March 1, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, February 28, 2007

I threw together a small windows app to help track projects. You can download it here.

I guess it would be better as a web app, but anyhow...oh, and feedback is always appreciated.

Edit: just saw SlimTimer today, a web-based time tracker thingy. Looks like my little project timer might be off to an early grave. :)

February 28, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, February 22, 2007

I've been doing some PHP development lately (yes, I know, you're probably wondering why I'm not doing Ruby on Rails) and I started to look around for a good PHP IDE. Zend Studio is supposedly awesome, but it's hundreds of dollars. I'll be trying out Eclipse (or TruStudio, which is built on Eclipse) soon, but I heard it's slow. We'll see.

Recently I came across PHP Designer recently & it doesn't seem too bad. It has built in help, context highlight, and (very important for me) statement completion/Intellisense/Code Assist/whatev. It's only a 14 day trial (not 30?), but currently it costs $54.

PHP Designer Screenie

February 22, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Wednesday, February 21, 2007

From the WURFL list, some good suggestions on ways to simulate mobile browsers & test mobile-aware web apps using Firefox plugins:

Tom Thurston suggests

...the firefox "user agent switcher" extension. Just add it, and create profiles for all the devices you wish to "emulate", i.e. use MOT-V3 and your platform will think that you are a motorola v3 hitting your site, and render xhtml-mp, and deliver the appropriate assets, even though you are on a web browser.

Alejandro Guerrieri says :

The "user agent switcher" for Firefox is a great tool. I usually combine it with 3 more plugins that can make your life happier and easier:

- "Modify Headers" ->
https://addons. mozilla.org/ firefox/967/

Allows you to modify _any_ header being sent by Firefox. It can replace "user agent switcher" since you can set the header "user-agent" also, but UAS it's quite more convenient for that (select the UA from a drop down menu). Anyway, if you want to set any other header (like some "accept" or maybe "x-msisdn") this is the tool to do it.

- "wmlbrowser" ->
https://addons. mozilla.org/ firefox/62/

Allows your Firefox to render WML pages, though some features doesn't work like a real device (most notably "on enter forward"). Anyway, really great
to test WML-Only pages or try WURFL with "retro" devices ;)

- "XHTML Mobile Profile" ->
https://addons. mozilla.org/ firefox/1345/

Adds support to mime-type "application/ vnd.wap.xhtml+ xml", not natively supportd by firefox, which only supports "application/ xhtml+xml" .

I usually develop with those four plugins. Sometimes I also use some SDK's from device manufacturers, but most of the time I use Firefox with that plugins enabled.

Thanks Tom and Alejandro!

February 21, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Saturday, February 17, 2007
Saw this list of GTD tools on Digg. Or maybe somewhere else. Anyhow, they look kinda cool, but I'm still going to install Outlook 2007 and see if that works as well.
February 17, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, February 16, 2007

New version of FireBug is out (v1.0.1), if you use javascript and FireFox, get it! Release notes for 1.0.1:

  1. Support escaping the % sign in console.log() calls using %%
  2. Support "Find Next" in the CSS tab
  3. Fixed problem causing inconsistent breakpoint triggering
  4. Deleting a disabled CSS property will work properly
  5. Fixed bug that prevented editing of DOM properties with numeric values
  6. Inserted warning about incompatibility with Sothink SWF Catcher extension
  7. Fixed incompatibility with HTML Validator extension

And no, I'm not going to post a blog every time a minor rev of something comes out. Only sometimes. :)

Code | Tools
February 16, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



FYI, TinyMCE is a nice little editor that makes it super easy to turn a regular textbox into a WYSIWYG HTML editor.

You can play with a demo and see how to install it.

I haven't looked into how to extend it, but if you have a number of textboxes containing editable HTML, you owe it to yourself & your users to bolt something on like TinyMCE.

FWIW I've also worked extensively with FreeTextBox, and while it's nice, installation is a bit more involved, and progress on it seems to have slowed. Plus it's not totally free open source, and the HTML output isn't very XHTML (unless you buy the non-free version).

TinyMCE is cool because it's a literal bolt-on that you can include w/o touching your ASP/ASP.NET/PHP code if you don't want to.

To be fair, another really popular WYGIWYG editor is FCKeditor. I haven't used it, but I've heard it's the bees knees.

And lastly, there's a new potentially-hip WYSIWYM (What You See Is What You Mean) editor cll WYMEditor that I mentioned a while back. Their goal is to keep the outputted XHTML simple, since oftentimes users can paste or SHIFT-click their way to producing crappy HTML that "looks" good to the eye but is horrible (e.g. extra breaks, inline styles) for CMS systems.
Code | Tools | Web
February 16, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, February 06, 2007

Today, TechCrunch posted a review of AllTheCode, a new code search site. So now we have at least

  • AllTheCode  -- only java results right now, no filtering available
  • Krugle -- can specify language and project. Can filter results by where the search term appears (e.g. comments, method name, etc). Can also search "Tech Pages" (a selective web site search) and projects.
  • Koders -- can specify language and license
  • Google Code Search -- can specify language, license, package, & file. Can search using regular expressions.
  • Codase -- can specify language (Java, C, or C++ only), plus advanced things like search within method name, class name, etc.

Why Use Code Search Tools?

Code search tools are handy because as a developer, your productivity and quality can be greatly affected by how you come up with the code to put into your applications. Sure, you could write everything from scratch, but that's too slow. Reuse is a good thing. Ideally you should be able to find existing samples, snippets, libraries, and frameworks that you can adjust and glue together.

In the old days you'd have to store away your favorite code snippets on your PC, or thumb through archived issues of Doctor Dobb's Journal. Later, you'd buy CDROMs filled with sample code, and tap your fingers while your drive whirred away. Eventually those code libraries could be installed on your PC. Recently, you'd use Google and other search engines (well, mostly Google) to search for code. But searching on "VB MD5 Algorithm" might get you some relevant results, but also a lot of junk.

So now we have code-specific search engines, allowing us to (hopefully) enter in our search terms, our programming language, maybe our license preference, and get back a set of results sorted by popularity, maybe with a Digg-esque rating and comment system so we know which code snippets are good and which suck. Right now if I pulled up an MD5 algorithm, how would I know if it even worked correctly?

Testing the Sites

To test the code search engines out, I did a search for "luhn" in Java on all five sites. FYI the Luhn Algorithm is used to test for invalid credit card numbers -- it's nice because a lot of invalid numbers can be eliminated without having to connect to and pass the number to a credit card gateway. All five sites returned matches (Codase with some extra work), and all had an integrated source viewer so I could review the match.

So here's what I found:

AllTheCode

AllTheCode returned 29 matches, but I didn't see any search hit highlighting or anything. A lot of them were duplicates, too.
allthecode

The source code viewer was ug-ly, bad color choices. And interestingly, my term "luhn" wasn't in the document at all. I tried some other searches & it seems AllTheCode is having some sort of issue, because most or all of the matches were totally irrelevant to my search. Chalk it up to Alpha status code, maybe. Hmm...maybe code search engines should let us filter against alpha, beta, or release code? There was a link to download the code file, but no links for the project home page or project zip file. No links to view other files in the project, either.
allthecodeviewer

 

Google Code Search

Google Code Search found about 100 matches and highlighted the search term. It also showed the code license and a link to the zip file containing the code file. It seemed to do a good job at suppressing duplicate files (e.g. the same code file in multiple projects), something none of the other search engines did. Not a huge deal, but nice.
GoogleCodeSearch

The code viewer was spartan (as with many things Google), but it had links to other files in the project, and it automatically scrolled me to the spot in the code where "luhn" was found. A very nice touch, especially for huge files. There were handy links to download either just the code file, or the whole project in a zip file. No link to visit the project's home page (e.g. on SourceForge) though, which might make it annoying if you wanted to check for later versions or supporting documentation.
googleviewer

 

Koders

Koders found 23 matches & showed a bit more information than Google did, like LOC, copyright and/or license info, links to SourceForge project pages, etc. Interestingly, koders runs on ASP.NET, a rarity in the Web 2.0 world.
koders

The code viewer was a bit nicer than Google's, and the search term was highlighted. On the left side was links to other files in the project plus anchor links to the various methods in the code file, which was cool. I still had to scroll or browser search to find out exactly where in the file it said "luhn," but at least it was highlighted. I think they should have provided anchor links to exactly where in the file the term was found. I could download the code file, or browse to a "project home page" of sorts (which had links to SourceForge and some stats), but I didn't see an easy way to download the entire project right from koders. Koders also offers a plugin for IDEs like Vistual Studio and Eclipse.
kodersviewer

koders "project home page"
kodersproject

 

Krugle

Krugle found 21 matches. Like Koders, it had some links to the SourceForge project pages and showed the license. It also has a neat feature allowing you to filter results based on where the search term appears (e.g. only show results where "luhn" is part of the function definition), but this feature didn't work very reliably.
krugle

I must say that Krugle has the prettiest code viewer. I liked the highlighting (though using italics for comments is probably a bad idea for readability), it had a cool treeview of the code repository, and it opened the code files in separate tabs so you could browse through multiple results. Yes I know you can also middle-click a link to open a new browser window tab, but still. I could download the code file and link to the project home page, but I couldn't download the whole project from Krugle.

One bad thing is that Krugle heavily uses AJAX, and thus your browser only shows the www.krugle.com link, no matter where you are. Makes it hard to bookmark stuff. You can click the "Create Link" button to get a greybox popup with a unique tinyurl-ish link to your search results, but that's one extra step I'd rather not take. Another bad thing is it didn't highlight my search term in the code, and my browser's search feature didn't work on the AJAX-y page. So I had to manually scan the whole code file to find out where "luhn" was. Not good for huge code files. :)
krugleviewer

 

Codase

Edit: I liked the idea of offering different types of searches, but got inconsistent results on Codase. A smart query (the default type of query) for "luhn" in java returned no matches, while a free text query for "luhn" in java returned 1. A free text query for "luhn" in all languages returned 11 matches, but Codase said they were all java file. So why those 10 extra matches didn't show up before isn't quite clear to me. FYI, searching for "validate credit card" returned more matches, but it still trailed the other engines. The presentation is nice, with syntax coloring in the search results for better readability.

codaseresults.png

The code browser is also pretty nice looking, too. Nice highlighting, with links to download the code. No project links, there, though.

codaseviewer.png

Conclusion

Right now I'd put Google at the top in terms of number of searches, duplicate file suppression, and barebones ease of use. Koder is at a close second with a better code viewer, handier project links, and some neat tools like IDE plugins. I could see Koders and Google switching places depending on your preferences.

Krugle was in third place with an attractive UI but average features. Krugle offers some interesting stuff that the other engines don't (MyKrugle for attaching notes and saving documents, code position searches, tech page searches), but IMO they seemed like not a lot of people would use them.

Currently, AllTheCode is just too alpha/buggy to consider, plus the fact that it only searches java limits it greatly. Codase could be interesting with its deep filtering ability and syntax coloring, but I think mostly people would just use the "smart search," and the poor number of results and limited languages hurts Codase.

Other Thoughts

FYI, to simulate a developer who might need to validate credit cards but wouldn't know the name of the algorithm (i.e. "luhn"), I also did a general search for "validate credit card" in java code and got a lot of results (100+) in Krugle, Koders, and Google Code Search. The results returned seemed applicable, and interestingly, the top few matches were different for all three engines.

Also, I'd like to see some community-based value added in, with comments or diggs to help me decide which algorithm to pick or avoid.

 

 

Code | Tools
February 6, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [4]



 Wednesday, January 31, 2007

I came across Unfuddle today. It's an ASP model that offers hosting for project management tools, source code, and bug/issue tickets. Plans range from free to $100/month.

I've been looking for a simple bug tracking solution, and while Fuddle may not be the right way to go (for me), it seems like an interesting offering. They use Subversion for source code hosting, and a Rails-built platform for managing projects, tracking to-dos and milestones, handling bugs and feature requests, entering time spent, and keeping a project moving along. Might be a good option if you have a small team of developers and don't want to deal with setting up a source code repository, and you're tired of emailing Excel spreadsheets around.

Note that hosting companies like Dreamhost offer easy Subversion setup, but AFAIK don't offer the other stuff -- issue and project tracking.

CropperCapture[16].Png

January 31, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, January 30, 2007

I was looking at wikis recently and thought I'd list out the ASP.NET wiki's I've noticed. Obviously there could be more, but here are the one's I've seen:

  • FlexWiki -- been around for a while, easy to install & use.
  • ScrewTurn -- has gotten some good buzz recently, seems the most active recently w/ a number of interesting features.
  • Perspective -- I recently noticed this. Has a WYSIWYG editor (which I think is good for corporate adoption). You can also attach & embed files (e.g. Microsoft Office Docs) & images, & search across them. Seems like it might be complicated to set up & install.

I believe they all can do authentication/authorization through NTFS and/or LDAP, so you can administer the permissions like you would any other IIS web site.

Here is a WikiMatrix comparison page of the above three wikis, although I don't believe their information is completely current.

January 30, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, January 24, 2007
Check out Vertigo Software's Cliff's Notes for a Team System Install. It'll walk you through setting up Microsoft's Team System so you can see what all the fuss is about and finally get away from Visual SourceSafe.
January 24, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, January 16, 2007

I heard a rumor that Aptana is a great editor for JavaScript. I haven't tried it, but Rick Strahl likes it, which is a good kudo in my book. Editing JavaScript in Visual Studio is "okay," not great, so I welcome a better editor.

Aptana's site also has a bunch of great video tutorials, for those of you who want webcasts.

Aptana Screenshots

"Code Assist" (Intellisense) for JavaScript, CSS, & HTML:
  

 

more and larger screenshots >>

January 16, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Tuesday, January 02, 2007

I noticed a different kind of WYSIWYG editor today (credits to Brian R) called WYMeditor. It strives to provide an easy-to-use content editor for non-technical users, while keeping the formatting options to a minimum. It's actually dubbed as a WYSIWYM (what you see is what you mean) editor, and outputs XHTML for easy insertion into CMS systems. Plus, it's open source, and very lightweight. 

Their words:

WYMeditor's main concept is to leave details of the document's visual layout, and to concentrate on its structure and meaning, while trying to give the user as much comfort as possible (at least as WYSIWYG editors).

I like the idea behind WYMeditor, because it strives to avoid my beefs with many existing content editors:

  • Many common WYSIWYG editors allow too much control over the content, allow users to paste in horribly-mangled HTML from Word, etc., and/or output HTML that's laden with inline styles, extra formatting (extra breaks, tables, non-breaking spaces), and not XHTML. The content often "looks ok" in the editor, but then doesn't work out well in the site. Or, the layout can get "messed up" in the editor, but since the user doesn't look at or understand the underlying HTML, he or she isn't able to fix the formatting issue without deleting all the content and trying again. Lastly, trying to clean up the editor's HTML output & insert it into an existing page template can be tricky and leave you with a funny-looking page.
  • The other direction, using a text-only editor with special characters for formatting (like many wikis do) minimizes problematic formatting, but is less natural to non-technical users who are expecting something to "look like Microsoft Word." And I don't blame them -- Alan Cooper wrote in one of his books about how often programmers forget to design interfaces that work the way users are used or and/or expect them to, and how that can cause unexpected usability issues or other problems. Not that we should never offer anything new to users with old habits, but...well you know what I'm getting at.

However, WYMeditor is still young, barebones, & has its share of issues (no nested lists, certain browser compatibility, trouble deleting HTML tables, etc). Still, WYMeditor might be a good option now or in the future, depending on your audience and application.

 

January 2, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, December 18, 2006

I saw this nice Code Smell summary at Berkeley thanks to Diederik Krols' anti-pattern blog. The Code Smell Summary (or maybe it's a cheat sheet) gives nice overviews of bad code practices, (briefly) explains why they're bad, and provides links to refactoring.com's illustrations and examples to demonstrate the problems and the cures.

Reviewing the code smell summary will help you become more aware of problem code in your own projects. Then if you really want feedback on your code, you can start using code analysis tools like FxCop or NDepend. :)

You can also read through some of the common refactorings as well as this list of database refactorings, although there's some sifting required to get to the real "a ha, that's a good idea!" stuff. I will say that the refactoring sites don't provide much explanation on why the ideas should be followed, presumably so that we'll be forced to buy the books.

Code | Tools
December 18, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, December 13, 2006
The December 2006 CTP of Sandcastle, Microsoft's free .NET 2.0 documentation tool, is available. It has some new features and a bunch of fixes.
December 13, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, December 08, 2006

One of my clients has employees across the country at their clients' offices, and sometimes users at a given location report that their connection to the company web site is slow. To assist with troubleshooting, I usually have them first run a bandwidth speed test at SpeakEasy and/or SpeedTest.net. I have them choose a test server closest to where the company web site is hosted (in this case, Chicago). Several times in the past the speed tests would demonstrate a slow connection, and we'd then be able to start troubleshooting.

That doesn't always resolve the issue, though -- sometimes the speed tests would be fine, but access to the site would still be slow (again, only for those locations). I recently found another free traceroute tool to help diagnose connection issues between the user and the web site. I prefer web-based tools since oftentimes the user doesn't have rights to install desktop bandwidth monitoring tools.

I've thought about putting a speed test on our web server itself. You can actually host SpeedTest.net's speed test for $400/year, or Visualware's MySpeed speed test for $250/year.

I found one or two free tests that you can seemingly host, but they were java source code & required linux. I suppose making a very simple Flash-based speed test wouldn't be too hard -- download some uncompressible files (like ZIPs, JPGs, MP3s) from the web site and measure how long it took to download them, then display the results. For the upload test, generate some data, POST it to the server, and measure that upload time (either on the client and/or the server). Or I guess one could do the same thing using AJAX, too, maybe.

December 8, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, December 06, 2006

Installing Subversion & TortoiseSVN

James Kemp posted a guide to installing Subversion on Windows. Unlike most guides on the net, his is pretty up to date.

Note that when it comes time to install svnserve as a service, just use this command line instead of James' longer steps:

sc create svnserve 
binpath= “\”C:\Program Files\Subversion\bin\svnserve.exe\” 
–service –root c:\pathtoyourrepository” 
displayname= “SVN Server” depend= tcpip

Note that the above command should be done all on one line -- I just broke it into multiple lines for display purposes. It also assumes you installed Subversion to the default location.

TortoiseSVN is really easy to install, & adds right-click context menus to Windows Explorer so you can perform SCM commands.

Once you have Subversion & TortoiseSVN installed, you can perform checkins, checkouts, branches, merges, etc. with wild abandon.

Integrating with Visual Studio

If you want to integrate Subversion with Visual Studio, you can use the AnkhSVN Visual Studio Addin. However, be warned that AnkhSVN isn't fully released yet (it's on RC4). In fact, reading the blog of one of AnkhSVN's developers, statements like "renames and deletes were very buggy", "a number of Ankh error reports had an AccessViolationException", and "I was pretty shocked to see that we do in fact delete files when Exclude From Project is invoked" kinda scare me. IMO you should probably treat it like a beta product for now ... you don't want to lose vital source code.

So...while I like the idea of Visual Studio integration, I just can't have a lot of bugs, crashing, and surprise deletions on source code. I'll just stick with TortoiseSVN for now (which is easy enough to use, just switch to Windows Explorer, make a few clicks, then switch back to Visual Studio).

December 6, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, December 04, 2006

FireBug, that awesome javascript/css/ajax/dom debugger plugin for Firefox, has a new version out. Blurb from their landing page:

Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

Just the way you like it

Firebug is always just a keystroke away, but it never gets in your way. You can open Firebug in a separate window, or as a bar at the bottom of your browser. Firebug also gives you fine-grained control over which websites you want to enable it for.

Learn more

Inspect and edit HTML

Firebug makes it simple to find HTML elements buried deep in the page. Once you've found what you're looking for, Firebug gives you a wealth of information, and lets you edit the HTML live.

Learn more

Tweak CSS to perfection

Firebug's CSS tabs tell you everything you need to know about the styles in your web pages, and if you don't like what it's telling you, you can make changes and see them take effect instantly.

Learn more

Visualize CSS metrics

When your CSS boxes aren't lining up correctly it can be difficult to understand why. Let Firebug be your eyes and it will measure and illustrate all the offsets, margins, borders, padding, and sizes for you.

Learn more

Monitor network activity

Your pages are taking a long time to load, but why? Did you go crazy and write too much JavaScript? Did you forget to compress your images? Are your ad partner's servers taking a siesta? Firebug breaks it all down for you file-by-file.

Learn more

Debug and profile JavaScript

Firebug includes a powerful JavaScript debugger that lets you pause execution at any time and have look at the state of the world. If your code is a little sluggish, use the JavaScript profiler to measure performance and find bottlenecks fast.

Learn more

Quickly find errors

When things go wrong, Firebug lets you know immediately and gives you detailed and useful information about errors in JavaScript, CSS, and XML.

Learn more

Explore the DOM

The Document Object Model is a great big hierarchy of objects and functions just waiting to be tickled by JavaScript. Firebug helps you find DOM objects quickly and then edit them on the fly.

Learn more

Execute JavaScript on the fly

The command line is one of the oldest tools in the programming toolbox. Firebug gives you a good ol' fashioned command line for JavaScript complete with very modern amenities.

Learn more

Logging for JavaScript

Having a fancy JavaScript debugger is great, but sometimes the fastest way to find bugs is just to dump as much information to the console as you can. Firebug gives you a set of powerful logging functions that help you get answers fast.

Learn more

December 4, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, December 01, 2006

position:absolute had a post about the new Opera Mini Simulator, and I must admit it work really well. Now granted you can also download normal the Opera browser & run it in "Small Screen" mode, but the simulator seems better.

December 1, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



Found another big list of accessibility checking tools at NSCU. Maybe I should start making a comprehensive list. Or a wiki. Or a delicious link set. Or something. Anyhow...

Fangs, a Firefox plugin, is interesting. I tried it out. Basically it displays a text version of your site similarly to how JAWS (the most popular screen reader) would read it. So it helps you look for a bunch of repetitive stuff, etc. It's not perfect, though, but nice for a quick page check.

Google Home Page
CropperCapture[3].Png

Fangs' "intepretation" of google.com would be read by JAWS
CropperCapture[4].Png

Fangs' list of links (similar to JAWS' link list)
CropperCapture[5].Png

 

December 1, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, November 28, 2006

Ran across this post from Chris Fulstow on 10 free tools for Visual Studio. And then of course there's the 10 Must-Have Visual Studio Addins on MSDN. And Scott Hanselman's Ultimate Tool List (does the guy ever sleep?).

Since it's tool overload, I'm going to try out three:

WinMerge

WinMerge is a free diff/merge tool. Sure, Beyond Compare is awesome, but it's not free. And I like free. See how WinMerge points out exactly what's different in the lines, rather that just saying "hey these two lines are different somehow." I think that's awesome.

GhostDoc

Ok, I figured out what GhostDoc does. It doesn't generate a help file for you (like I thought when I first read the name) ... it just auto writes the triple-slash XML Documentation comments for you, based on reflection and naming inspection. I usually write summaries for all my methods, but I leave the overridden methods undocumented and let the documentation tool copy the comments from the underlying type. But it's cool that GhostDoc will do that, too. I also don't usually write comments for my method parameters since they're often obvious enough from their name or from the method name (e.g. AddTwoNumbers(int firstNumber, int secondNumber) -- what's your guess on what the params are for?). But I like that GhostDoc will give those documentation anyhow. It feels more "complete" I guess. And definitely makes the generated help files look more professional. The below example is all auto-generated comments.

/// <summary>
/// Appends the HTML text.
/// </summary>
/// <param name="htmlProvider">The HTML provider.</param>
public void AppendHtmlText( IHtmlProvider htmlProvider )

FxCop

We'll see how this one turns out. FxCop inspects your compiled assemblies and lets you know if it has sucky design, naming, performance, security, or localization. I certainly don't expect it to be gospel, but it's probably nice to help point out stuff you've missed.

November 28, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, November 27, 2006

So I and some other mobile developers have been discussing where to host a new .NET mobile project: SourceForge or CodePlex?

SourceForge is the defacto choice. It's known, has a bigger community, offers Subversion, and is ahead in general features.

CodePlex is the Microsoft-specific answer to SourceForge. It's an upstart, uses Team Foundation Server as source control (which BTW you don't need Team System to use -- just use the free Team Explorer), but has the M$ money behind it and might be a better place to put a project if you want to get attention from the .NET community. Since it's smaller, you also might have a better chance to get noticed.

Unfortunately, CodePlex seems to be down this morning ... every page is giving me "The server has experienced an error."

Edit: it's back up now ... must have been a momentary thing.

 

November 27, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, November 22, 2006
Got an email today about Google Apps for Domains. Basically you can have Google Calendar, GMail, Talk (chat), and Page Creator (wiki) on yourdomain.com. Free during the beta period, and I suspect that Google will soon include other apps like Google docs, too. Get yourself one of those Outlook/Google Calendar sync tools, and you've got a tempting small business solution.
November 22, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Saturday, November 04, 2006

Mobile Web Sites in ASP.NET

I've been working on a mobile-enabled ASP.NET application lately, and overall it seems like pages did best when I

  • Used valid XHTML
  • Used as few tables & images as possible
  • Kept styles & scripting to a minimum & put them in a separate css
  • When I wanted to emphasize things I'd use standard tags like h1, h2, em, etc.

Remember that ASP.NET will degrade some of its functionality (e.g. client-side javascript validation) if it thinks the browser can't handle it. Since mobile browsers have a distinct user agent string, that means they'll be treated like a very basic web browser by ASP.NET. So you should make sure that your application still works (and looks ok) by using some emulators to test functionality.

Openwave Phone Simulator

Openwave provides a few versions of the Openwave Phone Simulator that lets you see how your site performs on the Openwave Mobile Browser. It's pretty easy to install -- log in, download the simulator, run it, & type in the URL you want to surf. Note that there are different versions of the simulator based on the browser version to want to emulate. So you can check this list of phones, see which version of the Openwave browser they use, & then get the matching Simulator version. So yes you're probably gonna be downloading at least 5.1, 6.2.2, and 7.0.

Generic devices on the Openwave Simulator version 7.0 (left) and version 6.2.2 (right):

CropperCapture[3].Jpg Openwave 6.2.2 on google.com

 

Windows Mobile Device Emulator

You can also use the Windows Mobile Device Emulator to emulate Pocket PC & Windows CE devices. Note that to use it easily you'll also want to install the Virtual Machine Network Driver and ActiveSync 4.2. Then reboot, even if it doesn't prompt you to.

Then in order to surf the web with your emulated mobile device, you

  • Open up Device Emulator Manager
  • Right-click an Emulated Phone & click Connect
  • Once the phone fires up, go into Device Emulator Manager, right-click the same phone and click Cradle.
  • After a few seconds, ActiveSync will open up & ask you what kind of connection to create. Choose a Guest connection.
  • Then you should be able to open up Internet Explorer on the emulated phone & surf around. You can type using your keyboard and navigate around the page using the arrow keys (on your keyboard).

Smartphone 2003 SE device profile on Windows Mobile Device Emulator:

Pocket PC

 

November 4, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, November 03, 2006

I took a look at NaturalDocs today for documenting C# code.  It works by looking at normal comments (/* */ or //) above your methods. It then parses those comments & pretties them up.

All I can say is -- meh. It's very fast, but doesn't parse XML (triple-slash) comments, and it seemed to miss a number of my classes (I think partial classes messes it up).

I don't mean to slight it, because I think it's helpful and fast. I just think it's probably better for documenting stuff like Javascript, Actionscript, etc. If they added support for triple-slash comments & partial classes then it might be more useful for C# etc in terms of its sheer speed.

November 3, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Sunday, October 29, 2006

http://ankhsvn.tigris.org/screenshots.htmlRC4 of AnkhSVN, a Visual Studio plugin that works with Subversion, was released yesterday. From the site:

AnkhSVN is a Visual Studio .NET addin for the Subversion version control system. It allows you to perform the most common version control operations directly from inside the VS.NET IDE. Not all the functionality provided by SVN is (yet) supported, but the majority of operations that support the daily workflow are implemented.

A screenshot from the screenshots page:

Code | Tools
October 29, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, October 24, 2006

Data Dictionary Creator was recently released by Jon Galloway. It's a UI allowing you to document your SQL Server databases by storing the documentation in extended properties, and then exporting it as Excel, XML, etc. The nice thing is it stores the documentation in the same place that SQL Server normally stores its descriptions.

So instead of using the SQL Server tools to update your descriptions like this (ugh):

sqlserverfielddescription.gif

You can now use a cool lil' UI to do it, like this!

Screenshot

October 24, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Sunday, October 22, 2006
I found another online accessibility checker for Section 508 etc compliance at www.aprompt.ca. It's web-based but also has a downloadable Windows version.
October 22, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, October 11, 2006

I'm using dasBlog because it's .NET based & I wanted to host it myself. But I've started to tire of the IE-based interface and thought it was time for a desktop tool. BlogJet is the obvious choice, but I wanted to see if there were any decent free tools available.

Tankfully, Scott Hanselman had a post about Windows Live Writer (MS' new free blog writing tool) and some other editors. So we'll see how it goes. ;)

October 11, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



So I had written a big post about slow debugging with Visual Studio and how I got my time down from 30 seconds to 10 seconds. And then IE hung before I could save my post. So, that was kinda annoying, because I thought it was a good post. So maybe I'll be buying BlogJet soon. :/

Anyhow, here's the Cliff's Notes version *sigh*:

  • Run msconfig.exe and use the Startup tab to get rid of programs that you don't need running (e.g. Quicktime)
  • Configure your antivirus program to not scan your ASP.NET Temporary files directory
  • Defrag your hard drive & make sure it has at least 15% free space.
  • Clean up IE's temporary files.
  • Disable Windows services you don't need using Black Viper's Windows XP Services Guide (no longer online, but available here at the Internet Archive). Use services.msc to disable services, not msconfig.
  • If you develop on your laptop, make sure it's plugged in & running at full speed.
  • Specify a new ASP.NET temporary directory via the web.config's <compilation tempDirectory="H:\new directory">. Pick a different partition, a different drive, or use a RamDisk (free one, commercial one) as your temporary directory for even more speed.
  • Make sure you don't have duelling assembly references using this ScottGu tip. Also check your project's Properties->Reference Paths for network or internet references.
  • Look at your Output Window when building to see if you notice any long pauses before certain things. I consistently saw a 5+ second pause preceeding some log4net error messages. After fixing my log4net config and changing my code to initialize log4net on demand (i.e. if I don't log anything, I don't load log4net), my build time dropped by 5-10 seconds.
October 11, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, October 05, 2006

In the .NET 1.1 days, documentation could be generated easily and freely using nDoc. Understandably, the fact that it was free is partly why nDoc has now been discontinued.

Since nDoc doesn't support .NET 2.0, you'll need something else to make CHM and other help files for your new Visual Studio projects. That's where SandCastle, the documentation tool recently provided by Microsoft, comes into play. SandCastle is the new free .NET 2.0 documentation tool of choice (if not the only one), and there's a new Septmber 2006 CTP version out. SandCastle is heavily command-line driven, with many steps involved, which is not what I like to deal with when I need to make documentation. I'd rather automate it, which is where SandCastleBuilder (one of several tools that can automate SandCastle steps). Here's a quick walkthrough on how to use SandCastleBuilder and SandCastle to generate rich help files quickly and easily.

Download the Files

  • First look in your Add/Remove Programs and remove older versions of SandCastle and any helper UIs. You can keep HTML Help Workshop installed, though.
  • Get SandCastle: Go to SandCastle's Wiki at sandcastledocs.com. There should be a link to download the latest version of SandCastle (you can get the September 2006 CTP here).
  • In order to generate HTML help 1.x .CHM files (my recommendation), download HTML Help Workshop here
  • To generate HTML Help 2.0 .HxS files, then
    • If you have Visual Studio 2005, you should download the Visual Studio 2005 SDK here.
    • If you have Visual Studio 2003, download the Visual Studio Help Integration Kit (VSHIK) 2003 here.
  • Get a tool to automate SandCastle. I highly recommend Eric Woodruff's SandCastleBuilder -- it looks very similar to nDoc, supports a lot of features, and unlike many of the other supporting tools, it worked for me the first time around and has been updated to support the latest SandCastle CTP. It's interface is a little more imposing than some of the other tools, but you can run it with my of the default settings.

Fixing a bug with the September CTP (optional)

SandCastleBuilder can generate your help files as CHM files, HxS files, and/or as navigatable websites that look a little like MSDN's online documentation. If you only want to make a CHM or HxS file, you can skip this step. Otherwise, if you want to create a navigatable help website you'll need to fix a small SandCastle bug according to the SandCastleBuilder's documentation:

With the September 2006 CTP, when generating the help as a website, the resulting output will cause JavaScript errors when loaded in Internet Explorer. This is the result of a bug in one of the script files that tries to access a style sheet with an MS-Help format URL. Open up the Presentation\Prototypes\Scripts\StyleUtilities.js file in the SandCastle installation folder and change the getStyleDictionary() function to the following:


    function getStyleDictionary() {
        var dictionary = new Array();

        // iterate through stylesheets
        var sheets = document.styleSheets;
        for(var i=0; i<sheets.length;i++) {
            var sheet = sheets[i];

            // It can't handle ms-help URLs
            if(sheet.href.substr(0, 8) == "ms-help:")
                continue;


            // get sheet rules
            var rules = sheet.cssRules;
            if (rules == null) rules = sheet.rules;

            // iterate through rules
            for(j=0; j<rules.length; j++) {
                var rule = rules[j];

                // add rule to dictionary
                dictionary[rule.selectorText] = rule.style;

            }
        }

        return(dictionary);

    }

Configuring a SandCastleBuilder Project

  • Open up SandCastleBuilder. If you've used nDoc before you'll notice a similar interface, and you can import old nDoc projects. For this post, though, we're going to start from scratch.
  • Pick Project->New Project from Visual Studio Project
  • Navigate to and select a Visual Studio Solution file. SandCastleBuilder will ask you which configuration to use for loading assembly information. You can choose your Debug or Release configuration.
  • You'll see the assemblies listed under "Assemblies to Document."
  • Go ahead and save the Help Project for now by clicking Project->Save Project in the menu.
  • In the Build/HelpFileFormat, the default setting is HtmlHelp 1.x. You can change it to other formats if you want.
  • In the Build/Dependencies section, you'll need to specify any assemblies your project is referencing. That includes third party DLLs and the .NET DLLs. So, open the Documentation Assembly References dialog and add a folder dependency to the version of .NET you're using (e.g. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727). Make sure your project is built, and add another folder dependency to your project's bin directory, since third party DLLs will probably be copied there.
  • Next, click the Namespaces button in the upper right. Here you can indicate which namespaces should be documented. Normally you wouldn't want documentation for any namespaces that contain web pages. You may have to doubleclick in order to uncheck a namespace. While you're in there, give your namespaces a summary description in the large textfield below the namespace list.
  • If you want, fill in the fields in the Help File section like Copyright, Header Text, HelpTitle, etc.

Generate the Help Files

  • In the Build/HelpFileFormat, the default setting is HtmlHelp 1.x. You can change it to other formats if you want, e.g. HtmlHelp1.xAndWebSite will give you a CHM file and a web site
  • The Paths/OutputPath section determines where your help files will be placed. By default it's in a subdirectory called "Help" inside your project folder. Note that when SandCastleBuilder generates help files, everything in this directory is erased, so if you already have a "Help" subdirectory with stuff in it, change Paths/OutputPath to a different (empty or nonexistent) directory name.
  • Go ahead and save your Help Project, then click Documentation->Build Project. It'll take several minutes for your help file to build, so go get a sandwich.
  • If the generation ends abruptly with an error saying "Unresolved assemby reference", add that assembly to the Build/Dependencies collection, save the Help Project, and try again.
  • You should now have help files inside the Paths/OutputPath (normally <your project directory>\Help). If you set the Build/HelpFileFormat to create a help website, the files will be inside this directory, too.

Automatically Generating Help Files in Visual Studio Whenever You Compile Your Project

If you want to generate your help files automatically whenever you compile a new release version of your project, follow these instructions (from the SandCastleBuilder help):

Right click on the project name in the Solution Explorer, select Properties, and select the Build Events sub-item. Click in the Post-build Event Command Line option to enter the command line to run. You can click the Edit Post-build button to open a dialog with a larger editor and a list of available macros.

In a solution with multiple projects that are documented by the same help file builder project, the post-build event should be defined on the last project built by Visual Studio. If the projects are documented individually, you can place a post-build event on each one.

Below is an example of a common command line script that can be used (lines wrapped for display purposes). Replace the path to the tool with the path where you installed it on your PC, and specify the correct location of the SandCastleBuilder project file (.shfb). The IF statement prevents building the help file in debug builds where it may not be needed.

IF "$(ConfigurationName)"=="Debug" Goto Exit

"C:\Program Files\EWSoftware\Sandcastle Help File Builder\
SandcastleBuilderConsole.exe" $(SolutionDir)Doc\TestProject.shfb

:Exit

Conclusion

That's pretty much it. I'm sure later versions of SandCastle will feature more, but with the right helper tools it's pretty easy to get started.

 

 

 

October 5, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, July 18, 2006

Instead of using Notepad all the time for viewing random text files, why not check out one of the many replacements mentioned on Rick Strahl's post on Notepad replacements. FWIW I use TextPad, although their menu hotkeys take a little getting used to (F5 for Find??).

July 18, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, June 28, 2006

Overview

The DevelopmentNow Google Calendar Monitor is a simple desktop application that synchronizes with your Google Calendar and pops up hard-to-miss, snoozable reminders for your events. You can also add events to your calendar without having to open a browser.

Installation

To install, just download the zip file, extract it, and run the EXE. Note that you must have the .NET 1.1 runtime installed (you can get it at Windows Update). The software has been tested on Windows XP Pro, SP2, but it should work on any computer that supports .NET 1.1. Note that firewalls will probably block the program. You will need to allow the program to access the internet in order to display your calendar.

General Use

To use, just start it up and go to the Settings panel. Enter your Google Calendar username and password, click Save Settings, and you're off. When you hide the main form, you'll see an icon in your taskbar. You can right-click it for menu options, single-click it for a quick view at today's apopintments, or double-click it to bring the main window back up.

Screenshots

Snoozable reminders pop up above your taskbar as well as in the middle of your screen, making it hard to miss your appointments.


Enter your settings for your Google Calendar


Add events to your Google Calendar


It automatically synchronizes with your online calendar
google calendar

Privacy

Your settings are saved on your local computer and are not sent over the internet except to log into Google Calendar. None of your settings or calendar information are shared with anyone in any way. It's just as safe as if you went to http://calendar.google.com and logged in yourself.

Price / Licensing

The DevelopmentNow Google Calendar Monitor is free. Use it any way you want as long as you don't in any way alter, distribute, or sell it without DevelopmentNow's prior written approval.

Download

Get the Google Calendar Monitor here
June 28, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, June 27, 2006

Ok, so this is funny. A few days ago I blogged about trying in vain to find software that would automatically back up my important files, ignore the ones that havem't changed, and send them to an FTP server. And so I just find out that WinZip 10 Pro will do that, and compress your files, too. And it's $50. Hmmm...

Some teaser screenshots:

Maybe I'll be checking out WinZip after all, and have it just watch my project directories, zip everything up, and upload it to a cheap web host.

June 27, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



Since I've started using an offsite backup service, I've been feeling better about my disaster recovery ability. However, I wanted to ensure that my files stayed small so that a) they would transfer faster to the offsite backup, and b) so they'd take up less space, which saves me money on storage.

So here's an updated SQL Command Line Backup script (see my previous post for details and the SQL script I used):

@echo off 
REM get today's date and time as one big string
for /f "tokens=2-4 delims=/ " %%i in ( 'date /t') do set theday=%%k%%i%%j
for /f "tokens=1-2 delims=: " %%i in ( 'time /t') do set thetime=%%i%%j
set now=%theday%%thetime%

REM create backup files
C:
cd "\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn"
sqlcmd -S localhost -U sa -P somepassword -i c:\sqlbackup\backup.sql -o c:\sqlbackup\log.txt

REM compress backup files
gzip -f C:\sqlbackup\*.bak

REM copy backup files to backup device
xcopy "C:\sqlbackup\*.*" \\10.1.10.50\ben_backup\sqlbackup\%now%\ /E /H /R 

The main difference is I'm now using a command line compression utility called gzip to compress the database backups (down to 10-13% of their original size). Gzip is open source, fast, and small. Obviously, you could use other utilities like WinZip's command line utility, or even Windows Services for Unix (with its ironic 230+mb download). But I figured free was good enough for me. You can download a Win32 version of gzip here.

FYI, the 10.1.10.50\ben_backup\ folder is on a local file server with RAID1, so it's relatively stable. But I now also have Mozy watching that folder, too, so everything that gets dumped there gets backed up over the internet.

Hopefully the above has given you some ideas on how to protect your code. By make regular database & source code repository dumps, and backing them up, you'll be in a better position to recover if your computer goes down, or worse.

June 27, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, June 26, 2006

Just ran across a tool to more easily read log4net files. There's a free single-user version apparently.

log4net Dashboard / Viewer

June 26, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Sunday, June 25, 2006

In order to work on the largest user base possible (who often are behind routers and firewalls), Skype will listen on port 80 and prevent IIS (and other services) from using it. That may cause some minutes of frustration as your IIS stops working, Visual Studio won't bind to the local web server, and you repeatedly click "Start" in IIS Manager to no effect.

To put Skype in its place and make it stay away from port 80 for good, open up Skype and go to Tools->Options, General, click "Set connection parameters and proxies", and uncheck "Use port 80 & 443 as alternatives for incoming connections." Then restart Skype. That should allow IIS to use port 80 as it needs to.

However, if Skype then stops working for you, you may need to open up a port in your router. You'll find the port that Skype's using on the same options page where you unchecked "use port 80...".

June 25, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, June 19, 2006

So I spent several hours last week doing some research on remote backups. Even though I have a file server here for local backups, something could always happen -- fire, flood, crazy electrical storm, theft, etc -- that could cause me to lose files or data from every machine in the building.

What I wanted was something simple: make it automatically back up certain files and folders on my computer, start up when Windows starts, run in the background (when idle or on a schedule), and back up changed files only. I did not want to manually click some "Backup" button all the day -- I needed "set & forget" behavior. And I was even willing to pay!

I started by reading reviews of storage providers on PC World and TechCrunch. After some more research, I signed up for a small GoDaddy Online File Folder since that got some kudos. Verdict: bleh! Would have been nice to learn about it before shelling out my $10, but oh well. Their web interface is slow. The backup software can only automatically back up one folder on your PC. One? If you want to back up multiple folders, you instead have to find a third party app and over it over FTP or WebDAV. WebDAV is slow, and their FTP service was giving me weird errors. I spent a few hours trying out third party software and eventually gave up.

I then looked at Box.net, a Web 2.0 darling. However, it didn't have any backup software -- I'd have to log into their site & drag files onto it every time I wanted to back something up. Forget that, guys. I started seeing a trend with other online storage services, too -- it was like they didn't really focus on backing up files, and instead made cool-looking web sites that made it easy to share your MP3 collection with your friends. Like we don't know how file sharing companies eventually turn out. Granted, I can see how sharing might fit in, since people will want to back up their photos, and why not share them with friends and let them print copies etc. But anyhow.

Finally I tried out Mozy, which thankfully fit the bill. Easy to install, 2gb storage for free, with a little app that rests on your computer and automatically backs up what you want when you want. They even encrypt your files before uploading, which is neat. You can upgrade to 30gb of storage for about $5/month. Two additional things I'd like to see out of Mozy, though: 1) offer a business-grade plan for 100+gb storage; and 2) compress the files (or at least compressible ones like BMP/TXT/.CS) before uploading so we can store more stuff and use less bandwidth.

So for now I'm trying out Mozy...we'll see how that goes. If anyone knows of third-party software that does automatic, differential backups over FTP, please let me know! I was tempted to write my own, but you know how that goes. 

June 19, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [2]



 Wednesday, May 24, 2006

Screencasting is the act of making a movie of what's on your computer screen and making available electronically (usually via the intra- or Internet). Making screencasts can help in a number of ways:

  • You could record demos of software you own for sales & marketing purposes
  • You could record demos of other software for review purposes
  • You could record demos of software or processes for training & support purposes
  • You could record demos of your all-time high frag score on UT2004 for bragging (or getting fired) purposes

Two free tools I've used are Wink and CamStudio. Both will let you record a screencast with audio, add some textboxes & arrows, and output a compressed SWF and HTML file for easy uploading to your web site.

Wink used to be missing audio and other feaures, but they just came out with version 2.0 that includes audio recording, the ability to plop textboxes & objects on your video, and other improvements. It's easy to use and includes some tutorials on how to make your own screencasts. Wink works by recording a series of screenshots and tying them together as keyframes on a Flash movie. The upside of that is that images are clearer and filesizes are smaller, but Wink can't record animation or other nuances. Wink create an EXE from your screencast (good for CDROMS or those small cdrom business cards), uncompressed SWFs (for importing into Flash), and compressed SWFs for sticking on a web site. 

Click here for a sample screencast made with Wink.

CamStudio is based on an open source release from RenderSoft (you can read the whole history on the CamStudio site). While both programs are easy to use, CamStudio is really easy to use because it's simpler -- optionally set a few settings (usually just Region->Region and the SWF/AVI toggle), just click a Record button to record, then click Stop to finish recording. CamStudio actually captures video and compresses it to AVI or Flash, so it'll capture all the animation you need. The downside is that since it's video, you'll notice some grainy compression artifacts, and filesizes are much bigger (the CamStudio sample screencast I made was 4.9mb vs 1.2mb for Wink). Wink seems to have more features then CamStudio, although only CamStudio can convert your movie to an AVI file -- handy if you want to upload your screencast to YouTube or burn a DVD for Uncle Joe to watch on his TV. CamStudio can generate AVIs using a number of codecs (DivX, WM9, etc) if they're installed on your computer.  

Click here for a screencast made with CamStudio.

I suggest checking out both tools. Each will work for most screencasts, although you may prefer one over the other for different things.

May 24, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, May 23, 2006

I avoided debugging javascript for a long time because 1) I didn't write a lot of it, and 2) it used to be a pain to do so with Visual Studio. Nowadays it's pretty easy, though, if you know how to do it.

You'll notice that if you open up your ASPX page in Visual Studio and try to set a breakpoint in javascript, you'll usually get a "This is not a valid location for a breakpoint" error. What you need to do is open up the client-side version of the page in Visual Studio and debug that. Here's how:

  • Open Internet Explorer, go to Tools->Internet Options, click the Advanced Tab, and ensure that "Disable script debugging" is unchecked.
  • Fire up your web project in Visual Studio and debug it using Debug->Start Debugging (or F5). IE will open up and display your web site.
  • In IE, navigate to the page whose javascript you want to debug
  • In IE, click the View->Script Debugger->Open menu item. That will open up the current page's html and javascript in Visual Studio.
  • Switch back to Visual Studio. You'll see the page's html and javascript. You can now set breakpoints, etc.
  • Now you can switch back to IE and do whatever you want in the page. Any breakpoints that you set in the previous step will be hit, and you can inspect variables, etc. just like in normal code-behind debugging.

If the above annoys you, another javascript-debugging option is to instead use Firefox and Firebug, which I posted about briefly a few months back. Firebug is a powerful plugin that not only lets you debug javascript, but explore the DOM and watch AJAX requests. You can download it here.

Both approaches (Visual Studio and FireBug) have their merits. I suggest trying them both out to see which works for you.

Code | Tools
May 23, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, May 04, 2006

I'm currently working on a property tax consulting startup, and I was noticing that some queries were running slowly. I'm familiar with database indexing, but I wanted to see what the new Database Tuning Advisor that comes with SQL Server 2005 could come up with. It supposedly helps database newbs tune their database without having to know how to create indexes, etc. Seasoned DBAs will probably gasp in horror (with good reason) at automated tuning processes, but what the heck...let's take her for a spin.

Don't Start Without a Trace

The first thing you want to do is create a trace file containing the SQL statements you want analyzed. So fire up SQL Server Profiler, click File->New Trace, and connect to your database. In the trace properties screen you'll want to use the Tuning template, click Save to File, choose a filename, check Server processes trace data, and click Run. See the screenshot below for details.

Now you need to execute the SQL statements that are running slowly. In my case, I just run through a number of test cases in my web application, ensuring realistic database calls. But you could also run SQL statements directly from Query Analyzer or SQL Server Management Studio. You'll need to ensure that your database command timeout is set high enough so your queries finish running instead of rolling back.

Once the SQL statements have finished, stop the trace and exit SQL Server Profiler. You now have a trace file containing all the SQL statements you want tuned. It's a binary file, so don't bother reading it in Notepad, although you can open it up and view it using the Profiler.

Generate Database Tuning Recommendations

Now it's time to tune your database by starting a new Session in the Database Engine Tuning Advisor (DTA -- don't ask why the E is dropped). The DTA groups its recommendations into Sessions. Each session starts out with a Workload (a list of SQL statements to evaluate, e.g. from your trace file) and a set of databases & tables to tune. A Session can either be used to generate tuning recommendations (e.g. Indexes, Statistics, etc), or evaluate pre-specified recommendations and let you know how well they work.

So, open up the DTA -- it'll start making a new Session for you automatically. Connect to your database, select the trace file, choose the database to be tuned from the database dropdown, and put checkboxes next to the databases/tables you want to tune. I didn't bother with the Tuning Options tab, but you can take a look out of curiosity.

Now click Start Analysis at the top, and wait a bit. The Tuning Advisor will run the SQL statements from the trace file, think a bit, and then spit out some recommendations. In my case (see below) it recommended some indexes and recomputing some statistics. It also gave a guesstimate on the speed improvement.

Using the Recommendations

Now you have a set of recommendations, and you have a few choices under the Actions menu item. You can Save Recommendations, which will generate a .sql script file you can apply to your database. You can Apply Recommendations, which just means the Tuning Advisor will apply them to your database, either now or at a specific time (like 2am) in the future. You can also Evaluate Recommendations, allowing you to try them out & see how much they improve performance, without permanently affecting your database. Before Saving, Applying, or Evaluating, you can uncheck any recommendations you want to skip.

I decided to evaluate the recommendations, which creates a new Session (11:32:46 AM) displayed a screen like the one below. Note how the tabs on the top allow you to switch between various Sessions. The tab on the left (the one from 11:08:53 AM) is the first Session that generated the recommendations.

Now that we've set up a "what-if" Session, go ahead and click Start Analysis again, and a Progress screen will come up. The Tuning Advisor will apply the changes, run some comparison tests, undo the changes, and display the results. In the reports tab, you can view reports like Statement detail report (see below) to see how much faster your queries are executing. You can also see how much disk space the indexes take up, and other information.

If you're happy with the results, you can go ahead and Save or Apply the recommendations.

But let's say that you want to try some of the recommendations but not others. If so, you can go back to the original set of recommendations (click its tab, or double click it in the Session Monitor window on the left), check/uncheck some recommendations you want to try, and Evaluate Recommendations again. The ability to play with different sets of recommendations and evaluate them without permanently affecting your database is handy and powerful.

Once I had a set of recommendations whose results I liked, I applied them to my database. I then fired up my application and run through a few test cases, and it ran much faster (as I suspected).

Final Thoughts

The SQL Server Database Tuning Advisor is a nice tool. It probably won't out-tune a skilled DBA, but it does a decent job in recommending indexes. I also like the ability to try "what if" scenarios to evaluate different indexes.

I had a few beefs, however. I didn't like the default names of the recommended indexes, but there was no way to edit them in the GUI. Similarly, there's no way to use the DTA to evaluate your own recommendations -- you can only evaluate recommendations that the DTA comes up with*.

Overall, though, it was a fun tool, and easy to use.

 

* - you can actually use the DTA with custom recommendations (i.e. ones that you came up with) by editing XML files and importing them into the DTA using a command line tool. You can also edit existing DTA recommendations by exporting them to XML, editing them, and re-importing them. I think that's pretty lame that you can't use the GUI for it, but oh well.

May 4, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, April 24, 2006

So I happen to love edit & continue in C# with Visual Studio 2005. There are people who say it encourages sloppy programming (which is true), but for me, there are some things I just can't code as effectively unless I know the runtime state. For example, writing complicated regular expressions against the results of various database queries and algorithms. Do I know if the regular expressions will work exactly before I run the code? No. Do I know if the code will work for all data permutations, beforehand? No.

Hence, edit & continue's blessing. Fire away, hit your asserts or whatnot, and if things look wrong, adjust on the fly. Now, I don't suggest doing big code restructuring while in edit & continue (could get messy & hard to manage), but you are able to if you need to.

Anyhow, much to my dismay I noticed that Edit & Continue stopped working after a while. I couldn't figure out what the deal was, since I was always getting "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized" whenever I tried to edit the code while debugging. I also noticed that not all my variables were showing up in the Locals & Auto debug windows (this is a hint for the punch line).

Michael Freidgeim has a nice workaround if you get stuck and my simple solution doesn't help you.

His post didn't help, and it took me a few minutes to realize that my project was in "Release" mode instead of "Debug." Whooooops! I guess I didn't notice that because I was able to mostly debug, even in release mode. But I shoulda caught that. Anyhow, flipping back to Debug mode fixed the issue.

Code | Tools
April 24, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Thursday, March 23, 2006

A few weeks back I blogged about using UltraVNC for remote support. Since then I've used it a few times to troubleshoot problems for clients in Arizona, Chicago, etc and it works great. A picture truly is worth 1000 words. No more dialogues that go like this:

Client: I'm getting an error with the system.
Developer: What error message are you getting?
Client: I don't know, it's just blank.
Developer: Which part of the screen is blank?
Client: The system is blank, like I just said.
Developer: Hmm. Ok...can you send me a screenshot?
Client: How do I do that?
[5 minutes of screenshot tutorials go by, ending with the developer getting several blank emails but no actual screenshots]
Developer: Well, let's skip the screenshot for now. Can you go to the page with the error and copy and paste it into an email for me?
Client: Ok, here goes.
[a few minutes later, a blank email arrives in the developer's inbox]
Developer: That didn't come through, can you try selecting more of the system and pasting it into an email for me?
Client: *sigh* Ok, I'll try again. Here it comes.
[a few minutes later, an email containing the system's URL arrives in the developer's inbox]
Developer: Hmm. Can you just copy and paste the entire browser window into an email?
Client: Isn't that what I just did?

...and so on, ending in a frustrated client, an exasperated developer, a broken system, and world suffering. Of course, the issue will turn out to be an empty dropdown or something, which you could have found out in 10 seconds if you could actually see the client's computer screen.

So, if you have remote clients whose desktops you need to see for troubleshooting, software installation, diagnostics, & whatnot but you're too cheap to pay for WebEx, et al. you should check out UltraVNC SingleClick. I had some instructions in my previous blog post, but let me know if you want me to put up a step-by-step tutorial on setting it up.

March 23, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, January 31, 2006

I'm in Portland, but I'm working on some projects with people in Chicago. In order to collaborate better, I was looking into ways to share my desktop with other users. I've used WebEx and other tools before, but I wanted something free. I also wanted something that worked through NATs (since I'm behind one), supported my multiple monitors, and was very easy for non-technical people to use. As in "click-on-this-URL-and-see-my-desktop" easy. So I started surfing around and saw the suggestion to use VNC, which I'd used in the past but not recently. 

VNC (Virtual Network Computing) is a desktop sharing/remote control program like Remote Desktop, PC Anywhere, etc. There is a server part (VNC Server) that runs on the shared PC, and a viewer (VNC Viewer) application that is run by people wanting to view and/or control the shared PC. The original VNC was open source, which spawn variants like TightVNC, UltraVNC, RealVNC's Free Edition, and others. RealVNC is the group that originally created VNC, and they have a limited, free version, along with some better non-free ($30-$50) versions.

Web-based Desktop Sharing

Users normally connect to shared desktops using the Standalone VNC Viewer, an installed application that connects over port 5900. However, VNC (at least RealVNC and UltraVNC) also offers a web-based java viewer. So instead of installing software, user could instead open a web browser, go to a URL, and connect to a shared desktop via a java applet. Easy peasy.

Behind the scenes, the VNC Server contains a mini web service that listens on port 5800. A user can open a web browser and connect to the IP of a shared computer, e.g. http://somesharedpc.yourdomain.com:5800. When users hit that page, they see a web page and a small java applet that allows them to connect to that PC's VNC server (if running). Once connected, they can see the desktop, use the mouse and keyboard, transfer files, and share the clipboard. 

I was able to connect to my PC from other computers on my LAN, but I wanted to make sure that my partners in Chicago could also see my desktop. Since my computer is behind a firewall, I needed to connect to my router and forward ports 5800 (for the web-based sharing) and 5900 (if people use the standalone viewer). Once that was done, VNC worked just fine over the internet.

Note that you can configure the VNC Server to prompt you before allowing connections, and to only offer view-only access to users.

Remote Support

UltraVNC also offers an intriguing remote support application called SingleClick. It's a small EXE that users can download in order to let you view and control their desktops.

SingleClick Screenshot

As a software developer, you can brand and customize the EXE with your own logo, text, IP address, button labels, etc. You can also include your own rc4 encryption key for secure connections. Once you have your customized SingleClick EXE, you can put it on your web site, email it to clients, etc. Then when a client (or technophobic relative) has computer troubles, you run the VNC Viewer, the user runs the SingleClick EXE and authorizes the connection, and after a few seconds you're logged into their computer. Once the session is done, SingleClick uninstalls itself from the user's PC. And although you (as the viewer) need to ensure port 5500 is forwarded to your PC, your users normally won't need to worry about firewall settings unless their firewall is blocking port 5500 outbound (which would only be the case in secure corporate environments). If that's the case you could always reconfigure your SingleClick EXE to run over port 80, which should be allowed in almost any company.

There is a pretty detailed walkthrough in the UltraVNC forums on creating your own SingleClick EXE to perform remote support. I made my own EXE and was pleased with how easily it worked. I do wish it was a bit prettier, though. Since it's open source, you might be able to make your own skin.

Other Features

Some other interesting features I noticed were

  • file transfer (TightVNC and UltraVNC)
  • multi-monitor support (UltraVNC and RealVNC)
  • Microsoft Windows Logon authentication, so users have to use MS logins to connect (UltraVNC and RealVNC)
  • a special video driver to speed up connections and reduce CPU utilization on the server (UltraVNC)
  • chat windows (UltraVNC)
  • some cool networking options like Repeater and NAT-to-NAT to get around NAT issues (UltraVNC)

Security

While the password exchange is secured in VNC, any text typed during the sharing session is normally passed in plaintext. That's probably OK if you're not typing anything sensitive, but any passwords, credit cards, etc. would be out in the open. In order to secure the entire session, you can install an SSH server and use SSH tunneling to connect to the shared computer. Non-Windows users can use OpenSSH while Windows users can use SSHWindows and follow Digital Media Minute's SFTP install guide to get SSH running (SFTP uses SSH).

If you don't want to deal with SSH, RealVNC's non-free versions support session encryption, and UltraVNC supports a Data Stream Encryption plugin.

Conclusion

When I used VNC years ago, it worked well but was pretty basic. But now I'm pleasantly surprised at the new features, speed, and stability. RealVNC's paid versions might be nice if you need tech support, want easy-to-use session encryption, and like paying for software. If you're a novice user or just want the no-frills version, you could also try RealVNC's free version -- I found the setup & installation of RealVNC to be a bit easier than UltraVNC. Otherwise I'd suggest giving UltraVNC a whirl.

If you're mostly interested in the remote support features, but want something easier to use and don't mind paying for it, there are some non-free applications that are based on VNC. EchoWinVNC is one, as is NetworkStreaming.

January 31, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, January 25, 2006

The best way to get cheap, dedicated employees is to get them when they're young (before they know any better), have them work on projects they think are cool, and give them lots of free candy and soda. The more sugar the better. 

But why mess around with newly-minted Comp Sci college grads? That's so 2005. I instead suggest finding kids between 10 and 14 and having them learn the Kid's Programming Language. It's based on .NET, but with a simplified IDE and API.

Put your kids (or spouse, or neighbor, or relative) to work building a next-generation tool so that you can retire young and finally have time to enjoy World of Warcraft. :)

Note: I am being tongue-in-cheek about "cheap labor." I don't advocate child labor or anything. I just thought this tool was cool (especially considering the brain drain & dropping numbers of IT grads) ad might be a good way to bond with youngins or help your local middle school students get into IT. But...I couldn't resist being flippant.

 

January 25, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



Fresh from reddit: Joe Hewitt (the DOM inspector dude) has recently released FireBug, a Firefox plugin that's "like a combination of the Javascript Console, DOM Inspector, and a command line Javascript interpreter." It looks perty sweet.

FireBug Screenshot

Grab it in the Mozilla Addons site.

January 25, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, January 13, 2006

Microsoft has two VM (virtual machine) solutions: Virtual PC 2004, and Microsoft Virtual Server. Since an MSDN subscription comes with both, how do you know which one to use?

Microsoft has published a white paper describing the differences, but in a nutshell the main differences are

  • The "officially supported" operating systems are different. Client OSes are supported on Virtual PC, while server OSes are supported on Virtual Server. In theory, both products should run the same OSes (see the What Works in Virtual PC site), so it's just the "official" support that differs.
  • Virtual PC has sound, Virtual Server doesn't.
  • Virtual PC makes it easier to drag & drop files between the host computer and VMs.
  • Virtual PC has the "shared networking" mode to make it easy for your VMs to connect to the web.
  • Virtual Server has support for multiple CPUs, hyperthreading, 3.6 of RAM, and SCSI drives. It also offers better control over VM CPU & memory utiliization.
  • Virtual Server offers remote administration via WMI, MOM, RDC, the Virual Machine Remote Control (VMRC), and other server management tools.
  • Virtual Server can be controlled via a COM API.
  • Virtual Server offers more networking and multi-server options, including clustering.

So...if you need to emulate a number of servers talking to each other and let them use your beefy dual-CPU box with 4gb of ram, you might want to use Virtual Server. Otherwise you can probably use Virtual PC.

January 13, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Monday, January 09, 2006

I recently got an MSDN Universal subscription via the Microsoft Empower for ISV program ($375 for MSDN Universal), which comes with only all Windows OSes, Visual Studio, SQL Server, Biztalk, Office, and lots of other software. One such program is Microsoft's Virtual PC 2004, which lets you create any number of virtual machines (VMs) each of which acts like its own computer.

Since I'm currently working on 3 different projects (one in .NET 1.1 & SQL Server 2000, one in .NET 2.0 & MySQL, and one in ASP.NET 2.0 & SQL Server 2005), I wanted to have separate development environments for each project to reduce the likelihood of cross-environment contamination (SQL 2000 affecting SQL 2005, .NET 2.0 messing up .NET 1.1, etc.). Not to mention that keeps it cleaner.

Virtual PC Benefits for Developers

Three big benefits for developers from Virtual PC (along with other VM solutions like VMWare and Virtual Server) are

  1. you can easily whip up a VM to try out beta software, etc without messing up your main machine
  2. you can keep different dev environments separate so you can switch between projects without having to uninstall or pollute your files
  3. you can have multiple VMs running at the same time in order to simulate an entire network of computers. For example you could have a VM emulating Windows 2003 & IIS 6, and have that VM communicate with another VM running SQL Server 2005 and Biztalk.

So for me, I'll start by creating a base VM with XP Pro SP2, Firefox, and Office. No dev tools yet. Using that XP Pro VM as a base, I'm then going to make at least three different VMs: one with .NET 1.1 & SQL 2000, one with .NET 2.0 and MySQL, and one with .NET 2.0 and SQL 2005.

When you create a VM based on an existing one, the advantage is you don't have to install anything that's already in the base VM (e.g., I won't have to install XP Pro, Firefox, or Office for my three dev environments). The decision you have to make is whether you want to just make a plain ol' copy of your base VM, or create a new "differencing disk" VM.

Copying your Base VM

Making a copy of a base VM is easy and performs well. You're literally making a copy of the VM files. The downside is it can take up a lot of disk space. To make a copy of a VM:

  • go into My Documents\My Virtual Machines (or whatever your VMs live) and create a new folder for the new VM, e.g. My Documents\My Virtual Machines\NewVMCopy.
  • find the .VHD file of the base VM, and make a copy of it into My Documents\My Virtual Machines\NewVMCopy. Rename it to something like NewVMCopy Hard Disk.VHD.
  • start up Virtual PC 2004, click
    • New->Next
    • Use default settings to create a virtual machine->Next
    • Click Browse, go into BaseVMCopy and enter a name for a new VMC file (e.g. NewVMCopy.VMC)->Next
    • Click Finish
    • The settings dialog will come up, click Hard Disk 1 in the left, check "Virtual Hard disk file:" on the right and browse to the .VHD file you put into the NewVMCopy. Bump up the Memory setting to 256MB RAM or more, and you may want to ensure the Networking option is set to a valid NIC or Shared (NAT).
    • Click OK
  • Your copy is now ready to start up, but before you do, make sure the VM you copied it from isn't running.
  • Now fire up NewVMCopy. Once you get it started, you'll want to give it a new machine name and SID so that it doesn't conflict with any other VMs on the network. To do this, download Sysinternal's NewSID and run it from the command line as "newsid /s <new name>" where "<new name>" should be a new, unique name for this VM. It will run a bit and then automatically restart your VM.

Congratulations, you've made a copy of a VM! Now you can back this VM up (by just backing up the VHD file), install beta software on it, lots of fun stuff. It's "virtually" hassle-free. ;)

Making a Differencing Disk VM

The other way to make a copy of a VM is to create a "differencing disk." The big disadvantage with copying a VM like we did above is that it can take up a lot of space. XP Pro and Office can make a 2gb .VHD file. Copy that .VHD file four more times and you've now got 10 gigs of space taken up.

A differencing disk VHD only stores what's different between itself and the base VHD. So if you create a differencing disk and only install a small program, the VHD file is going to be small, too. The downside is differencing disks can perform more slowly (although that seems to be debated), and if you change anything in a VHD you'll break any differencing disks based on it.

Rather than reinvent the wheel, I'll link to a few good articles on differencing disks. BTW, some sites refer to VMs created in Virtual PC 2004 as VPCs (Virtual PCs).

http://blogs.msdn.com/donsmith/archive/2005/06/16/429700.aspx
http://weblogs.asp.net/cumpsd/archive/2005/03/08/389738.aspx
http://andrewconnell.com/blog/articles/UseVirtualPCsDifferencingDisksToYourAdvantage.aspx

And a special bonus link: Top Ten Tips for Virtual PC 2004

And two more links to Griffin Caprio's thoughts on VMs: Why he likes VMs and Just in time development. And dammit Griffin you should turn on SEO-friendly URLs. :) 

 

January 9, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, January 06, 2006

Sourcegear has an SCM solution called Vault that has a few big things going for it as a VSS alternative:

  • You can import VSS projects
  • It can work alongside VSS, so you don't have to import all your VSS projects
  • It's easy to use and familiar to VSS users
  • It integrates into the Visual Studio IDE (if you're into that)
  • You can connect to it remotely over HTTP or HTTPS
  • It's cheap (free for a single user, $300 per user after that. VSS is ~$500/user)

I'm working on a small project now where the other developer is using Vault for source control, so this gives me a good chance to check it out. I'll also probably use Subversion and VSS 2005 for other projects.

Code | Tools
January 6, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



Subversion 1.3 was released a few days ago with a number of enhancements. The biggest news for me is the official support for the Windows _svn hack. In a nutshell, Subversion used to create working directories that started with a dot, but some versions of ASP.NET didn't work with those directories. The "hack" was to start those directories with an underscore instead. You can read more about the hack here. Any utilities will need to call the new Subversion API in order to work with the hack. TortoiseSVN (popular Windows explorer shell plugin for Subversion) has a release candidate that works with the new version -- I'd suggest waiting a week or two for a final version of TortoiseSVN.

What this all means is it will soon be much easier to use Subversion for all .NET development. Which is good, since everyone is trying to dump VSS. :)

* When I say "supports" I mean it officially supports the hack that lets Subversion handle ASP.NET projects and let ASP.NET keep working.

Update: TortoiseSVN 1.3.1 is now released and supports Subversion 1.3.

ASP.NET | Code | Tools
January 6, 2006    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, October 26, 2005

Yes, free. Microsoft is doing a 200-city US tour over the next two months to promote Visual Studio 2005, SQL Server 2005, and BizTalk Server 2006. Not only is it an all-day event with speakers, classes, Q&A sessions, and more, but they're giving away a free copy of VS 2005 & SQL Server 2005 to all attendees (while supplies last). Best of all, it costs nothing to register.

So check out the Visual Studio 2005 Launch Tour site and register. And get free stuff. And then start developing -- believe me, the new tools are sweet.

October 26, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, October 11, 2005

The upcoming MSDN offerings will provide copies of Microsoft's latest and greatest, including Visual Studio 2005, Windows Vista, Team System, et al. Unfortunately, the highest-level MSDN package is $10,000 (pricing chart). Which is huge. Huge enough to make development shops look at Subversion (instead of VSS) and other alternatives. Especially when you consider that if you have a QA department, all your testers need an MSDN license in order to test software built using MSDN-licensed tools (oh yes, it's true).

One big way to get that software but save on licenses is to enroll in the Empower ISV program. For $375/year, you get 5 MSDN Universal licenses, plus a bunch of other stuff. The downside (?) is you have to actually build something using Microsoft tools, and the license is only good for a year. And you also have to take a stab at getting some people MS-certified.

October 11, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, July 25, 2005

My Yahoo referrals went WAY down last week, and I realized that dasBlog doesn't direct-link to URLs in posts. Which normally is good. However, it means that when I linked to all my old blog content, spiders weren't able to see it. So Yahoo thinks all my blog posts went away, and so I have less content, and so I'm not worth sending traffic to as much. Which is a downer.

So for now the archive links are in the blogroll, which is a direct link. Eventually I'll rework the site design.

July 25, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Sunday, July 17, 2005

Scott Mitchell has a good post on database projects in Visual Studio. Helpful for those people still using Query Analyzer or SQL Server Enterprise Manager for all their database development.

Some of the benefits include better source control, using one tool for web dev & db dev, and a better editor. I don't know if I agree that deployment is significantly easier than in SQL Enterprise Manager -- DTS makes it pretty easy, too. Plus did you know that if you highlight a table/proc name in SQL Enterprise Manager and hit CTRL-C, the clipboard is filled with the T-SQL needed to create that entity? Go ahead, try it. Its cool, sortof.

One ohter benefit that Scott forgot to mention (at least in his blog summary) was stored procedure debugging. Without stored procedure debugging, you're stuck with extra PRINT & SELECT statements spread throughout your T-SQL. Being able to launch a proc & debug it using Visual Studio allows for much better development and troubleshooting.

July 17, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



So I've made the switch from Blogger to dasBlog for at least a few main reasons:

  • dasBlog supports RSS feeds
  • dasBlog has better monitoring and reporting features
  • dasBlog will ping more RSS aggregators
  • dasBlog supports CAPTCHA-protected comments (less comment spam)
  • dasBlog has auto trackback
  • dasBlog runs on my machine, so I can monkey with it if I want to
  • dasBlog has categories, so I can group my posts for users' benefit. Useful for people who blog about a lot of different things.

However, I've noticed that dasBlog isn't as good as Blogger for search engines. For example:

  • dasBlog's links aren't as spider friendly. They have some SEO-friendly (i..e no querystrings) URLs, but they delimit the words with spaces instead of dashes. And not all links are SEO-friendly.
  • dasBlog does't have as many links to archived content. It seems like the only content a spider could get to is content from the current month. Older posts are seemingly only accessible via a javascript method call.
  • dasBlog has a bunch of crap in the HTML. ASP.NET view state, inline CSS, inline javascript -- just a lot of stuff that is i nthe HTML (especially at the top) that has nothing to do with the content. I know that spiders will ignore a lot of that stuff, but it's still not cool.

I'll be fooling with the HTML in the next few weeks ... get the site all looking the same, improve the SEO aspect. Stay tuned for whether it's a success or dismal failure. ;)

July 17, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Wednesday, July 13, 2005

Previously (like 5 minutes ago) I blogged about HTTPLook. That review was written a few months ago & copied over to my new blog (here).

So, recently I came across Fiddler, a free utility made by Microsoft (or an MS employee with some free time). It actually acts as an HTTP proxy that your browsers run through, and it displays all the HTTP calls in its main window as seen below:


Click for full image

One of the things I like about it is it's quite stable. We had problems with HTTPLook "corrupting" our network settings, requiring a reboot to fix. Fiddler runs cleanly, can save the traces to logs for later inspection, and has a host of other features that many people would never use. We usually use it for debugging missing HTML components (i.e. a javascript or image file might be missing from an HTML page, yet the error isn't visible by inspection), or debugging web service calls (i.e. from .NET winforms applications or Flash apps). But Fiddler also has an interesting guide to performance tuning using HTTP sniffers. Might be worth checking out.

So, if you need an HTTP sniffer on Windows and are cheap, check out Fiddler. You just might like it.

July 13, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



Application: HTTPLook
Vendor: BinaryAge Software
Home Page: www.httpsniffer.com
Price: $29.95
Rating: 9/10
Pros: Cheap, lots of features, easy to use, works with any browser or application that makes HTTP calls
Cons: Plain-looking, not free, missing a few higher-end features

If you're working on an application that makes a bunch of HTTP calls (a spider, a data-driven Flash application, a web browser, a browser plugin, etc.), there aren't a lot of easy ways to monitor the calls. Yes, you can step through the code in debug mode, but that's problematic when debugging production installs. Not to mention slow and overkill. You can also look at the web logs, but sometimes you don't have access to those, or you have to wade through thousands of lines. You could write a call-logging mechanism, but that takes time & might have bugs of its own. What you need is an easy way to log & view all the HTTP calls that a machine is making. Enter BinaryAge Software's HTTPLook.

We have a data-driven flash application on a number of our sites. It calls web services, retrieves XML, downloads images, and hits "pixels" for traffic reporting purposes. But sometimes it would hang, or fail to load an image, or fail to poke a pixel, & it would be a PITA to see what it was doing & which calls were broken. With HTTPLook, you simple load up the application, click "Start", and start surfing/using your app. HTTPLook records the HTTP calls as you make them. It lists the outbound requests & the returns. Status code, cookie settings, headers, bodies, all there. Plus you can filter results, save logs, etc. Here's a screenshot:


Click for bigger view


More screenshots are here.

Now when we have problems, we can quickly pinpoint the troubled URL. We can easily inspect the XML being returned from the web services to see if there's errant data. We can see if there are any missing images by looking for "404" return statuses. Our debugging time & troubleshooting time was cut down to less than 10% of what it was. But the best part is that it's under $30, compared to several hundred dollars for competing products I found. And there's a free trial, too.

I don't mean to pimp this app too hard. I don't get any kind of referral fee, nor do I have anything to do with the company. I was just happy to find an inexpensive app that filled a niche & saved us a ton of time, and I thought others might appreciate the tip, too.

Now, I should mention that if you have to have a free solution, you could use Ethereal, a free network analyzer. But installing it, setting it up, configuring the filters, etc. isn't nearly as easy as HTTPLook. If you have the time, enjoy jumping through hoops, and don't have thirty bucks to burn, try out Ethereal. But be sure to also install the trial version of HTTPLook, too -- after a little while you might decide $30 isn't too much to pay for a no-frills app that does exactly what it's meant to do.

July 13, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



Testing out the new blog. http://www.dasblog.net is where you can get the code.

July 13, 2005    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]