Author Archives: warren

Sticks and Stones

“Sticks and stones may break my bones, but names will never hurt me.”

That was a lie that I was told as a child. I have literally experienced sticks and stones, as well as name calling. The worst physical violence done to me as a child was probably being knocked unconscious after being hit in the head by a large stick. I certainly could have been permanently hurt by that incident, but was not. On the other hand the verbal bullying did do permanent damage. “Just ignore it” is harmful advice for a bullied child. Consider the research:

Show your nobility, your human strength – halt bully behaviour. Sticks and stones break bones and names will hurt forever.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Why do adults seek an autism spectrum diagnosis?

swan

Being in the autism spectrum has probably gained a public image of only (or at least primarily) being a childhood experience. Early diagnosis, early education and early intervention has certainly been where most of the research and support has been focused. However, being autistic, aspie, on the spectrum – however you want to phrase it – is a lifelong experience, and requires lifelong support for many people.

Turning eighteen or gaining sufficient skills to act in a functional way does not mean that a person is no longer autistic. The challenges experienced do not disappear, they may change and there may be new ones in different life phases, but they are ever present. In fact for an adult who has lived in ignorance of their state-of-being, life has probably been a confusing journey in which mistakes have been compounded with guilt, and depression has come from not understanding why they do not integrate with the mainstream. Living this way is harmful for mental health, and living in ignorance is not the way to be the best version of you.

An analogy that I use hesitantly because I do not want to trivialise or be divisive: Imagine how the Ugly Duckling felt. After experiencing a brutal early life and then being ready to die, that “ugly duck” discovered that he was in fact a swan. With self-understanding life choices can be better managed and the damage caused by misunderstandings with the mainstream can be minimised.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

the skin between you and me

my calm skin,
appears to be;
probably ok.
but i hurt.

i wonder what act
shows the pain?
nothing true, so:
my false smile.

you cannot see
beneath skin.
here i am,
invisible me.

my polite smile,
tells you we;
communicate well.
you misunderstand.

i struggle inside,
why not speak?
i save us,
at my expense.

our natures differ;
pretend or be judged.
here i am,
invisible me.

my abilities,
demonstrate a;
basic competence.
i dream of more,

yet i function.
so what else?
too tired –
i cannot say.

let me hide,
this world hurts.
here i am,
invisible me.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

MP3 Odyssey: moving my music library to a new PC

I have been using Windows Media Player (WMP) for a few years. It did the job and I was able to create a cool playlist based on my song ratings and how recently I had heard the songs. My playlist had a few important features:

  • All unrated songs were included until I rated them
  • I hear all 5 star songs at least once every 6 months
  • I hear most 4 star songs at least once a year and definitely every 2 years
  • I was able to pull up a random selection of music according to my rules with little effort

The below summaries my rules:

Star Rating Include after Last Played Include this many songs
1 > 5 Years 1
2 > 2 Years 2
3 > 1 Years 14
4 > 30 Days 17
5 > 30 Days 21
Unrated Now All
4 > 1 Year 20
5 > 6 Months All
4 > 2 Years All

So, takeaway message from this is that I have put significant effort into my music library.

Just bought a new laptop that I wanted to make my main machine and here is what the WMP help suggested I do with my library:

Windows Media Player library FAQ

How do I move my library from one computer to another computer?
The library is a database that includes links to the digital media files on your computer. Among other reasons, you can’t move the library from one computer to another because the links in the database would no longer be correct. If you want to replicate your current library on another computer, you need to copy your digital media files to that computer and then add those files to the new library. For more information about adding content to your library, see Add items to the library.

Not acceptable.

Google quickly revealed Dale Preston’s Windows Media Player Metadata Backup. After following the instructions I had a relatively quick transfer of the library…unfortunately it did not transfer Date Last Played. Obviously required for the playlist that I like.

Searching further it seems that the Date Last Played corresponds to a field called UserLastPlayedTime that cannot be updated.

Time for a different approach.

I had occasional looks at MediaMonkey over the years, but there was no compelling reason to swap from WMP. Loading it up on the old machine and performing a rescan updated everything from the WMP database. Now all I had to do was move it to a new machine.

It took a little heartache but I ended up with the entire database on my new laptop. What I did was:

  1. On the old Windows XP PC relocate (via MediaMonkey auto-organise) all mp3 folders/files to c:\music
  2. Copy all mp3/folders files to c:\music on new Vista PC.
  3. Install mediamonkey on new vista PC.
  4. Copy mediamonkey ini and DB files from old PC to new PC as per locations in this information
  5. Open mediamonkey on new PC and notice that all entries are grey and the Path for songs is for example “[Appletree]\Music\AC-DC\Who Made Who\01 – AC-DC – Who Made Who.mp3” Changed the C: properties to have a matching “Appletree” label.
  6. Attempt to run “Locate moved/missing tracks” as per these instructions
  7. Kill mediamonkey via Windows task manager because the “Locate moved/missing tracks” did nothing other than hang the program (note that a new version was released while I was doing this, perhaps the new version does not behave like this)
  8. Also noted that “Add/Rescan Tracks to the library” has a similar effect as the “Locate moved/missing tracks” menu option – ie hangs the program and has to be killed via task manager.
  9. Attempted to update the drive ID as per these instructions (Which pointed to the script here)
  10. This script did not initially work, however it did after commenting out the lines as specified in a message on this page
  11. Now my collection became active. The MediaMonkey errors which required killing via the Windows Task Manager also stopped occurring.

