Archive | Conferences RSS for this section

#TechDaysOnline

I was invited to talk at Tech Days Online at the Microsoft Reactor in London today on the topic of Microservices.

Rather than a presentation format the talk was as part of a conversation moderated by Christina Warren, Senior Cloud Dev Advocate for Microsoft.

Being live on Channel 9 — Microsofts online TV channel — was somewhat nerve racking but I think it went quite well and I enjoyed the format.

Thank you to everyone involved in the production, I had a lot of fun!

Danny

Advertisements

Open Source JavaScript talk at JavaScript Cambridge

Presenting at JavaScript Cambridge

I presented a talk about my experiences developing Open Source JavaScript applications for CS Blogs today at the JavaScript Cambridge user group.

I covered

  • how your intended developer audience should affect your technical decisions
  • how a good application doesn’t always become a good open source project
  • how to structure an application or system to make it easy to contribute to
  • how the CS Blogs workflow fits together

After having received some feedback from Charlotte, who watched the whole thing, I intend to make some improvements to the structure of the presentation and submit it to some other conferences.

I’m not sure how much sense the slides will make without me talking around them, but they’re available here.

Danny

LibreOffice Bug #67159 or The Story of my first foray into Open Source

LibreOffice Website

A few weeks ago, when I was at Campus Party: Europe, I attended a fascinating lecture by Michael Meeks about LibreOffice. Whilst his talk was mainly about getting people interested in using LibreOffice, he also suggested that people get involved in the development of open source projects. As I was interested in this particular aspect of his talk the most I put my hand up, and asked the question

How easy is it to get involved in Open Source, particularly LibreOffice?

Michael, who works at Collabora – a company which supports LibreOffice, gave a great response and asked me to speak with him after the talk. I did so, and it was at this point he mentioned the “easy hacks” list that LibreOffice developers maintain, the purpose of which is to take the fear out of getting involved in an open source project. Items on the easy hacks list should only take a few hours to complete, be simple in their nature and allow to learn about the coding standards and systems used by the project.

For those who aren’t quite as interested in productivity software as myself, LibreOffice is a Desktop Office suite which has similar functionality to that of the famous Microsoft Office package, it consists of the following programs:

  • Writer (similar to Microsoft Word)
  • Calc (similar to Microsoft Excel)
  • Impress (similar to Microsoft PowerPoint)
  • Base (similar to Microsoft Access)
  • Math
  • Draw
Michael Meeks talking about the recent addition of an iOS remote for LibreOffice Impress at Campus Party: Europe

Michael Meeks talking about the recent addition of an iOS remote for LibreOffice Impress at Campus Party: Europe

Fast forward a few weeks to the 12th of September and I stumble across an item on the easy hacks list that interests me, this item is called “Bug #67158 – FORMATTING: Add shortcut Ctrl+K (or cmd + K on OS X) for inserting hyperlinks”.  It interested me because it seemed like it would be relatively simple to add, it’s just an event handler after all, and it was marked as “Medium importance, enhancement”, this meant it was both considered more ‘important’ than some of the other easy hacks, and it was more likely to impact on users as it was an enhancement people could actively see as opposed to code formatting changes (which, of course, are equally important, just less visible to users). Another interesting aspect of this bug was that it affected Writer, Calc and Impress, and my changes would be useful to everyone who used these programs, whether they used Windows, GNU/Linux or Mac OSX as the event would work on all 3 major operating systems.

I clicked through, from the list, to the Bugzilla entry for the task and assigned the task to myself and left a comment showing my interest in taking it on.

The next thing I had to do was boot into my Fedora GNU/Linux operating system and set to work on making the development environment in which I would make my changes, This is an area in which GNU/Linux, particularly its package system, really comes into its own. To install every single resource I needed to work on the project, from libraries to images, I just had to to type

          $ yum-builddep libreoffice

Following this I just had to download the latest version of LibreOffice from their Git repository and run a shell script which dealt with everything else. It was really easy to do following this guide.

