Get a mop and wipe it up!


Referendum on NZ Voting System

, posted: 20-Nov-2011 13:54

No voting system is perfect.

FPP is definitely the worst option. Only swing voters in the "marginal" electorates influence which party governs. Everyone else is effectively disenfranchised.

MMP is better, but suffers from List candidates -- people who have never had the endorsement of the voters.

My recommendation is for STV. There are no List MPs. Instead, there are larger electorates with 3 - 7 MPs. So a typical electorate might end up with 2 National MPs, 2 Labour MPs & 1 minor party MP. Some argue that it is complicated to cast ranking votes. If this dissuades some people who find it too complicated, then I think this is a good thing, as raising the average IQ of voters might raise the average IQ of MPs!



Powershop Marketing promotes mass murderer

, posted: 5-Jun-2011 12:13

Che Guevara (born "Ernesto Lynch") was a Stalinist mass-murderer, but only in real life.

Che was a narcissist who boasted that “I have no house, wife, children, parents, or brothers; my friends are friends as long as they think like me, politically.”
Yet, this mercenary is the icon that Powershop uses to promote itself.

Powershop marketing image

Why not go the whole hog and use images of Stalin? Or Hitler?

Or both?

Stalin and Hitler
It seems ironic that Powershop, a company presumably in business to make a profit, should use an image associated with anti-capitalism. If Powershop were to go bust, then all that money that I've paid in advance for future power will be squandered, and Powershop's name will be in the mud (with Bridgecorp and Hanover Finance) in the eyes of its customers.

So, what do you stand for, Powershop?




Police flashing lights make road safety worse

, posted: 4-May-2011 21:41

I'm not anti-Police. Not normally.

But I'd like to know why it is necessary to keep flashing red/blue lights going on a patrol car that has stopped to deal with a motorist on the Harbour Bridge approach, when both cars are completely out of harm's way in the construction zone mostly behind a barrier? What do the Police think that the flashing lights achieve, in that situation?

Allow me to elucidate what signal they send to other road users, travelling home in the dark, rush hour evening:





      •   Police! I must slow down -- even if I am not exceeding the posted speed limit, and there is no danger of hitting any bystanders. (Why?)









      •   Police! I must REALLY slow down, because I need something interesting to say to others in my household, and want to see if I can see any bodies.









      •   Police! Oh no, I'd better slow way down to see if my brother/cousin/uncle/workmate has been caught driving while disqualified. Again.




 
While this is an unusual case, I'd like the Police to consider their procedures, and ask whether some lateral thinking by the officer involved -- or some direction from the motorway controllers who could see, if they were watching their monitors, the effect on traffic flows in both directions -- might have deduced that switching off the red/blue lights could actually improve the situation.



Earth Day 2011 - Brainstorming Exercise

, posted: 3-Oct-2010 23:24

So, the next Earth Day is April 22, 2011. Our company is going to promote it, and become known as a "green" company. Who would like to brainstorm ideas for how we can best tackle this?

We'd like you all to participate, but we quite understand if it's not your "thing". No pressure.

Legally we're not allowed to discriminate against you based on your skin pigmentation, your choice of deity or bonking partner, how many years you've been on this planet and such like...

But failing to bow to Gaia or say "Heil Gore!" or recite the IPCC creed -- each of those is a capital offence with immediate and explosive repercussions. (That way there is no nasty Employment Court aftermath.)

So we can count on you full cooperation and support? (Remember, we know where you live.)

[For the uninitiated, the above is my attempted satire. If you don't get it, you need to watch this video. Warning: gruesome scenes.]















And the best comment about it is from "Thegavster" at the Daily Telegraph:

If this has done anything for me, its scared me. It warns me that these
people may well advocate this sort of sanction if you don’t support
their cause and as such are no different from any other extremist apart
from the fact that they have strong support in high places. What it
has also done is made me even more determined to do everything I can to
stop them. In short it has actually had the opposite affect that they
had hoped. Come on people, its time we stood up and did something about
this plague!








Caliburn.Micro for Newbies Who Want to Write Clean WP7 Apps - Part 1: How to Configure a New Project With Folders

, posted: 27-Sep-2010 22:10

Caliburn.Micro is an MVVM framework aimed at XAML development (WPF4, SL4 and WP7). I'm particularly interested in it for the benefits it brings to WP7 (Win Phone 7) development:

  • minimal code-behind

  • minimal databinding

  • clean separation between views and view-models (making unit testing easier)

  • simplified navigation between views


(There are many more benefits, but they are more esoteric than my brain can assimilate for now.)

Much of the simplification is achieved by "convention over configuration".  

This series of posts is my journey to understanding Caliburn.Micro for a real Win Phone 7 project. I am not a Caliburn.Micro ninja -- quite the opposite. I take my hat off to Rob Eisenberg for the framework he and his colleagues are creating. But, despite reading his documentation, and source code, I am a slow learner when it comes to putting into practical use. Thus, comments and corrections are encouraged!

So many introductory articles are "Hello World" apps that are TOO trivial. I want a VS2010 solution layout that I can use as a standard starting point for new apps, that encourages me to be a tidy coder. 

Assumptions:

  1. You have heard about Caliburn.Micro. (If not, read the Introductory Page)



  2. You have obtained the source code. (Otherwise, I'll wait while you sort that out too. You need a certain level of determination to make this work!)



  3. You have downloaded the RTM developer tools for WP7.



How to start a new Caliburn.Micro WP7 project in Visual Studio?


  1. File-NewProject WindowsPhone7 app.



  2. Add as an Existing Project your Caliburn.Micro WP7 source code project.



  3. To your WP7 project add a Project Reference to the Caliburn.Micro project.



  4. To your WP7 project add Model, Views and ViewModels folders.



  5. Delete the default startup page, MainPage.xaml, as it's in the wrong place.



  6. In the Views folder, create a new WP7 page as your startup screen and call it, say, ShellView.xaml.



  7. In the ViewModels folder, create a new class and call it, say, ShellViewModel.cs. Inherit from a suitable Caliburn.Micro class, eg Screen.



  8. Open the WMAppManifest.xml file in the Properties folder. Change the DefaultTask NavigationPage from MainPage.xaml to Views/ShellView.xaml. 



  9. Build the app and check that it runs the default page.



  10. Add a Model folder to your project.




Now you have a tidy structure for your application, with separate folders for model, view and viewmodel files. 

Important conventions to note so far:

  • a view can be located from a viewmodel via convention: the name of the view (ignoring the file extension) is the name of the viewmodel, but with all instances of the word "Model" removed. Eg, "ViewModels/ShellViewModel.cs" corresponds to the view, "Views/ShellView.xaml".





Coming up next (when I have time)...

Part 2. Navigating between views
 



dmw's profile

David White
Auckland
New Zealand


JasJar owner, Goon fan, .NET developer.