Wednesday, June 6, 2012

NDC 2012 Day 1

This is a technical blog entry of what I've learnt during the day.  So if you don't have a computing background you might not understand all of it.  That or you might find it rather head spinning.

9am I arrived just in time for the 9am talk.  The trains were late this morning but thankfully not late enough for me to miss the start.  Today's talk started off with the keynote by Aral Balkan, entitled "A Happy Grain of Sand".  He is an experience designer.  He talked about how toilets were designed in various hotels.  And lifts.  Providing examples of how not to design them.  One of his toilet examples had a flush that was situated on the bench top on the wall.  Bad design.  Also talked about how washing machines were badly designed, all of them to be precise.  Why?  Because they have settings that we don't really use or care to know about.  Ideally, there should just be a hole in the ground, we throw our clothes in it and boom, they should just come out clean.  Another example that he gave was the Arlanda airport (in Stockholm, Sweden) requiring you to do all these crazy steps to buy a ticket, and they even built a phone into the ticketing machine as support (so you know it's pretty damn bad!), whereas in Oslo you just slide your credit card and you're off to the airport.  It's a Superman moment, or rather, it's supposed to make you feel like Superman.  Badly designed things make you feel angry and well, pretty dumb.  I also made contact with an ex colleague of mine, it was nice to see him.


Aral Balkan singing a song before starting his keynote.

10:20am The next session I attended was the "Cut the Rope" talk by Giorgio Sardo, and this was him describing the experience and lessons learnt from porting the game to Metro, which is the upcoming user interface in Windows 8.  The application was originally written in Objective C which is for iOS, and Microsoft's obejctive was to not lose fidelity, so the entire game was converted to javascript, and only to use HTML 5.  He talked about how the ropes in the game were 30K triangles, each rope was 30K triangles and how it was optimised by making the functions inline, initially it was quite slow, the code that is.  He also showed how to use Xperf to profile and visualise performance issues.  The animation in the game was also done using sprites, one large sprite containing all animation images, with the javascript just showing the same image but different parts of the sprite, if that makes sense.  Touch was also another thing he talked about, there's a new API called the Pointer API which has one event called Pointer that can trigger events which are both mouse and touch events.  Giorgio also said how by the end of 2012 all laptops will have touch screens, but we'll see if that's true for Apple laptops.  He also provided animation tips using requestAnimationFrame(), setImmediate() and performance.now().  If you don't understand it don't worry because I don't remember much either. :)  He also talked about the audio tag which is unfortunately not supported in all browsers at the moment.  And how you can use pageVisibility to suspend drawing/audio if the current page is not in focus.  After that he provided a Metro demo where he literally copied and pasted the HTML into a new Metro project and it worked, but that's a horrible solution.  You have to scale your assets depending on the resolution, so a full screen game is well, a better solution for Metro in this case.  Also provided a quick demo in Expression Blend showing javascript real time running of the application, now that's cool.  You can edit the application while it's running javascript real time!  He ended with showing the Windows 8 store.



Giorgio Sardo.

Short break after that, I had some bread with crackers with some Mozzarella cheese and cured ham.  Oh there was the Norwegian caramelised cheese that was given out in the morning too as breakfast, forgot to mention that.

11:40am  Giorgio Sardo presented "Windows 8 Apps with HTML5 and Javascript".  He talked about how there are 3 projections above the Windows Runtime (Win RT), which are C++, C#/XAML and HTML + CSS + Javascript (Chakra).  But basically these 3 projections use the same Win RT.  He provided some code examples, showing how Windows is the namespace of WinRT, e.g. Windows.Storage.Pickers.FileOpenPicker().  Also mentioned the promise pattern e.g. picker.pick.SingleFileAsync().then(...) which I found interesting.  In Visual Studio 2012 you can now debug on the local machine, remote machine and the simulator as well.  Also mentioned the Win JS library which is the Windows library for Javascript.  He also repeated the Blend demo in the earlier session.  There's another thing he mentioned, process isolation, where your application on your local machine is trusted but anything that your application download will be in a web context area, or something along those lines.  He also went further into the Windows 8 store, saying how you can sell your application in the store where Microsoft will take 30% of the cut, and after 25K in sales, this falls to 20%.  Better than the Apple store.  He also mentioned you can use your own commerce engine and keep 100% of sales, and technical certification will be run on your application before you're allowed to sell it in the store.

Lunch was at 12:40pm, I had chicken tikka masala.  The queue was pretty long!  The arena (Oslo Spektrum) is not very big, but there's plenty of food to go around.  Also walked around and took photos after lunch.  Managed to grab a pear too.



Right of the exhibition area, also serves as dining area.  The yellow dropdowns hanging off the ceiling serve as signs to the different conference rooms.


Middle.


Left.


1:40pm "Hacking .Net applications The Black Arts" was the next session, by Jon McCoy.  He didn't really say how to hack applications, rather he demonstrated hacking applications using tools that he has written.  Basically everything .Net can be reverse engineered.  Not even obfuscated programs stand a chance.  He mentioned how meta data is stored in a lot of obfuscated programs even, so even if you mess up the names they can still be retrieved!

3pm The next session was "Metro Design Principles", by Laurent Bugnion.  How the Metro Design Language as bauhaus inspired, it came from Germany in the 1920s and was applied to architecture.  No gradients, just typography, and pretty much striped to the minimum.  Also talked about the 1950s Swiss Typography movement, and how Helvetica was designed by the Swiss.  Metro was developed in Zune, and made popular in the Windows Phone.  Also mentioned that you have to consider different screens when designing for Metro, ie. full screen views, snapped views and field views.  There's also other things he talked about like the 5 design principles, which are, pride in craftsmanship, fast and fluid, authentically digital, do more with less, and win as one.

After the session was over , I had some salad and corn at a different stall yes I ate more food.  There's plenty of food and plenty of things to try!  Also grabbed an orange and apple.

4:20pm "How we do language design at Microsoft VB and C#" was the next session.  This was presented by  This session was interesting but there was a lot of information.  He was saying how Visual Studio was huge and takes all night to build, for VB there's 20,000 QA tests of which 1000 are run automatically upon check in.  And how if there are language bugs, and if you tell management then they'll be allowed to fix it.  He also mentioned how UserVoice was used to provide feedback to the team and how people were complaining about the greyness of Visual Studio 2012 so they added colour back into the application.  And never to use var when giving a talk haha.  But he also said var was introduced as a good thing.  The Roslyn project is also something that he talked about, which is basically rewriting C# in C# and VB in VB.  And how it's not good to freeze a language as people want advancement like LINQ which was a research project in Microsoft Cambridge.  The Task keyword also started out at Microsoft Research.  Also mentioned a new feature called Async.  And how C# still has bugs. :)  Oh and x+= 1 is slower than x = x + 1, but I have to prove that.  He said shorter syntax does not necessarily mean faster code.  One very interesting thing he mentioned, was how all the data structures in Roslyn are immutable which means less bugs.  Cool.  And one of the last things he talked about was the /warnaserror swich is a big problem as it now means every warning is a breaking change for developers who use it.  This is still unresolved.



Lucian Wischik.


User feedback obtained from Visual Studio 2012, I think. 


My last meal was some Asian noodles which were quite bland.  But I took an orange after that.  Also somehow manage to stab my finger with some splinters off the chopsticks.

5:40pm  Last presentation of the day was by Robert C Martin who talked about the "Single Responsibility Principle".  Responsibility should be a person, and any module should be responsible to any 1 person.  To be more specific any module should be responsible to any 1 role.  Keep things that should change together, together, and things that should not change together, together.  Software should be isolated so that if 1 person asks for a change, the change doesn't affect somewhere else.  He provided an example of how an Employee class with the methods CalculatePay, Save, DescribeEmployee and FindById violates this principle because 3 roles are in play here, an accountant or clerk, a Database Admin (Save, FindByID) and a third role, HR maybe?  Well designed objects can resist change, whereas a system that is rigid you'll have to change in many places.  Fragile software is when making a change in one place causes it to break in another place because of coupling.  Oh and duplicate code?  Not necessarily bad.  E.g. if a function X and Y which are the same implementation are called by managers and clerks, then they are doing something different, it's just coincidence that the code's the same.  So it's okay to leave it in.  Lastly, always refactor!


Robert C Martin.


One of his slides presented on TDD, Robert mentioned how TDD (test driven development) feels slower but this slide shows development is faster as a result of TDD.

The talk ended at 6:40pm.  Each talk is an hour.  Tomorrow is another talk filled day.  Plenty of learning.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.