Now all I had to do was add in the event handler, and ‘fix the bug’ so to speak. Simple right? Well, sort of. LibreOffice has 7,075,071 lines of code (according to ohloh.net) so finding exactly where my fixes should go, and what exactly I should be writing to invoke the Hyperlink Editing and Insertion Dialog was a daunting task. Fortunately because my bug was assigned to the easy hack list some regular contributors to the project had left some pointers on what to do. Petr Mladek from Suse pointed me in the direction of the file which I needed to edit in order to add an event handler.

I played around with the file, finding out what the various variables did and meant and decided to swap around what Ctrl + C and the delete keydown events did, in order to see how easy it was to edit a pre-existing event handler — It was at this point I ran into my first issue.

When I attempted to build my changes it worked, however, when I ran LibreOffice Ctrl+C still copied things, and delete still deleted things. I was flummoxed. Thankfully when I reached out to Petr for help he was happy to provide it, it turned out I was providing the compiler with flags that meant it would ignore the changes I had made, with this knowledge I managed to get delete to copy things and ctrl + c to delete things, useless and in fact harmful changes, but a great test.

Having reverted the aforementioned events to do what was expected, I added in an event for Ctrl+K, using the same code style and formatting as the other event methods. To check the event was firing I made Ctrl+K Select all text in a document. Brilliantly, it worked first time.

I then set out the find what I would need to call in order to invoke the hyperlink editing dialog. This was made a lot easier by a really awesome utility LibreOffice has implemented called OpenGROK. OpenGROK allows you to search through all of LibreOffice’s code, instantly, using a web interface. I quickly found the method I needed to invoke to call the HyperLink Editing Dialog and added it to my code and compiled it. It worked! Awesome. My first patch to LibreOffice was ready to be submitted for review.

A review, in the context of open source, is when one of the project maintainers — kind of a manager of the project — looks over your code, ensures it does what it says it does and that it doesn’t break anything else, and then implements it into the main branch of code. At this point your code is part of the project and will then be made part of the next update which will be made available to the 150 million people who use LibreOffice! (thats over 100,000 downloads every day).

The LibreOffice Hyperlink Dialog in the Writer Application. Think of me when you invoke this using Ctrl + K!

The LibreOffice Hyperlink Dialog in the Writer Application. Think of me when you invoke this using Ctrl + K!

Today my code was accepted into the main branch. It’s really exciting to think that soon over 150 million people, and possibly many more in the future, will be using some of my code. I can’t wait to contribute some more, not only to this project but to others too!

You’ll be able to download my fix as part of LibreOffice 4.2, the release dates for which you can see here.

Danny

Campus Party : Europe in London

Last week I was fortunate enough to be with some of my fellow Microsoft Student Partners, some Windows Ambassadors, some Microsoft Interns and some Microsoft Employees at Campus Party Europe, an event which was described by the BBC as ‘Glastonbury for geeks’.

I would say this was fairly accurate, except there was less mud! Like Glastonbury there were several stages, a whole host of interesting people to meet, and tents!

Working on the Microsoft Stand

Tuesday through to Friday I worked for 6 hours a day on the Microsoft Stand. It was really good fun! Our job was to talk to people about Windows 8.1, Windows Phone 8, Microsoft Surface and the Xbox One and endeavour to answer any questions they had about either the software or hardware. As well as that we tried to get as many people as possible to take our surveys, in return each participant got a surprisingly stylish pair of Windows 8 Branded Sunglasses and a glow stick!

I was also fortunate enough to have Academic Audience Lead Phil Cross, point a few developers who had questions about Visual Studio and developing for Windows platforms my way.

The TeamworkPM App for Windows 8 I developed on the 2 big displays and the Surface Pro I wrote it on

The TeamworkPM App for Windows 8 I developed on the 2 big displays and the Surface Pro I wrote it on

Throughout Wednesday and Thursday I spent much of my shifts writing a Windows 8 app for the project management website TeamworkPM. It was especially interesting to do this because my display was being projected on two 42inch monitors above my head, this meant everyone could see what I was doing and I attracted quite a few developers to come and talk about developing for the platform.

