Spread Firefox | Download Day 2008

Firefox 3 now available

Download and help set a record

Download Day is here!
Set a Guinness World Record
Enjoy a Better Web

Sounds like a good deal, right? All you have to do to help us set the record for the most software downloaded in 24 hours is get Firefox 3 now – it’s that easy. We're not asking you to swallow a sword or to balance 30 spoons on your face, although that would be kind of awesome.

Please download Firefox 3 by 11:16 a.m. PDT (18:16 UTC) on June 18, 2008. That's 11:16 a.m. in Mountain View, 2:16 p.m. in Toronto, 3:16 p.m. in Rio de Janeiro, 8:16 p.m. in Paris, Madrid, Berlin, Rome and Warsaw, 10:16 p.m. in Moscow, and June 19, 2008 at 2:16 a.m. in Beijing and 3:16 a.m. in Tokyo.

Spread Firefox site 

Google Toolbar for Firefox 3 also available here

Code Generation with MyGeneration

I had the chance to grab and have a short look at MyGeneration for a few hours over the weekend and I should say I'm quite impressed with the features that it has. [more]

In one of my previous companies we developed our own custom code generator to fit the company's standard process/way of doing things (or more accurately our boss' way of wanting to do things). Being tied to the company's own way of doing things it had a number of constraints such as relying on naming conventions in database tables, support for other databases and only supported generation of C# for the data access layer. Not to mention it's proprietary. The reason I mentioned this is that I think it is safe for me to say that I knew how hard it can be come up with a decent and flexible code generator which supports templates and doesn't require a recompile to even just change the layout of the output. The code generators I've mentioned earlier involved parsing the template and doing simple to complicated string replacements but when I saw MyGeneration, it's awesome.

Unlike custom code generators like the ones I've worked before (and other commercial generators) that is a little more close to one-click code generation though, MyGeneration is more of a text/file (could be code or not) generator which enables you to generate your output(s) given information of your database's meta/structure (tables, columns, indexes, primary keys, foreign keys, views, stored procedures etc) and controlled via templates. The templates can be written in C#, VB.NET, vbscript or jscript and it is in these templates that you say loop inside you table collections and generate your create/insert, retrieve/select, update, delete (CRUD) stored procedures. Did I mention that there are already a good number of templates for generating stored procedures and data access layers for for some known OR/M frameworks? And if they are not enough like and you would want more control over the generated text/code and you happen to know the languages above then go ahead and create your own templates.

You should really go over to the MyGeneration home and familiarize with it, download the stuff. There is also this one link to a video (in youtube and Google video) to get you started. Mind you the resolution of the video is very bad but it still got me through so it's really trivial.

Moving forward, there are already those available for generating CRUD stored procedures which although also includes generation of stored proc by PrimaryKey I needed more such as stored procedures for every index in the tables I selected. I was a bit hesitant since I don't really have the luxury of time but I modify a template anyway and after a few minutes (yes minutes) I was able to come up with one that fits my needs. Yes that's how easy it is and considering that I did it in vbscript (since I modified an existing vbscript template) rather than C# which I'm most familiar with. Anyways, for those interested here's the content of the modified template.

UPDATE 6/22/2008 : as promised uploaded *.vbgen containing the template (not just the actual content). Just drop it inside Templates/Microsoft SQL Server folder and you'd now see it in your Template browser.

Modified dOOdads template for stored procedures with select by indexes follows: RDG_SQL_StoredProcs.vbgen (18.75 kb)

Ohh did I mention that MyGeneration is open source (BSD license) so create as many copies and modify if you have to.

If you already have a code generation of you're own doing then I would still suggest looking into MyGeneration and see it's features and you're really in for a lot of learning. You could either move features of your CG to it and help the community maintain it or get some ideas to your own and credit MyGeneration for it.

If you have the budget then you might want to look into CodeSmith. It's text/code generator too, is commercial but there are templates (such as .netTiers) which aside from generating the code also generates the Visual Studio projects/solutions along with the data access layer. It is likely to give you the same control over generated output as with MyGeneration but I haven't really looked more into this since I'm not looking into a
commercial product as of the moment but will be sure to keep you posted
if I do. As of the moment CodeSmith has schema providers (allows you to look into and retrieve database meta information of MS SQL, Oracle and MySQL as of the current version) but MyGeneration myMeta API supports more providers and has more templates for non .NET code. You have the source code too so if you need to support a custom database/store that you have it is possible and likely relatively easy to create you're own meta provider for MyGeneration too.

