Andornot Consulting Inc.
Home Page
Home Page
 |  | 

Monday, June 02, 2008

Firefox 3 (Release Candidate 1) and Hit-a-Hint

UPDATE: Installer (link below) updated to work with Firefox 3.1

Peter let us know this morning that several indispensable Firefox add-ons are now compatible with Firefox 3 RC1:

So off I went as that was the only reason I was holding off. Installed without problems and I love it. In just using it for a very short time (less than an hour):

  1. Sites load fast. And memory usage is much improved (right now with a couple tabs open I'm looking at 70MB whereas before it was regularly several hundred megs).
  2. Firefox itself loads very fast. Although some of this could be attributed to some add-ons that have been disabled now, it nevertheless is so much faster that even if the slug has not quite become a steed, it’s still awfully studly.
  3. The new functionality in the location bar is great.
  4. The add-ons dialogue is much improved. It's a small thing, but the reduced number of clicks to get an add-on installed makes a whole lot more sense than before.

And that's just what I've noticed right off the bat.

However, at first I thought Hit-a-Hint (a great add-on that makes it easy to do fast mouseless browsing) would be joining ColorZilla, Personal Menu, and a few others on the "not yet ready for 3" list, but searching the comments, sukhoy-isu mentions you can do a simple xpi installer change to get it going. Now how do you do that you may ask? Well, rather easily:

  1. Get the hah_0_9_1.xpi installer from https://addons.mozilla.org/en-US/firefox/addon/1341, or rather, because the link is not available from within Firefox 3, go to http://hah.mozdev.org/installation.html.
  2. The xpi file is a compressed archive, so use something like 7-zip to open it up and extract the install.rdf file.
  3. Open the install.rdf file in your favorite text editor and modify the maxVersion value to 3.0 and save.
  4. Plunk the install.rdf file back into the hah_0_9_1.xpi compressed archive.
  5. Go to File -> Open File and locate your hah_0_9_1.xpi file and go through the resulting add-on installer process.
  6. Voila! Start hitting your hints! 

Or, go the easy way and download the one I put together. Just change the extension from .zip to .xpi before opening it with Firefox.

Of course, your mileage may vary. Anything bad that ensues, don't blame me. It's not my fault. As always, it's Peter's.

UPDATE: installer updated to work with Firefox 3.1

Labels: , ,

Friday, February 01, 2008

Visual Studio and the non-sensical "Apply Cut Copy commands to blank lines where there is no selection" option.

Quoting some comments in Jeff Atwood's "Revinventing the Clipboard" blog post:

What I dislike the most, about the clipboard, is the really bad behaviour in VS. Say you cut something, then you try to past it elsewhere but you hit the C instead of the V (without any text selected) and bravo, you've lost your clipboard content! You now have to undo 3 or 4 times to re-start the manipulation. This is anti-productive at the most.

Fabian on January 22, 2008 03:01 AM

Fabian: That one gets me too, but the good news is that you can turn off that behaviour in Visual Studio.

Go to Tools->Options...->Text Editor->All Languages->General and untick "Apply Cut Copy commands to blank lines when there is no selection"

(I guess this goes towards what Jeff was saying about software having reasonable defaults).

GrahamStw on January 22, 2008 03:10 AM

It's one of those things that I never remember how to reset so here it is. Glory Hallelujah.

And btw, using ClipX and loving it (and yes, the beta seems to work fine in Vista).

Labels: , , , ,

Tuesday, November 20, 2007

SubSonic Code Generation within the Visual Studio IDE: Step-by-Step Instructions

Update: the title of this post is probably misleading as it's not all the steps for using SubSonic. There's plenty of material out there already on that (for i.e. how to set your build provider for Web Site Projects, how to set your config files for class libraries or Web Application Projects, how to set up your database, etc.) - the best place to start looking for that info is www.subsonicproject.com. This post refers to how to get using the subsonic.exe from within Visual Studio to regenerate your code on demand.

I've been using SubSonic for one of my latest projects and I really like what I've seen thus far. I'll save a further review for a possible other post, but since I've just repaved my machine and I'm setting everything back up again, I had forgotten how to configure the Visual Studio IDE to easily regenerate code using SubSonic (with a Web Application Project or Class Library - not the auto build provider).

Rob Conery has a good Webcast on how to do it all (if you haven't viewed it yet, head over now and do so), but it's a little tedious to work your way through the whole Webcast in order to pick out tool setup instructions. Therefore, I figured I'd jot down how to set up SubSonic DAL generation scripts for easy generation of code in Web Application Projects or Class Libraries. In other words, instead of having to open a command prompt all the time and specify what you want generated and where etc., just create some toolbar items and/or macros to do it for you on demand right in the Visual Studio IDE.

Reference External Tool

  • Tools -> External Tools -> Add
  • Settings for new External Tool:
    • Title: SubSonic DAL
    • Command (to your local sonic.exe location): C:\Program Files\SubSonic\SubSonic 2.0.3\SubCommander\sonic.exe
    • Arguments (means execute the generate command to, in my case, a generated directory in my class library - in other words, where my web.config/app.config file is with all SubSonic config options set): generate /out Generated
    • Initial Directory: $(ProjectDir)
    • Use Ouput window: checked
    • Prompt for arguments: checked (optional)

      image 

Create SubSonic toolbar with SubSonic DAL button (optional)

  • Right-click anywhere on blank menu bar and select "Customize"
  • Click "New" for new toolbar and save as "SubSonic":

    image 
  • Switch to Commands tab and then select category "Tools"
  • Select External Command n where n is the position of your newly referenced SubSonic DAL tool in the Tools menu:

    image 
    In the screen shot above, it's External Command 6. On a new machine with nothing else on it, the number will be External Command 2 as there's only one other tool before it in the menu (Dotfuscator Community Edition).
  • Drag and drop External Command n to the floating SubSonic menu you had just created:

    image 

  • When you now press close on the Customize dialogue, your SubSonic menu should now reflect your tool name. In this case that would be "SubSonic DAL."
  • Drag your floating toolbar to wherever you want it on your menu bar. Now, to generate code you can click on it from the Tools dropdown menu, or directly on your menu bar. Of course, you could just go further and create a macro.
  • Note: make sure you're actually in your SubSonic project where your app.config is located when you execute the command - nothing bad will happen if you don't...it's just that nothing good (code generation) will happen either.

Create another external tool that runs the SubSonic DB versioning command (scripts schema and data for your database!)

  • Do exactly as above for the SubSonic DAL tool, but instead put in the command "version /out \DB"

Labels: , , ,

Friday, July 13, 2007

Search open source code with Koders

Koders.com is a search engine that searches a large library of open source code. It's also a product you can purchase and point at your own codebase, but it's the easy access to all manner of reusable code, in just about any language, that has my beanie propellor whirling.

You can rather quickly find out how other developers have used method X in a given API, for instance. Seeing .NET examples in use in the wild is a much more potent educational tool than than the skeletal examples on MSDN, personally speaking.

You can also look for working examples of a concept. How have others approached solving problem Y? A browse through the relevant search results can show you real code being used in real life. Because honestly, if you are faced with a tough nut to crack, chances are someone else has already cracked it.

It gets better, because not only can you learn from your research, you can pick it up and use it wholesale. Or at the least, adapt the solution to your specific needs.

So the ability to search for code is, alone and all by itself, very useful. But you can you also browse through entire software projects! Holy crap. I spent some time just grazing:

Koders also provides a Firefox search engine plug-in, and a Visual Studio plug-in: Koders Plug-Ins. I am cozying up to both.

Labels: ,

Friday, February 23, 2007

How to make change happen with your blog, wiki's, podcasts, and more @ Northern Voice 2007

I must say, being in a room full of blogger aficionados, wiki neophytes, avid podcasters, and especially "Non-Programmers" was a refreshing experience. Northern Voice 2007 (a non-profit personal blogging conference for techies and newbies alike) was held at UBC this year (February 23-24, 2007). Moose Camp (an organic, self-organizing, un-conference) kicked off the event with over 300 web developers and enthusiasts from around the world. Without a doubt, every participant shared (or ranted about) their success stories and of course debated about which blogging platform was the best (WordPress vs. Drupal vs. MovableType vs. Expression Engine). There were numerous Cool Web 2.0 Tools, Tips, & Tricks that I tried to absorb via osmosis (way too many that I will probably spend long nights playing with all of them). However, the one thing that impressed me the most (aside from snatching up a free t-shirt and funky buttons) is how these tools can remarkably help change an organization (ahem, we use lots of Web 2.0 tools on our web site), a community (ex. VanCity's ChangeEverything.ca), and even our very own lives (ex. Kristen's story and her adventures). Here are some of the sessions that I attended: The fine folks at Podcast Spot have recorded all the sessions and are available at http://northernvoice.podcastspot.com/. For photos, search via Flickr tag: nv07, northernvoice The interesting part about this conference is that participants are actually encouraged to whip out their notebooks and blog, instant message, write emails, upload flickr photos, and simultaneously podcast during presentations. [I personally never did that...well, I only moderately checked my email .... and I only made a few blog posts... and I only uploaded ONE photo...but I had to IM chat with.... ;) ]. I look forward to sharing my experience with our Andornot clients.

Labels: , , ,