cmiles – blog

Charles Miles – Tucson Hiking, Outside and Adventures, Excel, .net, Life

End of Project Notes

In October of 2007 I started work on a project to convert and extend an older True BASIC data processing program. Early this year, after releasing several versions, work on this project ended and I thought it would be interesting to share some thoughts and experiences. I do not consider myself a ‘master programmer’ and these notes are not intended as ‘expert guidance’ – so why post them? Because I have enjoyed similar posts from other programmers!

Overview:

Platform: The requested target for the project was a Windows desktop application. Windows desktop applications do not get much love/hype these days and at various times during the project we talked about doing a web version. But with no existing server/host to use and without manpower/budget to acquire and maintain a server/host a desktop application was a good choice. Application installation and updates can be a challenging part of a desktop application – but in this case we only ran into a few support issues and it was really not a problem.

Programming Language/Platform: C#/.NET (eventually 3.5)/Visual Studio (eventually 2010). Since Windows desktop was the target and we had existing experience with this stack we did not seriously consider other choices…

Gui: We started the project in WinForms and later moved to WPF. The WinForms version worked fine, but I find WinForms hard to love – in particular I dislike the GUI designer and generated code. It was refreshing to move to WPF, working with XAML for the UI is quite nice and I have found WPF to be a quicker, easier and more maintainable way to create UI (I have used WPF for several other projects as well). I would hesitate to start a new project in WinForms – but I have started to strongly suspect that UI technology/framework matters less than I would have guessed several years ago. My personal experience has been that many technologies have reasonable basic functionality – you are going to be able to get a decent/basic UI built without too much time/pain. But it seems like that in every technology it is going to cost quite a bit of time to tweak/create/craft all of the details needed to make the UI something you would actually want to use (UI hints to help users solve their problems, help for beginners, understandable error messages, good editing, great validation, smart interaction with the database, attractive visuals, great layout, etc…). WPF seems like a step forward compared to WinForms – but not a big enough step forward to make creating good UI easy or to make achieving your vision uncomplicated… I would pick WPF over WinForms for a new project – but certainly not with the illusion that a great UI can be created quickly in any technology.

Data: We used Microsoft SQL Server Express for this project (2005 and 2008 versions). For this project a carefully constructed schema helped us to enforce rules about the data, catch errors and query the data much more easily than a non-relational store would have. We did 95% of our data processing with SQL queries – for this project that turned out to be a very pleasant way to work.

Version Control System: We started this project in 2007 and used Subversion and Trac at hosted-projects.com. While I currently do not have much love for Subversion I did realize after switching to Mercurial that it is easier to explain, understand and use for simple scenarios – a great benefit in some situations. About two years into the project we moved to Mercurial and Assembla. Mercurial is fantastic – my experience has been that Mercurial has quite a few benefits (easier check-ins, faster access to history, nicer branch/merge, quick cloning of the entire repository for experiments) without any additional hassles once you get over the initial learning curve. We stayed with Mercurial for the rest of the project but did move from Assembla to Fogbugz and Kiln. Moving to FogBugz was nice – we found that the default FogBugz setup worked better for us than a default Trac setup (we were not interested in spending time customizing Trac). Moving to Kiln was FANTASTIC – I love the features that Kiln provides for working with Mercurial repositories. The ability to maintain and organize multiple repositories made it much easier to work simultaneously on different releases and features. We took advantage of the 2-person Student/Start-up (free) plan. I really like FogBugz and Kiln, but I do wish they had some additional pricing options – while these services are certainly ‘worth’ $30 per person per month that could be tough to justify for smaller/experimental/less profitable endeavors with more than two developers.

Details:

LINQ to SQL – For a simple strongly typed data access this was great! Creating the data layer via SqlMetal on the command line was a nice part of our workflow. But I am very glad that we did not try to do all of our data processing via LINQ – when we experimented with trying to do everything in LINQ we quickly found that complex queries were more readable, easier to create and faster to change done directly in SQL. While LINQ to SQL is still supported by Microsoft I think it is fair to say all their energy is going into the ADO.NET Entity Framework and I don’t think I would choose LINQ to SQL for a new project.