Finally, for some people (including a part of me) who are more comfortable with having
much control over their code rather than generated you might hesistate but if you'll be the
one calling the shots on how it would be generated, how much different
could it be? Literally you could save hundreds of hours.

A more detailed comparison might be in place soon but have to get back to work 🙂 Hope you'd get a lot from MyGeneration and this post.

Acronis True Image Home 11 vs Norton Ghost 14

Acronis True Image Home 11 vs Norton Ghost 14 which one is better? or do I choose? [more]

I've ran into some a number of issues in my machines that required resetup and what would have been reinstallation but thanks to Symantec Ghost 2003 I didn't to reinstall windows from scratch.

As I was thinking of upgrading to the new Norton Ghost 14.0 I had the following features on top of my mind:

1. Recover without a Recovery CD (if possible – still recommend to have such CD though) 

2. Live Backup ** (though also present in Ghost 14)

3. Easy to use interface

4. Low cost for new purchase or upgrade

To make the long story short after a few minutes I found myself purchasing Acronis True Image Home 11. Relative to the items above, here are my comments.

1. Recover from a previous backup without a Recovery CD. Just enable Recovery Manager after installation and during machine startup, Press F11 and Acronis will be loading and enable you to select a previous backup to restore. Ghost has this LightsOut feature but after reading the manual, the catch is that if the file system is corrupted you have no way to recovering without a Recovery CD. And there are a couple of complexities involved in it like involving pcAnywhere technologies and other things. It seems that this was primarily created to enable remote recovery (an admin would recover a machine without being physically present there). I'm somehow a technical guy and I could go about this but I don't really need this complexities not to mention I dont have time for it. (if you want you can grab the Ghost 14 user manual and see the section on LightsOut). I have tried this F11 stuff already (although I just verified my backup rather than restore it) but I will put it to a real test next time.

This is also somehow similar to how IBM laptops does AutoRecovery which I'd have to say is a pretty impressive feature. 

2.  Acronis supports Live Backup (no need to reboot to DOS or something) though also present in Ghost 14.0, the latter doesn't actively market it. You would be able to create a backup of your disks/partition while continuing to work, seamless. My guess is it's something to do with Volumn Shadow Copy or something. This feature is also present in Ghost since version 9 (though had bad reviews then). I'm not sure which of the two, version 9 and 2003 came first but in the 2003 I was always prompted to reboot if I'm backing up the OS partition. Thanks to ObiYawn for the correction on this.

By the way I knew of Acronis from a laptop I had in one of my previous employers. It was preinstalled and it just works. Tried Live Backups all the time and after a restore, no problems and an exact replca (of course I'm no guru as for the internals but from my point of view no issues).

3. Just enough eye candy for Acronis to look good for me. Ghost is fine too but being part of Norton/Symantec they seem more inclined to a more formal GUI. By preference I like Acronis (subjective of course).

4. Regular price for Acronis True Image Home 11 is $49.99 as of this moment but got a coupon number somewhere in the web and trimmed down to $44 something. While Ghost 14 is around $69.99. That's a big difference considering that Acronis is winning in my other considerations. (for the coupon number, leave me a message in case you can't find it thru google and ill try to look for it in my history or TimeSnapper screenshots)

It is also worth mentioning about Acronis' Secure Zone where a hidden partition is made for you to store a backup and can also be password protected (I think this zone is encrypted but not sure yet). Anyways, it makes the automated recovery even better. I have 2 physical disks and had the partition in my non system HD. 

TrueImage also support scheduled backups which I like and another cool feature Try&Decide™ which allows one to make changes to the system that could possible cause it to become unstable then in the end choose to discard those changes and rollback to state when the feature was turned ON. I'm excited to try this feature when time permits. I usually and would likely still use Virtual Machine to do some experiments/trials but if this turns out as a much cheaper/elegant solution then why not.

Ghost has this feature of capturing your system and using the image as virtual machines (VMWare, VirtualPC) but was not enough to make me decide otherwise. Acronis has this feature but not for the Home edition. I have my base VHDs anyway so I could live without this and Try&Decide mentioned above looks promising.

I won't elaborate further on complete list of PROs and CONs but just those features that made me decide. Of course selections should be made on a case to case basis but safe to say that being an advanced user Acronis TrueImage stands a chance against the more popular Norton Ghost.

If you don't have any of the recovery solutions yet, I would encourage you to have one and take a look at these two and others. I would love to talk about the advantages of fast recovery but someone is likely to have talked about it in the web and better than I would suggest consulting Google. Smile

