Friday, August 21, 2009

Tweets - July 28th to August 21st

erm, i cannot be arsed writing a proper blog post so i thought i'd post up the tweet stream from the last month or so.

family pics to come.

  1. mmm, if i got 300,000 signatures for "should john key stop hitting his children?" should that be allowed because we live in a 'democracy'?
  2. this referendum is not democracy in action, it's stupidity in action.
  3. unlike last week, i did not eat any friday pizza at work today, hooray! 2.1 kg down, 10.9 to go!
  4. this means, Sherlock, that the fm transmitter must be interfering with the iPhone in some way, no wonder it was on special on 1 day!
  5. how odd, the iPhone cradle works with gps and 3g when car is switched off only. even if iPhone is not attached!
  6. please let my daughter sleep tonight for bursts of longer than 20 minutes, my life depends upon it....
  7. http://bit.ly/KqWlR drug extends mice life by equivalent of 13 human years
  8. watched hunger at the weekend, movie about ira hunger striker bobby sands. despite turning him into jesus it was pretty mesmerising stuff
  9. love the new asb 'track my spending' feature, now i can see exactly how much money we waste on coffee and children's toys
  10. RT @nzben: Oh excellent. Kiwi Party leader wants the law to allow hitting kids with weapons http://tr.im/wHYL Cock.
  11. i wonder why the reserve bank doesn't just alter banks allowable reserves for lending as well as interest rates to control the market
  12. First Google Chrome 4 reveals the beginnings of cloud synchronization: By Scott M. Fulton, III, Betanews Downloa.. http://bit.ly/3LuYam
  13. Microsoft sets out new model for its 'Oslo' modeling language: By Scott M. Fulton, III, Betanews Since September.. http://bit.ly/PkkUD
  14. realised iphone holder http://is.gd/2lULG appears to nullify the gps, works fine with it in my lap even, so not tomtom's fault after all
  15. nice jquery pluging to truncate text sensibly with ellipsis, multiline support too! http://bit.ly/17pp22
  16. http://bit.ly/XNzho mmm, where to get the iphone tomtom receiver in NZ!? Anyone else struggling with early adopter pain on this!?
  17. got the tomtom iphone app it feels great and the poi collection is strong, but 'poor gps reception' so big fail! need the receiver;(
  18. dennys has hologram kid's menus, genius! http://twitpic.com/e3di9
  19. off to dennys for dinner because we can't be arsed cooking, awesome
  20. http://bit.ly/d6HWM remote control of mysky units, about time!
  21. RT @RealBillBailey: http://twitpic.com/e2mam - touring views #3 let's party. -- Ah, Ginsters Cornish Pasties, the memories!
  22. http://bit.ly/GeJ4K flickrsync allows you to sync local folders with flickr, even managing sets and tags, free too, nice!
  23. back into the running but boy it's harder with an extra 13kg and hills, only 3K but it's a start....
  24. loving orb live on iphone, streaming all media from windows home server remotely, nice! http://bit.ly/nNOyi
  25. scrabble on iphone is crap, cpu is too easy and you can't play people online except on local wifi, $6 too, avoid!
  26. Bing vs. Google rematch: Who's getting better, quicker?: By Scott M. Fulton, III, Betanews Two months ago, Micro.. http://bit.ly/11XSbw
  27. Qik: Yet another brilliant service crippled on iPhone: By Tim Conneally, Betanews Mobile video streaming site Qi.. http://bit.ly/9oAgi
  28. http://bit.ly/DoFu5 monotouch iphone hello world, cool stuff. anyone in the beta program yet? #cantbearsedtolearnobjectivec
  29. http://bit.ly/fehLG team at work enthralled by initial win7 boot sequence
  30. google maps with compass rocks!
  31. i will be crowning off the week by picking up a curry from www.satya.co.nz this evening, YUM
  32. Microsoft's Mac unit replacing Entourage with Outlook for Mac: Microsoft's Mac Business Unit this morning said i.. http://bit.ly/g5eJu
  33. grappling with wrigley's electro chewing gum, why do i feel like i'm eating condoms, that packaging is wierd
  34. very much enjoying dual screen RDP from win 7 to win 7!
  35. Twittered off: Time to grow up: By Carmi Levy, Betanews Last week's monumentally scaled denial-of-service attack.. http://bit.ly/fzLtz
  36. sysprepping win 7 developer vm, went pretty well in the end
  37. finally got my head around the video apis for www.justin.tv
  38. love that kid made $100 4 telethon by playing playstation 4 15 hours! and then win a mobile from sponsors..
  39. warriors getting stuffed,not up 4 it, 10 lil orbits donuts numbing the pain
  40. off to the warriors today, hopefully kevin locke at full back will cheer me up
  41. awesome, i need to slipstream the sql 2008 sp1 myself!
  42. ah, win 7 only accepts sql 2008 with SP1 only accepted, you can't install them separately, pain
  43. ran the sql 2008 standard installer, says "known compatibility issues" on win7, then a set up failure. not having a good time now.
  44. bummer, you can't run xp mode in a win 7 vm, not so great for developers then, thanks MS ;( http://bit.ly/17OWZV
  45. can't run xp mode in a win 7 vm? "there is no hardware assisted virtualisation support in this system". bios on host is configured fine, mmm
  46. putting finishing touches to our new win 7 powered work vm complete with the win xp mode for quick IE6 testing;)
  47. Support I'm running Windows 7, add a #twibbon to your avatar now! - http://bit.ly/CAcgK
  48. ms partner program site, trying to get VLK for win 7 "an unforseen error has occurred", great
  49. satya on great north road, best curry in ages last night @guidetoauckland #5
  50. installing win 7....
  51. Pressure-sensitive keyboard, new Microsoft Hardware prototype: Microsoft's hardware group this morning unveiled .. http://bit.ly/BtgXY
  52. win7 akamai download not working? http://bit.ly/qJSxX an error has occurred reference id: 49E58B72
  53. Future of open Web video may change with Google acquisition of On2: By Tim Conneally, Betanews Google announced .. http://bit.ly/1ImcMX
  54. super mum http://twitpic.com/cyiz4
  55. "look out honey cuz i'm using technology" - iggy pop
  56. http://bit.ly/vv4Wc great visualisation of music sales since 1978 via @darren via NYT
  57. http://www.ie6nomore.com/ for a ready to go callout for users to upgrade their browser
  58. what you get for voting nats.. RT @mandamonium: ..help this campaign for night class funding! http://www.stopnightclasscu...
  59. office for iPhone? http://bit.ly/LNSfk
  60. http://bit.ly/ga4WV monotouch for iPhone coming next month, all u c# devs wanting to deploy apps 4 iPhone get ready:)
  61. Digeo introduces new components, software for Moxi HD DVRs: By Tim Conneally, Betanews Digeo today unveiled a ne.. http://bit.ly/Ytzlp
  62. estimation spreadsheets rock
  63. some of the designers at work are getting really excited today http://bit.ly/4Cu1Nl
  64. rediscovering eno's oblique strategies http://bit.ly/sB5wy
  65. thai plum, ham and edam sandwiches are great
  66. zz top? awesome! taste is a bourgoise conceipt @darren
  67. boston's more than a feeling is better than any weezer song, any problems with that?
  68. RT @gnat: Can't get into beating up on Bill English for housing allowances. Unemployment, GDP, Cullen Fund, ... fair cop. Expenses? FFS, NZ.
  69. beautiful sunny Auckland day demands burger fuel lunch
  70. curried steak pie from at helier bakery with rum ball for afters, yum
  71. nice to have some friends round today to see Lia, cheesecake and benidorm time
  72. RT @nzben: Serious question for #voteno-ers: what would you do if a random adult hit your kid for being 'naughty'? What makes it different?
  73. windows home server back online after primary hard disk failure and replacement, brilliant!
  74. i emailed green party mps, they put me on their mailing list without asking and have sent me more after i unsubscribed, boo
  75. found my windhows home server discs, now about to test re-install on new primary hard drive, if this works i'll be very happy
  76. RT @darren: "I'd rather eat my own shit than duet with James Blunt" - Paul Weller
  77. awesome, windows home server primary hard drive failure and lost the original disk! can i get a replacement, not sure?
  78. RT @swadeshine: Scientists Claim New State of Matter Created • http://bit.ly/DHi7V
  79. http://bit.ly/Ms0kJ 'experimental' .net 4 beta 1 release, why does this feel kinda odd. Why not just call it beta 2?
  80. anyone know how to get remember the milk synced with outlook tasks reliably?
  81. back home safe and sound http://twitpic.com/bzkuj waiting for Tommy to wake up so he can meet his little sister for first time!
  82. RT @shanselman: Bing! to replace Yahoo Search - RT @TallyDigitalBiz: CNN http://bit.ly/n7qhv
  83. 2 months off obstetrics cover on health plan, should have delayed the shagging!
  84. picking wife and daughter up from hospital, home time!
  85. Blog Share: Welcome Lia Rose http://bit.ly/PrPeI
  86. released my last tweet didn't make any sense whatsoever, ho hum, time for an early night
  87. wondering if the google chrome os should be forced to have a ballot screen for the operating system?
  88. http://bit.ly/oHmLh FFS, so now MS can't even include IE logo because someone might choose that over Opera and that would be unfair??
  89. xero i love you, but could you find all my receipts and file them nicely away in a folder as well?
  90. RT @themorgan: is it just me or is Paula Bennet a complete and utter bloody idiot? shouldn't we have, you know, SMART people in parliament?
  91. http://twitpic.com/bwfb4 little Lia rose sleeping

