Menu

Tuesday, 30 December 2014

Enabling disk encryption on OSX Yosemite turns out to be a straightforward process. Simply enable it through Setting/Security & Privacy/FileVault - if you chose not to let your iCloud account unlock your disk (for when you've forgotten your password) you'll have to keep a safe record of the recovery key (it sounds like you only get one oppourtunity to record this) - this triggers a reboot, and then when you log back in you'll be able to monitor the progress of file encryption from the same settings panel.

Unfortunately the purge command now needs to be run as sudo - before I enabled FileVault I ran it without sudo so I didn't get accurate read results. I hope though that the write values are accurate - I did multiple runs just to capture a feel for the variability:

Before FileVault (without sudo purge, read results were invalid)

MacBook Air:

Write Speed is: 211.474 MB/sec

Write Speed is: 211.479 MB/sec

MacBook Pro:

Write Speed is: 749.875 MB/sec

Write Speed is: 747.208 MB/sec

After FileVault (with sudo purge, read results look reasonable)

MacBook Air:

Read Speed is: 177.373 MB/sec

Read Speed is: 179.464 MB/sec

Write Speed is: 162.953 MB/sec

Write Speed is: 162.258 MB/sec

MacBook Pro:

Read Speed is: 764.053 MB/sec

Read Speed is: 762.525 MB/sec

Write Speed is: 665.999 MB/sec

Write Speed is: 692.193 MB/sec

IF this benchmark is valid, taking the BEST case (smallest difference) for write speed on the MBP (747-692) indicates I've lost 55 MB/sec or approximately 7%.

I was hoping for a more negligible difference, but the real test that matters will be if I notice any significant degradation.

This page lets you choose from your registered devices (if you have more than one). From here you can see when it was last used, and where. You have the option of 'Ring', 'Erase', and 'Lock'. Choosing 'Lock' lets you provide a new pin - so next time you access it the new pin should be active.

Monday, 10 February 2014

I'd noticed that most of the recent applications in the App Store won't install on my iPad 1 anymore. They either need a gyroscope or IOS 6 or 7. My iPad is stuck on IOS 5.

The first problem with this is that I haven't found a way to browse the App Store for applications that ARE compatible. This is incredibly frustrating, since its just left to trial and error finding some that will work.

This hasn't been so simple, and I suspect others might have the same problem so I've tried to document what I've found:

Doing a 'reset' to erase the iPad (before gifting it to someone) will leave you in the unfortunate situation of not being able to install many applications very easily.

At this point, it doesn't seem possible to install applications requiring > IOS 5 via the device - its not compatible so not allowed.

So to work around this, you can use iTunes to 'purchase' applications. Since using iTunes doesn't seem to be aware of your devices, it'll let you purchase anything.

Now you have some purchases, you can return to your device and open the App Store. Go to the 'Purchased' tab and then individually install each application. Hopefully at this point you'll get the 'download the latest version that is compatible' message.

A couple of notes here:

I did all of this while connected over the cable to the computer running iTunes.

When I first did it, the applications seem to hang while installing, and never completed installing properly. The solution to this was to delete the applications from the device, then return to the 'Purchased' tab and reinstall. (I think the first installation of the apps may have been due to an iTunes sync which failed and never recovered - presumably because they are not compatible. By deleting them and reinstalling them from the iPad itself via the purchased tab, I got the 'install latest compatible' message which resulted in success).

Update 1: I am experiencing a lot of crashes on the device - mainly with the App Store and iTunes. I don't know if this happened before I reset/erased the iPad or if it has just started happening now.

Some obvious things could be improved here:

The App Store could let you filter by 'compatible with device x' e.g. only show me those applications that will work on my 'iPad 1'

When you install apps from the device, it could just install the latest compatible version right there (bypassing the need to do anything special).

If I've got any of this wrong, I'd love to hear. It would be extremely useful to be able to EASILY continue using the iPad 1.

Saturday, 17 August 2013

I'm using JBehave with Selenium WebDriver to test my PrimeFaces (JSF2) application. Selecting an option from a SelectOne option list isn't standard though because of the HTML markup generated by the JSF component.

The facelets code to place the selectOneMenu uses the ID 'state':

This generates HTML div blocks with id's prefixed with this components id:

To select an option, I use a method which manipulates the appropriate divs - this can be used as illustrated below:

To reuse this type of utility method, I put it in a base Page Object class:

Monday, 12 August 2013

I was exporting my banking transactions the other day. It's a much more tedious process than it has to be and after using this for years and not seeing any updates to the site I thought I'd send some feedback - written as stories:

As an Online Banking Customer, I want the system to remember my export preferences so that I can efficiently export my transactions ­

currently I have to set everything every time (even if you navigate from a selected account, you still have to pick an account) ­

file format (i.e CSV) ­

date format (dd/mm/yycc)

As an Online Banking Customer, I want to export transactions for all my accounts in one go so that I can efficiently export my transactions ­ so I don't have to do them one at a time

ideally multiple accounts in one file

As an Online Banking Customer, I want to be able to access more than 12 months worth of transactions so that I don't have to export so often. ­

not much history is available online ­and transactions can easily be lost if you don't remember to export frequently enough

And after getting confirmation of my feedback - where everything was on a single line of text without any of the formatting I used:

As an online user, I want formatting to be preserved when I provide feedback so that it can be clearly read and understood. ­

my last feedback suggestion removed all cr/lf so it was all printed on one line and not clearly readable ­

perhaps you could use the markdown format (customers wouldn't need to know, but it may provide an easily way to have some formatting without complicating things)

I was surprised to get a response - most companies don't bother. They reckon they'll be updating the site this year or next year - sounds like a BIG BANG approach, after not much in the way of incremental improvements for years. I guess I'll just have to continue with the tedium for a while yet.

Saturday, 25 May 2013

Sometimes its useful to expose the version of your web application - I find it useful so vsConsole can display the version of the deployed application for each environment on the dashboard. If you build your app with Maven, you can use this code to get the version, and simply wire up a controller/rest endpoint to return it as text/plain.
To expose the version of your maven built spring web application, you can use a REST controller like that shown below. Note, you won't see a valid version while running in the IDE - it'll only work when running the Maven built WAR.
If you want to add the Jersey dependencies to your spring application try using the following dependency declaration.

Monday, 6 May 2013

I've seen projects where the application code base contains database connection information - passwords and all, or, WAR files are rebuilt for each environment with properties substituted appropriately for the target environment.

Rather than putting database information in the application code, it makes more sense to use a JDNI data source provided by the container. This way the exact same application code is deployed to all environments, and we don't encounter any exposed passwords - since the owner of the container (in production environments the infrastructure/support team) define the data source themselves.

With the database connection information encapsulated within the container, you don't need these details in the source code, you don't expose passwords to anyone and you don't need to repackage your application for each environment - deployment is simple.

Another similar use-case is for the mail server. You may also want to expose a String which could point to a properties file or server address - this can then be referenced in your spring application context.

Below are xml snippets of a Tomcat configuration which exposes some resources and a Spring application context file that uses those resources.

Note however, on Windows you may have some problems with undeploying the application - after an undeploy command, some jars may be left over in the webapps/appname directory. When you try to redeploy your app you'll see an error containing "cannot invoke tomcat manager fail - unable to delete...".

To work around this, you can change the TOMCAT_HOME/conf/context.xml to include the 'antiJARLocking' attribute like so:

<Context antiJARLocking="true">

The documentation points out though that this will impact start up times of applications.

In my case, I noticed problems when doing a redeploy to Tomcat - most likely unrelated to Maven and/or the maven tomcat plugin and more to do with PermGen (I saw perm gen OutOfMemory: PermGen space errors in the tomcat7-stderr logs, and the Tomcat process was consuming 100% cpu). Adding the following switches to the Tomcat JVM settings seems to have fixed it for now:

Tuesday, 16 April 2013

Print to Google Drive

I just noticed 'Save to Google Drive' in my 'Print' options in Chrome! This is awesome - when you want to save something for reference, and you don't want to go through thousands of bookmarks, this is exactly what I wanted!

Media Problems

Here is a great blog post about trying to find a decent movie streaming service. Now I have FetchTV (this lets me buy movies to stream, much like the Google Play option) I'm considering turning my MythTV media center off, but I still need an option for playing music/displaying photos/etc. There are lots of options, from AppleTV to Western Digital et al media players. Props to Google for actually selling us here in Australia movies and music - unlike Amazon (we still can't buy movies and music from Amazon in 2013).

Andrew Chen quits RSS - WTF!

Andrew Chen just announced that he's quitting RSS in favour of email notifications. Look at the comments though, and there isn't a single positive response (and they are all quite sensible reactions). Presumably this was provoked by Google Reader being retired, but the unanswered question for Andrew is why does Reader == RSS ? I've switch to Feedly (which has a seamless process to migrate your reader account) and I'm liking it so far. I won't even notice Reader go offline.

Monday, 25 March 2013

Installing Windows Vista
For the first time since I bought it, my old Dell Inspiron 1525 has Windows Vista back on it. It's been running Ubuntu Linux since I got it, so why does it now have Windows again? My children are using computers at school now and they are using Windows - mainly Office. So rather than confuse them with different operating systems it seems more constructive to just give them some consistency and let them have their own computer set up like it is at school. I'm going to have to buy Microsoft Office for them - which after seeing how Libre Office handles clip art, I'm quite happy to do! (MS Office has a nice search and browse for clipart which the kids love and can use well. Libre Office didn't seem to have any search and you were left to click into each folder one at a time to see the clipart - not particularly useful).

