Thursday, November 24, 2011

Wed 23rd Nov

So I’ve spent half the day adding a game date to the bloody scoresheet. Date handling in JavaScript / JSON and MVC is a right pain in the arse. Throw in jQueryUI date pickers and knockout, and it’s just a complete clusterfuck.

Ended up being a fairly productive day, though worked until early hours of the morning. Grid system is shaping up nicely!

Tuesday, November 22, 2011

Tue 22nd November

Getting there! Got basic game statistics up and running. Still a lot of work to do, definitely a lot of cleaning up to do, but it’s starting to look like an application!

Fri 18th Nov

I guess not a lot happened last Friday…

Thursday, November 17, 2011

Thu 17th Nov

Didn’t get much done today, was a fairly late, productive night last night. I have the wall of tasks set up, should work fairly well, all those sticky notes staring down at me, jostling with each other to be noticed. Well… At least I can move them around and tell them which ones need to be done before the next big release. Err… First big release. Uhh… First alpha release… Whatever, release.

Basic stats tomorrow, then very near to a release candidate anyways. Apart from all those little yellow sticky notes staring down at me.

Wednesday, November 16, 2011

Wed 16th Nov

A couple of responses on the stackoverflow question. One about the new version of the Azure SDK, released two days ago, apparently contains improved exception contracts. Downloading now, hopefully this is what is needed!

Got a little paranoid last night about backups not working. I know that the maximum file size for Windows Live Mesh is 50Mb, and some of the database backups are bigger than that. A new approach is needed. Got a workspace set up to get the entire source control repository to a backup folder that is synced with Live Mesh. Should work much better, but still got to sort out Windows Live Mesh running as a service properly.

Tue 15th November

Authentication today. This will support persistence of team list. As it is per user, it makes sense now to put this on the user object. This will probably change, particularly when we start to support multiple users for the same “account”.

Man. Table Storage exceptions suck balls. So bloody useful. Azure diagnostics look ridiculous to configure. I guess I’m going to have to at some point, may as well get them going.

So it looks like turning development storage logging on results in a stack more information. Why this doesn’t appear in the exception thrown, or at least have an option to return it, is beyond me. I’ll have to try Fiddler.

Posted on stackoverflow about exception messages. See what comes back.

Tuesday, November 15, 2011

Mon 14th November

Will get the selection panel completed and unit tested today. Looking good!

Pretty much done, except from styling and persisting the team list. Tomorrow!

Monday, November 14, 2011

Fri 11th November

Fairly late one last night. Focus is somewhat lacking today.

Managed to get a good start to player selection working.

Thursday, November 10, 2011

Thu 10th November

Everything was a bit screwy with the network this morning. Seems the domain controller got it’s knickers in a knot. Resetting the administrator password and rebooting it fixed everything. Might be time to get a physical server for it!

It is going to be one of those days. Now the TFS build controller is “unavailable”. Why do things just break without any change? Manually restarted the build controller and all seems well. Looks like the domain controller failing has quite a few flow on effects.

Had some fun getting QUnit tests running and passing on the build server. I intend to write a blog post about this. Turns out I had to install IE9 to get some of the UI tests passing. It’s a bit of a flag to make sure I test on different browser versions! At least the tests are running, passing and reporting correctly now.

Wednesday, November 9, 2011

Wed 9th November

Things are getting there. Working in the stats grids now. Looking good!

Working with some fun oddities in the DataContractJsonSerializer and other things. DateTime values are fun! Manually hacking them out of the generated JSON string for now. Will have to deal with them a bit better down the track.

Visual Studio is starting to display some oddities, mostly ones I’ve seen before, like certain keys not working (navigation, backspace), intellisense not working 100% of the time (Resharper?) and general immediate compilation funkiness.

Monday, November 7, 2011

Thu 3rd November

Another beautiful day in sunny Canberra. Nice.

Most of today will probably be spent setting up vegie garden stuff, but will be doing some research into Azure table storage and starting to get a DAL ready in a spike project. Also need to get Unity working with MVC again.

Thursday, November 3, 2011

Wed 2nd November

It’s been a week. A most enjoyable week spent in Noosa with my girl. The Sunshine Coast is awesome! The trip home was not quite as planned, thanks Qantas, but we made it.

Forgot to blog yesterday. The scoresheet is getting close to being feature complete. Can now add extra balls in the final over, navigation works well, except for one minor issue, but going to ignore that for now haha. I had high hopes for the knockout.mapping plugin, but there is some quite unexpected behaviour in there (i.e. specifying “copy” on an observable array so it maps it into the existing instance as a normal array makes all its children “copies” as well.) The persisted version is a very lightweight version of the view model anyways, so wrote a quick custom implementation. Very simple, very fast, easy to understand, no dependency on an external library, much better!