I'm quite sure this is money well spent.

VisualSVN Server

In a previos post on My SubVersion experience I received a comment from
Ivan Zhakov of VisualSVN to try out the said product (which by the way is free) and so I did. [more]

Not much to say except that it was an amazing experience. No issues with installation, simple but does it wizard steps (eg. option to use port or HTTPS, default repository folder et al) and an MMC management console. Now I don't have to edit config files manually and instead do it from a GUI. They also have a windows service to start VisualSVN which also handles the management of the Apache server.

As mentioned it comes with Apache installed, lets you choose which port to run apache and since I don't really need it running all the time the windows service did it for me. If you do need to tweak things in your apache installation I'm sure you could also do as you please since I can see the files are just in the VisualSVN installation folder (default ProgramFiles/VisualSVN). Not an apache guru here but the conf files are editable and probably so are the rest of the features (modules whatsoever).

No issues so far (and I hope for good). Good to know some things about SubVersion binary packages installation and some things you can do from command prompt but if don't want to complicate things and need a simple enough solution to have subversion working I suggest you use VisualSVN server as I do now.

My Subversion (Version/Source Code Control) Experience

I had a chance to look into subversion today and here are some of my notes. It's a version control system (source code control but it's really more than just code) along side Visual SourceSafe, SourceGear Vault among others. Why subversion [more]of all other is worthy of another post but first one, it's free (Vault is also free for single user/personal i think but in that case Subversion is more widely accepted in the community and some issues with JetBrains TeamCity support for Vault made me think that Vault may not be that frictionless when it comes to Continuous Integration – not sure if CruiseControl.NET supports it).

Moving on, there's just not much to say my experience but it just works. Some caveats since I haven't read the documentation and instead jumped right in but I'm happy with my first checkin/checkout after a few minutes.

1. I got the latest (i think) Windows Installer (with the basic win32 binaries) from the following link:

Also note that you can get to this from their home page by clicking on Downloads from the treeview on the left of the site. Then go to the windows section. Furthermore you could reach the same page by clicking on Documents and Files from the same treeview on the left. After redirection to the Documents & files page, on the treeview that appears in the main content of the page, traverse subversion > releases > windows (or further to windows apache 2.2.x node for binaries built against the famous apache web server version 2.2).

2. Install (in my case I installed on a Virtual Machine I have with Windows XP)

4. I then created a sample repository by issuing the following command (command line dialog/cmd) "svnadmin create C:svntest_repository" where C:svntest_repository is an existing folder in my system. There are some articles that mentioned issues when the directory doesn't exist and rather than test and verify it, I created the folder before issuing the command (but feel free to try it and tell us how it goes). Looking at the C:svntest_repository directory I found new directories/files created so on the right track here.

6. Then I was wondering now that I have SVN setup, what will be my server URL? I have worked with http/https/svn URLs before but merely as a client who connects to it. I tried to connect to it using SmartSVN (client) which I'm already familiar wit. You can also use TortoiseSVN but coming from Visual Source Safe and Vault background, I prefer not to work with SVN from the windows explorer (as TortoiseSVN does).

So I was trying to connect without knowing my SVN server URL (yeah, using SmartSVN but not so smart there) and just trying random URLs like say my internal IP was so I tried or svn:// with or without the test_repository relative path. Obviously no luck there and getting some thing like "connection refused" (sorry should have noted the specific messages).