SQL Server Compact – As noted above we ended up going with SQL Server Express – but our original intention was to use SQL Server Compact edition as the primary database and include an option for advanced users to use an existing SQL Server instance. Unfortunately my ignorance killed the SQL Server Compact part of our plans – I was developed for months via Sql Server and had written hundreds of lines of SQL before I realized that some of the syntax that I had used was not available in SQL Server Compact edition. At that point we felt it would have taken too much time to rewrite the SQL and we went forward with just SQL Server Express. This was a learning experience for me about the differences in SQL databases…

Importing Data – We, of course, ran into problems with users supplying invalid data – but I think that is always true of user input. The more interesting problem we ran into was that we underestimated the user’s ability to understand and fix the problems in their data. For the second version we added a validation layer that gave us a chance to both catch errors in the data AND give the user detailed/helpful error messages – it was certainly not perfect but it helped quite a bit to have detailed user targeted error messages.

Conclusion:

Like any project if I was going to do this again I could do a better job – but we managed to produce a working application that we were able to maintain and constantly improve for several years! I think most of our choices were reasonable given the goals and resources – but certainly database and desktop application would be two things that I would consider carefully if were starting again from the beginning.

CM

Filed under: .net, Software

Wesabe, PasswordSafe, hosted-projects.com, S3 Backup, HotSpotVPN

Last month I ordered a Lenovo X61 Tablet (originally due to arrive last week – now delayed…) and I immediately started a folder of software that I wanted to install on my new machine. As part of that process I also looked for new web applications that would work for me as desktop application replacements and thought about services I want to continue to use:

Wesabe
web address: www.wesabe.com
length of time used: just over a month
for me replaces: Microsoft Money

I have used Microsoft Money for about 7 years. I am a ‘light’ user of the product – no investment tracking or anything complicated – and it worked well for me but did not have any must-have/killer features.

When I saw Wesabe I was intrigued, Wesabe provides basic account tracking (including pulling information from your bank via a desktop app or (better) a Firefox plug-in), has clean/flexible tagging of transactions, supports adding attachments to transactions (such as a scan of your reciept), very basic reporting/exporting and a nice clean interface. In addition Wesabe adds a twist to financial management software by tying you into a community of users who can provide tips and join groups on topics such as saving money.

I have been using Wesabe for about 1 1/2 months now and for me it is has worked great – no glitches or problems, simple to learn and has the features that I need! It seems fairly clear to me that Wesabe is not intended to (at this point anyway) track a complex financial portfolio, but for tracking/tagging transactions on a basic set of accounts it works great.

PasswordSafe
web address: www.passwordsafe.com
length of time used: about two months
for me replaces: PINs

I have seen many suggestions about different ways to manage the insane number of online accounts (not to mention ‘offline’ numbers/combinations/pins/etc.) that almost everyone seems to accumulate – but none that are perfect. I found PINs over a year ago and liked the simplicity and small footprint, but occasionally wanted access to my passwords when I did not have my computer or USB drive handy…

For me PasswordSafe is a nice solution. PasswordSafe offers a number of features, for me the ability to store usernames/passwords and search my account to bring up the information I need is great. PasswordSafe has a desktop app that can pull down all of your information into a format that is available offline and a (beta) favorites link that will bring up a browser window with your PasswordSafe information for the current site. This service has worked great for me and, like Wesabe, the features match quite nicely with what I need.

hosted-projects.com
web address: www.hosted-projects.com
length of time used: just over a year
for me replaces: hosting a local subversion server

For the past couple of years I have been trying to continually improve my programming skills and have several personal projects that I have been working on – even working 99.9% by myself it is hard to imagine not using a version control system.

Subversion (with tortoisesvn) is the system I picked and I started by running a subversion server on my own system. This was a great way to get started, but I was nervous about losing data if I had computer problems.

So I found an alternative – hosted-projects.com; the price is good and they have plans that are appropriate for a wide variety of needs. I have never seen the service go down, they set up a trac site for each module you create and the management interface is easy to use. I do not have much experience with other version control/project management hosts, but for my uses hosted-projects.com has been perfect.