Friday, August 21, 2009 9:02:19 PM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, July 28, 2009

Welcome Lia Rose

It used to be that i would announce things via a blog post. Haven’t now traversed into the world of twitter i found that tweeting everything with twitpic links was a much more instant way of getting the good news across. If you find this blog in any way interesting i suggest you follow me on twitter at www.twitter.com/kpatton

Anyway, welcome Lia Rose you are truly a beautiful precious thing to us. Lia was born at 10.22am by c-section on July 22nd weighing 3090g (6lb 10oz). Mother and baby are doing very well.

Annabel relaxing before lia rose arrives

Lia rose 2

Lia rose with mum and dad

Liz rose sleeping

Tuesday, July 28, 2009 11:04:56 PM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, July 16, 2009

domain names purchased for posterity

Just found out today that Lia Rose will be with us on the morning of Wednesday 22nd July, New Zealand time.

This reminded me that i needed to rush out and get domains, so my children could do their own thing when they need to….

www.thomas-patton.com (the main one was taken!)

www.liapatton.com (the advantage of having a slightly rarer first name)

Thursday, July 16, 2009 9:54:42 PM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, July 11, 2009

Taupo and Whakapapa Weekend

Some pics of our lovely weekend in Taupo and Whakapapa.

Saturday, July 11, 2009 9:35:09 PM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, July 08, 2009