Just created my Azure account for my BizSpark MSDN subscription. It is just so cool that Microsoft are giving me all of this software for free. They’ll get their money out of me, of course, but it makes life so much easier for now!

So much to learn about Azure for now anyways. Got to try and remember as much as possible from the 2 day Azure course I did earlier in the year, plus Azure Service Bus, etc, etc!

Not sure how much of that will get done today. Going to go to the gym, got to leave at 5, want to set up a seedling propagation tank for a vege garden, set up a new fish tank to move that damn guarami out.

Wednesday, November 2, 2011

Wed 26th October

Morning, LiveWriter! How you doin’ today?

So, some UI tests with QUnit and jQuery this morning. Still haven’t solved the copy and paste issue with providing markup and templates to QUnit, but will just copy and paste for now. These tests should make the port from jquery-tmpl to knockout control flow bindings much easier.

During investigation into using AJAX to load templates, came up against a strange issue with making AJAX calls using the jQuery-1.5.1-vsdoc library – “TypeError: Cannot read property 'context' of undefined”. Works fine with the normal, non-vsdoc version. H-okay!

Tuesday, October 25, 2011

Tue 25th October

Late one last night so late start today. Things are starting to take shape.

It’s all working quite nicely. Now writing a crapload of unit tests. Got to start looking at mocking in JavaScript.

A few tests now written, including some against the navigation pubsub stuff. Works out alright! Haven’t tested most of the navigation module as the meat is in private functions and the output is manipulation of the DOM using jQuery. Two potential approaches – mock jQuery so we can ensure the right calls are made, or render the actual HTML in the test, allow navigation to manipulate and test the resulting changes to the DOM, more like an integration / functional test. Oh… A third option is to make the methods in question public.

I intend to investigate both. The latter is probably easier in some ways and I intend to do this anyway at some point. A problem with this is getting the jQuery templates (or knockout templates / control flow bindings – more on this in a sec) into the QUnit test fixture, without copy and pasting them. They can be loaded by AJAX fairly simply, but QUnit won’t be run from a web server. Trying to load the from a local file but running into cross-domain issues. There may be some hacks to allow this - http://stackoverflow.com/questions/4208530/xmlhttprequest-origin-null-is-not-allowed-access-control-access-allow-for-file).

Since jQuery templates are being discontinued, I’ve also been looking at knockout control flow bindings. This should allow me to do away with an external templating solution and also enables the template to be written as a single template, rather than a separate, small template wherever a foreach is used. Should be much more elegant!

Enough for now. ZZZzzzZZzzzzzzzZzzzzzz…zzz….z………z……

Mon 24th October

A bit of a late start today. Slept in a bit due to being fairly sore from riding yesterday, spent a bit of time giving the olds’ cats some company.

I was hoping to get the score sheet fairly well finished today, but grappling a bit with some design issues. I want to keep navigation across the sheet as decoupled as possible from the model itself, but the navigation obviously needs to be able to identify individual balls. I could

  • handle the visible selection and deselection of balls part of the model (have a property on each ball to indicate if selected and bind a css class to this) and raise events to do this from the navigation module,
  • use jQuery to do the visible selection and deselection. This means the navigation module needs some way of identifying the HTML element for each ball, such as through the ID of the element (this would mean the template for each ball needs the context of what over, batter, inning and team it belongs to).

Either way, handling a click event on each ball element needs some way of identifying the individual ball. Ho-kay! Rethink required.

Did a bit of research into templating engines, which led to another potential JavaScript framework. It appears jQuery templates are being discontinued, with the responsibility of a templating solution being handed to the jQueryUI team. A likely candidate to supersede jQuery templates is JsRender, according to http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html. Should be a fairly straightforward port to use them if they do become the “official” templating engine, supported by both jQuery and knockout.