[Caffey left a great comment about CVSDude.com offering both CVS and SVN hosting. Looks like the basic plan at CVSDude is $1 less than hosted-projects.com with slightly different options.]

S3 Backup
web address: http://www.maluke.com/s3man/
length of time used: about 6 months
for me replaces: external hard drive backup

Large, inexpensive external hard-drives and multi-gig DVD formats have made personal backup easier, but unless you store the backups somewhere secure and in a different location from your computer how useful are they if there is a break-in, fire, flood or a need to restore while you are traveling?

I have been very interested in backing up to online storage and Amazon’s S3 service makes it possible to backup up the amount of information I have for a reasonable cost. I have been backing up with S3 Backup for about 6 months and it has worked well. The software is still in Beta – I have had occasional small glitches – but so far the benefit of having secure online backup has been worth any small problems.

Amazon S3 is new enough that I am not aware of any well established software packages for working with it – it will be interesting to see what other options emerge. I want to try Jungle Disk (recently out of Beta) at some point… I have also seen Mozy recommended numerous times for online backup – but I like the idea of not being tied into one vendor for backup/access software.

HotSpotVPN
web address: http://hotspotvpn.com/
length of time used: about 18 months
for me replaces: unsecured browsing over public wireless

A few episodes of Security Now! may induce enough fear about wireless security that you will start looking at VPN solutions. Some of my friends simply VPN to their home/desktop computers when on the road, but I do not have (and do not intend to have) anything other than my laptop. So the solution for me when using unsecured wireless hotspots has been HotSpotVPN. I have occasionally had trouble connecting and have trouble at some airports with the login system – but overall HotSpotVPN has been easy to use and the extra security has been worth the cost.

Enjoy,
CM

Filed under: Software

Multi Tap Tempo

Over the past week I had a chance to write a program that I had been thinking about for a couple of months. I spend some of my time editing audio for dressage (in an older version of Samplitude (which I think is a stunningly fantastic piece of software)).

This often involves splicing together multiple smaller sections of audio that may have slightly varying tempos. In some situations I would simply match tempos by ear – but in this case the final product needs to have very tightly controlled tempos so I often use hardware/software that allows you to tap in the tempo. Tapping in the tempo works great – but I have not found a device/program that I like that allows me to:

-Tap in multiple different tempos without resetting the device or managing multiple windows
-Easily retain information about the tempos that were tapped in
-Take up a reasonably small amount of space on my screen/desk

To meet my needs this is what I came up with:

MultiTapShot1

The left hand column shows the keyboard key that the row is associated with. When you tap the key the program measures the interval between the taps and present several statistics about the tap interval (beats per minute averaged over the last X taps, average BPM over all taps measure for that row, the average duration in seconds of all of the taps for the row and the total length of time of all of the intervals measured for the row).

Multi Tap Screen Shot 2

A right-click menu provides access to many features including:
-Assign different keys for each row
-Add single or multiple new rows
-Clear the stats from single or multiple rows
-Save/Load sets of rows (This includes saving stats from the rows, but is mainly intended to allow saving a setup)
-Delete a row
-Stay on top option
-Setting to determine the number of rows created when the program starts
-Setting to adjust the number of intervals used in the “# Tap Avg. BPM” column
-Simple Printing

This is only lightly tested so far so use at your own risk – but if anyone besides me finds this useful or interesting it would be great to hear about it –

Multi Tap Tempo Setup
Multi Tap Tempo Source

Enjoy,
CM

Filed under: Software

twitter -> twitterings

  • Just saw the new Resharper 6.1 Early Access version has Async CTP support listed - downloading now... 6 months ago
  • Quick post about FeedDemon/Pinboard/Save to Pinboard on Android as my choice for Google Reader Sharing cmiles.info/2011/11/05/goo… 6 months ago
  • FeedDemon+Custom Sharing XML->Pinboard; NewsRob + Save to Pinboard on Android - replacing Google Reader sharing, Reader now just for sync... 7 months ago
  • Doing a few Max - cycling74.com - tutorials - what fun, first time in a decade I have played with this... 7 months ago

