23 Aug 2011

Cricket Run Rate Tools for Windows Phone 7

icon-200In my ever growing list of Windows Phone 7 apps I introduce you to the latest one, a cricket run rate toolset!

This is another calculator type that allows you to work out cricket run rates, projected scores at the current run rate and also projected scores if the run rate changes to 4, 5 or 6 runs per over!

The second screen is the compete screen which allows you to put in the score of the first batting side and then see if the chasing team is at, above or below the run rate needed to catch them and what run rate is needed!

It’s a very nice and simple tool to have in your toolbox for cricket fans!

screenshot-1.1_8-12-2011_14.26.54.596screenshot-1.1_8-12-2011_14.27.27.990screenshot-1.1_8-12-2011_14.27.31.23screenshot-1.1_8-12-2011_14.27.34.977screenshot-1.1_8-12-2011_14.27.42.477

wp7_278x92_blue

22 Aug 2011

Community night in September 2011 - IMPORTANT INFO

Community Night, the best way to meet, mingle and learn (if you don’t know about it – read here) happens on the second Tuesday of the month… except in September due to an event at the venue on the Tuesday which can’t be moved.

So for September it will take place the Monday before, in other words Monday the 12th September. Please help get the word out to the various user groups and communities!

See you there!

15 Aug 2011

Codename: Roslyn - the next generation of the C# & VB.NET compilers

277341190_3f098a08a4_oThis past weekend I had the opportunity to present at a fantastic event, Dev4Devs which is a free event where anyone can present on anything (software developer related) for 20min. It is a lot of fun, because of the variety of talks, the variety of people (some new speakers and some experiences speakers) and the HORRID 20min timeline.

This time I presented on a topic I am very interested in, Codename: Roslyn which is the next version of the C# & VB.NET compilers which are fully managed code (C# one written in C# and the VB.NET one written in VB.NET).

Since there is no public bits available I made use of the compiler from Project Mono – which has had similar things (the REPL environment and hosted compiler) for years.

As with all presentations here (or at the end of the post) are my slides, demo notes, demo files and other info!

During my research and prep, I found a bunch of interesting posts and information about it so here is the info I found. I’ve bolded the ones I think are especially interesting.

Image from Ezu

11 Aug 2011

South African ID Number Tools for Windows Phone 7

16 November 2011: This application has had a major update, see the details in this post

app tileFollowing the same idea as my AA Rate WP7 app, another very popular spreadsheet I built is one that verifies South African ID Numbers so I also decided to build a Windows Phone 7 app to do that.

This does a little more than the spreadsheet could, so it has lots of info about what in an ID number does not verify which is very useful.

In addition it includes a awesome new feature a South African ID Number GENERATOR! With this you put in a few required details, hit a button and BOOM! An ID number that will validate.

Important to remember that validation of a number doesn’t mean it actually exists, just the math works. So please don’t use this for anything except interest or development!

screenshot-1.1_8-11-2011_10.16.32.910screenshot-1.1_8-11-2011_10.16.35.801screenshot-1.1_8-11-2011_10.16.38.175screenshot-1.1_8-11-2011_10.16.40.135

(btw screenshots are from 1.1, which is soon to be out – so if you download and it looks different then give it a day or two)

wp7_278x92_blue

11 Aug 2011

AA Rates Calculator For Windows Phone 7

16 November 2011: This application has had a major update, see the details in this post

marketplace-tileOne of the most popular posts on my website is the AA Rate calculation spreadsheet I built in 2008. The goal of the spreadsheet is you provide the details about your vehicle and it tells you what the AA Rate for your vehicle is. So I decided to rebuild this for Windows Phone 7!

This was a lot of fun because it has some complex issues (matrixes of values) which had to be solved, so that tickled my developer brain.

This also allowed me the opportunity to update the calculations since they change every so often which is important for you!

An interesting thing that I learnt with this release is that the official/documented calculations is NOT equal to what the AA online calculator does. So there is an option now called “quirks mode” which runs it equal to the online calculator where if you turn it off, it runs it using the documented mode!

screenshot1screenshot2screenshot3

wp7_278x92_blue

03 Aug 2011

Nugget: Little compiler optimisation

Found this little C# compiler optimisation which is really cool. Here is start code

int y = 0;
int x = 10;

if (x * 0 == 0)
{
    y = 123;
}

Console.WriteLine(y);

If you know a bit of math, anything multiplied by 0 always equals 0 (line 4). So the compiler optimises that out and then because x is never used that is also optimised out and you end up with

int y = 0;

if (0 == 0)
{
    y = 123;
}

Console.WriteLine(y);
So very smart Smile
19 Jul 2011

Presentation Dump - Mid 2011: Windows 7 API CodePack, Development for Nokia, Mercurial, VS Tools, AOP, Multitasking, Cloud