Foundations of Light

Not content with being 8 months pregnant and busily putting together loads of albums for clients and looking after tommy, Annabel has succeeded in putting together a brilliant exhibition of her work at the Coco Espresso cafe/restaurant in Thames.

Some quick pics of the setup and cafe are presented below:

003

002

004

 

001

Wednesday, July 08, 2009 11:09:29 PM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, June 29, 2009

KandaAlpha now on codeplex

kandaalpha a go go
Monday, June 29, 2009 11:34:59 AM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, June 25, 2009

db4o POCO Repository using Visual Studio 2010 .Net 4.0 Beta 1 and ASP.Net MVC 1.0

Note: This article applies to beta software and comes with no warranty or support, use at your own discretion. You must have Visual Studio.Net 2010 Beta 1 installed on your machine to make use of the code.

KandaAlpha now hosted on CodePlex, download from http://kandaalpha.codeplex.com/

This is an article which builds on a previous post on domain drive design architecture using asp.net web forms and Entity Framework v4.0. now, we leverage that core architecture to have a db40 object database as the back end and an asp.net mvc web application at the front end.

  • db40 is an object database which means there is no mapping files, attributes or other ‘impedance mismatch’ between your c# classes and the ‘database’ itself. It’s mostly used in embedded scenarios but appears to be getting used in websites. I’ve only just scratched the surface with it here, but i think it’s very cool and i hope it gains more and more traction.
  • asp.net mvc is the latest and greatest presentation architecture for asp.net and includes great separation of concerns between the various layers. In the architecture presented here, the Views and Controllers are within the asp.net mvc web application and the Model is essentially the domain model (e.g. KandaAlpha.Domain.Model)

