Archive for the_time('F Y')

Great marketing for Xbox 360
26 March 2007 in Business & Microsoft | Comments (1)

I thought this story was great. I always love it when people think outside the box when it comes to marketing. I won’t re-post what actually happened, just click the link below.

Microsoft teases Sony

- JD

Find out more about SharePoint
24 March 2007 in Microsoft | Comments (0)

It seems SharePoint is all the rage these days with many businesses and it has many people wondering what exactly it can provide or how to work better with the latest versions of SharePoint.

My friend Chan and the crew at Provoke have created a fantastic website all about the offerings in the SharePoint space at www.freshfromtheoven.co.nz. However, potentially of more interest is that they have their own free seminars for people to attend. There is some space still available, I’d strongly suggest if you can make it that you check it out.

If you’re even more hardcore then you might want to check out the Asia Pacific SharePoint Conference.

If either of these sound like you then check out Chan’s post which has more detail about times and places.

- JD

Simple paging with LINQ for SQL
23 March 2007 in .Net | Comments (2)

One thing we’ve been playing with at Mindscape with the creation of Background Motion is LINQ for SQL (previously known as DLINQ). Over my time in software development I’ve found myself having to write paging code a few times. In itself it’s not hard but it is easy to do it in a dumb way if you don’t think beyond just restricting the dataset.

Every now and then I see code that pulls an entire dataset back from the database and then slices and dices it into a single page. This of course isn’t a very good idea but it does solve a basic issue when doing paging: knowing the total number of results which you need to know when displaying a paging control.

So you will need two queries, one to get the count, one to get the page. Still more efficient than transporting 10,000 or more rows of data to your application.

How does LINQ for SQL make this easier? Check out this code snippet:

private IList<Contribution> GetWithinDays(int days, int skip){

  return ModeratedContributions

    .Where(c => c.AddedOn >= DateTime.Now.AddDays(days))

    .OrderByDescending(c => c.AddedOn)

    .Skip(skip)

    .Take(PageSize)

    .ToList();

}

This is LINQ in action, this will return a collection of contributions which were added in the last 5 days, in descending order based on when the contribution was added. The key here is the Skip and Take methods. These allow to to chop of the start of the result set and Take will select the next number of rows from that point. Effectively this is doing your paging. Keep in mind that LINQ for SQL is converting this C# code into SQL so this paging functionality is being applied at the database, not in our application.

All you need to do is calculate the offset for the skip parameter and you’re done. In the code above, PageSize is defined within the scope of the class so is not passed in but this can be any integer for the number of results you want per page.

You really can’t get much easier than that. Now, just to get the count of the results, that’s easy enough with LINQ as well:

private int GetNumberWithinDays(int days)

{

  return ModeratedContributions

    .Where(c => c.AddedOn >= DateTime.Now.AddDays(days))

    .Count();

}

Now with those two pieces of data from our database, the results and total number of potential results we can go forward and implement some easy paging. Of course we control all the other information in this example such as the number of items on a page etc but overall you can see that LINQ enables these types of solutions easily.

For more information about LINQ for SQL check out this MSDN article.

- JD

Presentation observations
23 March 2007 in Events & Mindscape | Comments (5)

Lately I’ve delivered a few presentations as you’ll likely know from my previous posts. I thought I’d write a few thoughts on what I’ve found while doing them. To set the scene for those who haven’t attended my recent talks, the audience size has been between about 150 to 500 people. Quite large by my standards, certainly the largest audiences I’ve spoken in front of.

A few things I’ve learnt from doing these presentations:

  • The first words are the hardest, get them out and you’re fine.
  • When you’re mic’ed up you don’t even notice it after about 3 seconds of speaking, I was a tad concerned about that.
  • The intense nerves you get before speaking are actually good if you can turn them into energy when you speak.
  • Check if you have a “nervous tick”, mine was saying “Good Times” which while amusing to most, I tried to ensure I didn’t say it too often after the first presentation.
  • Make sure you have some water, a dry throat tends to hit you suddenly.
  • Be ready for bright lights, often you can’t see the audience very well because of it (which can be a good thing if you’re nervous).
  • Look around the room, even if you can’t make out the faces you should look like you’re talking to the people.
  • Try to use pictures and less words on your slides, you’re less likely to read the slides to the audience and it’s more interesting to the crowd.
  • Don’t name your last slide consistently as “Call to Action”, the audience learns and reads it as “Pack up” when it’s potentially the most important message of the presentation :)
  • Many more things but I won’t go on :)

One thing I’d also suggest is that you find somebody who has done these types of talks before to work with when you first do them at this size. I was fortunate enough to doing them with Jeremy there as well who I’m pretty sure has done about a million big audience talks. He was really useful for being able to answer any questions I had and for making sure I didn’t let me imagination run away on me about how intimidating the audiences could be (I found the audiences great, I ended up feeling quite relaxed by the end of the presentations). So a big thanks to him.

Now I’m thirsty for some more presentations, that nervousness is like a drug :)

- JD

    EGovernment Web Guidelines updated
    23 March 2007 in General | Comments (0)

    John Lewis pointed out on my previous post that the new version of the E-Government Web Guidelines are now available. They’ve been renamed slightly to “E-Government Web Standards” and because of this have been given a version number of 1.0.

    Great to see some evolution here.

    Check out the press release here.

    Go an download the Web Guidelines here.

    A key message of my presentations recently has been that you should read these standards even if you’re not developing for the a Government agency. They provide some solid and useful information for your check your site against to ensure maximum accessibility for your site today and tomorrow.

    Thanks John,

    - JD

    TechEd registrations now open
    23 March 2007 in Events & Microsoft | Comments (0)

    Well it’s been a few days since the technical briefings so I thought it’s a good idea to point out that the TechEd 2007 registrations are now open. Last years event kicked some serious butt and I expect this year will be no different.

    TechEd has been selling out very early each year so I’d suggest you get your registration in asap!

    - JD

    Presentation: Extending Application Reach
    22 March 2007 in .Net & Events & Microsoft & Mindscape | Comments (0)

    Microsoft 2007 Technical Briefings

    Thanks to everyone that came to our presentation on extending the reach of your applications. In a few weeks we will also be making available videos of the three presentations that Mindscape delivered for those wanting to see them again or who could not attend the sessions.

    Here are the links from our presentation:

    Presentation File:

    Demonstration Files:

    I hope everyone that attended this session found it useful, feel free to post feedback or questions.

    - JD

    Presentation: Web Standards Compliance
    22 March 2007 in Events & Microsoft & Mindscape | Comments (1)

    We are officially done with the Microsoft 2007 Technical Briefings and everything went really well. As promised, it’s time to start posting our presentations, demos and links. If you’re looking for the files from Jeremy Boyd you can grab them from his blog. In a few weeks we will also be making available videos of the three presentations that Mindscape delivered for those wanting to see them again or who could not attend the sessions.

    Here are the links from my presentation:

    Presentation File:

    Demonstration Files:

    I hope everyone that attended this session found it useful, feel free to post feedback or questions.

    - JD