The fact we half way through the year snuck up on me this morning, so it is time again to share some of the presentations I have done in the last 6 months! For those new to the presentation dump, every 6 months or so I share all the slides I can (some I can’t because they contain NDA info, like the one about Microsoft’s Project Double Rainbow) so that you can take these slides and work with them yourself!

So what is included in this dump:

  • Windows 7 API Code Pack: This was a very fun session to do since it was showing off a bunch of cool Windows 7 features.
  • Development for Nokia: This is maybe one of the best looking slides, but one of the worst timed sessions since shortly after it Nokia announced their move to WP7 so not much could be taken away from this Sad smile
  • Mercurial: This is a difficult session, because the demo’s are so boring (how do you make source control sexy?) – however a ridiculous amount of animation about process made this entertaining to create and present.
  • Visual Studio Productivity Tools: This one started off from the idea of answering the question CodeRush vs. Resharper – which is a bit of religious debate more than a this one wins. It includes a bunch of other interesting content about other extensions too. For non-South African’s “Braai Rules” is the same as saying “BBQ Rules” or “Pub/Bar Rules”
  • Aspect Orientated Programming: This is a big one for me as I see general development using more of this and the frameworks, like .NET, moving to it more and more in future. Good to get an early look into it.
  • Multitasking in applications: This session looks at one of the themes of .NET 4 – TASKS. Why should you care, because multi threading is complex, but multi tasking gives the same benefits with less complexity.
  • WebMatrix: Microsoft’s new tool for hobbyist web developers. What is included in that tool? This presentation tells you.
  • Welcome to the cloud: I had a great opportunity to present at Tswane University of Technology with Rudi Grobler on the cloud & mobile. This was a very fun session and allowed me to also talk about why BBD is such an awesome place to work.

Slides available in the post! Click below for more

Windows 7 API Code Pack

Development for Nokia

Mercurial

Visual Studio Productivity Tools

Aspect Orientated Programming

Multitasking in applications

WebMatrix

Welcome to the cloud

11 Jul 2011

Security is hard for users, so let us clean up with NEAT & SPRUCE

Microsoft used to be a horrid company with regards to their security, then they sat down and made security a quality gate – we do not ship if security is wrong. How do they know what is wrong? A 24 page guideline with 68 bullet points?! Perfect holiday reading Smile with tongue out

The security development lifecycle team has recently tried to help us developers improve our applications so we not the next company with a bad security issues with two acronyms which will improve security notices to our users: NEAT & SPRUCE

What is NEAT?

  • N: Necessary – Only show messages that you need. If you can take a safe action automatically or defer the message, do that!
  • E: Explained – If you do interrupt the user, explain in everything to the user. EVERYTHING?! Yes, and the SPRUCE acronym will help explain what everything is.
  • A: Actionable – A message should only be presented to the user if there is steps the user can take to make the right decision.
  • T: Tested – A security message needs to be tested. TDD, Usability Testing, Visual Inspection, every test.

So, we need to show the message now – what do we put in there? SPRUCE:

  • S: Source – Why are we showing this message? Did a website do something or a file or a user action? Tell the user.
  • P: Process – Give the user the steps they need to go through to make sure they make the right decision.
  • R: Risk – Explain what the consequences of getting the decision wrong.
  • U: Unique – If your software knows everything, do the right thing automatically. So if you are showing the message, it means the user has unique information that is needed to make the decision. Explain what information is needed (slightly similar to P).
  • C: Choices – Show the user all the options and recommend the safer one.
  • E: Evidence – Provide any additional information that the user may need to make the decision.

Now that the training is done, let’s look at real implementations:

A web page contains secure & nonsecure content

Here is what the dialog looked like in the bad old days of IE6:

11[2]

In IE 9 where this logic has been applied:

ie9

Let’s look at the differences:

  • N (Necessary) has been applied – previously this was a blocking model UI, which the user was forced to deal with to continue working. Today it shows discreetly with at the bottom and only if the user needs to work with this they have to, otherwise ignoring it.
  • E (Explained) has had been done with the What’s the risk? – which shows the dialog below. It is not perfect as it hasn't followed SPRUCE fully but it is a good improvement.
  • A (Actionable) has been applied – previously you had both a yes & no, now we have one action that can be done. Close or ignore and nothing happens.
  • T (Tested) there is some weird language issues with the old one especially if English isn’t your primary language because of the yes/no not being perfectly clear. The new dialog has a single very clear labelled button!

whats the risk

Takeaways

Now that we have looked at how it can help you and how to do it, attached is a nice simple 3 page document with more details and reminders about this. GO IMPROVE YOUR APPLICATIONS!

 

AttachmentSize
File NEATandSPRUCEatMicrosoft-final.docx68.68 KB

Pages