Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

12 Mar 2006 - Developer Blogs in United Kingdom

<March 2006>
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
262728293031

Blog Entries (12 Mar 2006) RSS << Earlier | Later >>

  • Designing for: The Web Standards Project

    Published on 12 Mar 2006 from

    SXSWi, The Web Standards Project is changing, entering a new time in its history, opening the hive up to better include the communities and issues we've done our black and gold best to represent since 1998. And with the new phase comes a new face, and I am could not be prouder that Jeffrey Zeldman has today cut the virtual ribbon on my new WaSP design.

  • Custom date formats in TSQL

    Published on 12 Mar 2006 from

    Ever wanted to format dates easily by specifying a format i.e. formatDate(@date, 'dd-MM-yyyy') without having to remember the relevant number for the CONVERT function. Well now you can .......(read more)

  • Custom date formats in TSQL

    Published on 12 Mar 2006 from

    Ever wanted to format dates easily by specifying a format i.e. formatDate(@date, 'dd-MM-yyyy') without having to remember the relevant number for the CONVERT function. Well now you can .......(read more)

  • Running Sums the sequel part x

    Published on 12 Mar 2006 from

    If you've been following the trillogy (Adams posts 1,2 Jamies post ) of attempts at getting a running sum out of TSQL you will appreciate that there are many ways to solve a problem. Following my previous post on partitions and aggregates I thought that might be an avenue. Well it is, and i've thrown in a use of the unpivot as well. I know this could have been written using CASE statements, but that wasn't the point.

    If anyone can come up with a better solution then let me know.

    DBCC DROPCLEANBUFFERS -- Clears the data cache

    DBCC FREEPROCCACHE -- Clears the procedure cache

    GO

    declare @start datetime

    set @start = getdate()

    ;with agg

    as(

    SELECT year(OrderDate) year

    , month(orderdate) month

    , SUM(D.LineTotal) OrderTotal

    , row_number() over( partition by year(OrderDate) order by year(OrderDate)

    , month(orderdate) )row

    From Sales.SalesOrderHeader H

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    group by year(OrderDate)

    , month(orderdate))

    , temp

    as(select year, month, row, aggrow, ordertotal, orders

    from

    (

    select year, month, row, ordertotal

    , sum(ordertotal) over (partition by year, row/2) [1]

    , sum(ordertotal) over (partition by year, row/3) [2]

    , sum(ordertotal) over (partition by year, row/4) [3]

    , sum(ordertotal) over (partition by year, row/5) [4]

    , sum(ordertotal) over (partition by year, row/6) [5]

    , sum(ordertotal) over (partition by year, row/7) [6]

    , sum(ordertotal) over (partition by year, row/8) [7]

    , sum(ordertotal) over (partition by year, row/9) [8]

    , sum(ordertotal) over (partition by year, row/10) [9]

    , sum(ordertotal) over (partition by year, row/11) [10]

    , sum(ordertotal) over (partition by year, row/12) [11]

    , sum(ordertotal) over (partition by year, row/13) [12]

    from agg) p

    unpivot (orders for aggrow in(

    [1],

    [2],

    [3],

    [4],

    [5],

    [6],

    [7],

    [8],

    [9],

    [10],

    [11],

    [12])) as unpvt

    where row = aggrow)

    select year, month, ordertotal, orders from temp

    order by year, row, cast(aggrow as int)

    select cast(datediff(ms, @start, getdate()) as varchar(20)) [time taken]

  • Running Sums the sequel part x

    Published on 12 Mar 2006 from

    If you've been following the trillogy (Adams posts 1,2 Jamies post ) of attempts at getting a running sum out of TSQL you will appreciate that there are many ways to solve a problem. Following my previous post on partitions and aggregates I thought that might be an avenue. Well it is, and i've thrown in a use of the unpivot as well. I know this could have been written using CASE statements, but that wasn't the point.

    If anyone can come up with a better solution then let me know.

    DBCC DROPCLEANBUFFERS -- Clears the data cache

    DBCC FREEPROCCACHE -- Clears the procedure cache

    GO

    declare @start datetime

    set @start = getdate()

    ;with agg

    as(

    SELECT year(OrderDate) year

    , month(orderdate) month

    , SUM(D.LineTotal) OrderTotal

    , row_number() over( partition by year(OrderDate) order by year(OrderDate)

    , month(orderdate) )row

    From Sales.SalesOrderHeader H

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    group by year(OrderDate)

    , month(orderdate))

    , temp

    as(select year, month, row, aggrow, ordertotal, orders

    from

    (

    select year, month, row, ordertotal

    , sum(ordertotal) over (partition by year, row/2) [1]

    , sum(ordertotal) over (partition by year, row/3) [2]

    , sum(ordertotal) over (partition by year, row/4) [3]

    , sum(ordertotal) over (partition by year, row/5) [4]

    , sum(ordertotal) over (partition by year, row/6) [5]

    , sum(ordertotal) over (partition by year, row/7) [6]

    , sum(ordertotal) over (partition by year, row/8) [7]

    , sum(ordertotal) over (partition by year, row/9) [8]

    , sum(ordertotal) over (partition by year, row/10) [9]

    , sum(ordertotal) over (partition by year, row/11) [10]

    , sum(ordertotal) over (partition by year, row/12) [11]

    , sum(ordertotal) over (partition by year, row/13) [12]

    from agg) p

    unpivot (orders for aggrow in(

    [1],

    [2],

    [3],

    [4],

    [5],

    [6],

    [7],

    [8],

    [9],

    [10],

    [11],

    [12])) as unpvt

    where row = aggrow)

    select year, month, ordertotal, orders from temp

    order by year, row, cast(aggrow as int)

    select cast(datediff(ms, @start, getdate()) as varchar(20)) [time taken]

  • HARDWARE: RAID Arrays explained good article!

    Published on 12 Mar 2006 from

    I've been using RAID for several years now (bulk of the time after I purchased a P4B533-E back in 2001 or maybe 2002) with IDE RAID 0 (I know, not the safest, but I was willing to gamble!) Right now i'm on an insane RAID 5 array on my P5WD2-Premium, with hard-disks being very cheap its very easy to setup RAID arrays with most motherboards, Bjorn3D has an article going into depth about all the RAID configurations available for now and very indepth analysis of each config, easy to read and very nicely written. Read RAID: A Guide For All.

    On a side note, if your after a new drive, the Western Digital Raptor X 150Gb (10,000RPM) with 16Mb cache flies on RAID 0, i've got two hooked up onto the secondary SATA controller (SiliconImage) of the P5WD2-Premium, eventually I'm considering moving that to the Intel Controller and having Windows installed on it and having all the important stuff on RAID 5 config I have now. If you want ultra-fast drives (and sexy too) get a Raptor X from Western Digital. A bit pricey, but worth it.

  • HARDWARE: RAID Arrays explained good article!

    Published on 12 Mar 2006 from

    I've been using RAID for several years now (bulk of the time after I purchased a P4B533-E back in 2001 or maybe 2002) with IDE RAID 0 (I know, not the safest, but I was willing to gamble!) Right now i'm on an insane RAID 5 array on my P5WD2-Premium, with hard-disks being very cheap its very easy to setup RAID arrays with most motherboards, Bjorn3D has an article going into depth about all the RAID configurations available for now and very indepth analysis of each config, easy to read and very nicely written. Read RAID: A Guide For All.

    On a side note, if your after a new drive, the Western Digital Raptor X 150Gb (10,000RPM) with 16Mb cache flies on RAID 0, i've got two hooked up onto the secondary SATA controller (SiliconImage) of the P5WD2-Premium, eventually I'm considering moving that to the Intel Controller and having Windows installed on it and having all the important stuff on RAID 5 config I have now. If you want ultra-fast drives (and sexy too) get a Raptor X from Western Digital. A bit pricey, but worth it.

  • LIFE: Essendon to Hawthorn in 28mins (via Prahran) on labour Day at peak-hour morning traffic times.

    Published on 12 Mar 2006 from

    [Applies to Melbournians...]

    I woke up at 8:00am today to get to uni at around 10:00'ish (I take 15mins to get ready - most of that is taken up by trying to find matching pairs of socks, if you see me without socks, i gave up the search;-) I'm not one of those guys who spends time on how good he looks... quick shower, slap on something and out the door...)

    I get on the freeway today and its EMPTY! honestly, there was hardly any cars on the tullamarine freeway, usually in the mornings its packed (due to the merge with the Calder) and just that part from Melrose Drive to Mt Alexandar Road takes 5-10mins(my style of driving), I did that in under 2mins today, then theres the trek to Kings Road in the city, usually burns up the bulk of 45mins-1hr, did that (again mystyle of driving - no CityLink) in 16mins, then from Prahran to Glenferrie took around 10mins (I was stuck behind a tram for most of the trip).

    And this was on a public holiday - which Swinburne students dont get off for some reason, maybe other uni's dont either? Usually this treck takes me atleast 1hr 30mins (again with my style of driving, using "Intelli-Lane-Switching":D) now if only it was like this every day(Traffic that is)!

    that is all...

  • LIFE: Essendon to Hawthorn in 28mins (via Prahran) on labour Day at peak-hour morning traffic times.

    Published on 12 Mar 2006 from

    [Applies to Melbournians...]

    I woke up at 8:00am today to get to uni at around 10:00'ish (I take 15mins to get ready - most of that is taken up by trying to find matching pairs of socks, if you see me without socks, i gave up the search;-) I'm not one of those guys who spends time on how good he looks... quick shower, slap on something and out the door...)

    I get on the freeway today and its EMPTY! honestly, there was hardly any cars on the tullamarine freeway, usually in the mornings its packed (due to the merge with the Calder) and just that part from Melrose Drive to Mt Alexandar Road takes 5-10mins(my style of driving), I did that in under 2mins today, then theres the trek to Kings Road in the city, usually burns up the bulk of 45mins-1hr, did that (again mystyle of driving - no CityLink) in 16mins, then from Prahran to Glenferrie took around 10mins (I was stuck behind a tram for most of the trip).

    And this was on a public holiday - which Swinburne students dont get off for some reason, maybe other uni's dont either? Usually this treck takes me atleast 1hr 30mins (again with my style of driving, using "Intelli-Lane-Switching":D) now if only it was like this every day(Traffic that is)!

    that is all...

  • Multi level aggregates in SQL 2005

    Published on 12 Mar 2006 from

    I was looking to answer a users question on the forums this evening when I realised there is another big feature thats been added to SQL 2005 that I wasn't fully up to speed on. The user wanted to, for each row, provide a percentage that was related to the whole resultset. i.e.

        x   z%

    a  2   0.46 = 2/(2+5+6)

    b  5   0.38 = 5/(2+5+6)

    c  6   0.15 = 6/(2+5+6)

    I intially was going to say that you need to perform a seperate sum to then divide the values of x to give the percentage, probably using a derived table. I then looked into the ranking and wondered whether there was another solution. As with many TSQL problems there are generally a couple as was seen recently with the Running Sums  challenge.

    The neatest solution is the use of an aggregate over a window. This is achieved by using the OVER and the PARTITION BY clauses. This allows the aggregate to be performed over a set of rows. This does require a group by. I took the users question an came up with an Adventureworks sample. Finding the total of orders for a salesperson and the percentage of the total each person has made.

    The SQL 2000 version would be something like

    SELECT agg.firstname

    ,agg.lastname

    ,agg.postalCode

    ,agg.personalTotal

    ,1.0 * agg.personalTotal /CompanyTotal

    FROM (SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) personalTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId)agg

    cross JOIN (SELECT SUM(D.LineTotal) CompanyTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL ) AggTotal

    Order by 1,2

    GO

    The SQL 2005 first stage is to use a CTE (Common Table Expression)

    ;WITH Agg

    AS(

    SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) personalTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId)

    SELECT agg.firstname

    ,agg.lastname

    ,agg.postalCode

    ,agg.personalTotal

    ,1.0 * agg.personalTotal /CompanyTotal

    FROM agg

    cross JOIN (select sum(agg.personalTotal) CompanyTotal from agg) AggTotal

    Order by 1,2

    The next stage is to use the windowed function

    ;WITH Agg

    AS(

    SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) personalTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId)

    SELECT agg.firstname

    ,agg.lastname

    ,agg.postalCode

    ,agg.personalTotal

    ,1.0*agg.personalTotal /sum(agg.personalTotal) over (partition by 1)

    FROM agg

    Order by 1,2

    Getting simpler. You don't need the CTE you could write it as,

    SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal)

    , 1.0* SUM(D.LineTotal)

    / SUM(SUM(D.LineTotal)) OVER (Partition BY 1)

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId

    Order by 1,2

    Interestingly the performance difference is negligible. The CTE with the windowed function does have the edge. So this isn't a performance thing but an ease of use/programming thing.

    Be careful though you could do the following, Whilst the Query plan doesn't show a large cost difference (because the query is very similiar) there is a huge hit on the DISTINCT bit of the query. If you run this with STATISTICS IO ON you will see a huge amount of IO for the worktable. This is another situation where you cannot rely on the execution plan cost on its own. You have to look at the IO as well.

    SELECT DISTINCT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) OVER (Partition BY C.ContactId)

    , 1.0* SUM(D.LineTotal) OVER (Partition BY C.ContactId)

    / SUM(D.LineTotal) OVER (Partition BY 1)

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    Order by 1,2

  • Multi level aggregates in SQL 2005

    Published on 12 Mar 2006 from

    I was looking to answer a users question on the forums this evening when I realised there is another big feature thats been added to SQL 2005 that I wasn't fully up to speed on. The user wanted to, for each row, provide a percentage that was related to the whole resultset. i.e.

        x   z%

    a  2   0.46 = 2/(2+5+6)

    b  5   0.38 = 5/(2+5+6)

    c  6   0.15 = 6/(2+5+6)

    I intially was going to say that you need to perform a seperate sum to then divide the values of x to give the percentage, probably using a derived table. I then looked into the ranking and wondered whether there was another solution. As with many TSQL problems there are generally a couple as was seen recently with the Running Sums  challenge.

    The neatest solution is the use of an aggregate over a window. This is achieved by using the OVER and the PARTITION BY clauses. This allows the aggregate to be performed over a set of rows. This does require a group by. I took the users question an came up with an Adventureworks sample. Finding the total of orders for a salesperson and the percentage of the total each person has made.

    The SQL 2000 version would be something like

    SELECT agg.firstname

    ,agg.lastname

    ,agg.postalCode

    ,agg.personalTotal

    ,1.0 * agg.personalTotal /CompanyTotal

    FROM (SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) personalTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId)agg

    cross JOIN (SELECT SUM(D.LineTotal) CompanyTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL ) AggTotal

    Order by 1,2

    GO

    The SQL 2005 first stage is to use a CTE (Common Table Expression)

    ;WITH Agg

    AS(

    SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) personalTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId)

    SELECT agg.firstname

    ,agg.lastname

    ,agg.postalCode

    ,agg.personalTotal

    ,1.0 * agg.personalTotal /CompanyTotal

    FROM agg

    cross JOIN (select sum(agg.personalTotal) CompanyTotal from agg) AggTotal

    Order by 1,2

    The next stage is to use the windowed function

    ;WITH Agg

    AS(

    SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) personalTotal

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId)

    SELECT agg.firstname

    ,agg.lastname

    ,agg.postalCode

    ,agg.personalTotal

    ,1.0*agg.personalTotal /sum(agg.personalTotal) over (partition by 1)

    FROM agg

    Order by 1,2

    Getting simpler. You don't need the CTE you could write it as,

    SELECT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal)

    , 1.0* SUM(D.LineTotal)

    / SUM(SUM(D.LineTotal)) OVER (Partition BY 1)

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    GROUP BY c.FirstName

    , c.LastName

    , a.PostalCode

    , C.ContactId

    Order by 1,2

    Interestingly the performance difference is negligible. The CTE with the windowed function does have the edge. So this isn't a performance thing but an ease of use/programming thing.

    Be careful though you could do the following, Whilst the Query plan doesn't show a large cost difference (because the query is very similiar) there is a huge hit on the DISTINCT bit of the query. If you run this with STATISTICS IO ON you will see a huge amount of IO for the worktable. This is another situation where you cannot rely on the execution plan cost on its own. You have to look at the IO as well.

    SELECT DISTINCT c.FirstName

    , c.LastName

    , a.PostalCode

    , SUM(D.LineTotal) OVER (Partition BY C.ContactId)

    , 1.0* SUM(D.LineTotal) OVER (Partition BY C.ContactId)

    / SUM(D.LineTotal) OVER (Partition BY 1)

    From Person.Contact c

    JOIN Person.Address a ON a.AddressID = c.ContactID

    JOIN Sales.SalesOrderHeader H ON H.SalesPersonId = c.ContactId

    JOIN Sales.SalesOrderDetail D ON D.SalesOrderId = H.SalesOrderId

    WHERE TerritoryID IS NOT NULL

    Order by 1,2

  • SXSW: Social life

    Published on 12 Mar 2006 from

    It's like the first week at uni being here. Everyone is really friendly, there's loads of parties, and I get to chat to people for hours at a time. It's just brilliant. I've met loads and loads of people. I went to two parties last night: the first was the Austin on Rails party, at which I met Scott Becker, who, like me, writes in C#, is a drummer, guitarist and singer, and is a little bit deaf too. He doesn't look like me though. We chatted about the problems of using Rails in a Microsoft shop, given that Rails doesn't work with IIS reliably yet, and guessed that it might we do before too long.

    I went to the frog design party, which was really noisy, but I had a good chat with David Olimpio. I hadn't eaten, so I went off to find somewhere to eat, and came across "Tony's Southern Comfort Restaurant", which was completely empty, apart from a jazz / blues band. I ordered what I thought was a traditional Texan meal: catfish, fried okra and corn bread, and it was delicious. The band (led by Tim Curry) were really good, and unlike anything I've ever seen live before. I chatted with them during the interval, and they gave me three CDs (more free stuff!). It was a really mellow time.

    This morning, while I was waiting for my cab, a lady called Julie saw my pass and asked to share a ride. She's a programme manager, currently working for BT, and she has to manage hardware people, programmers in Surrey and India, and a whole bunch of other stuff. I'm always impressed with people who can do that sort of thing, as I find it really hard.

    Every time I mention George Bush, it induces a violent mood swing in the person I'm talking to, followed by profanities, and lots of frowning. One (otherwise bright) American I spoke to didn't know that the UK comprised England, Scotland, Wales and Northern Ireland, instead assuming that Wales was part of England (no comments from Welshmen please).

    [tags: ]

  • SXSW: Panels

    Published on 12 Mar 2006 from

    So, I've been to some great panels. Yesterday I went to Jeremy Keith and Aaron Gustafson's DOM scripting session. DOM scripting, it turns out, is like DHTML, only done responsibly. Instead of using document.write() or innerHTML to add any old tags regardless of context, the DOM is used to find to correct node (as in HTML tag), and modify the attributes or text, or create new nodes underneath it.

    True to form, I ended up with a free copy of Jeremy's book, DOM Scripting; it looks really good. The first chapter explains for loops, while loops and if statements, so obviously it's aimed at non-coding web-designers, but I'm a non-designer web-coder, so I understand the basic JavaScript. Later on in the book (this is a quick skim), there are explanations of how to use the DOM responsibly, so browsers with JavaScript disabled can still see the content, and the JavaScript is separate from the markup. There's also some good examples of how to do common things, like making stripy tables. Anyway, a really good panel.

    I then saw Kathy Sierra's session on creating passionate users. I've been reading her excellent blog for a few months now, so I had heard some of the content before. Despite this, there was plenty of new stuff, and it's the sort of thing that needs to be heard several times. It was also good to put a face to the name.

    Today. I started at a panel about decisions when starting a web company, which was really interesting. Interestingly, four of the panel had been approached by Google to sell their company to them. One said yes, and three said no. Evan Williams, who started Blogger (which I am using right now) was the yes, and it was the first company Google bought. Joel Spolsky said that Google now use acquisitions as a recruitment process to employ people who can clearly deliver products. I first heard about daily build machines from one of Joel's articles a couple of years ago, so it was good to actually meet him and say thanks. While I think of it, I've submitted a session proposal for DDDIII about setting up a build machine. Maybe someone will actually vote for it.

    I've just left a panel about the future of small devices, which was really interesting, as it's an area I'm not involved in. There were some interesting suggestions, and an admission that improving battery life and standardising recharger interfaces is not high priority in the industry right now.

    [tags: ]

  • SXSW: Online

    Published on 12 Mar 2006 from

    Well, I've found free internet access. My ticket included a press pass, so I get to use the press room, and the MacBook Pro laptops within. I've not used a Mac before, so I now know what all the fuss is about. They're great. Anyway, I don't have to pay for internet access at Kinko anymore. Paying for internet access certainly made my typing faster.

    [tags: ]

  • Gosling on Java vs other languages

    Published on 12 Mar 2006 from

    Asking a vendor about a competitor's technology generates more heat than light. It's not only the obvious bias. The other problem is simple ignorance. How can someone deeply immersed in Java, for example, keep truly well-informed about alternatives like PHP, Ruby or C#? It is a lot to ask. Instead, you are liable to get curious statements, like the claim from Sun's Dr James Gosling that PHP is a clone of JSP - difficult, since it was around before JSP was thought of. Now Gosling says that PHP and Ruby are only for web pages and do not scale. Ruby, of course, is a general-purpose language; Gosling may be thinking of Rails; see David Heinemeier Hansson's response. The scalability part I find it hard to take seriously. There are many routes to scalability that don't require Java.

    Reading between the lines, it looks as if Gosling accepts that "complexity hurts Java" (quote from Yakov Fain's notes). His thesis is that complexity is needed to give Java its "power", where power is the ability to solve a breadth of complex problems, from web apps to "interplanetary navigation". His further thesis, if I understand right, is that you can prevent this complexity from obstructing productivity by using sharply focused tools.

    I agree up to a point. The right tools combined with strong frameworks enable us to manage complexity. At the same time, the rise of dynamic languages combined with test-driven development represents a profound shift in our understanding of programming, as I've come to realise during the last year or so. It strikes me that the range of problems for which Java is seen as an optimal solution is actually narrowing, rather than becoming ever broader as Gosling suggests.

    Tags:

  • Vodafone row claims see Gent quit

    Published on 12 Mar 2006 from

    Former Vodafone chief quits his honorary post as life president amid rumours of a boardroom rift at the mobile giant.

  • Internet blows CIA agents' cover

    Published on 12 Mar 2006 from

    The Chicago Tribune says it has compiled a list of 2,653 CIA employees, just by searching the internet.

  • It’s quite simple: it’s British

    Published on 12 Mar 2006 from

    Your registration will be checked by an admin for eligibility."And the Terms & Conditions state that a podcast is considered British only if: "At least one of the regular significant, audible contributors to the podcast show must be a citizen of the UK or UK expat living abroad."Yet, over a third of podcast submissions are from podcasters who are clearly not British (mostly American)!... The form itself even bounces if the registrant chooses any nationality other than British - stating in a bright red error message: "Britcaster only accepts registrations from British podcasters..."I realise that many podcasters out there desperate for an extra listener or two will just fill in forms willy-nilly, but how do they believe a blatant mirepresentation by being a non British podcast on an exclusively British listing site can benefit them in any way?It escapes me.I check all submissions manually for eligibility and request further evidence of their Britishness if it is not clear from the podcast and/or website that they are in fact British.

  • Livedoor boss 'facing new charge'

    Published on 12 Mar 2006 from

    Takafumi Horie, the ex-boss of internet firm Livedoor, is expected to face further charges for falsifying accounts, reports say.

  • Atlas Presentation and Samples

    Published on 12 Mar 2006 from

    I had the chance to present a new talk I created about Atlas (our new ASP.NET Ajax framework) to a few thousand people at the Dutch Microsoft DevDays conference last week.  Based on the feedback I’ve received it was a big hit, with a lot of people telling me that they left with a really good understanding of what we are doing, and how surprisingly easy it was to use (several people left my talk on the first day, downloaded and installed it, and successfully built their first data-driven Ajax application that night).

     

    Click here if you want to download and walkthrough the slides + demos for my talk.

     

    About "Server-Centric" and "Client Centric" Ajax Applications

     

    I split the presentation into two parts. The first part focused on how to build what I call “server centric” Ajax applications – meaning the application and navigation code for the Ajax application still primarily resides on the server (in the case of ASP.NET using VB or C#), and Ajax is used to communicate between the client and server and transfer incremental updates of HTML UI.  The new ASP.NET <atlas:updatepanel> control and other associated Atlas server-side controls make building applications really easy with this approach, and doesn’t require developers to master client-side JavaScript (in fact – you can actually get away without using it at all if you want).  It is really easy for any ASP.NET developer to add nice Ajax support to their existing web applications using this approach (for example: you can typically Ajax enable an existing data-driven page using the ASP.NET DataList + GridView controls in less than 5 minutes).

     

    The second part of my talk then focused on what I call “client centric” Ajax applications – meaning that much of the application and navigation logic runs using JavaScript on the client (which then calls back to the server to retrieve and update data).  This enables even more immersive applications to be built using Atlas (for example: Mashups, Live.com Gadgets, Windows side-bar components, etc).  Atlas provides a rich JavaScript library framework to make building these types of experiences much cleaner and easier.  It include a rich networking stack to allow exchanging .NET data-types between browsers and servers, a rich JavaScript library that provides a base class library of useful non-UI components and patterns (for example: the ability to do inheritance in JavaScript, timer classes, string-builder classes, the network classes, etc), and a JavaScript control library framework that enables developers to componentize and encapsulate JavaScript-built behavioral controls to HTML UI (for example: Atlas ships with a client-side ListView control that you can attach to standard HTML <div> elements to provide client-side databinding support against data that you dynamically retrieve from a server).

     

    The Atlas client-side JavaScript library is very powerful and feature-rich.  One really nice thing about it for people who don’t want to write a lot of JavaScript is that it can also be used to build ASP.NET controls to enable much richer server controls that encapsulate this behavior for you, and integrate nicely within existing ASP.NET pages.  We are going to be putting out a Atlas control toolkit + library containing a number of sample controls that show how to-do this in the next few weeks, and hope to spur control developers to start producing a lot of great Atlas-enabled server controls that anyone can use.  Our plan is to make it trivial for anyone to build great ASP.NET web applications that take rich and full advantage of Ajax.

     

    Using the Samples in the Talk

     

    The samples from my talk are best used with Visual Web Developer Express (which is free) or Visual Studio 2005.  Just download this .zip file and open the web-site at the sub-directory root and you are good to go (note: you don’t need to install Atlas – since the project already includes a copy of it). 

     

    I didn’t require the use of a database with these samples – instead I focused on building very small specific samples that clearly illustrated individual technical points.  For a more complete, data-driven, application scenario with Atlas you can check out my Task-List Sample Application & Blog Post that I built using the December CTP drop.

     

    O’Reilly’s Atlas Book

     

    O’Reilly Press also recently published the first Atlas book online. 

     

     

    It is part of their “rough cuts” series – which is a concept I find really appealing.  Basically with the rough-cuts series you can pay $17.99 to buy and download a .PDF subscription version of the Atlas book, which will then be updated as the technology changes and the book evolves (they’ll send you an email when updates occur and then you can download the new update).  For $38.99 you can buy both the online subscription version as well as get sent the final printed book once it ships in the future when the book is done and the technology stops moving.  This provides a nice way to stay up-to-date with bleeding edge technology, but also not have to worry about your bookshelf becoming obsolete a few months from now.

     

    I bought and read the Atlas Rough-Cuts book on the plane ride back to Seattle.  I found it a good book that helped a lot in learning the basics of the Atlas client-side control framework and base class library (the documentation for both of which is still very scarce).  The current version of the book doesn’t cover the server-centric model yet or the <atlas:updatepanel> control (although this is the easiest part of Atlas to learn – and my samples + slides above should cover most of the basics).  But if you are looking to start understanding the client-centric approach I’d recommend buying a copy and checking it out – it is a fast read that helps provide easy exposure to the technology.  You can learn more about it and order/download it here.

     

    Hope this helps,

     

    Scott

     

    P.S. We’ll be releasing a lot more information + samples + document about Atlas at the MIX conference in a week’s time.  Stay tuned for then.

     

  • Ahhhh! More WPF Goodies. March CTP of Expression Interactive Designer.

    Published on 12 Mar 2006 from

    I’ve just moved my WinFX environment from Windows Vista Feb CTP to Windows XP Service Pack 2 as I’ve been having trouble getting a driver for my laptop’s video card that would cope well with an external display such as a projector (this is a temporary glitch that will no doubt get fixed as we head towards Beta 2 of Vista but it’s stopping me working productively right now).

    So, I’ve just gone through the process of installing the WinFX runtime, the Windows SDK and the extensions for Visual Studio onto my laptop which takes, all told, about 45 minutes or so.

    I was just trying to decide whether there was anything that I’d missed when I spotted a post that said the new CTP of the Expression Interactive Designer had gone live so I’m off to download it now. This is compatible with the February CTP of WinFX.

  • Links for 2006-03-11 [del.icio.us]

    Published on 12 Mar 2006 from

  • "Spying on Yourself"

    Published on 12 Mar 2006 from

    Alex Barnett points to J Wynia's guide to setting up and playing with the Attention Trust's Firefox extension to record your clicks and gubbins.

    This is something I hoped existed. There's not a lot you can do with it at the moment (it makes a big list, and you vaguely report on it later), and frankly the wishlist on the Attention Trust wiki seems pretty low on big ideas. Personally, I want to look into some form of Attention Microformats, so I can define the semantics of a set of related gestures - e.g., buying a book on Amazon, checking train timetables and other incredibly dull stuff like that. The raw data's useful, but I'd much rather be querying something richer, and when it comes to sharing the data, I think it would be interesting to be able to combine semantically-similar attention data from different sources. It's entirely possible this is all out there, I've not really been reading avidly enough to keep up. Looking forward to playing, though.