Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts

Friday, 20 June 2008

Subversion 1.5.0 released

Just saw that Subversion 1.5.0 has been released. There are quite a few new features, but the main ones of interest to me are:

See the svn 1.5 release notes for a run down of the main changes, or the CHANGES file for a complete list.

Oh yeah, and the usual, major version, working copy and repository format provisos apply... while the API is backwards compatible and svn 1.5 server and tools work with older repo versions, working copies are a different story. Older client tools will not work with svn 1.5 working copies, nor with 1.5 repositories. Your existing working copies will automatically upgrade to the 1.5 format when you access them with the new tools. Read this for more information.

You'll also need to upgrade your repository format to 1.5 to take full advantage of the new features like merge tracking (although you'll get a number of the improvements with older repo formats as well).

Certified binaries will be coming out over the next couple of days at CollabNet (other binary maintainers listed here). The TortoiseSVN crew is pretty much ready to go too.

Wednesday, 28 May 2008

BDD test naming with AutoHotKey

Update 2008-05-29: JP has posted a much better version of this script (with suggestions from a few of his readers). I've updated the script on this post to work more like JP's version, but you're probably best off grabbing it from his post, or searching his site for his latest version.

Was having a chat earlier with my good mate JP Boodhoo... er, well, more accurately, I left a comment on his blog and he was nice enough to email me back. Anyway, JP has started trying AutoHotKey rather than his previous macro for BDD-style test naming.

I thought I'd post an extremely over-engineering version of this AutoHotKey script, which has a toggle-approach similar to the Emacs Everywhere script I posted earlier.

Once you have AHK installed, you can just extract the ZIP below and double click the .AHK file to load the script. The script will let you toggle "test-naming mode" (i.e. replacing spaces with underscores) using Ctrl + Shift + U. You can cancel out of test naming mode by pressing ENTER, ESCAPE or starting the method signature by typing a '('. Pressing Ctrl + Alt + U will insert a new test template before switching on test naming mode (although you might be better off using R# templates for this). All this is simply to make it easier to type out tests like this:

[Test]
public void Test_naming_mode_turns_spaces_to_underscores() {}

Version 2 of the script can be downloaded here:

Feel free to change the hotkeys and the dodgy icons :). I haven't had a good test of it yet so use at your own risk.

If you're happy with how it works you can add it to your Startup programs and have BDD-style test naming goodness whenever you like. Hope_this_helps! :-)

Change log

  • 2008-05-29: Uploaded v2, synching with JP's version 2, adding test templates, and made test mode exit after typing '(' for test method signature
  • 2008-05-28: Updated hotkeys to match JP's version
  • 2008-05-28: Original post

Tuesday, 20 May 2008

ReSharper 4.0 beta

Update 2008-05-22: The real beta release has just been announced. It is the same build (804) as the beta candidate, which pretty much answers my question below on the difference between the two :).

R# 4.0 beta candidate has been released. I'm not quite sure of the difference between a beta and a beta candidate, but I'm assuming its better than a standard nightly build :)

You can get it here, build 804. I've had a pretty good experience with most of the "works here" builds, so am looking forward to firing this up today :)

Wednesday, 7 May 2008

Enabling tracing for WCF (then making sense of the output)

I've been battling with a few of WCF's "endearing" foibles over the last couple of days (like this one). One thing that I really should have noticed earlier to help with this battle is that you can enable tracing for WCF. MSDN gives this example:

<configuration>
   <system.diagnostics>
      <sources>
            <source name="System.ServiceModel" 
                    switchValue="Information, ActivityTracing"
                    propagateActivity="true">
            <listeners>
               <add name="traceListener" 
                   type="System.Diagnostics.XmlWriterTraceListener" 
                   initializeData= "c:\log\Traces.svclog" />
            </listeners>
         </source>
      </sources>
   </system.diagnostics>
</configuration>

This produces a fairly unreadable mess, but you can use the Service Tracer Viewer (SvcTraceViewer.exe) that comes with the Windows SDK (C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin on my PC) to get some useful information out of it. This is actually quite a cool tool, providing a nice interface to view all the different activities happening behind the scenes, and highlighting errors that occur.

WCF Trace Viewer screen shot

Friday, 11 January 2008

Take a break

Sometimes when I'm working on something I'll get totally absorbed, lose track of time, and end up with my head glued to the computer for hours. When I eventually finish and come up for air, I feel completely drained for the rest of the day, and I can't help but think that if I had paced myself better I would probably be more productive overall. I'm assuming this is not uncommon for geeky typed people.