In the evenings when the stand got a bit quiet we would try to entice people to come and see our wares in a variety of ways, one of which was through the medium of dance :P. My highlight was the Macarana, or the Microsoft Macarena as I called it.  Below you can see us all dancing and waving our glowsticks to the ever-entertaining Harlem Shake.

Talks

The main thing that first attracted me to the offer of working for Microsoft at Campus Party Europe was the fact that we could spend our down time watching some of the many speakers that came to talk about their respective fields.

I was fortunate enough to catch 2 or 3 lectures a day, from people as well respected and diverse as Jon “Maddog” Hall — chairman of Linux International — and Ian Livingstone — President of Eidos and founder of Games Workshop.

The O2 arena hosted 8 stages, of all of which had talks from 10am – 10pm each night, so there was certainly a lot to take in — too much to write about here.

My favourite talks were actually that about free and open source software (sorry, Microsoft), and the relatively new phenomenon of open data.

Swag

At the end of the week my fellow MSP’s and I were super happy with being able to have witnessed one of the coolest, and largest tech conferences in the world, but even on top of that Microsoft were generous enough to allow us to keep the devices we had been using throughout the week to showcase both Windows 8.1 and Windows Phone 8 to customers, this meant a Nokia Lumia 920 and a Microsoft Surface RT each!

I was over the moon with the Surface RT because I had been looking to get an RT device for a while to test the performance of a few of my apps on the lower powered ARM CPU’s — but I was especially happy with the Nokia Lumia 920. My phone contract ends in a few days, and because now I have an awesome new phone I’m gonna go on a SIM only plan and save myself some money 🙂

Thanks

I would like to say a massive thank-you to everyone involved at the O2, the people behind Campus Party, and of course Microsoft for making everything work like clock work and giving me a fantastic opportunity to learn from some of the best minds in our industry, a lot of laughs, some great knowledge and some cool electronics! I hope to see you all again soon!

Danny.

Featured on the Microsoft UK Students Blog and going to Campus Party

Microsoft UK Students Blog

Today was quite an exciting day for me and my relationship with Microsoft, the company behind the Windows Operating System and The well known MS Office Software. This afternoon I was involved in a Lync meeting with a few of the people in the Academic Audience team learning about what I would be doing when I go to work for Microsoft for a week at the O2 Arena at an event called Campus Party.

Campus party is described, on their website, as

an annual week long, 24-hours-a-day technology festival where thousands of “Campuseros” (hackers, developers, gamers and technophiles), equipped with laptops, camp on-site and immerse themselves in a truly unique environment.

Recognized as the biggest electronic entertainment event in the world, Campus Party unites the brightest young minds in technology and science under the idea that “the Internet is not a network of computers, it’s a network of people.”

The festival features over 500 hours of talks, debates, workshops, competitions and hackathons related to science, innovation, digital entertainment and creativity. Additionally, hundreds of hours of ad-hoc events are planned by participants and continue throughout the night.

Me and a few other Microsoft Student Partners, as well as some others from the University of Hull will be promoting development on the Windows Phone and Windows 8 platforms, we even get our own Microsoft Shirts, which are bound to be fashionable ;). I look forward to it, its going to be a lot of fun and a great way to meet a lot of interesting people.

Later in the afternoon Phil Cross asked me if he could feature my latest blog post about QuickSync on the Microsoft UK Students Blog feed, I was of course happy to let him! He prefaced it with this nice message:

Danny Brown from Hull is one of our MSPs and has worked with us to help promote Tech and gives invaluable “constructive” feedback  on stuff we do. He’s written some apps and also worked with us on a project to build an incentives website and back end working quickly! I’d like to share that site but it’s been taken down as the incentive isn’t running any more. Anyway, he has started talking about his new venture and I thought it might inspire other students and startups to see what’s possible with skill, commitment and a certain amount of dedication. Oh and I imagine there were a few pints of Guinness involved as well!

Here it is and connect with him via his blog or LinkedIn.

which I thought was nice, he also took the time to tweet about it saying:

Always nice to be referred to as inspiring!

A big thank you to the Microsoft Team, I look forward to seeing you at Campus Party in early September!

Danny

Microsoft Student Partner North European Summit 2012

Unfortunately this is the only picture I have of all the British MSP Team together…

About a month ago I was on the weekly MSP Lync Online Meeting when Academic Audience Manager Phil Cross mentioned that there was an opportunity for some British MSPs to go to Dublin for 3 days for a North European MSP Summit. At the event MSPs from many North European countries would come together, under one roof, and discuss how to best utilize the MSP program, make some apps together and generally learn more about being an MSP and Microsoft as a company in general. I think it was fair to say I was more than eager to go.

After booking my tickets for a flight and 6 separate train journeys to and from the airport I eagerly awaited the 21st of November!

Wednesday

It was an early start for a student — 6am — to get to the train station for my 7:30 train to Manchester Piccadilly. I got to Manchester around 10 and got another shorter service from Piccadilly to the International Airport. By 11 I was in the departure lounge, after having a bottle of coke and my toothpaste taken from me by security and eagerly awaiting, but at the same time dreading my first plane flight without my family.

Before we boarded the plane a delegation from the Irish Parliament got off it!

Before we boarded the plane a delegation from the Irish Parliament got off it! Hence all the police

I really enjoy flying, I think it lends a certain perspective to life. It makes you think about how small everything is in relation to the planet, combine that with my work on my Solar System Simulation for 2D graphics — and you can think about how small the planet is compared to the universe. Here are some pictures of the “patchwork quilt” that makes up the land between Manchester and the Irish Sea and some interesting things in the sea itself, including a massive ferry that looks absolutely tiny.

"Patchwork Quilt" England

“Patchwork Quilt” England

Spot the ferry

Spot the ferry

When we got to Dublin Airport I bumped into a fellow MSP, James Thorne, and together we caught the Air Coach to Leopards Town, where both our hotel and the Microsoft Campus were situated. Whilst James and I wandered around the Technology Park looking for the Microsoft Campus I jokingly quipped “Just look for the most boring building, that’ll be the Microsoft one” — so I was surprised when I found Building one, pictured below, which I think is quite a nice looking place. However, we were meeting our fellow MSPs in building 2.

Microsoft Ireland Building 1

Microsoft Ireland Building 1

Our Welcome to Ireland

Our Welcome to Ireland – Cead Mile Failte – Gaelic for “A Hundred Thousand Welcomes”

Because our flights were slightly later in the day than other peoples, James and I missed the beginning of the welcome talk, but did turn up in time to introduce ourselves using a slideshow we had previously prepared. You can see my slide below:

My MSP Profile Slide for the North European Summit - Windows 8 Style!

My MSP Profile Slide for the North European Summit – Windows 8 Style!

We were supposed to show off our aspirations, some previous projects and some contact methods. I think this slide does that well!

After every MSP had introduced themselves — and there were well over 100 of us — we had a short presentation from the Microsoft European Marketing Manager about Windows 8 and Microsoft’s strategy surrounding it. After this we went for a meal back at building 1, which is where the Microsoft Employees normally eat. It was really nice, I really could get used to working and living around a Microsoft Campus!

The OSO Restaurant In Microsoft Ireland Building 1

The OSO Restaurant In Microsoft Ireland Building 1

After dinner we had country presentations, which were incredibly entertaining as well as informative. Each of the countries represented at the event had a 5 – 10 minute powerpoint about what makes their country interesting and unique, some even bought alcohol and traditional food for us to try. One of the amusing things which I hadn’t expected was the amount of friendly rivalry between the Scandinavian countries. 😛 It was all in jest however :). Our presentation had everything you would expect of a British Country presentation, self deprecation  sarcasm and wit — however we did learn that British Humor doesn’t make a lot of sense to some of our fellow Europeans.

Microsoft - Work Hard, Play Hard

Microsoft – Work Hard, Play Hard