After some digging it turns out that you have to have a server to access the repositories (duh, so that's why apache has been mentioned all over)

I don't have apache setup so I was wondering if I could live without it. So after some walk around the documentation I found Overview of Server Configuration and there it is svnserve. The documentation is very impressive if only I've read through it first but diving right in without reading much still worked for me. Here's a link to the main page for the Subversion Book multi-page html edition index. Or you can also check out the the Subversion Book for other available editions (eg. PDF)

6. I started svnserve as a standalone daemo using the -d switch and tried to access it using SmartSVN (from my host machine). The command was svnserver -d. Tried to connect using SmartSVN again.

(File > Create Module menu item > "select local directory to import to repository" > setup repository profile). Hmm, should probably have made a post on SmartSVN or tortoise but feel free to drop me questions if ever or chekc out documentation for SmartSVN or Tortoise on "importing local files to repository"

Moving on. Oops, I was getting new errors along the lines of "no repository can be found at URL (svn://". Hmmm, sounds bad but not so bad coz somehow it is now able to recognize the server, it just can't find a repository in there. Again, checking the documentation, it turns out that you have to use svnserve's -r switch if you have to use that path. That is without the -r switch your repository URL should append the full path of the repository (C:svntest_repository). The samples given are in UNIX so not sure how it should look like in windows (will try when i can), maybe svn://"c:svntest_repository"? But bottom line is that i started svnserve with this command instead "svnserve -d -r c:svn" and accessing the repository URL as svn:// now works. great.

So guess that's it. Pardon any incoherent thoughts above (if any) but hope this benefits someone other than future me. Back to work.

Help File for .NET Assemblies (SandCastle and SHFB)

I needed to create a sort of simple API Programmer's Reference for an assembly I'm working on so I figured I'd give SandCastle (an open source project from Microsoft) a try. [more]

SandCastle Help File Builder (SHFB) on the other hand is created by Eric Woodruff and also housed in CodePlex. I've used NDoc before and SFHB has an easy NDoc look and feel.

Need not say more, it just works. Install SandCastle, then SFHB, open SHFB GUI, select your assembly or XML comments (output file from Visual Studio or csc.exe), click Build, wait and after a while you have a CHM documentation.

Of course you have to have comments in your code to generate useful documentation (and although it could take a little or some time, it's always good to have comments) (** Can't confirm if VB.NET has xml comments too or only C# has it).

If you're not familiar with comments then place the cursor on top of a class or method, then press character "/" thrice. You should see a summary comment (which by the way different from the general comment with two "/" only and can be placed anywhere in the class file.

I'm really glad these things just works. You probably need to tweak some things if you need it customized whatsoever but in my case, I'm good where I've come so far.

So here are some links:

SandCastle on CodePlex 

SandCastle on MSDN 

SandCastle on CodeProject (a good documentation)

SHFB on CodePlex

SandCastle Forum

Other Project supporting/enhancing SandCastle

SandCastle Blog

SandCastle related Projects in CodePlex 

Firefox Bookmarks Location and Moving it

It just so happened that I've been asked where Firefox Bookmarks are stored a number of times [more](and I have to admit I also had to look for it the first time) so I figured I'd post here for everyone's convenience (did the gooling for you)

It's usually (by deafult I believe) located at C:Documents and Settings<your username>Application DataMozillaFirefoxProfiles where <your username> should obviously be replaced with your windows login/user name. When you get to this folder you should see some semi cryptic folder name like "4dw3r4ow.default". Open that folder and you should find bookmarks.html. That's where firefox stores your bookmark information.

Also, I bring along a cheap 2.5" external drive with me for files et al so I thought hey maybe I should save my bookmarks in there too so I have access to them on machines I use (eg. home and office). For this I would redirect you to this post by Chris Ilias on customizing firefox bookmarks location.

I know I know there are a number of ways of storing bookmarks online but I think the benefit I'm after is if I have firefox bookmarks itself (rather than online bookmarks like del.i.cious or google bookmarks – yes there is such a thing), I can use my AutoComplete Manager add-in. Which is typing in the address bar, the addin doesn't simply provide suggestions based on words in the URL or bookmark name or page title but all of them plus a couple more options on how you want autocomplete to behave. I've been using it for sometime and working good (not to mention some updates/enhancements here and there). This has been in my FF addin list for sometime along with NoScript and a few others.

Resharper vs CodeRush

I installed CodeRush into one of machines just a while ago and it didn't take me long to decide to uninstall it and have Resharper instead [more](have resharper on another machine).

CodeRush have more "eyecandy" as they say, looks more pleasing to the eye (subjectively of course), has very powerful use of templates (type pi and will produce a private int property with an underlying private field), the code flow/break statement, clear way of indicating scope (code blocks) and I haven't explored yet but they do have some code metrics features.

I don' t know if I'm using the right terms for these features but I think resharper's analysis and testing support is better. Plus, I feel that CodeRush is being too smart for me and I would stick with resharper for now and explore its Live Templates features to be close to that of CodeRush.

CodeRush is actually a code generation tool, while resharper is more of a refactoring tool (thus better matched with DexExpress' Refactor – makers of CodeRush). But IMHO resharper is more than that and probably safe to say is even better with CodeRush and Refactor combined. It could be because I've used resharper first (though been only a week) and most of the time it wins over CR in reviews but then again this is just my opinion.

Plus not to forget that if you consider Resharper's pricing, I don't have to think twice for now 😀 and go with Resharper.

Ideally, it would be nice to run them both but I don't want to mess with the machines I have for now. Leaving it for a later post if I do find time to try them both together. For now, uninstalling CR here and having R# in place. I wonder what others think?