Posts

  • What has been happening?

    I retired just over a year ago. I did say I would not be posting as often and it turns out I was right. I have still been doing some work on my projects so I though I would post a quick status update PodcastUtilities for Android PodcastUtilities for Android has developed into a pretty fully functional app now with the addition of the ability to configure the app rather than having to edit an...
  • Worldolio updated

    In my previous-post, in May, I did say that I would no longer feel compelled to post once a month, and indeed it turns out that’s exactly what has happened. I did also say that I would continue to learn and work on personal projects and with that in mind I have made some progress. Worldolio is an application that enables you to keep track of various geographical information for cities around the world. It...
  • End of an Era

    The end of an era, that is how a colleague described it when I decided to retire. I’m not sure if that is good or bad but I think he meant it in a good way. Well it certainly wil be a change. I stared work in 1987, I started this blog in 2008. The initial idea was to have a place where I could keep notes and information that I would otherwise forget It...
  • Multiplatform test projects on .NET Core and .NET Framework

    Previously I wrote about porting PodcastUtilities to .NETCore, that is, producing a DLL project that can build multiple platform targets, one for the cross platform .NET Standard and one for the Windows only .NET Framework. At the time we understood that we had incurred some tech debit, in that the tests still only ran on .NET Framework due to their use of RhinoMocks. RhinoMocks is no longer maintained and does not support .NETCore. When I...
  • Recommender Updated

    Its been six years since I updated Recommender. Not really because I have abandoned it but rather it was pretty complete. However unlike other platforms Android does seem to be in a constant state of churn which has meant that there were some issues starting to surface It targetted SDK 23 and this is no longer allowed and not surfaced by the play store The legacy Android support library didnt work properly with newer devices,...
  • Xamarin Android Part 8

    Custom Views in Xamarin Android Applications This post is part of a series of posts exploring writing apps for Android using Xamarin Android. I have found that the extra complexity of using fragments, with their similar but subtly different lifecycle from activities, to not really be worth the effort. So I tend to compose activities from custom views instead. One view I have used in multiple apps is a custom view to show the progress...
  • PassTheParcel released

    This month I have released PassTheParcel. PassTheParcel is a simple, quick and easy to use app to play music for “Pass The Parcel” or “Musical Chair” type games. Its designed to do a simple task Select a music media file from your device’s storage Optionally select the minimum and maximum length of time to play the music each time the Start button is pressed. Start the music - it will automatically stop after a random...
  • Xamarin Android Part 7

    Monitoring Xamarin Android Applications In a previous post we completed all the basic tasks building and publishing an app for Android using Xamarin Android. Part of deploying a mobile app includes the ability to be able to monitor crashes and report on analytics. To do this monitoring I declared two interfaces one for analytics and one for crashes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
  • Updated package for PodcastUtilities

    PodcastUtilities is an application that enables complex local cache management for podcast feeds. Its available as a version for .NET Framework on Windows and also a cross platform version to run on Windows/Mac/Linux etc. The main difference between the two is that for syncing podcasts caches the .NET Framework versions supports MTP file systems, the cross platform version does not, for downloads the two versions are identical. Last year we released PodcastUtilities on Chocolatey. Last...
  • PodcastUtilities available on Amazon Appstore

    This month we have published PodcastUtilities on the Amazon Appstore. We did attempt to distribute it via the Google Play Store however as we needed “Manage Storage” permission Google declined saying “The feature you identified that is dependent on this permission does not appear to be critical to the core functionality of your app”, rather than arguing the toss with a Google-bot we decided to publish PodcastUtilities on Amazon App Store as well as making...
  • Xamarin Android Part 6

    Xamarin Android for Android Developers In the previous post we completed all the basic tasks building and publishing an app for Android using Xamarin Android. There are some other techniques that android developers tend to use that are slightly different when using C# Click Handlers in Recyclerviews In kotlin you will often see click handlers attached to RecyclerView items by using setOnClickListener like this 1 2 3 4 5 6 7 8 9 10 11...
  • PodcastUtilities for Android released

    This month we have released a new version of PodcastUtilities, PodcastUtilities for Android. This version takes advantage of the work we did porting PodcastUtilities.Common to be .NET Core/.NET Standard. Using the .NET Standard assembly we can then make use of Xamarin Android to provide exactly the same logic as the desktop versions of PodcastUtilities, PodcastUtilities on .NET Framework on Windows or cross platform package for PodcastUtilities on .NET Core, on Android devices. The process we...
  • Xamarin Android Part 5

    Xamarin Android for Android Developers In the previous post we got as far as building an app for Android using Xamarin Android. The app was build using the current Android architecture, targetting Android 12, using viewmodels, dependency injection and observers. We also built and ran unit tests to exercise the code. Now all that is needed it to publish the app. Odds and Ends Up until now we have just been building and using the...
  • RamEater available on Amazon Appstore

    This month I have published RamEater on the Amazon Appstore. RamEater has been available on Gooogle Play since 2015, however Google’s terms and conditions keep getting more and more stringent and require increasing effort for a free application. So I have decided to widen the available sources where it can be installed from. It can be side-loaded from the Github repo, as well as installed from the Amazon Appstore The source code is in Github....
  • Xamarin Android Part 4

    Xamarin Android for Android Developers In the previous post we got as far as building an app for Android using Xamarin Android. The app was build using the current Android architecture, targetting Android 12, using viewmodels, dependency injection and observers. The next step is to create unit tests to test the viewmodels. Create the AndroidTest application The architecture we are trying to create looks like this In the previous posts we created the PodcastUtilities application...
  • Xamarin Android Part 3

    Xamarin Android for Android Developers In the previous post I got to the point where I had created a PodcastUtilities app for Android using Xamarin Android. This is the third part of that journey which describes the steps I took to get activities, viewmodels and observables working. Create AndroidLogic class library As I said in part 1, in “real” android instrumentation tests, the tests just reference the main app directly however the received wisdom is...
  • Xamarin Android Part 2

    Xamarin Android for Android Developers In a previous post I started to describe my new project PodcastUtilities for Android using Xamarin Android. This is the second part of that journey which describes the steps I took to get the basic Visual Studio Solution setup. Create Application Project As I said before I am using VS2019, as it was the most recent stable version available when I started. To get started I created an empty solution...
  • New release of Trailblazer

    This month we have released a new version of Trailblazer. Trailblazer is a simple, quick and easy to use track recorder, for hiking, running cycling etc. You can record and share your tracks. The app was inspired by MyTracks - a Google app that is now deprecated. The app is supported on all Android phones from Android 4 up. It is activity being developed by a 100% remote team of developers, we use it to...
  • Xamarin Android Part 1

    Xamarin Android for Android Developers I’ve been aware of Xamarin for quite a while, but given that I write my Android apps in AndroidStudio and Kotlin I’ve always ignored it. I think I always though of Xamarin as being another attempt at a cross platform UI, I have played around with these on and off over the last 30 years going all the way back to Zinc, and I’ve never found any of them to...
  • New package for PodcastUtilities

    This month we have created two new packages for PodcastUtilities, a package for PodcastUtilities on .NET Framework on Windows and a cross platform package for PodcastUtilities on .NET Core. PodcastUtilities is an application that enables complex local cache management for podcast feeds. Its available as a version for .NET Framework on Windows and also a cross platform version to run on Windows/Mac/Linux etc. The main difference between the two is that for syncing podcasts caches...
  • One-way databinding in Android

    Recently I was trying to fix an odd error in screen rotation. There were two input fields and one was preserved when the screen was rotated and the other was not. The databinding is setup at the top of the layout XML file like this 1 2 3 4 5 6 7 8 9 <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> <data> <variable name="viewModel" type="com.example.namespace.ViewModel" /> </data> The field that works correctly looks like this 1 2 3...
  • New package for Worldolio

    This month we have created a new package for Worldolio. Worldolio is an application that enables you to keep track of various geographical information for cities around the world. Wordlolio was implemented as a web site, a mobile app (Windows Mobile, remember that) and a Windows desktop application We pretty much stopped work on Worldolio in 2008, apart from doing some very minor maintenance work. I do still use the desktop version and was keen...
  • New release of Trailblazer

    This month we have released a new version of Trailblazer. Trailblazer is a simple, quick and easy to use track recorder, for hiking, running cycling etc. You can record and share your tracks. The app was inspired by MyTracks - a Google app that is now deprecated. The app is supported on all Android phones from Android 4 up. It is activity being developed by a 100% remote team of developers, we use it to...
  • Checkbox controls in Fitbit OS5

    Fitbit OS5 Last year Fitbit announced OS5 and during this year I have ported two of my apps from OS4 to OS5: wrist-list and Timestyle. While I was porting them one of the things that tripped me up was that OS5 does not have a documented checkbox widget Now I have ported both apps I have pulled out my implementation of checkbox so that it is relativity easy to add to other apps. Checkbox Control...
  • Timestyle for Fitbit OS5 released

    Timstyle for Fitbit OS5 This month I have released a new version of Timestyle for Fitbit OS5, the new OS for its Versa 3 and Sense devices This was a bit more tricky than a usual app port as I don’t own one of these devices, I have an older Versa model and Fitbit have not, and will not release OS5 for these devices. So I am reliant on the emulator, which is at best...
  • Another Gadget: TP-link Deco Mesh Network

    I have moved house again and as part of the process, for reasons that are too complex but trivial to go into, I ended up with a free offer of a mesh network from my ISP, Vodafone. The deal was a two pack of TP-Link Deco X20s which is part of the TP-Link Deco Mesh Network product line. I had not really used a mesh network before as I thought it might be overkill in...
  • AndroidX Navigation and Proguard

    Recently I can across an odd problem with AndroidX navigation and Proguard. It was odd because the code worked fine in a debug build but the release variant crashed. There is very little difference between the debug and release variants, as you would expect, the main one is proguard. I am not a big fan of proguard, for this exact reason, however it was a requirement from the client. with the following error E/AndroidRuntime: FATAL...
  • Virtual Checkbox Tile Lists in Fitbit OS5

    wrist-list Last month I started to migrate wrist-list to the new Fitbit OS5 After some challenges I was able to get the app working. At the last moment I discovered a problem with the virtual tile list. The issue was that as long as there were up to 10 items in the list everything was fine, if there were 11 items then the render and scrolling on the list was broken like this The top...
  • Porting wrist-list to Fitbit OS5

    wrist-list Last year I released wrist-list on the Fitbit app store. Its gone quite well with 2,500 installs. Fitbit have continued to release new devices that run Fitbit OS and I have received requests to make wrist-list work on them. The new devices: Versa 3 and Sense run the new Fitbit OS5 and its only available on the new devices, and Fitbit OS4 is only available on the old devices. So it was always going...
  • Custom coloured cells in Excel

    I was given an interesting problem recently. The requirement was for cells in an Excel spreadsheet to be colour coded on the basis of the text in the cell. Also the spreadsheet user needed to be able to maintain the colour coding and the spreadsheet user was an experienced Excel user but had no programming experience. For example the way it should work is that as the user types, or pastes, into the activity row...
  • Reverting a merged branch in GIT

    Recently I needed to fix a problem we had with our code base. The problem was that we had changed some code in one of our internal libraries and tested and merged it. However our internal consumers of the library were not ready to accept our changes and as they had been merged into master it was blocking further work on the library. In truth we should not have merged the change but a communication...
  • Compare tracks in Trailblazer

    This month we have released a new version of Trailblazer. Trailblazer is a simple, quick and easy to use track recorder, for hiking, running cycling etc. You can record and share your tracks. The app was inspired by MyTracks - a Google app that is now deprecated. The app is supported on all Android phones from Android 4 up. It is activity being developed by a 100% remote team of developers, we use it to...
  • Timestyle updated

    The last update to my Timestyle for Fitbit watchface was six months ago in it I addressed memory issues when launching the watchface Active Zone Minutes The main reason for the update was to add support for Fitbit’s new Active Zone Minutes. This required updating the SDK to version 4.2 and then rebuilding the watchface. Adding support for Active Zone Minutes was pretty straightforward 1 2 3 4 5 6 7 8 9 10 11...
  • Managing transitive dependencies in gradle

    Recently I can across a problem with android dependencies when upgrading some of our components. The problem was that the library org.apache.commons:commons-lang3 broke compatibility with Android version 6 and earlier. The issue was introduced in the commons-lang3 library at version 3.10, if we used version 3.9 or earlier we were fine anything later and it would fail. I did some experimentation and found that I was able to control my project dependencies using gradle. At...
  • New release of Trailblazer

    This month we have released a new version of Trailblazer. Trailblazer is a simple, quick and easy to use track recorder, for hiking, running cycling etc. You can record and share your tracks. The app was inspired by MyTracks - a Google app that is now deprecated. The app is supported on all Android phones from Android 4 up. This release has been updated for Android 10 and enables sharing the statistics for the track...
  • wrist-list updated

    wrist-list A couple of months ago I released wrist-list a todo list for Fitbit OS devices. Almost immediately I found a bug, if you left the list unattended for more than two minutes it would exit back to your clock face. This month I released an update to fix the problem. appTimeoutEnabled It turns out that the Fitbit SDK documentation does cover applications timing out after inactivity. I fixed it by adding this code 1...
  • Things I dont know about wifi

    OK, there are probably lots of things I dont know about wifi networking, but this is just one example and how I managed to get it working on my machine. I bought a new machine a couple of years ago, it is a ThinkCentre M720q, its very nice and works fine. The only bit I have had trouble with has been the wifi. It comes with a Intel 8265 11ac wifi adapter and Windows 10....
  • wrist-list released

    wrist-list I have release a new app this month. Its called wrist-list and its a todo list for Fitbit OS devices. The primary use case for the app is to be able to check off shopping items as you go around the supermarket without having to keep on getting your phone out. Hopefully it can also be used for may other todo list use cases. wrist-list is not designed to edit and maintain lists, rather...
  • Working with Fitbit Virtual Checkbox Tile Lists

    I’ve started working on a new project for my Fibit Versa and so far it seems to be going quite well. Its basically a todo list on your wrist for a very specific use case, I am writing it for a birthday present but it may be more generally useful, we will see. I knew that the Fitbit SDK had support for some pretty advanced view components so I started there. What I needed was...
  • Fitbit OS memory management

    I have had my Timestyle for Fitbit watchface in the store now for five months and it seems to be going quite well. However I have noticed that there appeared to be an intermittent issue and one of my users has been very helpful in trying to track the problem down. When I attached the device to the developer console I would sometimes see and error like this (though not always) Fatal Jerryscript Error: ERR_OUT_OF_MEMORY...
  • New release of Trailblazer

    This month we have released a new version of Trailblazer. Trailblazer is a simple, quick and easy to use track recorder, for hiking, running cycling etc. You can record and share your tracks. The app was inspired by MyTracks - a Google app that is now deprecated. The app is supported on all Android phones from Android 4 up. I have been a bit preoccupied with travelling and other projects. However I have managed to...
  • Timestyle for Fitbit success criteria

    Whenever I start a project I like to have an idea about what success looks like, and my private projects are no exception. In the past I had some modest success targets for my pebble app: wrist-spin. I decided that at least 10 hearts and 100 downloads would be a success and by the time that Pebble was shut down I had more than three times that target. For my current project, Timestyle for Fitbit...
  • Fitbit emulater != device

    I have been working on Timestyle Fitbit, a watchfach for Fitbit devices. I had thought that I had completed most of the functionality and that I could leave the project alone for a while. However I received an email from a user who had a Versa2, they said that the time display did not fit properly on the display. I did believe the user, however I could not replicate the problem, I didnt have a...
  • Timestyle for Fitbit updated again

    Last month I released an updated Timstyle for Fitbit, It seemed to go quite well and as I added analytics I can get a feel for how users use the app. I even got some more feature requests from users. So this month I have released another update to add Start and end hours for the periodic interval alert On-device settings that can be used without internet access to override the displayed time and to...
  • Timestyle for Fitbit updated

    Last month I released Timstyle for Fitbit, It seemed to go quite well and I even got some feature requests from users. So this month I have released an update to add A narrow font option for the time display as it appears to not fit properly on a Versa 2 The steps display can now be switched off in the settings Optionally there can be a second display of distance, floors, or heart rate....
  • Timestyle Fitbit released

    Last month I wrote about my decision to buy a Fitbit Versa. As I noted in the conclusion I thought I might end up writing some of the apps that I wanted. It turned out that the first thing I wanted was a watch face like my beloved TimeStyle on the pebble. I wanted to stay true to Dan’s wonderful design goals. However in the first release I was going to cut down the amount...
  • Another Gadget: Fitbit Versa

    I have another new gadget - Fitbit Versa. I have owned and developed apps on a number of Pebbles and I was very disappointed when Pebble stopped trading. I really enjoyed using my Pebble watches, and I guess to a certain extent was resentful of Fitbit, however I have to say that Fitbit have tried to be fair to us Pebble users. As my Pebbles have started to show signs of wear and tear, and...
  • Trailblazer now supports KML and KMZ

    This month we have released a new version of Trailblazer. Trailblazer is a simple, quick and easy to use track recorder, for hiking, running cycling etc. You can record and share your tracks. The app was inspired by MyTracks - a Google app that is now deprecated. The app is supported on all Android phones from Android 4 up. The new version can now real and write KML format files, which means that it can...
  • JUnit test error: Stub!

    I was using two different computers with my new Trailblazer project and I noticed something odd, one unit test failed on one of the computers and they all passed on the other. I check that everything was up to date on both and that the Git hash we were building from was the same. I was weird but consistent I kept seeing a Stub! error This is a generic error that seems to get thrown...
  • RamEater updated

    This month I have done a maintenance release of RamEater. I have noticed that newer phones like the S10 now have 8GB of memory and the number of services in RamEater was not enough to consume all the available memory on its own. I’ve added another 6 bringing it up to 16 services, Android usually limits each service to 0.5GB so that should be enough for the moment. I also fixed a UI bug that...
  • Porting PodcastUtilities to .NET Core

    We have built a new version (3.0.0.0) of PodcastUtilities this month. The source code and a cross platform prebuild package are available if you just want to run PodcastUtilities. The new .NET Framework version is functionally the same as the previous version (2.2.2.0) all we have added is a new .NET Core / .NET Standard version Porting the code It was relatively straightforward, well it was after I found Rick Strahl’s great article on porting....
  • Code Review: Dates in unit tests

    One of the things about reviewing code is how often I can look at code and think that it ios pretty good only to have it fail and on review discovering that the failure has an obvious fix. I had a unit test like this 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30...
  • Trailblazer released

    Very pleased to be finally releasing Trailblazer. Its taken quite a while to get it released but the first version is now ready. Trailblazer is a simple, quick and easy to use track recorder, for hiking, running cycling etc. You can record and share your tracks. The app was inspired by MyTracks - a Google app that is now deprecated. The app is supported on all Android phones from Android 4 up. The source code...
  • An event bus for projects that use RX and Kotlin

    An event bus is a useful thing, when a UI is decoupled from the business logic it is often used to be able to signal state changes. The thing is that I am trying really hard to not take dependencies when I dont have to, experience has taught me that they come back to bite me in the years that follow. In Android-land I could have used Otto or Event Bus. However when I looked...
  • Configuring Logback for Android

    I like using logging in my code, I know that some people think it makes the code look messy but over the years having decent logging has saved me so many times that I still favour the approach. On Android I have used SLF4J and logback. They really work, they are reliable and small and play well with testing. My default configuration looks like this. 1 2 3 4 5 6 7 8 9 10...
  • Setting up an Android project testing framework

    In my spare time I have started to work on a Android project and its nearing the point where we can publish the first release. The project is an Android app that is entirely written in Kotlin. In this project and in my professional life I find that we are often discussing how we should structure our testing framework with reference to the testing triangle and also Martin Fowler’s take on it The general drift...
  • Using mockito with kotlin - part 2

    In a previous post I looked at the problems I had been having using Mockito in a Kotlin project and the small helper functions that could make things easier. At the end of that post I said that I didnt have a good solution to the problems of using a captor. I really didn’t want to add another dependency like mockito-kotlin. Well it turns out there is a solution. Argument captors The problem is that...
  • Ten Years After

    It has been ten years since I started blogging. At the time I said I needed somewhere to store some static content and where I could document things I would forget, things haven’t changed that much. This is not my first blog and I was unsure if I would actually keep going with this one. I had read somewhere that a good plan was to set an achievable target and stick to it. After the...
  • Using mockito with kotlin

    I have been using Mockito for a while and recently I have started a kotlin project. Using kotlin and mockito together throws up some interesting problems, I have already looked at some of these. Argument matchers Getting matchers to work with Kotlin can be a problem. If you have a method written in kotlin that does not take a nullable parameter then we cannot match with it using Mockito.any(). This is because it can return...
  • Rebble Alliance

    We have known that the web servers that support the pebble are going away for a while now. To be fair, Fitbit have done a great job of making it a soft landing, but now finally the Pebble services including the app store has now disappeared. This means that the developer portal and the app store has now gone. However not all is lost. Rebble have managed to put together as alternative community supported set...
  • PodcastUtilities and TLS

    We have built a new version of PodcastUtilities this month. The source code and a prebuild package for Windows is now available. We do have plans for PodcastUtilities but for the moment we are doing maintenance releases. We have started noticing that some podcast providers are using an encrypted channel to distribute podcasts. I am not completely sure what attack vector is being mitigated by this but some providers do and some dont. If a...
  • Code Review: Avoiding Mockito.any()

    I am continually amazed about the basic and obvious things that are picked up in code review, even for experienced developers. I have been using Mockito for a number of years and its a great mocking framework. Every now and again I want to write a test like this 1 2 3 4 5 6 7 8 9 10 @Test public void example_1() { setupPresenter(null); // act presenter.editTrackName(1); // assert Mockito.verify(mockview, Mockito.times(1)).promptForTrackName("1", Mockito.anyString()); } I...
  • Pebble 1 != Pebble 2

    With the end drawing in for Pebble and my old Pebble Time’s battery dying I decided to get a Pebble 2 before they all disappear. I have to say the Pebble 2 is quite a nice device however its not completely the same as the Pebble 1. I wrote an application that sends and receives data from my Android phone to the Pebble and it worked fine however with the new watch all sorts of...
  • New version of PodcastUtilities

    This month I have done a maintenance release of PodcastUtilities. I have noticed that the playlists generated by PodcastUtilities do not work on an Android device. I dont really use them on Android and they worked fine on Windows so it wasnt a big deal but it did irritate me. I had a look at the file specification for ASX and WPL and I was suprised to see that although the format of the files...
  • Unit testing using Mockito and Kotlin

    I am staring to get to grips with Kotlin and I have writted about my challenges in starting a new Kotlin project. The project has been progressing well and hopefully will be published this year. I have tripped over an issue in writing unit tests. In Java classes are only sealed if you use the keyword final. By contrast in Kotlin classes are sealed by default and can only be inherited or overridden if we...
  • Java crypto

    I came across an interesting problem recently. There was a bug where a payload was being transmitted - except that some combinations never made the trip. The bug appeared to be that some combinations were not working, in fact the suspicion was that there was something not right on Android Orea. I had a look and it took a while but in the end I found that the problem was that as part of the...
  • Logging is important

    We all spend lots of time looking at the happy paths in code. I have previously blogged about how important it is to generate good error messages and handle exceptions properly. Well it turns out that logging is important as well. Recently I came across this code in production. The problem was that the way the code was structured meant that we didn’t get enough information in the logs to help us fix the problem....
  • Kotlin, Dagger2 and Butterknife

    I have started a new app. I know I have written about setting up an app to use Dagger2 in the past but this time I am using Dagger2 and Butterknife with Android Studio 3 and Kotlin. Dagger2 and Butterknife are not new and are well documented but using them in a Kotlin app was less well documented as I setup this app. There are some things that I needed to get used to before...
  • Windows Media Center in NZ using DVB-S - part 2

    I have written before about getting Windows Media Center working in New Zealand using DVB-T and DVB-S. This covers accessing Freeview TV using an ariel and a dish so I thought that I had covered everything. It turns out not. I have just moved house, still renting and part of the deal is that I just inherit a satalite dish, I know the previous tenant had working TV, but nothing else. I have an AverMedia...
  • Reading disk drive SMART information - part 2

    The story so far Last month I was trying to get SMART data from a disk drive. The documentation I could find worked great for one disk drive however when two drives were in use I had a problem linking the data returned from the two WMI select queries SELECT * FROM Win32_DiskDrive and Select * from MSStorageDriver_FailurePredictData, as I cannot assume the data is in the same order. I used the index property in...
  • Reading disk drive SMART information

    Recently I have needed to get SMART data from a disk drive. I maintain a server at home and from experience that disks appear to last around four or five years if they are run all the time and SMART information is an excellent way to spot when a disk is about to die. Again from experience any pending bad sectors is a very bed sign. I was writing a disk monitor program in C#...
  • Another Gadget: Google Home

    I have another new gadget - Google Home. Speakers you talk to are all the rage at the moment, Amazon and Apple are in on the act. First Impressions Well there is a lot of hype. The voice recognition is good, over 90% accuracy. Its just that the devices its competing with, light switches egg timers, volume controls are all running at 100% accuracy. Even having to repeat yourself a bit is irritating. In general...
  • Navigation widgets for liquid

    Now my blog is hosted on Github Pages using Jekyll I found that I need to make some additions to the default template. I used the default template as it has a pretty well structured set of includes meaning that I can add my own widgets pretty easily. The last main piece that I wanted to add from my previous blog was navigation controls. I wanted a timeline of blog posts as well as navigation...
  • An image widget for liquid

    This year I migrated my blog to Github Pages. I am super impressed by the move hosting on github is incredibly fast. There are a few things that I took for granted in my old work flow. One was the way that if I inserted an image into a post then Windows Live Writer would insert a small thumbnail and link to the full image. I didnt realist how useful this was until I wrote...
  • New version of wrist-spin released

    I own a pebble and I really like it. I guess by now everyone knows that Pebble is no more having been bought by Fitbit. I have produced a real time cricket score app for the pebble called wrist-spin. Even though Pebble is no longer an entity I still have one and use wrist-spin all the time so I will continue to support the app until my watch breaks. I’ve released a new version of...
  • Data Migration

    In the previous post I was looking at moving my site from GoDaddy to Github and Azure. The main dynamic part of my web site is my books catalogue. The catalogue has been a pet project for me for many years. Really the only user of the catalogue is me, its still my card index but I use it to experiment and practice with new frameworks and techniques on a real life data set. Year...
  • Moving On

    I started my website in the 1990’s, I still have some of the old pages around. I started my blog around a decade ago. Over the years I have been on a number of platforms. Year Host Technology Blog 1996 GConnect (Local ISP) Static HTML, ASP (Classic), FrontPage None 2007 WebStrikeEasyCGI Static HTML, ASP.NET, PHP WordPress 2012 GoDaddy Static HTML, ASP.NET MVC, BlogEngine.NET 2017 GithubAzure Static HTML, ASP.NET Core Github Pages, Jekyll Moving platform is...
  • New version of Recommender

    I’ve released a small update to Recommender this month. The app is working quite well in its small user base, the change enables you to add a nickname to the app and then when you share a recommendation the recipient will always know where the recommendation came from. You can also edit any recommendation to identify where it came from in the same way as giving a recommendation a category. The source code is in...
  • Success Criteria

    More than once this year I have been involved in discussions about how successful a feature or even a product is. There appear to be a number of criteria that people are happy to use: does it make money; is it widely used; do people like it. Its harder to get agreement on how we should measure these criteria and even harder to agree what success might mean. At the moment I work on a...
  • Slipping standards

    I really try not to rant in this blog, it does no good really. Last year I wrote about a decision I had to make about extending PodcastUtilities to support dates that did not follow the defined standard. It makes me sad when we cannot follow standards. I was surprised at work when a colleague queries my pull request in which I did not escape a single quote char in an android resource file. The...
  • Displaying the appinfo version number in a Pebble app

    This year I have started writing apps for my Pebble. One of the first things that I usually do is put in some kind of “About…” screen so I can easily tell what version of the code I am using.  The about screen for wrist-spin looks like this As often happens on a new platform its the simplest things that trip me up. The version number (versionLabel) used in the Pebble app that is published...
  • New version of Recommender

    There is a new version of Recommender in the play sore. The main change is that I’ve added a Bottom Sheet using the Design Support Library. The Bottom Sheet is used to display the list of categories that you have currently used. Category is a free text field but is used to group recommendations so its best to try and avoid misspelt duplicate. The list of current categories is displayed to to try and discourage...
  • Rebuilding a Media Center PC in 2016

    I have previously written about how to get Windows Media Center working in New Zealand. Recently my Media Center PC died and I needed to rebuild it. In 2016 this was slightly more tricky than I expected. I know that Media Center has been deprecated by Microsoft and that it is not supported on Windows 10 however for live TV there really isn't a real alternative. XBMC / Kodi keeps getting better and eventually I...
  • Android development for .NET developers

    A couple of years ago I switch tracks from being a .NET web developer to being an Android developer. Its not the first time I’ve switched tracks and I am sure it will not be the last. Recently I did a presentation giving people with a .NET background a general map of the terrain in Android development and I wanted to capture the information in the presentation here. Prerequisites You can use what you like,...
  • Pebble activity tracking software

    At Christmas I bought myself a Pebble Time. I often buy myself a Christmas present as its a great way of getting exactly what you want. Actually I didn't know if I wanted a Pebble but six months in I think its a great device, a smart watch that only needs charging once a week but works great in bright sunshine is a real triumph, I rally didn't want a smartwatch the conks out at...
  • Unit Testing Android async callback functions

    Android code will typically make use of async callback functions to do work that could take a long time, such as making network calls, or interacting with the file store or local databases. In fact the Android OS will throw an exception if you attempt to make a network call from the UI thread, which means that a common pattern of writing code is call a synchronous method and pass a callback function that will...
  • Setting up for Pebble development on Ubuntu

    I bought myself a Pebble watch at Christmas and even wrote an app, wrist-spin, to display live cricket scores on the watch. Its a great device and its been fun to develop for, however the setup is not straightforward. The Pebble SDK only runs on Mac OSX and Linux. Now given that 90% of desktop machines run Windows and that the life blood of a device like Pebble depends on the availability of a lot...
  • wrist-spin updated

    I have updated my pebble cricket score app wrist-spin. It ended up being a larger updated than I originally planned, I guess one thing led to another, the update Reworked the navigation so that its much easier to flip between views ranging from a minimal but easy to see at a glance time and score view through to a full detail view. Added the ability to switch between data providers, I’ve found three suppliers of...
  • Unit Testing in native Android apps using MVP and Dagger2

    Towards the end of last year I started working on a new project, Recommender. I found it interesting to compare the tools i selected in 2015 as against an earlier project such as measureme. when i started the new project with new tools i also wanted to try apply some structure to the code to help enable testing. When projects are developed and tested and run all in the same environment then producing automated test...
  • wrist-spin released

    I bought myself a Pebble Time smartwatch for my Christmas present to me. I have been pretty pleased with the watch, it seems to do everything that I wanted in a smart watch, its strong points are a 5 day battery life and how readable it is outside. One of the things missing (from my point of view) was real-time cricket score updates. Well over the Christmas break I decided to fix that. I wrote...
  • New version of PodcastUtilities

    This month I have done a maintenance release of PodcastUtilities. I was seeing this error from a number of sites, including the BBC, The Guardian and NZ Tech Podcast. GetFeedEpisodes: warning, unable to add an episode for Tech Weekly, Thu, 03 Dec 2015 15:35:14 UTC is not a valid RFC 822 string representation of a date and time. I was surprised by the error as it looked OK to me. I ended up adding another...
  • An MVP pattern using scoped Dagger2 IoC containers

    i have previously written about using dagger2 in my new project recommender. one of the things i found most frustrating about writing native android code in contrast to c# or javascript code is how hard it has been in the past to get a reasonable amount of test coverage from unit tests. there have been challenges eclipse didn't have great support for testing this has been addressed as androidstudio is much better at working with...
  • Recommender released

    I have been working on a new native Android application. Recommender is an application to store, organize and share personal recommendations: music, films, books, apps, web sites, restaurants – pretty much anything. Its designed to be used in person where you want to pass on a recommendation to a friend. There is no web service, there is no need to register you details anywhere. This is not an anonymous crowd sourced opinion its intended for...
  • Using Dagger2 and Roboelectric for unit testing in Android development.

    I have started a new project using AndroidStudio and Dagger. Using inversion of control is all well and good but its only there to help with isolation code and one of the main reasons for doing this is to enable objects to be more easily tested. In previous projects I have written pure junit tests. These worked well enough however it does mean that I am only able to test a relatively small number of...
  • Starting a new native Android app in 2015

    Last year I wrote MeasureMe a native Android application. I have just started a new project I find it interesting the difference in tools and techniques I am using only 18 months after MeasureMe. At the time I identified four main areas that I addressed first. Logging Inversion of Control / Dependency Injection Unit Testing Automated Building In 2014 I used eclipse and ant to control the build process, logging was handled by slf4j and...
  • New version of MeasureMe released

    I have done a little bit of tidying up in MeasureMe and published a new version to the play store. I have made manual measurements easier to trigger, by using the icon next to the measure on the main screen. This enables a measurement to be taken immediately. I have also added new scales for anxiety and depression as well as adding a spreadsheet to the example spreadsheet folder.
  • Using Microsoft Fakes to test legacy code

    Recently I needed to do some maintenance work on some old code that was not written with unit testing in mind and had not been structured to enable testing, for example there was no inversion of control. Ideally I would have restructured the code to isolate it from external dependencies however this would have required a large QA resource cost to perform regression testing on the restructured code, and there were no existing unit tests...
  • RamEater updated

    Last month the first version of RamEater was released. I’ve done a bit of polishing of the code. The main change has been to support older Android 2 devices. The problem is that activityManager.getLargeMemoryClass is only available in Android 3 and later. private void eatAllMemory() { //Get amount of memory this app is allowed to use (in MBs) int availMem = activityManager.getLargeMemoryClass(); eatMemory(availMem); } The code has been changed so that the amount of memory...
  • RamEater released

    I have been trying to work on an interesting Android development problem recently. The activity lifecycle includes a number of less obvious states. If the device’s memory is under pressure then an activity can be unloaded, and ultimately the activity and the application process can be unloaded. As a developer it is possible to simulate the activity being unloaded by setting the developer option “Don’t Keep Activities” like this. I needed an easy mechanism to...
  • New version of MeasureMe

    I have release a new version of MeasureMe, v1.1.1. This version has been migrated to material design and compiled for Android 5, lollipop. There is no functional change in this release however I think the layout and navigation is far better. The colour palette was generated by using material palette.
  • New version of PodcastUtilities

    This month I have done a maintenance release of PodcastUtilities. I’ve added the option to delete any old empty folders that occur during download or synchronisation. The new version (2.1.0.6) is now in BitBucket and also available as a binary download if you just want to run PodcastUtilities.
  • Migrating from Eclipse to AndroidStudio

    Last year I produced my first native android application. its called measureme and its done ok on googleplay, over 100 downloads and a review of over 4 stars. it was developed using eclipse and ant, these were the recommended tools at the time and i used them to build release and debug variants and to run unit tests. towards the end of the year android studio 1.0 was officially released and around the same time...
  • Message logging in WCF clients

    Having migrated a service client from WSE to WCF one of the things I noticed is that WCF client message logging is certainly very comprehensive but it can be extremely verbose and difficult to just look at the wire packets. It turns out that WCF client channels can be easily configured to use an existing logging framework. To attach a custom logger we can configure it into the client by adding a behaviourConfiguration into the...
  • Migrating UsernameOverTransport security from WSE to WCF

    WSE was, and I suppose is, a wrapper library to help make talking to WS-* compliant services easier. Specifically it can make communicating with secure services easier. However WSE was targeted at .NET v2, there is not a v4 version and development appears to to stopped. The current mechanism for talking to services like this is to use WCF. With that in mind I have had to migrate a client library away from WSE to...
  • Running JUnit unit tests from Ant

    Having written unit tests for the Java business logic classes, the next piece of the puzzle is to be able to run the tests from a command line build so that they can then be run on a build server or continuous integration server. Remember that these tests are pure logic tests and have no UI, also that they make use of RoboElectric to enable the tests to be run in a desktop JRE and...
  • Unit Testing in native Android apps

    Given that the target machine for an Android app is an Android VM the only real way of running any tests is in the emulator. This seemed like a very complex operation especially for unit tests on individual method calls. There are test that I would only want to run in an emulator or a device such as UI testing but I like to test base components before I get into assembling them as it...
  • Build configurations in native Android apps using Ant

    Last month I was looking at logging in native android apps and in that post I did mention that the logging configuration would need to change based on what I was trying to build. I build MeasureMe for two different reasons. A release build to go in the play store In this build I want almost no logging (only if an unhandled exception is thrown. A build for me to test with This build has...
  • Logging in native Android apps

    MeasureMe was my first native Android application. previously i’ve commented on the basic framework needed to start developing an app and one of the most basic elements is logging. in my previous projects in .net i have used emterprise library and log4net and they have both been fine. obviously for an android application i was going to need a java based framework. i have already blogged about how i migrated from one logging Enterprise Library...
  • New version of MeasureMe

    I have done a small update to MeasureMe. I found a bug where some of the values in the Units Consumed were missing. The fix is in the play store now. I’ve also added another example spreadsheet for Units Consumed. Sorry this post is so short but I have been super busy this month.
  • IoC in native Android apps

    Recently I spent some time producing MeasureMe, a low friction personal measurement tool for Android devices. The development time for the first version was four weeks. Looking at my check-ins for the project I see that I spent the first one and a half weeks getting the architecture sorted out, that is almost a third of my time. It was my first “proper” native Android application, and I did not have long to complete the...
  • MeasureMe Updated

    Last month I release the first version of MeasureMe, a low friction personal measurement tool. One of the ideas behind an agile approach to software development is that the minimum viable product should be shipped as early as possible, and the first version of MeasureMe was in the play store 4 weeks after I started. Then the idea is to revise the product to add functionality. Over the last month I have added Multiple measurements...
  • MeasureMe released

    In the past I have produced HTML5 Phonegap application, TextByNumbers, for android. Last month I spent some time working on a native android application I was interested to see what challenges it would present and how it would differ from an HTML5 application. I needed to get through the development lifecycle quickly, from start to the play store was only four weeks. I think that its resulted in a useful tool as well as giving...
  • Passing Gmail attachments to PhoneGap apps on Android part2

    In part 1 we had got the data from a Gmail attachment and passed it though the Java native application into the Phonegap JavaScript. On the JavaScript side the code we want to call is in a KnockoutJs view model but the mechanism should be similar for other frameworks. In the main index.html we have <script> var enigmaMessaging = new EnigmaViewModel(); ko.applyBindings(enigmaMessaging); </script> And within the EnigmaViewModel we have function EnigmaViewModel() { var self =...
  • Passing Gmail attachments to PhoneGap apps on Android part1

    We have started a new project, Emigma. The plan it to be able to send and receive encrypted messages on Android devices. Obviously we want the flexibility to use and transport for the message and also we really don’t want to have to write a complete email package so we would like to be able to use an external email application such as Gmail. One of the first parts in this was to try and...
  • New version of PodcastUtilities available

    Although we are now working on other projects we are still maintaining PodcastUtilities, we added MTP support this year. I have fixed an issue in PodcastUtilities. The issue was that if an error was thrown when trying to find the available free space on the destination drive then the file copier would stop and not copy any files. The meant that if SyncPodcasts was used with relative, UNC for an MTP path then it would...
  • Inserting line breaks into PDF text using XSLT-FO

    Recently I needed to insert a line break into a block of text in a PDF file. The PDF was generated using an XSLT-FO style sheet with an XML input document. The solution wasn't as straight forward as I had expected but it can be done relatively easily. The XSLT-FO looked like this <fo:block font-size="9pt" line-height="14pt"> <xsl:value-of select="/PresentationData/TextBlock"/> </fo:block> The change needed is to add the linefeed-treatment attribute like this <fo:block font-size="9pt" line-height="14pt" linefeed-treatment="preserve" >...
  • Commute times for a train and folding bicycle in Wellington

    This is the third place I have lived in as many years. Given that the commuter trip is one that I make twice every working day I was interested in how long it would take. We have moved out to the beach, about 20 KM north of Wellington. Its beautiful and tranquil and I hoped that I would be able to keep roughly the same commute time by another new gadget, a folding bike. The...
  • TextByNumbers available on Google Play

    This year I’ve been working on my first real project using html5 and i think its gone pretty well. i’ve even used phonegap to use the assets in an Android application. I thought I would take the final step and publish the app on Google Play. I have to say its a pretty painless process (though its not free) and its well documented on the Google developers site as well as this post. The application...
  • Error messages are important

    I’ve been doing some maintenance work on some old code. And I think that most of my effort has gone into making the error messages better. If a piece if software is successful then it means its going to be used in a live environment. It also means its going to break at some point and at that point its going to be a lot easier for everyone if the error message it produces makes...
  • PodcastUtilities now supports MTP

    We have been working with PodcastUtilities for a couple of years now. Just recently we have both ended up with devices that use MTP (Media Transfer Protocol) rather than USB Mass Storage so we have needed to extend PodcastUtilities to support both MTP and USB. The new version with MTP support is now in BitBucket and also available as a binary download if you just want to run PodcastUtilities. A spin off from this work...
  • Keeping common source between Phonegap and HTML5 apps

    I have written a small utility app to help compose SMS texts and emails out of text snippets – TextByNumbers. Initially I created this as an HTML5 app using jQueryMobile and Knockout.js. It seems to work OK in its HTML5 form however I wanted to explore how easy it was to get into natively hosted apps using Phonegap. The app is completely client side – the server is only used to serve files - so...
  • Getting jQuery Mobile and knockout.js to play together

    My current project is an HTML5 application to assemble text snippets for use in email or SMS messages – TextByNumbers. I have to say that the experience has been pretty good. The two main frameworks I used were jQuery Mobile and knockout.js. I said at the time I would do a separate post about getting them to play nicely together, and here it is. First of all I started to use the jQuery Mobile ListView...
  • Listening to cricket in New Zealand

    I like cricket, and now I have relocated from the UK to New Zealand I’ve had to find methods of listening to cricket. Not watching, I cannot give up days watching cricket, but on the radio I can have it on and still get things done. England International Cricket My usual method of listening England international cricket was Test Match Special on 5live. However its usually region locked so to listening requires some sort of...
  • Windows Media Center in NZ using DVB-S

    I’ve blogged about getting windows media center to work in new zealand using an aerial, dvb-t. of course as soon as i got it to work properly we moved house again and this time there isn't any coverage using an aerial. instead the house does have a satellite dish, so i set about trying to get media center to work with a dvb-s decoder. i bought an AVerMedia AVer3D Satellite TV Tuner, I have to...
  • TextByNumbers

    I’ve been taking a break from PodcastUtilities to start work on a new project TextByNumbers. TextByNumbers is designed to enable people putting together letters / emails / SMS messages from snippets that the user can easily produce. Its should be useable on phones with or without a data connection. I did think of writing a native app, I guess it would be an android app as I have an adroid phone but then I thought...
  • Windows Media Center in New Zealand

    Last year I moved from the UK to New Zealand. I brought with me my Media Center hoping that I could get it to work. It turns out that TV is broadcast over here using DVB-T (and DVB-T2 for HD) just like Freeview in the UK so it does work to the extent that I can watch live TV. However getting the EPG working was another matter all together and the results are mixed, is...
  • Refactoring code using default parameters

    Recently I have come across code that had been refactored using default parameters in C#. The refactoring had taken place in a DLL and it caused an interesting problem in the calling client code. When I looked at the code at first I could not understand how the refactoring had broken the client code so I experimented with this code to reproduce the problem. The original code looked something like this. namespace Library { public...
  • Ajax requests in HTML5 offline applications

    I’ve started having a look at writing offline applications. Its good fun to write using different technology and I am discovering that the whole HTML5 stack is still very immature. The stack I’d settled on for my first attempts is: HTML5, jQuery, jQueryMobile and Knockoutjs. The first stumbling block I came across was that ajax calls work differently when in offline mode. It turns out that jQuery returns a status code of zero when the...
  • appcache MIME type for IIS

    This month I have a rant, I am not a big fan of rants in blog posts as they never really seem to achieve much and really just seem to be be a bit self promoting. However I’ve not had one before and last month I came across a topic that is worthy. I’ve started a pet project to write a browser based HTML5 app. In the past we have produced a version of a...
  • PodcastUtilities: New Version

    We have just completed a new version of PodcastUtilities, it now supports a post download command. Using this command its easy to hook up utilities such as MP3Gain or any other post processing command. This build also contains some bug fixes including support for running the utilities from UNC paths. There is a ready-to-go compiled Windows version available to download, which includes the utilities and documentation. We are planning to take a bit of break...
  • Exception handling in services in a production environment

    I have written about using Enterprise Library to log exceptions in a production environment, specifically how to cope when the loggers will not write to files or event logs. Recently I came across a problem where the whole logging framework was failing to initialise in a production environment. What we got was the usual generic error message and nothing useful in the event logs and obviously the logging framework did not receive anything. In this...
  • Using OpenCover and nUnit

    Previously I have written about using OpenCover with xUnit. It struck me that I should probably also do the same for nUnit as that is what we use in PodcastUtilities The structure of these scripts is slightly different from the xUnit scripts as they have to work both 16 and 32 bit. The master script looks like this call SetProgramFilesEnv.bat if "%ProgramFilesPath%" == "" exit 1 set opencovercmd="%LocalAppData%\Apps\OpenCover\OpenCover.Console.exe" set nunitcmd="%ProgramFilesPath%\NUnit 2.6\bin\nunit-console-x86.exe" %opencovercmd% -register:user -target:%nunitcmd% -targetargs:"/noshadow...
  • Medium Trust, SQLServer CE, log4net and NHibernate

    I have been moving hosting provider to godaddy. Easily the biggest hurdle to overcome has been medium trust. Enforcing medium trust policy is a common approach in shared hosting environments the intention being to stop applications from trampling on each other. The existing site were a mixture of web applications and static pages that used a mix of technologies. Static pages Obviously no real problem moving these, though they were redesigned on the way. Blog...
  • Using OpenCover and xUnit

    When I am writing tests I find it useful to have a coverage tool. Since NCover is no longer free I have started to use OpenCover I like OpenCover, it is a mature product that works well and as a free open source project its great for my personal projects. I also use the excellent ReportGenerator to format the output from OpenCover. I recently needed to use a coverage tool to work with some xUnit...
  • Commute times for bus and bicycle in Wellington

    A while ago I compared commute times in Manchester, I now live in Wellington and thought it would be interesting to repeat the exercise (no pun intended) here. I live a little further out of town in Wellington, the routes I use its about 12.5 KM to work and 11.5 KM home. When I use the bus I have to walk about 5 minutes to the bus stop from my house, the bus stop is...
  • Options for implementing ReadOnly and ReadWrite properties

    This is a real problem, I did come up with a solution however it was not straightforward which probably means that I might have missed something, is there a better way of doing this? The problem In PodcastUtilities we have a configuration file. This is the representation of the podcasts we want to download. The Downloader and the Sync need read access to the configuration however the GUI needs to be able to read and...
  • Digital Migration

    Last month I noted that I had moved from the UK to New Zealand. Just to complete a clean sweep this month I have digitally moved from easycgi to godaddy. Well I’m on a roll now. If you have subscribed to the old blog on easycgi you will need to re-subscribe here. Why did I move? I have to say that I have always found easycgi great hosts however there was a chain of events...
  • Things I have learnt

    I started this blog about three year ago. Its not the first blog I had had a go at like a lot of people over the last ten years I have started with all the best intentions and then it petered out. This blog is different – I have actually kept at it. The idea has been to set realistic goals, in this case of a post every month. I have tried to learn something...
  • A Festive Peer Review

    Its the festive season and I bake a Christmas cake most years. I bake it in August and then let it mature until December. I was given a Christmas cook book years ago and have used the recipe out of that book ever since. Last year I decided to seek a peer review of the cake and who would be better to do that than mum. She said it was very nice but I had...
  • FxCop suppression works in visual studio but not in MSBUILD

    I had a very odd problem to solve recently, I needed to specify a SupressMessage attribute on some code however when I did decorate the code with SupressMessage FxCop on the build server still complained about the error. I had used FxCop locally to check the code before checking in and also used the FxCop command “Copy as SuppressMessage” to make sure I didn’t type it wrong. Luckily this problem only seemed to afflict some...
  • Testing jQuery behaviour using jasmine-jquery

    Recently I was working on a web page and I needed to add the ability to have certain LABEL element be highlighted with an icon and to have an alternative prompt. As often happens in web development the elements to be highlighted were delivered to the page using a JavaScript array planted from the server side and although I could have changed this mechanism it would be less intrusive if I could work within the...
  • TiddlyWiki on small screen devices - available for download

    Last month I described how I got the pipe symbol to work in TiddlyWiki on my HTC Wildfire. I got to TiddlyWiki for small screen devices by downloading AndTidWiki, this in turn was based on iTW. The thing is that its based on TiddlyWiki v2.4.1, the current version is v2.6.4 and now includes jQuery. I took a little time and also had help from Andrew and we have put together a Powershell script that will...
  • TiddlyWiki on android phones, using the pipe symbol

    Solving this problem made me laugh, and cry. It did remind me of something I heard years ago What is the difference between hardware and software? If you play with hardware enough you will break it, if you play with software enough you might just get it to work. I like using tiddlywiki, I’ve used it as a super todo.txt for a long time. I stumbled on an implementation for Android which in turn was...
  • podcastutilities: now supports downloading and synchronising

    A couple of months ago I mentioned PodcastUtilities. This month we have produced a new version of PodcastUtilities that now supports downloading and synchronising podcast media files. You can download a compiled version of PodcastUtilities in a zip file from BitBucket For the last five years I have been using Juice and it has provided sterling service as a podcast downloader, however it appears to have been dormant for the last six years since the...
  • Code Review: Testing Behaviour

    During a code review of unit tests someone said something that I found very interesting. We had been looking at the structure of BDD (GivenThat and When) style tests and he said that he wanted tests to be written in such a way that if he wanted to refractor code but not change the overall intent of code then the tests should not break – but of course they always did. It made me think...
  • PodcastUtilities

    I listen to lots of podcasts, both technical and for entertainment. The problem I have had for a long time is that I need software that will download episodes from a specified list of podcasts and, as I keep a large number of podcasts on my computer then synchronise a subset to a mobile device. Although there are options all seemed unsatisfactory somehow I object to running the large memory foot print of a program...
  • Exception Handling in a try/finally block

    However I recently came across a problem I put into a system. I did not notice the problem until I was going through the exception logs and discovered that they were not as useful as they could have been. I had written some code that was a client to a WCF service and if there was a problem with the service then the intention was to log the error for the main program to carry...
  • Travel tips for India

    Last year I wrote down some of the things that became apparent only after visiting Cuba, this year I have been to India and thought it might be useful to share the things that I discovered there. I have just returned from there and we discussed what we had learnt, there were three of us travelling, one women and two men. Obviously these are our experiences from a three week trip, you might get different...
  • ie does not display a space after an embedded SPAN element

    I came across another odd render problem in IE. I had an a SPAN element enclosed by a DIV element. the span was being used to attract style to a part of the text in the div The HTML I thought I had was something like this. <html> <head> <title>Test</title> <style type="text/css"> body { font-size:20px; } .div { background-color: red; } .span { background-color: blue; } </style> </head> <body> <div> <div class="div"> test before <span...
  • Commute times for car, tram and bicycle in Manchester

    I live in Manchester, I live in the suburbs, 8 kilometres (5 miles) from where I work in the city centre. I usually cycle to work however sometimes I use a car or the tram. Where I live is a 3 minute walk to the nearest tram station, and about 5 to 10 minute walk from the tram station to work. When I use a car I have to walk about 5 minutes from the...
  • calling a stored proc from another stored proc and getting results

    I am not a SQL DBA but like a lot of developers I do get to work in relational databases. Also I guess like a lot of developers I find SQL to be the most alien of the languages I work in. Recently I needed to refactor some code that had an impact on a database, in common with the DRY techniques I wanted to remove duplicated calculations. I’ve simplified this example to make it...
  • Sony Reader vs Amazon Kindle Hands On

    Last year I bought a Sony Reader, I had my reservations about the whole eInk thing but I was so impressed that this year I bought an Amazon Kindle, I thought it might be useful to compare the two approaches to electronic reading. Side by side I guess before I get into the details of each of the readers I should compare them side by side. In some ways its a bit unfair as the...
  • Code Review: Copying the text from a Message Box

    Strictly speaking this snippet isn’t even code however it did come up in a code review and I’ve made use of it often. Lots of times when an error message appears I need to be able to get the text from an error message dialog, either I want to find the text in source code or to use it to search the internet. It turns out that as long as the developer has used the...
  • Code Review: Constructing a StringBuilder with a capacity

    Its the small things that seem to be the most generally applicable when writing code and one of those little things is the construction of a StringBuilder. I guess most developers assume that concatenating strings is not very efficient, because they are immutable it means a lot of copying and memory allocation behind the scenes. One of the advantages that “modern” programming languages such as Java and the .NET family proclaimed over their predecessors was...
  • Enterprise Library exception handling in a production environment

    I have blogged before about liking Enterprise Library, particularly about its exception handling mechanism. Given that the whole purpose of the exception handling mechanism is to provide much needed information about defects in software I have recently been faced with a problem where the exception handling mechanism itself failed. I had a piece of software that was deployed to a production server. It had been tested fully on a staging environment and was then deployed....
  • Another gadget: Dulux PaintPod

    Recently I needed to paint a house, not a huge house, a smallish two bedroom house however I did need to paint all the walls and the ceilings so there was a fair amout of painting needed. I had noticed the Dulux PaintPod in B&Q (I am in the UK, its a bit like Home Depot). I thought that if I was ever going to get use out of a device like this then now...
  • Restoring a image to an Acer Netbook from a Windows Home Server

    After Scott going on about how good Windows Home Server (WHS) is I decided to try it. I have to say on the whole I am very pleased, it works very well. I did have one issue with restoring machine images. WHS will backup machines on the network. You can restore individual files by opening a backup set and copying any files you need. If you loose the whole machine, for example you suffer a...
  • Javascript != C#

    A while ago I blogged about the pitfalls of working in multiple languages, and lo and behold I instantly went and fell down another of them. I had some code that I had written in C# and I needed to port it to JavaScript, I did briefly think to use Script# but it seemed like complete overkill for a class with a few calculations in. Anyway the C# code looked like this double value1 =...
  • HTML UL bullet alignment in different browsers

    In previous posts I have explored strange effects on HTML and CSS in different browsers. I do like it when I have the time to find out exactly how to fix fender problems across browsers by understanding what is going on. I came across a problem in IE where the bullets for a UL element were rendering at the bottom of each list element and the solution to this problem is interesting in that it...
  • travel tips for Cuba

    I have just returned from Cuba. I went armed with the usual travel book and I guess as always with travel I returned having had things work well and things work less than perfectly. I kept a journal and thought it might be useful to publish some of the things I wish I had know before I left. More than anywhere I have travelled the guide book seemed to be out of date very quickly....
  • C# != VB.NET

    Or maybe it should be VB.NET <> C#. I started out using C++ professionally but as time has gone on ended up using a wide variety of languages. Web development does tend to involve concurrent use of multiple languages, javascript, C#, SQL, XSLT etc. I find that using multiple languages at the same time makes it lots easier to make silly mistakes because the language does not perform in the manner I assume it does,...
  • My new Sony Reader

    Before Christmas there was a lot of buzz around eReaders. Many podcasts were saying that the Amazon Kindle and eReaders in general were finally mature enough for mainstream use. I like to buy myself a Christmas present, last year it was a netbook, so I thought I’d have a look at what was available. Let me say straight away I live in the UK, not North America, if I did live in North America I...
  • Watching TiVo recordings on your PC

    I’ve had a TiVo for ages a very welcome Christmas present from Steph. Occasionally I need to watch programs that have been recorded on my TiVo on a PC or on another TV in a different room. The way I’ve solved this problem for years was to use a pair of digisenders, a solution that does work but does have some limitations which mainly centre on the use of the 2.4GHz frequency band. the digisender...
  • Code Review: if statements

    As part of my role as a developer I attend code reviews. On more than one occasion I’ve been struck by small details that have made a big difference. A colleague once pointed out that I was giving myself an opportunity to get code wrong by missing out the braces in an if statement. In most C style languages, (C++, C#, Javascript etc) this is legal if (someCondition) performSomeAction(); However he asserted it was unwise...
  • Debugging ASP.NET and using Integrated Windows Authentication

    Last post I was looking at using integrated windows authentication in IIS. When I am working on a web site like this on my dev machine I often turn integrated windows authentication off and Basic Authentication on. This enables me to access the web site using different credentials that I can just type into the browser. Please note that I only do this on my dev machine and would not recommend doing this in any...
  • Using Integrated Windows Authentication in IIS

    Many public facing web sites need to have special “admin” modes, or even completely different personalities for internal staff. One possible method of achieving this is to use the Integrated Windows Authentication in IIS which can be setup from the Directory Security tab of the IIS MMC snap in as shown here If the anonymous access option is checked then anyone can access the site if not then the user’s windows credentials will be sent...
  • Using Safari with proxy server credentials

    Recently I have installed Apple’s Safari browser and found a problem with my proxy server. My proxy server requires credentials, in the case of IE and Firefox this is my Windows account credentials which the browser will automatically present. Other browsers like Opera and Chrome ask me to enter my username and password before the first page is rendered. they even have a checkbox to remember the credentials so I am not prompted before every...
  • CSS margin, padding and background-image problems

    In my previous post I was looking at problems with older versions of IE. It is always easy to poke fun at older browsers (and IE6 is getting on for 10 years old now) and as I noted at the time the problem migrates from browser to browser as time goes on, in the past it was Netscape 4 and undoubtedly it will be a different browser in the future. Recently I came across an...
  • CSS z-index with containing blocks and IE6 / IE7

    In my previous post I was exploring the effect containing blocks have on absolutely positioned elements. I did say that containing blocks have an effect on z-index as well. The effect is that elements with a higher z-index but within a containing block are rendered behind an element with a smaller z-index. It turns out that the effect is probably a bug and that it only happens in older versions of IE, that is IE6...
  • CSS position:absolute, what does it mean?

    This is probably something the rest of the world found out ages ago but I have only just discovered it. I was trying to find a problem with a page, granted the page was quite complex and consisted of a large amount of generated HTML but the problem boiled down to a simple issue: I did not understand how position:absolute worked in CSS. I had a style like this .interesting_p { position: absolute; top: 10px;...
  • ASP.NET exception logging in a hosted environment

    Fixing problems with web sites can be tricky. On the desktop, if I can replicate the problem then attach a debugger and find the problem, When I am writing a web application this is what I do, I run IIS locally and debug locally and all is fine. However after the site is deployed things become more tricky. In many hosted environments I often find myself restricted. I cannot attach a debugger to the running...
  • A Comparison of Weather Feeds for use in applications and web sites

    I am involved in a project to build an application called Worldolio, this applications provides a variety of geographical information, current time, DST dates, sunrise, sunset and weather forecasts. Currently I am reviewing the weather feed we use for Worldolio with a view to replacing it. In the course of this work I’ve had a look at most of the weather feeds I can find, if you know of any I have missed please point...
  • My new netbook: Acer Aspire One

    I decided to treat myself to a new netbook after Christmas and given that Dixons / Currys were selling Acer Aspires at less than 200 pounds for the Linux version with the 120 GB hard disk I decided have a play. I quite liked the idea of using Linux It is purpose configured for the hardware Its quick to boot its something new to play around with, I have used various flavours of unix in...
  • How to fix Tivo Suggestions in the UK

    If you own a Tivo and are based in the UK then you will have probably noticed that your Tivo has not been recording suggestions for the last few months. I sort of noticed it as part of the background noise in life and finally managed to find some time to see what was going on. It would appear that the problem has been identified by Tivo, however there are no plans to fix it....
  • Rolling Flat File Trace Listener with Purging for Enterprise Library

    I have used Microsoft's Enterprise Library (EL) from Version 1 back in the day. I have to say I love EL, I have read lots of blog entries telling me that there are better components to do some of the parts of EL but EL has some very compelling reasons to use it It has a lot of components of an application that I know I *should* write but that are just overhead. If I...
  • SQLite foreign key constraint generator using T4

    In my previous post I described creating a Codesmith template to generate SQL code to implement foreign key constraints in a SQLite database using triggers as SQL does not natively support the foreign key constraint when specifying the column during table creation. After I had produced the template I started reading about T4 which is Text Template Transformation Toolkit. T4 is built in to Visual Studio, the obvious advantage being that you can use T4...
  • SQLite foreign key constaint generator using Codesmith

    I have started to plan the my new online books catalog as part of the new site structure, as I discussed here. I know the basic shape of the way the catalog will work, in that I will be using server based technology rather than compiling an Access database to HTML. I have been assessing which database technology to use bearing in mind that part of the reason this site exists is to provide an...
  • Getting the tab key to work in a WPF ListView control

    During the summer I have been doing some work on WPF and this lead me to reading about Scott Hanselman's new project Baby Smash.  One small paragraph in this post captured my early progress One little aside to end on. Just when I'm getting really pissed at WPF and I'm ready to give up, something simple and cool happens where I realize I'm starting to "get" it. An example of this is a dialog that...
  • Mixing fire and water: ASP.NET and WordPress

    In my previous post I was describing the earlier incarnations of this web site and the slow but steady draw to trying to rework the web site again. There was a definite sequence of steps that led to this site. During the summer I have been doing some work on WPF and this lead me to reading about Scott Hanselman's new project Baby Smash. His posts about WPF are interesting, especially as I seem to...
  • how did we get here?

    I created my first personal web site in the 1990’s. When I created that first site I decided to use static HTML for the site for a number of reasons I had my hands full learning HTML and CSS without having to learn a server side technology. I was unsure which server side technology was going to be most useful to learn I was cautious about adopting a technology that would make it hard to...
  • Hello world!

    Over the years I have produced a large number of "Hello World"s. In many ways this is the most complex and in other ways it is one of the more straightforward. The world in this instance is likely to be a very small world. I really just need an online CMS system to keep some pages that are easy to update and information that I tend to forget if I do not write it down....