As the main aim of the event was to aid with networking between MSPs we all felt it was appropriate to go for a night on the town in Dublin together with our European Comrads, and a gret night was had by all.

Thursday

The next morning we were straight back to work to learn about how to make games for Windows 8 using the HTML 5 Canvas and associated Javascript API’s. This was indeed almost identical to the code I was already using in my implementation of my Solar System Simulation – so it was great to see I could use the skills I had learnt at university to make interesting HTML5 powered games for Windows 8.

After this we learnt more about the more “traditional” way of making gaming applications for Microsofts Desktop OS, XNA. XNA isn’t officially supported in the “Metro”/Modern UI Windows Environment, however a company called The Mono Project provide an API called MonoGame which allows you to use your XNA Code, with some minor alterations. I still think that it is a shame that Microsoft themselves aren’t officially supporting XNA any more but MonoGame is an acceptable replacement.

Learning Mono became immediately useful because for we were then split up into teams to make a game. I remember joking with a friend that I was finding it hard enough to remember all the British peoples names, and I was worried that with Scandinavian people in my group I would appear rude by being unable to remember or prenounce their names. Fortunately this wasn’t too much of an issue as I was paired up with an Englishman called Tom, a Norweigan called Patrick and a Swede called Michael. However we were also teamed up with a Latvian, whos named none of us could pronounce, so we called him G. 🙂

First things first, we had to come up with a team name. We all thought Michael’s idea of “Too Inappropriate To Succeed” was funny, so we went with that. The next thing we had to do was come up with a concept for our game. None of us could really come up with a good, original game idea off the top of our head so I suggested we all wrote down a Location, Action and Character Word on a small note. We then collated all of the words of each type together, so all the locations were in one pile, all the actions were in one pile and all the characters were in one pile. We then chose one of each word type at random, leaving us with Seal, In An Oil Barrel and Pick Axe. Based around these words we came up with an idea for a game called “Seal Summit”

Seal Summit is a double entendre because the game is about a seal reaching the top, or summit, of an oil barrel it is trapped in — but the game was also devised at the North European MSP Summit. In the game you play as a seal which has been trapped in a very very large oil barrel. You attempt to get to the top of the barrel by using your pick axe and trying to avoid falling objects. Yes, it is a tad strange. I have very little of the game to show off so far as we had a very limited period of time in which to come up with the context and start coding, however if you keep checking back soon I plan to work on it more over the Christmas break and may have something to show off soon!

After we had worked on our group project for a few hours we had another presentation — in fact my favorite of the whole 3 days — on how to give good presentations. Some of the tips we were given were basic common sense once you had thought about them, but had just never occurred to me. There were also some more intelligent ways of making yourself appear more confident and help you achieve the end goal of any presentation, which is to make people interested in the information you have to provide.

The tips included:

  • Lowering the lights counteracts the effect of stress on your eyes — which can give away to people you’re not entirely confident
  • If you need a moment to pause travel across the stage, that way it looks like you’re moving rather than struggling to think of something
  • Playing some low volume music in the background can be calming
  • Slides should have a small amount of detail, people are very visual and will just stare at the powerpoint rather than listen to you if it has too much on it
  • Don’t worry about your bladder, your body stops you from needing the toilet whilst in that sort of situation 😛

After the fantastic presentation on presentations we had a feedback session with the MSP Worldwide Program Lead, Michelle Fleming, about what we felt could be improved within the program, and what her ideas were for the future of the program. Some of the points made were particularly interesting

  • Some of the website and much of the online portal for the program were outsourced to other companies, they failed to deliver when the website was taken offline for several weeks. From now on a lot of the work will be carried out by MSPs for MSPs.
  • There’s going to be greater access to devices for MSPs to run and test software on, and show off to people
  • There’s gong to be a better system for sharing best practices for demonstrations, events and the like

All of this is bound to make the MSP program better and more effective both for the MSPs themselves and Microsoft. I can’t wait to see it all implemented.

After the feedback session we all had a period of free time to spend at our hotel before we all got on a coach to a very special location in Dublin.