Anyway, there are a few applications out there for helping you remember to take a break. One of these is WorkRave, which is specifically designed for prevention and treatment of RSI, and is released free of charge under the GPL.

I have just started playing with it but it looks great. It gives you the option of scheduling breaks of varying durations and frequencies. All the schedules work on timers that pause during idle time (so if you take a break between timer events you won't end up over-breaking :)). I have set it up to be pretty discreet (not enforcing breaks, no micro breaks etc), but it is serving as a good reminder to come up for air once an hour or so.

It also tracks daily statistics on mouse movements and keystrokes if you are interested in that sort of thing. One of the top features for me was the Exercises screen, which runs you through a few basic exercises you can do at your workstation to make sure you don't maintain a static posture for too long.

Definitely recommend having a look at this to help stay productive, and to avoid ending up with Programmer's Hands or other afflictions associated with the treacherous occupation of "computer geek".

Wednesday, 19 December 2007

Launchy 2.0 -- now with QT!

My favourite application launcher just got better with the release of version 2.0. This release is a complete rewrite using QT, which means it is also coming to a Linux and OSX near you!

Not sure how if the previous versions did this, but this version seems to have really great integration with my Firefox bookmarks (including my quick searches). It also seems faster using the ever reliable gut-feel measurement, and now supports Vista (the previous version didn't play to well with Vista). I have to agree with the release notes that state "It's just better".

Quick warning: the new version is incompatible with your old plugins, skins and settings, so installing 2.0 will reset Launchy to factory-defaults.

If you weren't using Launchy before, I seriously recommend you start now. It's awesome. It's free. What more could you ask for?

Monday, 10 December 2007

ASP.NET 3.5 Extensions CTP is here!

Now go play. :-)

Apologies for content-bereft post, but I've been hanging out for the ASP.NET MVC bits for ages and I can't contain my excitement to my open-plan semi-cubicle. :-)

Wednesday, 21 November 2007

Link: Mounting ISO images in a virtual CD-ROM drive

I end up looking for this link once or twice every year, so I have finally given in and am chucking on my blog for safe keeping :) 

Mounting ISO images in a virtual CD-ROM drive - help.net

Wednesday, 7 November 2007

Windows Live Writer out of beta

The Windows Live suite is out of beta, including Windows Live Writer 2008.

I love Writer :)

Update 2008-01-08: If you are having trouble installing with the new Live installer, try these steps.

Thursday, 1 November 2007

Getting SubSonic talking to Oracle

I wasn't sure how well SubSonic would play with Oracle, but it turns out that it was very easy to get the basics working. First, I setup a data access class and the SubSonic basics like VS external tools etc.

Instead of the configuration suggested in the above link, my App.config looked like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/>
  </configSections>
  <connectionStrings>
    <clear/>
    <add name="MyAppsConnectionString" providerName="Oracle.DataAccess"
      connectionString="Data Source=MyOracleServer;User Id=MyUserId;Password=MyPassword;Integrated Security=no;" />
  </connectionStrings>
  <SubSonicService defaultProvider="MyApp">
    <providers>
      <clear/>
      <add name="MyApp" type="SubSonic.OracleDataProvider, SubSonic"
        connectionStringName="MyAppsConnectionString"  generatedNamespace="MyApp.DataAccess" />
    </providers>
  </SubSonicService>
</configuration>

The emphasised bits will vary for you obviously. If you need connection string help check ConnectionStrings.com for your Oracle provider. I am using Oracle Data Provider for .NET, so your providerName may vary if you are using a different one.

It was then just a matter of running Sonic.exe generate /out Generated via the external tool configured earlier (or manually running it) from the project directory, and out pops your data access layer.

Tuesday, 23 October 2007

More on learning ReSharper

Moron learning? Yes, today I wanted to talk about how I am going about learning ReSharper.

A colleague of mine, after reading my last post on some basic ReSharper features, asked me how I'd learnt about these features, how much time it took, and whether there were any good tutorials out there.

Short version: printing keymap and playing around, not much, and haven't really looked. Of course, my verbosity knows little of and cares not for boundaries of any sort, so read on if you want the self-indulgent version.