This led to looking at JsViews as a potential JavaScript framework. I didn’t do much research into alternate frameworks, mainly because knockout seemed to be such a good fit for the project. While they could certainly do the job, judging by the ToDo sample application (http://borismoore.github.com/jsviews/demos/step-by-step/10_todos.html), knockout would appear to be a much more elegant solution, particularly with its dependentObservables and mapping plugin.

Friday, October 21, 2011

Fri 21st October

OK, so bending my head around the JavaScript “this” keyword. Have to use a closure every time we want to use “this” from an internal function.

Not such a productive day. Gym, stop off at olds, general stuffing around. Learned some valuable stuff about JavaScript, though, all is not lost. Nearly time to go to the pub anyways.

Thursday, October 20, 2011

Thu 20th October

So it looks like my previous employer got my pay right after all. My mistake!

Things are going well. Greatly enjoying learning JavaScript and progress on the actual project is also quite good. More unit tests! A pub sub mechanism for JavaScript will be next big cab off the rank, then finally some Azure stuff. Noice.

QUnit tests running on TFS build are no longer reporting their results correctly. Got to replace my implementation of NUnit on TFS Build with the Community TFS Build Extensions version, hopefully will fix it and also be a simpler implementation.

Got to sort out a decent backup mechanism, don’t think Live Mesh will cut it for much longer.

Anyways, off to feed ma and pa’s cats while they’re away and then for dinner with the missus.

Good times!

Wednesday, October 19, 2011

Wed 19th October

NQUnit looks sweet, should be able to get CI going without too much hassle. Resharper has a few problems refreshing the list of tests, got to sort that out (not using Resharper QUnit integration).

My previous employer didn’t pay me my entire salary for last pay. I think they ignored annual leave. Will have to chase this up. Damn corporations!

Got NUnit running on the build server (http://danderson00.blogspot.com/2011/10/running-nunit-tests-under-tfs-build.html). Also got QUnit tests working, soon to be blogged. Some notes:

Now trying to get my Windows Phone 7 tasks app building on the build server. Some missing SDKs, potential NuGet issues. A pre-build step in each project with NuGet references is a potential solution, just to call NuGet, pointing it at the packages.config file (http://www.pandincus.com/blog/combining-nuget-with-team-foundation-build).

Some stuffing around to get the Windows Phone SDK to install on Windows Server 2008 R2 - http://blogs.msdn.com/b/astebner/archive/2010/05/02/10005980.aspx.

Thinking about some interesting consequences of rendering a view from a model using knockout. Pretty tightly couples your view to your model. Definitely affecting how batter totals and over totals will be set up. Humm…

Tue 18th October

Internet is down this morning. iiNet are actually acknowledging this in a phone message on their support line, rather than treating me like a retard. Going to the gym while they sort their shit out.

Back from the gym. Internet is still down. Had some ideas on the layout, setting it out on paper is probably a good approach. Figuring out where to put float, clear and position CSS attributes is difficult! I really need to do some HTML/CSS tutorials and learn this stuff properly.

Got the layout fairly well sorted. Float: left and clear: left are well used. Not 100% sure if this is the best approach, but it works reasonably well.

Investigating extending JavaScript arrays for aggregates such as sum (obvious use is in totals). Going to create a new project containing JavaScript extensions for general purposes such as this. Now is the time to start learning JavaScript unit testing!

Looking at QUnit. Looks fairly mature. Definitely no out of the box CI integration. Some thoughts on this:
• NQUnit!
• Create an automated UI test to load the test page into a browser and fail on some failure indicator
• http://www.henrycordes.nl/post/2011/04/25/Javascript-Unittest-in-build.aspx
• http://stephenwalther.com/blog/archive/2010/12/20/integrating-javascript-unit-tests-with-visual-studio.aspx
• http://twoguysarguing.wordpress.com/2010/11/02/make-javascript-tests-part-of-your-build-qunit-rhino/
• Custom framework – use some sort of tag (“///Test”) before function declaration to denote test and call method using JScript, V8, Rhino, etc

Mon 17th October

Continued looking at knockoutjs. Lots to learn about JavaScript! Having trouble defining classes with dependent observables referencing observables from the same class. Looks exactly like the tutorial, but doesn’t work. Bah! (pass in the observable target, doofus)

Live Mesh doesn’t seem to play the game when it’s running as a service.

HTML and CSS layout is SO unintuitive.

First week (Tue 11th – Fri 14th October, plus weekend)

First week of leave. Mostly spent finishing off infrastructure. Wins included:
• Infrastructure
o Configured SMTP server for relaying through gmail account
o Configured RAID failure alerts through above SMTP server
o Configured TFS backups, including alerts through above SMTP server
o Configured Live Mesh / SkyDrive backups
o Configured web deploy agent on APPS
o Installed LiveMesh as a service
o Configured network printer
• Development
o Completed quick and dirty tasks app, deployed to phone and server
• Learning
o Started looking at knockoutjs
o Started looking at TFS client object model

Welcome

So I decided to keep a journal of the progress of Your Cricket Stats. There's nothing interesting here, why are you reading it? Go do something constructive! More technical posts are on my main blog, http://danderson00.blogspot.com/.