Can you guess where it is yet? St. James' Gate Guinness Storehouse

Can you guess where it is yet? St. James’ Gate Guinness Storehouse

The Guiness storehouse was an interesting place to go, and something that you simply have to do if you’re in Dublin. We were fortunate and lucky enough to have Microsoft treat us to dinner in the restaurant, which gives you a 360 degree view of the beautiful capital city of The Republic of Ireland.

Its fair to see my fellow MSP’s and I had a great time. It’s a shame I only had time to briefly say goodbye to everyone before catching my early flight the next day. I’d like to say a big thank you to Phil Cross, Michelle Fleming, Microsoft Ireland and everyone else involved in making such a great 3 days. I’ve made some friends which I’ve kept in contact with a can’t wait to see at the next MSP event and learnt some useful skills not only for within the technology industry, but life in general.

Danny

Windows Phone 7 to Windows 8 Day

The Commonwealth Club - Embankment - London

A few weeks ago a link was posted on the Microsoft UK Student Developer Group detailing a Windows Phone 7 – Windows 8 weekend in London. Originally the location wasn’t released, presumably whilst Microsoft worked out how many people would come and how much room they needed, but eventually we were told it would be at the Commonwealth Club at Embankment in London. This is the nice building you can see in the above photo! The event itself was this weekend just passed, I couldn’t make the Sunday but thoroughly enjoyed Saturdays festivities.

It was a snazzy place, and a great place to stay for the day, but I’ll talk more about that later. The idea of the weekend was to show people how to port their application from Windows Phone 7 to Windows 8. It also showed off some of the new API’s, Runtimes and paradigms that make Windows 8 apps an improvement over those of the phone — though I’m sure there will be API and feature parity in Windows Phone 8.

When I got to the commonwealth club I was shown to the basement floor which had been taken over by Microsoft (the only company who would schedule a Phone related event in a basement with no phone signal ;))

One room was the “Work Zone” where developers could actively work on porting their applications from Windows Phone 7 – Windows 8 with the help of the Microsoft Evangelists.

The "Work Zone" -- Posh

The “Work Zone” — Posh

Another was the “Game Zone” where people could play Star Wars Kinect competitions to win prizes such as DAB radios. The final area was the “Talk Zone”, in which mini lectures were held with topics that had been voted in by the people at the event.

The C# 5 / .NET 4.5 / WinRT Asynchronous Framework

The most popularly requested talk, and therefore the one we got to see first was a talk on C#, .NET 4.5 and WinRT’s new asynchronous framework. Whereas at the moment to send a WebClient to fetch some data and then display it you’d have to do some code like the following:

//Actual simplified (i.e. no error reporting etc) code from the Hull CS Blogs app for Windows Phone 7

//Set up downloader somewhere
WebClient contributorsXMLDownloader = new WebClient();
            contributorsXMLDownloader.UseDefaultCredentials = true;
            contributorsXMLDownloader.DownloadStringAsync(new Uri("http://www.dantonybrown.com/hullcompsciblogs/contributors.xml", UriKind.Absolute));
            contributorsXMLDownloader.DownloadStringCompleted += contributorsXMLDownloadComplete;

//In another totally seperate place
public void contributorsXMLDownloadComplete(object sender, DownloadStringCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                XDocument xdoc = new XDocument();
                xdoc = XDocument.Parse(e.Result, LoadOptions.None);
                contributorsList.LoadFromXML(xdoc, FileOrigin.internet);
                contributorsListBox.ItemsSource = contributorsList;
            }
        }

As you can see, we set it up and then at a later time the method we specified in the event handler earlier is called once the download is complete. If you have loads of these async calls, or worst yet async calls within async calls it all gets very confusing, very very quickly.

In C# 5 two new keywords have been implemented to ease this situation. Async, which as you can guess marks a method call as being one that is executed asynchronously and await which says “don’t execute code under me until this async method is complete”.

For example we can convert our above code to a HTTPWebRequest using the new keywords. Look how simple it is!