Downloading statements

I've just noticed PayPal have an interesting feature - you can download your transaction history, by date range, OR just the transactions since your LAST DOWNLOAD. Awesome - many sites are missing this feature. Some of the online banking sites don't even remember ANYTHING - date range, file type (csv etc) - from one export to another - you have to enter everything for every account. Just amazing.

Nexus 7 Android Tablet

I finally have an Android tablet - I've been thinking about getting a Kindle for a long time as a way to catch up on reading during my daily commute. The paperwhite looked good but I couldn't order it from Amazon because they aren't shipping it to Australia and Dick Smith only just started selling it at $169. So when ShoppingExpress had the Nexus 7 16GB for $199 plus postage, I thought that'd be good. A full tablet instead of an eReader, and a little bit heavier, but I think its a good compromise and I can use it for so much more.

New screen protector for my phone

When I got my HTC Incredible S (on an Optus plan) they put a screen protector on it before giving it to me. So I never saw the screen without it. The protector had a kind of grainy-ness to it but the screen looked okay. Recently the protector started looking pretty bad and it was time for a new one - and WOW, what a difference. This protector is different, not grainy, totally clear but I assuming its not too good for reflection! It was also very easy to put on since it is a stiffer plastic and doesn't bubble. Right now my screen is looking totally awesome and like a brand new one!

