January 2008 - Posts
I missed posting yesterday due to stuff.
- I had not headr of this site before - iStockPhoto. Allows you to purchase photos for use in presentations/web sites etc. The thing that interests me though is the ability to post a photo for purchase
- Absolutely hilarious parody of Tom Cruise. (You need to have seen the Tom Cruise Scientology interview)
- An awesome resource for podcasts that relate to ASP.NET.
- Are we a step closer to the Hydrogen Economy?
<Rant>
Well, I finally feel that I need to say this (emotionally charge as it is likely to be). I am sick to death of the movie and music industry leaving us poor mugs here in Oz on the outer. Waiting for movies/tv shows to be bought by the TV stations before we can see them, and in some cases waiting for years before we see it. Here are a few examples:
- Flash Gordon is being shown in the US on the Sci-Fi channel. Now, even though we do have a Sci-Fi channel here on Foxtel, I have yet to see any indication that we will get to see it (I know I know, it is probably crappy, but let us decide that)
- There is also another show called Kyle XY - similar situation
- Doctor Who -well, we saw the first 3 series (8 months after release mind you),a nd are yet to see the new ones. We haven't even seent eh Christmas Special yet.
- The Sarah Jane adventueres is apparently in season 2, yet we have not yet seen it here
- The The Sarah Connor Chronicles is not here yet (but apparently we are promised this "in February"
There are many many more like this. Take XBox live and the ability order movies and watch them that way, or even iTunes where you can purchase on-line movies. Then there is Amazon with DRM free music. The list goes on.
What do we get lumbered with? Bigpond movies, which sucks so much you would rather go and hire it from a Video store. And Bigpond Music, which sucks so so so much (jsut try and re-image your machine and see if you can play your legally bought music) . In the face of all of this, you hear the entertainment industry cry about piracy, and how much it is damaging their business.
Well, if we, the consumer, actually cared enough to stop believing their crap arguments, the might actually stop their hiding behind the veil fo piracy, and actually supply the whole world with services that stop piracy. How much does constricting supply of a prodcut contribute to piracy? Remember prohibition? Did that work? Well, I say that the entertainment industry is attempting to practice prohibition on entertainment. So of course there will be priacy. What else do they expect?
</Rant>
My apologies for the lack of posts. It was Australia Day, and I took a few days off 
So without any further ado, here are my links for the day:
Well, I finally got sick of the old Community Server look, and since it was Australia Day, and I had a few spare hours, I thought I would upgrade to to the newest version. So here it is. To me, it looks a lot better, and will hopefully allow me to organise the posts a bit better.
Seems to be a quiet day today. Nothing on the radar worth mentioning.
- So I am going to spend the evening learning about ASP.NET MVC from one of my favourite sites: dnrtv
- Came across this article about XBox 360 and failure rates. I just loved this comment:
"First, MS has under resourced that product unit in all engineering areas
since the very beginning. Especially in engineering support functions
like test, quality, manufacturing, and supplier management. There just
weren't enough people to do the job that needed to be done. The
leadership in many of those areas was also lopsided in essential skills
and experience. But I hear they are really trying to staff up now based
on what has happened, and how cheap staff is compared to a couple of
billion in cost of quality." (emphais mine)
UPDATE: Changed the title to refelct the actual month (not Januaary)
- Had a query today from a colleague at work on how to warm up a SharePoint site so that when a user first accesses the site, they do not wait for 15 seconds while the site goes through a JIT. I did not have the link on me, so I found it, and thought I would document it here
- Extending AJAX controls
For most of the time, I love .NET. It truly makes my programming life so much easier than it was in my VB 6 and COBOL days. But someetimes, you come across something that makes you want to take the .NET framework designers and punch them senseless. I am, of course, talking about that wonderful "by design" feature of ASP.NET 2.0 data binding that results in the dreaded "dropdownlist has a SelectedValue which is invalid because it does not exist in the list of items".
Now, the error is not a bad thing. You first populate a DropDownList with reference data from a database (or a Business object) that serves as an input field so that users do not have to enter data in. Then, you put that DropDownList into a gridview/listview/formview etc, and retrieve a record from the database that contains a field whose value is represented by the DropDownList data.
BUT, say that the database returns a null value, or that the value of an historical record contains a reference value that is no longer valid, or even that there is a data corruption issue. What result do we get? A horrid screen that is presented to the user informing them that a "dropdownlist has a SelectedValue which is invalid because it does not exist in the list of items". And a user is supposed to understand this how?
Anyway, after a massive amount of searching, I have come up with a solution that works for me. (Just a s a side note, I have tried the AppendDataBoundItems="true" but this only works when you know what values are missing from the drop down. Not really a solution IMHO). The solution I found was courtesy of WebApps.com. The upshot is that for the DropDownList, you handle a OnDataBound event, where you essentially set the value yourself if it is there, otherwise set the value to a default item. Simple, yet elegant.
Why Microsoft has not made such a solution easily discoverable, is beyond me.
And as a note, the same thing happens in .NET 3.5, so they have in no way listened to gripes about this. I mean, how hard is it to allow the programmer to catch the exception and handle it? (And if anyone reading this knows a better way, then please let me know.)
Anyway, hope that helps someone. (My apologies for the rant)
- A nice site for development tools and methods
- I am not an Apple fanboi, but this does look very interesting
- Yet another battery idea. I know that the Internets are excellent for information dissemination, but it also is a vehicle for hype. Let's just hope that one of these "miracle" battery ideas actually makes it to devices in the next 5 years.
- Another example of how there are a lot of very talented people out there. Makes me whimper in despair at my mediocrity
- And it looks like the Apple Air is green as well.
- Interesting Archaelogical stuff about a sunk city off the coast of England
- An interesting article on Windows WorkFlow
I came across this little doozy on my current project.
The Situation
We have an application that is a multitiered application, with an ASP.NET front end, a Business Logic Layer, and a Data Access Layer. We are using strongly typed datasets (that are created from Oracle Views which correspond to the cursors that are output by the stored procedures). In some situations we have some fields that can be null in the databasae, but are represented by reference types in .NET (e.g. DateTime, Integer, etc). The problem arises when these values are null is that an exception is thrown when a OracleDataAdapter.Fill operation occurs.
The Solution
So, after a lot of searching, I came up with a solution,
- Right click the dataset and select "Open With"
- Select the XML editor
- Find the reference field that you require to be able to be null
- For DateTime fields, add the following to the xs:element:
- msprop:nullValue="0001-01-01T00:00:00.0000000"
- For other reference types, set to a value that you will identify as null (e.g. -1)
- Save and recompile
In the end,the solution is very simple, but very hard to find a definitive solution to. Note that I am using Visual Studio 2005 with .NET 2.0
Hope that helps someone out there.
- Martin Fowler has an interesting article on repositories
- After seeing No Country for Old Men on Sunday at Birch Carrol and Coyle cinema at Garen City (Brisbane), I have vowed never to set foot inside a BCC cinema again. Horrendous. The cost was high, they now have allocated seating (meaning that you have to sit where they tell you, and heaven forbid that you happen to be placed next to a chatterer, or a baby, or another annoying type, and the air conditioning gets turned off halfway through a film. I would complain, but no one would listen, so I will merely stay away. Yeah. That'll get 'em)
- Very interesting concept here about capacitor driven cars
- Another interesting article on solar.
- Egypt, drought, growing populations, and how to handle them
- An interview with Bill Gates. Love him or loathe him, he has certainly changed the world, and I think for the better
- And then there is this one for fun
- Just what were they thinking? Then again, it is David Hasselhof after all. Seriously bad.
- It really is a world filled with people who have far far too much time on their hands
- Some audio books for those who like to listen
- An interesting podcast from Thoughtworks
More Posts
Next page »