public async void DownloadContributors()
{
       HttpClient http = new System.Net.Http.HttpClient();
       //Notice how we're awaiting this response right here rather than going to an event handler
       HttpResponseMessage response = await http.GetAsync("http://www.dantonybrown.com/hullcompsciblogs/contributors.xml");
       //We'll only get here once the response has completed!
       string result = await response.Content.ReadAsStringAsync();
       //Business Logic that would normally be in the event handler
       XDocument xdoc = new XDocument();
       xdoc = XDocument.Parse(result, LoadOptions.None);
       contributorsList.LoadFromXML(xdoc, FileOrigin.internet);
       contributorsListBox.ItemsSource = contributorsList;
}

It’s nice because everything is where it should logically be. Together. Anyway, theres a hell of a lot more to talk about that I can fit in this already packed blopost, for example any method which calls another method which is marked as async has to be async itself, but you can find out all this at Channel 9.

The Windows 8 User Experience (UX)

Metro is all about making an experience for the user, from Live Tiles which mean you don’t have to even enter an application to get its content to the exact alignment and size of text of titles, sub-titles and paragraphs in apps. Andrew Spooner delivered a great talk on how to achieve the best user experience for users when porting your application from Windows Phone to Windows 8.

Although a lot of things can be directly ported in some ways — a panorama application on Windows Phone can be a panorama application on Windows 8 — some things can’t. Windows 8 has no concept of a Pivot page for example.

A Pivot Screen - There's no similar control in Windows 8

A Pivot Screen – There’s no similar control in Windows 8

Because pivot screens are often used to filter content, in my example the blog pivot shows only blog posts whilst the twitter pivot shows only tweets, there are a few ways to get round the limitation. You could use an application bar, a context menu or change the overall layout of the page.

Andrew also explained about the different modes a page can be in. Landscape, Portrait or pinned to the side, and how to deal with each. You can find out more about redesigning your Windows Phone 7 application to Windows 8 or designing a new application from scratch here.

Windows 8 Contracts

The second most popular talk topic was contracts. I’ve written about my love for the idea of contracts before, when I attended the Windows 8 camp at The University of Hull a few weeks back.

The idea behind a contract is that it is a way for an app to communicate with other applications in a standard way, even ones it doesn’t know about. For example a share contract says “I have these images that can be shared”. Any application that can accept images then says “I can accept these images and do something with them”. Notice how the sharing application doesn’t say what it wants done with the images and the receiving application doesn’t tell what it can do — this is on purpose to allow more interesting experiences.

If the user selects that your application it receives the images and can do anything with them, for example allow the user the edit them or share them straight to a social network. 🙂 Its all really cool stuff and allows experiences that no one would previous think of, the example given was a cooking application that shares pictures of food. An application that accepts pictures could then make it into an interactive Jigsaw. Why anyone would want to do this is unknown… by everyone. But you can see it allows us to do things we wouldn’t previously have thought of. I mean who, when writing a cooking application writes in a MakeJigsaw() method? No one 😛 But Windows 8 will allow this important functionality! 😉

Search isn’t the only type of contract. Previously to this event I hadn’t seen the Settings Contract but it looks quite cool. It allows your app to store its settings in a uniform way within the right hand pane which comes up when the settings charm is pressed. Some of this might not make sense now, but it will when you use Windows 8. Its nice because it allows applications to have application specific settings in the same place as universal ones such as “Allow this app access to location data” 🙂

Background Tasks on Windows 8

Background tasks on Windows 8 are very similar to background tasks on Windows Phone 7… apparently. I’ve never used them, but it’ll be a nice easy port for those people who have. There are all the sort of optimized background tasks you expect:

  • Media player (Audio AND Video, whereas on Windows Phone 7 it can only do audio)
  • VoIP
  • Background downloading
  • Update Tile and Notification

There’s also a generic background task which is unoptimized but allows you to do whatever you want. We were advised that this was a last resort and if we could use one of the more optimized background tasks to do whatever we wanted to achieve we should. Background tasks can be activated in several ways:

  • By a timer
  • When a certain condition is met (e.g. WiFi connection state changed)
  • By custom rules (e.g. Connection State changed && connection state is online)