The way I have gone about learning ReSharper it pretty simple. First I printed the keyboard shortcuts I find on the ReSharper documentation page (there is also a white paper there that covers the major features), and highlighted the ones I thought I would use regularly, and tried incorporating them into my coding sessions (Ctrl + Shft + R to open the Refactor This menu for example). Then I just had a quick look through the quickly-accessed ReSharper options whenever I had to do something "resharpery".

For example, if I had to do something that could potentially be done by an automatic refactoring, I would highlight the relevant section and hit Ctrl + Shft + R to see what refactorings ReSharper could offer, like extract a method, changing a signature, introducing a variable etc. I would also hit Alt + Enter whenever I saw the Quick Fix icon Quick fix icon, and had a look at the options provided.

I have learnt a lot, and continue to learn a lot this way. It has been a pretty low-intervention strategy -- it does not interfere with my normal work, but I still end up finding out a lot due to the easily discoverable nature of many of the ReSharper features.

If you want more in-depth tutorials there is the 31 days of ReSharper series (was for version 2.5 or so I think, but still relevant), and there are probably some more floating around the Net.

Wednesday, 17 October 2007

Getting to grips with ReSharper

On the couple of occasions I have talked people into trying JetBrains ReSharper (R#), the first thing they seem to notice is that it can optimise your using statements, and that it puts are bar down the right hand side of your editor showing you all the mistakes you have made in bright red and yellow stripes. There is obviously a lot more to ReSharper than that, and I've noticed people seem to get as much out of it as they put into it. Here are some of the features I found useful when I first started getting to know ReSharper 3.0.

Navigation

ReSharper introduces many nice ways of finding your way around your code. The File Structure View provides a list of all the members in your current class. Double clicking on a member jumps to that point in the code. You can also rearrange members and manage code #region blocks.

The mechanics of the File Structure View are fantastic, but to me the biggest advantage is the additional awareness it provides. At a glance you can take in all the members in the current file, which means you always have a good awareness of the context in which you are working, such as the class' current responsibilities.

I dock my File Structure View window to the right of VS and find it invaluable. You can access this window via the ReSharper >> Windows menu, or Ctrl + Alt + F.

Screen shot of File Structure View

ReSharper also provides a number of shortcuts to jump to a file, type, or symbol (Ctrl + T, Ctrl + Shft + T and Shft + Alt + T respectively). This lets you start typing part of the file/type/symbol you are looking for, and pops up an auto-complete box that allows you to quickly jump to the item you are after. Generally much faster than using Solution Explorer.

Other navigation features include an improved (over the standard VS) "Find Usages" feature, and a "Navigate from here..." menu that lets you jump to base, type declaration, function exits and more.

Code Generation

Mashing Alt + Insert opens a code generation menu, from which you can access wizards to generate properties with backing fields, constructors, interface implementations, and even delegations to class members. When I write "wizards", don't go picturing Clippy or some equivalent monstrosity -- these are actually helpful! For example, the constructor generator lets you select the fields/properties you wish to initialise in the constructor's parameters and then dumps the constructor into your class. The wizards are generally very keyboard friendly as well, so you don't have to madly chase your rodent around trying to click obscure buttons or links.

Generate constructor screenshot

Templates

The templates in ReSharper are incredible. There are a couple of templates build in (try typing "foreach<TAB>" into a method that takes any IEnumerable like an array as a parameter. No really, go try it! I'll wait...), but the real power comes from creating your own Live or Surround With template.

The templates support parameter substitution (i.e. you put a token in your template), and through the template builder UI you can specify exactly how these parameters are populated at run time. For example, you can tell ReSharper to guess the substitution based on the current type, current parameters, or even transform an existing name (such as using the camel-cased version of a Pascal-cased property name).

Edit template example

The educated guesses ReSharper uses are generally spot on, and are used in a number of places throughout the product, such as some of the Quick Fixes.

You use a template by typing part of the name into VS, and selecting the template from the autocomplete menu that pops up.

Refactoring

The standard Visual Studio refactorings are awful. On every PC I have used it has been almost entirely unusable. Trying to rename a private class member tended to cause a complete recompilation of the entire solution and basically take an eternity. ReSharper's refactorings work in milliseconds, and provide a whole lot more than VS.

The standard ReSharper 3.0 keymap (not the IntelliJ/ReSharper 2.x one) lets you mash Ctrl + Shft + R to open a context-sensitive refactoring menu. For example, if you highlight a passage of code and hit Ctrl + Shft + R, you can choose Extract Method to move that code to its own method. ReSharper will either instantly apply your refactoring, or open one of its helpful wizards if it needs a bit more data from you to continue.

There are also several chords you can press as short cuts to various refactorings, like Ctrl + R, Ctrl + V to apply the Introduce Variable refactoring. The refactoring features of ReSharper are extremely powerful, but in my experience require the most amount of work to learn how to use effectively. Every day I seem to find a new way to use a ReSharper refactoring to make coding easier.

The screen shots below show the "Refactor This" menu that appears after a value is selected and Ctrl + Shft + R is pressed. The second shot shows the Introduce Variable wizard, and the third shows the result.

Refactor This context menu

Introduce variable refactoring example

Result of introduce variable refactoring

Intellisense improvements

ReSharper, depending on which options you have specified (ReSharper menu >> Options), augments the standard Intellisense offered by Visual Studio. One option I turn on is to show more info about members, such as the return types. It is a good idea to play around with this to best suit the way you work.

The main thing ReSharper offers in this area is smart autocomplete and type autocomplete. Instead of the default Intellisense triggers such as Ctrl + Space, you can press Ctrl + Shft + Space or Shft + Alt + Space to get ReSharper to intelligently restrict the autocompletion options base on your current context. For example, if you are initialising a variable from a method call and and trigger a type-autocomplete, ReSharper will only show you a list of methods that return a compatible type.

Quick fixes

This is the best feature in my book. Whenever ReSharper finds an error, a suggestion, or recognises a number of common actions in the current context, it will flash up a light bulb and underline the relevant code. The colour of the light bulb and underline will depend on what type of quick fix ReSharper has identified (error, suggestion etc).

When you see Quick fix icon, press Alt + Enter to open the Quick Fix context menu, which will solve all your problems for you.

An example that is really useful when doing TDD is when you write some test code first that does not yet exist. The missing method will be written in red, and the quick fix icon will appear. Pressing Alt + Enter will display the menu shown below:

Quick fix menu to create a method

If you select "Create method...", a method stub will be generated, and you can TAB through the fields in the template ReSharper uses and fill in the details. The screen shot below shows ReSharper's suggestions for the parameter name, or you can specify a completely different name.

Quick fix process suggests a method name

Another TAB press and you can replace the throw new NotImplementedException(); line with your required implementation:

After quick fix method creation

But wait, there's more!

There is a Unit Test Runner, an option to cycle through your copy/paste clipboard (Ctrl + Shft + V), more code colouring options (such as greying out dead/unused code), automatic xml-doc generation for parameters, automatic importing of relevant namespaces, dead code removal and more!

Can I have my commission now?

There is so much to ReSharper, and you really will get as much out of it as you put into it. Once you become familiar with it you will find your code almost writing itself. I really recommend exploring the options it offers (ReSharper menu >> Options), as well as looking through and trying all the features. If you want an idea of exactly what can be accomplished, have a look at this video from Ilya Ryzhenkov, .NET Tools Product Manager at JetBrains.

There are only a couple of downsides to ReSharper. One is that you need a decent PC to run it on anything but a trivially sized project -- it is a real memory hog, despite improvements being made over v2. Secondly, it is quite easy to become dependent on ReSharper, and feel lost when you go back into normal VS-land. Sometimes I feel like I need to jump back into emacs to remember how to do stuff old-skool :) The other problem with the product is that it leaves you hankering for JetBrains to develop a Visual Studio replacement, say, Intelli.Net :)