My previous post discussed the architecture presented here solely within the context of the Entity Framework 4.0. It was also limited to usage of Web Forms on the front end. This release includes that working example but also includes into the solution an asp.net mvc 1.0 application which builds on the architecture and is backed by a db4op powered repository.

The first things i did were:

  • Added an MVC application (KandaAlpha.UI.Mvc) which is the front end side of things, with controllers that dependency inject the services and repositories as before.
  • Implement new repository for db4o (sorry, in the application i misspelt and used a zero, doh!) in KandaAlpha.Infrastructure.Repository.db40.
  • Update the web.config of the mvc application (and associated tests project) to wire the Unity dependency injection so that the db4o repositories are returned for repository interface requests

Changes to Dependency Injection Approach – Service Location vs Constructor Injection

I released this post last night and then got some good feedback from Will Beattie about design smells around my choice of Service Locator pattern approach to the dependency injection within the mvc controllers. One other approach as discussed in this post’s comments is to use constructor injection dynamically on the controllers. So, you can see i’ve added a custom controller factory.

In addition, Will had commented ton the controller’s dependency on the repository layer. I wasn’t too fussed about this given repository is within the domain and simply consists of interfaces but i did break it out for completeness. Notice that this does mean you get duplicate interfaces on the service layer in many cases. In practice, i would be quite happy to expose repository through the service layer but made the change anyway for completeness.

It’s worth noting i do still make of the ServiceLocator pattern within the mvc controller factory itself and also within global.ascx.cs Application_End which is where i ‘clean up’ the Repository Context (e.g. kill to db40 database ‘connection’).

So in general, the trend seems to be to favour constructor injection but there will sill be scenarios where a service locator pattern can prove useful, particular when mocking/testing may not be required.

Unit Test Isolation

If you take a look at the unit test for the controller now you can see how easy it is to mock up the controller without recourse to any dependency injection. In fact, the test is failing because i haven’t gotten round to implement a SaveChanges() for the in simply memory repository i built.

Before the unit test was admittedly an integration test, and it appears cleaner now, although it would be more work to maintain an in memory repository for a larger more complex application, but more advanced mocking tools may help with that.

How the mvc project runs

When you run the mvc project, it simply displays 2 customers on the screen. I’ve also added a little update on one of the customers as you refresh the page, just to show how to save things back to the db40 file.

This all took less than 2 hours and i was very pleased to get things up and running so quickly. It hopefully shows you some of the power and flexibility of dependency injection and the domain drive approach as well as introduction you to how use such an architecture with technologies like asp.net mvc, db4o and entity framework.

Thursday, June 25, 2009 10:51:27 PM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Sunday, June 21, 2009

glorious winter day

what a fantastic sunny day it was today.. Winter? bollocks to that!

DSC00088DSC00085DSC00084DSC00083

Sunday, June 21, 2009 6:26:59 PM (New Zealand Standard Time, UTC+12:00)  #    Disclaimer  |  Comments [0]  |  Trackback