Take a breath!

Now it should be a simple matter of recreating the playlist in MediaMonkey, right? It was not so obvious how to create a playlist that would do the same function as my original WMP playlist. Until I found that auto playlists can be combined just by using the Advanced Autoplaylist feature in MediaMonkey.

What I did was create an Autoplaylist for each of the criteria that are listed above and then create a ‘master’ Autoplaylist that combined the lot of them by adding a search criteria with: Property=”Playlist”, Condition=”Is”, and then selecting the Autoplaylists to include in the Values area.

Hooray, the new laptop is now setup with my music database.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

JAOO Brisbane: Goldilocks and the Concurrent Processes

Today I attended the first day of JAOO Brisbane. A pleasant diversion from the everyday, a chance to catch up ghosts of workplaces past, and an opportunity to see presentations by some IT thought leaders.

Erik Meijer started the day wanting to make a case for “fundamentalist functional programming”. The IT community has reached a crisis point of distributed systems and multi-core computers that is not solved by present day programming languages. A (the?) primary issue to be solved is in eliminating hidden side-effects. Stating side-effects is an enabler for implicit concurrency, rather than, say the explicit world of threads in Java. Hopefully that is a reasonable summary – the talk was impressive enough just because of the journey that we went on.

Finishing the day were Erik Dörnenburg and Martin Fowler searching for design that is just right. There was some discussion of essential and accidental complexity. Essential is required by the problem you are facing, accidental is required by the approach you take. Solutions with too much simplicity are not tasty and neither are solutions with too much complexity. Getting your design just right is a primarily a craft. It may be helped by things like Domain Driven Design or reducing irreversible architecture choices by removing them or delaying them.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Choose Your Poison: Does business logic belong in the database?

There are debates about where to locate the business logic in a software application. Some say that the only place is in some middle language, others argue that the database is the logical home. Once upon a time I guess that no-one gave it much thought, you build a piece of software and it ran on the server, anyone who wanted to use it logged into the server. Or you sent the software off to a user to install on their computer.

Then came two tier applications with part of the software installed on a PC and part residing on a server somewhere. Where did the business logic go? Probably with the piece on the PC, causing heartache whenever it had to be changed. So, the next intelligent move was to centralise the business logic on the server – what was on the server? Probably just the database.

N-tiered applications bought layers separating the storage of data, access to the data, business domain, presentation logic and user interface. Why? Because it means you can change one of the components without having to affect all the other pieces of the software puzzle.

So, there are choices as to where you try to place most of the business logic. In practical terms this equates to a choice between your database and some other language that extracts data from the database.

Some reasons to choose the middle language would be:

  • Your software is meant to work with as many databases as possible.
  • You have no idea about how to use database features like stored procedures.
  • You believe that implementing the business logic in a middle language provides a better separation of concerns or a looser coupling.
  • You believe that the database is only there for data persistence.
  • You believe that the middle language is a better technical choice for manipulation of data. That is, Data Access Objects and possibly the database schema are generated, Object-Relational Mapping (ORM) frameworks can be fully used.
  • The database is only one of many data sources for your software.
  • It is important to create a solution as quickly as possible at the possible expense of later maintainability.
  • There is a higher probability that your database of initial choice will change to something else.

Some reasons to choose the database would be:

  • Your software is meant to work with as many middle languages/interfaces as possible.
  • You believe in having the business logic as close to the data as possible.
  • You believe in making use of database features beyond simple data storage (particularly if you paid a lot of money for it).
  • You believe that the database is a better technical choice for manipulation of data. That is, stored procedures are used to abstract the implementation of data storage, complex queries can be used and are tuned by database experts, unit testing of database code is performed.
  • There is a higher probability that your middle language of initial choice will change to something else.

I believe that the object-relational impedance mismatch should be acknowledged and managed at the DAO interface regardless of use of database features – rather than subverting either the object model or the relational model. Except when the solution indicates otherwise.

My opinion is that the object model and the relational model should both be first-class citizens in your software. Having a stored procedure layer in the database supports the loose coupling of the models. Recognising the importance of both aspects of your software supports:

  • better use the native capabilities of your tool choices
  • better response to change.

There are some passionate views about this topic, a few starters to follow up are:

Object/Relational Mapping is the Vietnam of Computer Science. It represents a quagmire which starts well, gets more complicated as time passes, and before too long entraps its users in a commitment that has no clear demarcation point, no clear win conditions, and no clear exit strategy.

Ted Neward: The Vietnam of Computer Science

For modern databases and real world usage scenarios, I believe a Stored Procedure architecture has serious downsides and little practical benefit. Stored Procedures should be considered database assembly language: for use in only the most performance critical situations.

Coding Horror: Who Needs Stored Procedures, Anyways?

Martin Fowler: Domain Logic and SQL

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather