Wednesday, 24 April 2013

Weather forecasts on our home phone using BoM data

C610 IP handset showing weather forecast

A nice feature of the Gigaset C610 IP phone that we use at home is that you can choose various information services to display on the handset, including during 'screen saver' mode. The default services include the normal news, sport and weather, but as I've noted before, the weather data these services use is invariably quite different to that published by the Australian Bureau of Meteorology (and invariably quite different to what I see out the window).

As it turns out these services are customisable. You can add your own RSS feeds in via a web interface. The BoM doesn't provide such RSS feeds, and the only existing ones I could find were too detailed to be useful on a very small screen.

So I decided to find out what it would take to grab the forecast data from the BoM and massage it into an RSS feed suitable for displaying on a very compact display. I also thought it was a good chance to try out some shiny new things along the way. In particular ASP.NET Web API to produce the RSS feed and Windows Azure Websites to host the service.

The results of my efforts can be viewed at - http://gardiner-weather.azurewebsites.net. It's a very basic landing page for the service which lists what areas of Australia are currently supported (eg. only those states for which the Bureau provides XML data). Did I mention it's very basic? Smile

The feed I'm using for my phone is this one - http://gardiner-weather.azurewebsites.net/api/forecast/SA/Adelaide

Now all we need to do is to glance at the handset and we'll immediately know the latest weather forecast for today and tomorrow!

Configuring your Gigaset C610

  1. Log in to your Gigaset's web page:
    image
  2. Go to the Settings | Info Services section
    image
  3. Click on the www.gigaset.net/myaccount link and go to the Screensaver tab
    image
  4. Select the 'News' row and click on the 'Edit' link. Select 'Favourites' from the dropdown and give your weather feed a name and paste in the URL to the RSS feed.
    image
  5. Click on 'Save' and your settings should soon take effect on your handset.

Monday, 22 April 2013

SSDT Talk Notes

Here's a summary of the talk I did at the Adelaide SQL Server User Group last week. Most of the talk was a demo (only a couple of PowerPoint slides) so hopefully this is a useful reference for those who attended.

Intro to SSDT

  • Evolution of DataDude
  • The new way of shipping BIDS
  • Ships with SQL Server 2012 and Visual Studio 2012
  • Replaces 'Database Projects' from previous versions
  • Updates every 4-6 months (in time for SQL Azure updates)
    • Ships with VS 2012 and with SQL 2012
    • Free tool - use VS shell or integrate with existing
    • Will update frequently to keep up with SQL Azure features

Connected

  • SQL Server Object Explorer
    • Connect to local or Azure
  • Queries
    • Execution Plans
    • Client stats

Disconnected

  • Database projects
  • Model-based
  • Edition-aware targeting (project properties)
    • Can switch to azure to check if database is compatible with azure
  • Table designer/code view
    • Synchronised
    • Demo deleting a column
      • Can see errors (even before building) of related objects (eg. Views) that reference column
  • Build creates a 'dacpac' (Data-tier Application Package)
    • 'Upgrade data-tier application' from SMSS
  • Declarative model
  • 'Create New Project' via SQL Server Object Explorer
  • F5 builds and deploys database to localdb
  • Snapshots
  • Import .sql files
  • Code analysis

Schema Compare

  • Connected, Project, dacpac or snapshot
  • Update changes (defaults to not losing data)

Refactoring

  • Expand wildcards to column names - SELECT *
  • Semantic refactoring through model - not just find/replace
  • Go to Reference, Find all references

Publish database

  • Directly
  • Via SQL script
  • DACPAC
    • C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\sqlpackage.exe

"c:\Program Files (x86)\Microsoft SQL Server\110\dac\bin\SqlPackage.exe" /action:driftreport /tsn:.\sql2012

/outputpath:c:\tmp\driftreport.xml /tdn:SsdtSample

Unit testing

  • Right-click on stored proc to create unit tests

3rd Party Integration and extensions

  • Red Gate SQL Compare (beta)
  • Version control
  • Laan SQL Formatter (soon)

Further reading

Saturday, 20 April 2013

Another Birthday

Two jars of pickles and a Storm Trooper mugI am blessed with a wonderful family and friends. It was my birthday this week, and Narelle cooked a very yummy birthday tea. Pasty slice (see below) followed by baked cheesecake if you were wondering.

My sister surprised me with a present that included jars of Spring Gully pickled onions and sweet spiced gherkin rounds. This is special because not only do I like gherkins (like pickles for American readers) and pickled onions, but the Spring Gully company has been in the news this week as they were placed under administration. I hope they can turn the business around and these jars don't become collectors items.

My friend Andrew also has a creative streak. The Star Wars storm trooper mug was part of his present. To top the night off we had two unexpected guests drop in just in time for the birthday cake, one of whom is on a flying visit from overseas.

On a sad note, I came home the next day from work to discover that one packet of Iced Vo Vo biscuits (also a present) had already been eaten by some little "mice". That's the trouble with having your birthday in the middle of school holidays I guess.

Nanna Jean's Pasty Slice

  • Pastry
  • 1lb mince
  • 1lb potatoes
  • 1 big carrot
  • 2 onions
  • Parsley
  • Grate the vegies

Nanna Jean passed away in 2009, but a few years earlier I'd asked her for the recipe for her pasty slice that I enjoyed so much. The above notes are all that I wrote down. Not very complicated. The pastry ends up like a pie crust, with the filling in the middle. Yum.

Wednesday, 10 April 2013

Speaking on SSDT at Adelaide SQL User Group

TSQL2sDay150x150Today just happens to be T-SQL Tuesday, and this month's question is "how did you come to love presenting?"

The first time I presented in front of a group? hmm that's a tough question. Actually now that I think about it, it might have been the first time I did the kids' story as a young teenager teaching Sunday School. Keeping the attention of 5 year olds is a tough gig, but I must have done ok as that's something I still enjoy doing to this day. Sunday school, youth groups, camps, church conferences – they all gave me opportunities to try out "being up the front".

Moving more to the IT-side of things, getting opportunities to present at local user groups and events has definitely been a highlight. The last couple of years I've also been able to work in and present at the hands-on-labs at Microsoft's TechEd conferences, which is great fun.

One great thing about presenting is that it can be a two-way street. Sometimes you end up learning just as much from those you're presenting to as you hope they did from you.

Speaking of presenting, it's nice to be able to get back to the Adelaide SQL User Group next week and present on SQL Server Data Tools. It's something I've been using a bit lately and thought it would be of interest to others too. I've been involved with this group since it first started years ago, but for the last 12 months or so I've been unable to make the Wednesday timeslot in person due to some family commitments, so I'll be looking forward to catching up with some old friends.

If you're free next Wednesday lunchtime, feel free to register and come along. It would be great to see you!

Monday, 1 April 2013

Nokia Lumia 920

Earlier this year, Microsoft ran a new competition offering the first 10 developers to publish 5 new Windows Phone apps a new Nokia Lumia 920 phone (and Lumia 820 and 620s for 4 or 3 apps respectively). Getting 5 new apps developed and published in a relatively short time wasn't easy, but I figured the only way to have a chance at picking up a new phone was to have a go.

I was pleasantly surprised to find that I'd just managed to scrape through picking up a shiny new Lumia 920 handset, after initially thinking I'd missed the top 10.

The new phone arrived last Thursday – just in time for me to spend a bit of time over the Easter long weekend to get to know it a bit better (and for the kids to test out it's game-playing functionality!)

DSC_6976The phone came in a 'Developer' box. I think this is the same kind that the BUILD conference attendees would have received.


Text inside boxThere's a nice bit of developer-humour inside the box too.


DSC_6981 Just in case there's any doubt, the handset has 'Developer device' and 'Not for Sale' printed under the glass just below the buttons. This means it's also not tied to a particular network provider, which is handy.

Nokia Lumia 800 and Lumia 920Here's a side-by-side of my Lumia 800 next to the Lumia 920. You can see how much larger the 920 is.

Initial thoughts

The screen is nice and large with bright vibrant colours. Reminds me of my old Omnia 7's AMOLED display a bit, though according to the specs is not only a larger screen, it also has a higher DPI.

The case finish is quite slick. In fact maybe a little too so. The 800 came with a rubber/plastic shell that not only helped protect the phone, but also made it a bit 'grippier'. I think I might investigate getting something similar for the 920.

The 920 is a true quad-band phone, supporting 850, 900, 1900, 2100 MHz 3G frequencies. My unbranded Lumia 800 doesn't support 850, though Narelle's 800 (being Vodafone-branded) does. As a bonus, the 920 also supports LTE which will be handy when Vodafone rolls that out soon.

Ben had mentioned he's experienced some reliability issues with his 920, and unfortunately I'm seeing similar problems already. I've seen my 920 spontaneously restart while I was using it once, and seen evidence of it restarting a couple of other times already. That's not so encouraging and gives me cause to question whether to completely retire the 800 and use the 920.

Google is being a bit annoying with Microsoft at the moment – turning off Exchange ActiveSync access to GMail & Calendars in a few months. Interesting to see if the trick of browsing to https://m.google.com/sync/settings/iconfig/welcome?source=mobileproducts&hl=en (with a UserAgent set to iPhone) still works. It is making me seriously consider moving my email over to Outlook.com instead.

Battery life seems ok, but I have noticed that a serious bout of gaming by the kids takes it toll. One comment from our resident gamer was disappointment that his saved games weren't

I do like the Kid's Corner feature – you can set up some games and apps that kids can play (and nothing else).

The Wallet is also a good idea. I've enabled a separate PIN to ensure no one accidentally buys new games or apps on my phone.