Pages

Friday, 29 October 2010

Watching PDC10…

PDC10 Player

I’m  impressed with the live streaming video system that Microsoft set-up for the PDC.

You can watch live or past sessions. I’m watching the keynote right now that took place just a few hours ago.

The player lets you switch between slide view and stage view.

I wish they did that for the previous TechEd events… Too bad the Ipad doesn’t do Silverlight.

Update: when the US sleeps (now 07:54 BST), quality switches to HD, see below:

HD

Monday, 25 October 2010

Notes from DDD8a

Microsoft Campus in Reading

The DeveloperDeveloperDeveloper event at the Microsoft offices in Reading was split in two tracks of simultaneous sessions.

Notes from some of the sessions:

It’s Time to Look at Entity Framework

Speaker: Julie Lerman (twitter @julielerman) thedatafarm.com

The Entity Framework was initially designed to reverse engineer existing databases but you can now also create them from scratch.

The designer generates a DDL. It doesn’t actually create the DB, it creates a script. Then you give the script to a DBA (Not sure how you specify paths for database and log files ?).

Support for POCO classes: your classes don’t have to inherit from Entity Framework classes, you can keep your model totally separate from EF and still work with the designer. The way you do this is through T4 templates, some of them you can download from Visual Studio Gallery.

If you tweak the T4 template you can totally abstract the EF layer (ObjectSet, etc…). In other words your code can interact with EF only through interfaces, which makes unit-testing possible.

TODO:

  • check out T4, CodeFirst

Packaging in the .NET World

Speaker: Seb Lambla (twitter @serialseb)

Seb demoed OpenWrap www.openwrap.org (the site is going live live in a few days), a packaging tool that you use to inject dependencies into your build. The dependencies must be available as “wraps” for this to be possible. You inject the dependencies with a simple command-line tool.  

The openwrap commands can also be used from within an msbuild file.

There is another open source tool called Nupack (maintained by Microsoft) released on codeplex.

TODO:

  • Check out Scott Hanselman’s blog about Nupack

Is NoSQL the Future of Data Storage?

Speaker: Gary Short (twitter @garyshort)

  • Term introduced by a programmer from LastFM.
  • NoSQL
    • often does not implement ACID
    • avoids joins
    • no fixed schema
    • scales horizontally (adding more machines)
  • Types of NoSQL DBs
    • document Store
    • graph storage: nodes and edges
    • key/value stores: on disk/on RAM
    • “eventually consistent”
    • object DBs. You provide your own indexing rules.
  • Good for:
    • geographic regions, large quantities of data, game server sharding (what’s sharding?)
    • often written, rarely read > Key/Value
    • binary data
  • Example: Twitter
    • they tried RDB > didn’t scale.
    • built FlockDB
      • not optimized for transversal, because not needed.
      • optimized for adjacency lists: graph stored as set of edges
      • idempotency: useful for computing set unions and intersections.
    • Lessons learned: use aggressive timeouts

TODO:

  • check story of Twitter (DB angle)

Modern C#: this is not your grand-daddy’s language

Speaker: Jon Skeet and his pony. (twitter: @jonskeet)

Inspiring talk about the evolution of the language features of C#.

Jon illustrated how powerful C# has got by writing a MaxBy() implementation in various versions of C#. MaxBy() should return the element of a collection containing the maximum value of a specified field. It should work with any field and any collection.

He wrote the solution in C# 4 use generics, lambdas, method extensions and inferred types.

In C# 1.0, he started with a simple for loop: this lead to code specific to the class being compared. To make the code a bit more generic he used a delegate and some downcasting from System.Object to the type compared: it worked but was somewhat verbose and not as type safe as the C# 4 version.

Jon’s quotes:

“Knowing how things work under the hood is important. However you need to be able to shift gears so that you think at a higher level when you need to”

“We need to be jolted out of the idea of what a language should look like.”

“You can express yourself more clearly without having to write things you don’t need. What needs to be expressed is expressed only once.”

“Learning F# helps you understand the new features of C# 4.”

Things you should know about SQL as a developer