Tuesday, 19 March 2013

Google Reader and Listen

I've been using Google Listen for listening to podcasts since I got my Android phone. It worked well, I would just subscribe to podcasts via Google Reader and drop it in the 'Listen Subscriptions' folder. But now with Google announcing the end of Reader, and Listen has long been abandoned, I'm looking for a suitable alternative. I really liked how I simply had to subscribe to a feed online - if I have to subscribe to things via an app, I'm stuck if I ever want to switch apps. Maybe I'll try Pocket Casts.

LinkedIn Groups

I've noticed that when contributing to LinkedIn groups, its not immediately obvious to others from your profile. Recent comments might show up in your activity stream but they'll soon disappear. If you view your profile, you'll see a Groups section that shows the groups you have joined. Click on one of those and you'll be taken to the Group page and at the top there will an area where you can start a discussion - on the left will be your picture and under that is a tiny link to 'Your activity'. Click on this and you'll be able to navigate your history within this group. You can link to this page using the group id and your member id. Mine link to Agile and Lean Software Development looks like this:

Depositphotos

Get royalty-free images, photos, vectors, illustrations and videos from the best microstock - Depositphotos.

vsConsole

vsConsole is a tool for developers and testers which lets you easily tail log files on remote servers, monitor the status and version of applications deployed to your environments, and stay informed with broadcast messaging.
Learn more

SSD Cloud Servers‎

Built For Developers. Deploy An SSD Cloud Server In 55 Seconds.
Digital Ocean