Hope this post helps give your ReSharpering a jumpstart. :)

BPM tools vs. developers

Was going to send email this to a former colleague that shared some negative BPM tool experiences, but I think it raises some interesting points that are also applicable to RAD tools in general.

Frank Sommers uncovers some very interesting views in this post (both in posts it links to, and in the comments) on why many developers rail against BPM tools:

Java Community News - Are BPM Tools Useful to Developers?

Two schools of thought seem to be that developers don't like BPM because of the threat (perceived or real) they pose to their livelihood (which I believe is true at least to some degree), or that they don't like it because it actually gets in the way of doing things efficiently (which is my main complaint).

One of the good quotes in the article is this one from Robert Cooper:

"These products are unworkable because they are based on the idea that “You won’t need programmers anymore!” at least at a core level. Once you make that assumption you start building things that get in programmers way, and still include enough abstract programming concepts that no non-programmer is ever going to be able to work with it proficiently."

Another good one is in a comment from James Watson, where he states "This idea that developers don't want to use drag and drop tools because it's boring is a load of crap... Most programmers are busy and if a tool can save them time and headaches they will use it". He then goes on to list the typical cycle of how these things are introduced, which would be hysterically funny if it wasn't so true. I have quoted the list here as there is no permalink to the comment:

1. The salespeople tell some suckers that they won't need developers anymore. Many lies are told.
2. The company bites. They might even layoff some developers.
3. Non-developers try to create their own programs with 'simple' drag and drop tools.
4. Complete meltdown ensues when the first bump brings the house-of-cards crashing down.
5. The developers are now told to use this tool to do their work and maintain the steaming pile that has been built. (a.k.a throwing good money after bad.)
6. The developers try to maintain the mess that the non-developers wrote and create maintainable software without the tools that developers normally use (because they work.)
7. Productivity and/or quality continue to suffer. Developer morale drops. Much more 'code' is created than would be needed in conventional development approaches.
8. "Experts" in the tool are contracted and/or hired at great expense. They teach the developers how to work around all of the product's deficiencies in order to be moderately productive.
9. The rising expenses cause managers to look for ways to reduce development staff. Outsourcing may be used.
10. A vendor comes in to tell some suckers that developers won't be needed with their new drag and drop tool...