Speaker: Simon Sabin (twitter: @simon_sabin)

  • Do not truncate the transaction log > you loose point-in-time recovery
  • Re-indexing
    • You may just need to update the statistics.
  • Shrinking
    • usually bad, files grow for a reason
    • shrinking makes sense after a big import job only
  • Clustered indexes on dates
    • make them small and unique
  • Types of joins
    • Loop: for small datasets
    • Hash: large datasets
    • Merge: requires sets to be ordered
  • user-defined functions
    • bad performance!
      • interpreted
      • can’t use parallelism
    • demoed a padding operation done with UDF vs one done with a CLR function. The CLR one significantly faster.
    • Prefer CLR functions over UDF.

TODO:

  • Look into taking snapshots vs restoring from backup.

 

More blog posts about the event:

Danny-T.co.uk

The Ninja Ferret

Slides:

Chris Hardy’s WP7 talk

Thursday, 21 October 2010

Ipad/Iphone Apps List

IPad

  • Ocado
IPad 003 

Very well suited to the Ipad, here is a typical use case:

  1. Book your delivery slot (slots for the following evening are usually free).
  2. Add all items from the previous order
  3. Display basket and go to your kitchen
  4. Remove unwanted items (check your fridge and cupboards)
  5. Add items you know are missing
  6. Go back to your sofa and browse your favourites for things you might have forgotten
  7. Checkout: type in the voucher (Ocado often emails 15% or 20% reduction vouchers)
  8. Type in the 4-digit pin to authorise the transaction, and that’s it.

 

  • Reeder

Could do with some photos really

  • Quickly syncs with Google Reader.
  • Elegantly displays groups of feeds
  • How I use it: I star articles I want to read during the week and take the time to read them at the week-end.
  • No pictures, no colors :-(
  • Too bad you can’t subscribe to a new RSS feed from within Reeder.

 

  •  Pulse

IPad 008

Unlike Reeder, this one will show the pictures included in the RSS feeds.

You can create tabs to arrange your feeds. Inside each tab you can add feeds imported from Google Reader. Note you can only import from Google Reader, it does not sync.

Pleasant to look at but from a functional point of view, Reeder is still better because it syncs with any change you make to your subscriptions in Google Reader.

  • DropBox

There is a small set of files I always want to have with me. I use DropBox to keep them in sync. I installed it on my PC, 2 laptops, an Iphone and an Ipad. Changes made on any device are immediately propagated to the others if they’re on.

The Windows version gives a version history of each file.

IPhone

  • 2Do Lite

Clever little app for TODOs. You can associate a TODO with a geographical location. Click the nearby button to filter TODOs by current location. This is good for the situations where you say “Next time I go to Boots, I should get some shampoo”. Elegant, fast, good-looking.

  • TimeOut London

Iphone 056 Search films by location, by date, by cinema.

I use it to look-up the films available in a short list of of favorite cinemas.

  • FourSquare

IPhone 061 This is what Google Latitude should have been. Check-in to pre-defined places (restaurants, bars, companies, hotels, train station platforms, forests…) to tell where you are or add tips about a particular place. This app would be great if only more people used it: the nearby tips tend to age a bit.

It’s all I wanted to do with Google maps: see a place I like, make a note of it to come back later or go to a place and leave a note about it. I used to do it with Google maps, it’s much more clever with FourSquare.

A friend talks to you about this new restaurant he tried: look-up the name, add it as todo and attach a tip “Remi recommended the Savoy bar because it was recently refurbished and just re-opened”

IPhone 062

A number of little apps are available to make it easier to use FourSquare, in particular to automate the check-ins: CheckMate and FourMinder.

  • TimeOut London

Iphone 056 Search films by location, by date, by cinema.

I use it to look-up the films available within my short list of favorite London cinemas.

  • DropBox

The Iphone version allows you to cache some of the files for offline view (by making them favorites). You can’t view the version history though.

Saturday, 2 October 2010

UK TechDays Special Event with Steve Ballmer

I’ll go hear about Windows Phone 7 and Azure on Tuesday. It will happen at the ICC in the Docklands (Royal Victoria Dock).

It seems it’s still possible to register.

image