In a background task you can write any code you want and are totally unlimited. The only thing to be aware of is that normal applications only get 1 second of background task CPU time ever 2 hours in order to retain battery life.

New in Windows 8 are notifications on the lock screen. 1 application, chosen by the user, can display its notifcations on the lock screen. Much like the calendar application does on Windows Phone 7. This chosen application is special because it gets 2 seconds of CPU time every 15 minutes.

Posh Food

One of the interesting but non-CS parts of the day was the dinner. It was kind of weird, but cute. Lots of small versions of popular dishes such as burgers, there are some pictures below.

The best kind of beer is free beer!

The best kind of beer is free beer!

We had a good choice of drinks too!

We had a good choice of drinks too!

The worlds smallest burger!

The worlds smallest burger!

Burger compared to a small tea candle

Burger compared to a small tea candle

Getting on the Windows 8 Marketplace for Day One of General Availability

One of the opportunities of the event was to discuss getting a “store token” which allows your application to be on the store the day Microsoft releases Windows 8, days — possibly weeks before your competitors. I spoke to Paul Lo about this and should find out if I’ve successfully received a token soon!

Getting help with Hull CS Blogs for Windows 8

The best and most helpful part of the day for me was having a 40 odd minute chat with Andrew Spooner about porting my applications design to Windows 8. We used a programming statement and some use cases to think about the experiance — this was a methodology I haven’t used before and I found it incredibly useful, I shall be using it from now on!

A programming statement is a paragraph or two explaining what your application or program is all about, for example my one was

The Hull CS Blogs application aims to deliver the content of all the bloggers at the University of Hull Computer Science department to users in an attractive way whilst allowing people to discover more about each contributor, via the use of twitter streams and a list of applications they have worked on. The application will also deliver a regularly updated list of featured applications developed by people within the universities computer science department.

Having this statement allows you to have something to refer back to when you’re thinking about features, for example. “I’m writing an application which allows people to discover about the contributors through the use of twitter, do I need to have a reteweet feature?” Well, the use of twitter in the application is to discover things, not necessarily interact with content, so this should be left out til a later release where there aren’t other more important features to be developed.  (By the way, this idea was actually one discussed about the Hull CS Blogs application)

A set of use cases are the “stories” of how you envisage people using your application. For example one of mine was

Russell has missed a guest lecture at university, he wants to read up about it and knows that his fellow computer scientists will most likely have blogged and tweeted about it. He opens the Hull CS blogs app and views the latest blogs and reads a couple. He then looks at the latest tweets for more minute by minute information, and then drills down into James’ contributor page because he cares about james’ opinion and wants to see more about what he has to say about the event both via twitter and his latest blog posts.

Reading this makes you realise what features are crucial to your app. So in this situation you would need.

  • Latest blog list
  • Feed of all tweets by all users
  • A page for each user

Without this user case I wouldn’t have thought about implementing an overall twitter feed in the main panorama rather than just a per user feed in each contributors page.

Anyway in the end we went from these initial designs, which are essentially a direct port of the Windows Phone app:

Main Panorama Initial Idea - Hull CS Blogs for Windows 8

Main Panorama Initial Idea – Hull CS Blogs for Windows 8

Contributor Page - Hull CS Blogs Windows 8

Contributor Page Initial Idea – Hull CS Blogs Windows 8

To this overall view of the application in a hierarchical order:

Andrew Spooners improvements On My Initial Ideas - Entire App - Hull CS Blogs

Andrew Spooners improvements On My Initial Ideas – Entire App – Hull CS Blogs

I will be using this design for the actual version of the Hull CS Blogs app for Windows 8, so check back here to hear more about that.

I apologise for the length of this post but it really was such a packed day! I hope this blog has made you look forward to developing for Windows 8 and porting your existing WP7 applications, because I certainly am! I’d like to thank Microsoft for treating me so well as they always do, with lots of support, free drinks and some amazing free food. Truely an experience worth remembering!

Danny.