RSS pinboard -> links

  • Gmap4 - Share Enhanced Google Maps
    A very cool tool - free for non-commercial use - that can produce very nice (and very usable) topo maps that can have data (GPX, KML,...) overlaid on it very easily!
  • Vistoso Hiking Club Hikes Database
    Short descriptions of hikes near Tucson with a few off trail and interesting destinations - no doubt there are more informative sources but sometimes the simplest thing is nice...
  • Bill Hill - Pictures
    I don't stumble on that many well organized great sets of Tucson hiking photos so saving this link!
  • [WPF] How to bind to data when the DataContext is not inherited
    This solved a problem for me with control of DataGrid Column visibility via Data Binding. Did not test/research/profile this extensively, but for my problem this worked like a charm.

RSS cmiles-consuming -> posts

  • Kafka on the Shore and The Wind-Up Bird Chronicle, Haruki Murakami 2012 June 1
    Kafka on the Shore and The Wind-Up Bird Chronicle by Haruki Murakami are favorites of mine. To combine them into one blog post seems slightly odd – they are not part of a series and are complex enough that reducing them down to a few sentences seems like a disservice. But what these have in [...]
  • Hyperion and The Fall of Hyperion, Dan Simmons 2012 May 16
    I first read Dan Simmons‘s Hyperion in the early 1990s – the Hyperion Cantos is quite famous and I would occasionally see Hyperion listed in Amazon recommendations and ‘top’ lists (see the ISFDB Top 100 Lists and Your Picks: Top 100 Science-Fiction, Fantasy Books from npr books (note that you may get some amusement out [...]
  • Wool Omnibus (Wool 1-5), Hugh Howey 2012 May 1
    I don’t usually pay much attention to Amazon’s recommendations – but after finishing 1Q84 I wanted something new and, for whatever reason, the Wool Omnibus by Hugh Howey jumped out at me on Amazon’s list. Wool takes place in a bleak future where the characters live in self sufficient underground silos with only a vague [...]
  • 1Q84, Haruki Murakami 2012 April 15
    I am a fan of Haruki Murakami, so I was excited when the English version of 1Q84 became available. I picked up and put down this book several times while reading it and I have to admit that I just really don’t know what to say about it – Long/Interesting/What?/I am glad I read it/Why?/1984/hmmm… [...]
  • Ride the Divide 2012 April 2
    Ride the Divide has great scenery, interesting people, injuries, struggles and riding along the Great Divide Mountain Bike Route that goes from Banff, Canada to the Mexican border! While I am familiar with some of the long distance hiking trails in the US I had no idea this route existed and it was fascinating to [...]
  • Forks over Knives 2012 March 20
    Forks over Knives (official website), directed by Lee Fulkerson, is a rather long documentary with the singular message that plant based diets are better than meat based diets (it may be slightly more subtle than that, but I think that is a pretty fair summary). I watched the film days after seeing Tabloid and could [...]
  • Tabloid, The Thin Blue Line 2012 March 15
    Tabloid – by Errol Morris – is the story of Joyce McKinney. McKinney was involved in a widely publicized case/scandal/incident in England in the late 1970s sometimes given the colorful name ‘The Case of the Manacled Mormon’. I had no knowledge of the events prior to the film – which might have added to the [...]
  • Jig 2012 March 1
    Jig follows a number of dancers leading up to their participation in the 40th Irish Dancing World Championships (2010). This film is a friendly, short and entertaining glimpse into a world that I did not know even existed – great fun. Simple, good! Rating: 4 of 5 First Watch Date: December 2011 CM
email: charles@cmiles.info

flickr -> pictures

1205 Looking down Pontatoc Canyon

1205 Looking up canyon from the end of the Pontatoc Canyon Trail

1205 Pontatoc Canyon End of Trail Sign

1205 Looking up at the rocks above the end of the Pontatoc Canyon Trail

1205 Catepillar

1205 Maybe from the fire fighting

1205 Looking back up Sabino Canyon from Brinkley Point

1205 View towards Sabino Canyon from Brinkley Point

1205 Charles and Alison

1205 View from Brinkley Point

More Photos
Follow

Get every new post delivered to your Inbox.