Monday, 24 September 2007

Managing multiple monitors with DisplayFusion

DisplayFusion is a free (as in beer) application for managing multiple monitors. It has features for setting different backgrounds per monitor, or setting a background that spans all monitors. It also has some hotkey settings for moving and tiling windows between monitors (I really like the Win+S shortcut to center the active window and size it to 75% of the active monitor's size). While I miss the Windows taskbar extensions that Ultramon has, DisplayFusion beats Ultramon on price (Ultramon is priced very reasonably anyway, but free is hard to top :-)), works well and is quite polished.

Binary Fortress Software » DisplayFusion

Friday, 21 September 2007

xUnit.net announced

Interesting times in the area of automated testing for .NET. James Newkirk, who previously worked on NUnit (and wrote at least one good book on TDD in .NET), and Brad Wilson have released xUnit.net, a new unit testing framework for .NET. Read the announcement for the important differences.

One of the interesting features added (old news for MbUnit users, perhaps) is "test method extensibility", which is (emphasis mine):

"...the definition of how to run a test method can be extended. There are two example of this: the first, in the extensions DLL, is the [Theory] attribute which allows data-driven tests; the second, in the samples, is the [RepeatTest] attribute which runs a test method multiple times in a row. For more information on data theories, see http://shareandenjoy.saff.net/2006/12/new-paper-practice-of-theories.html."

There is also a comparison between NUnit, MSTest and xUnit.net on the xUnit.net CodePlex site. It is released under the Microsoft Permissive License (Ms-PL) (both NUnit and MbUnit use zlib/libpng-based licences).

Be interesting to see the reaction to this and the effect (if any) on the other unit testing frameworks, NUnit in particular. NUnit is pretty much the defacto standard for .NET unit testing, despite generally being seen to lag behind alternatives like MbUnit. If this move is seen as diluting the NUnit standard it might see a large jump of people to xUnit.net, or perhaps to the established and more advanced MbUnit.

[Update 2007-09-22] Some initial, lukewarm reactions have gone up around the 'Net. See Roy and Bill's posts. Brad Wilson has responded to some of these.

Wednesday, 12 September 2007

Committing using the keyboard in TortoiseSVN

This post brought to you from my insanely-trivial department. When you commit some work using TortoiseSVN you are given a nice little dialog in which to enter comments and review the files being committed. I tend to break up my commits into logical sections of work, some of which are quite small (for example: adding client side validators to a single ASPX page). So I type in my comment, and have the option of tabbing through the relevant form fields or reaching for the rodent to click the OK button. All pretty easy, surely there is no way for a lazy person to do less work during this process... or is there?

Turns out you can mash Ctrl + Enter in the comments field and that will be the same as hitting the OK button (pressing Enter normally just gives you a new line). This will undoubtedly save me fractions of a second every day. Over the course of my life this could add up to an astounding 5 minutes of time saved! Of course, this blog post took about 6 minutes to write...

Tuesday, 4 September 2007

Opening a VS item's directory in Explorer

I use TortoiseSVN as my SVN client, but it is not integrated into Visual Studio like AnkhSVN and others. This generally suits the way I like to work, but occasionally it would be nice to right click on a new class and pick "Add to SVN", or have an easy way of doing an SVN move. I have recently started using a simple way of accessing these features, without installing a VS-integrated client, by providing a shortcut to opening a Visual Studio item's folder in Windows Explorer where we can use all our standard TortoiseSVN functionality.

UPDATE 2007-09-24: The functionality provided by the following steps is very similar to right-clicking on tab of an open file, and selecting "Open containing folder", which I admittedly only just noticed*. I have left this example online for two reasons. First, the method below offers a bit more functionality, as it also works for files selected in the Solution Explorer. Secondly, the general approach described is a really useful technique for easily extending VS. For example, I remember seeing a screencast of configuring Subsonic's SubCommander as an external tool in VS to generate your DAL and script your database with a single button click.

From Visual Studio 2005 (similar steps should work for 2008/Orcas too):

  1. Go to the Tools menu and select External Tools...
  2. Click on the Add button
  3. Set the executable to your Windows Explorer path (C:\WINDOWS\Explorer.exe on my PC).
  4. Set the arguments and initial directory to "$(ItemDir)". Not sure if the quotes are needed incase you have spaces in your paths, but they don't seem to hurt.
  5. Give it a title, such as Open in E&xplorer. The & just designates the menu accessor key, which is x in this case. -- you can leave it out if you like.
  6. Note which number your external tool is in the list -- in the screenshot mine is #7 (1-based counting here). This is only for if you want to create a menu button for this external tool.
  7. Click OK

Screenshot of External Tools dialog.

You can now select an item in the solution explorer, or just use the file you are currently editing, and go to Tools --> Open in Explorer to open the file's folder. Now you are back in Tortoise country, and can add the file to SVN.

You can make this even easier by setting up a menu button for the external tool:

  1. Right-click on one of your menu bars and select Customise (ok, it says Customize, but I can correct the spelling can't I? :) )
  2. From the Commands tab, select the Tools category, and then External Command {xx}, where {xx} is the number you carefully noted in step 6 of creating the external tool.
  3. Drag and drop the command on to the menu bar of your choice.
  4. Customise the button's appearance as required. I right clicked on the View --> Solution Explorer menu item and selected Copy Button Image, then right-clicked on my button and used Paste Button Image to get a purdy icon. I also hid the text description so it takes less room on my menu bar.
  5. Click Close on the customisation dialog.

You can now select a file, click the icon, and voila, instant Explorer. Ok, so this sounds largely pointless, but it does really help me to quickly switch between Visual Studio and TortoiseSVN.

* There seems to be quite a lot of cool crouching-tiger-hidden-features in VS 2005 (i.e. features that are not very discoverable). Some of the things I love about Resharper are present (mostly in simplified form) in standard VS 2005, but they are easier to discover (and generally easier to use and work better IMHO, YMMV) in Resharper.

UltraExplorer, a Windows Explorer alternative

After using Vista for a while I was having trouble switching back to the Windows-XP version of Windows Explorer at work. I especially missed the bread crumb that makes it really easy to go to different folders along the current path.

There had to be an alternative out there. Turns out there are a few, but one that is free and has a bread crumb bar is UltraExplorer. It is very customisable, has loads of features, and seems quite usable in my experience so far.

Monday, 20 August 2007

Handy list of open source software in C#

CSharp-Source.Net maintains a list of open source software programmed in C#. Not sure who runs it, but it has a sister site that focuses on Java. It is handy for tracking down some OSS alternatives for charting tools, PDF libraries, testing frameworks etc.

Tuesday, 17 July 2007

Firefox keyword searches

When you add a bookmark to Firefox you can also specify a keyword for it. Typing in that keyword into the address bar activates that bookmark. You can also pass a parameter to your bookmark, by typing in keyword parameter. This allows you to setup some really useful shortcuts. Here is a list of some of my searches:

Search / Site Keyword Url
Gmail gmail http://gmail.com
Google google http://www.google.com.au/search?q=%s
Google (shorthand) g http://www.google.com.au/search?q=%s
Wikipedia wp http://en.wikipedia.org/wiki/Special:Search/%s
My blog d2 http://davesquared.blogspot.com/search?q=%s
Oracle 10g docs oracle http://www.oracle.com/pls/db102/search?word=%s

The %s token in the URL is substituted with whatever you type after your keyword. I can type g linq to search Google for information on "linq", or d2 firefox keyword searches to lookup my blog for this article when I forget the URL format required :). You can generally work out the required URL by checking the address bar after performing a search and replacing your search term with %s.