ODP.Net Part 3
January 21st, 2009Ok, not really part three but a quick post about how the last two posts arrived at the blog in the wrong order. I can’t be bothered swapping them round so just read from the top down
Talk is cheap. Show me the code.
Ok, not really part three but a quick post about how the last two posts arrived at the blog in the wrong order. I can’t be bothered swapping them round so just read from the top down
This stuff really does tire me out. I’ve spent yet another day battling with Oracle’s data provider instead of doing anything meaningful. I’m calling a stored procedure with an out parameter of a varchar2. I assign an OracleParameter in exactly the same way as the stored procedures , same order and same sizes. everything matches, and I keep getting a ORA-06502 saying that there’s a size mis-match. What gives. I’ve never had this much trouble with SQL server, everything just seems to *work*. Pick up oracle and you seem to spend days battling with crap SDKs, connection problems, and weird things like TNS names junk – after all it would just be TOO complicated to specify this as an IP address in the connection string. <sigh>
Oracle isn’t my Friend.
Ok, after spending another 1/2 day battling with the oracle tools for devstudio, i took the plunge and reflected the whole Oracle Data access component. I’m not sure I should be publicly admitting to reverse engineering Larry’s baby but if its the only way I can find out what broken, so be it. They should learn to write working code.
So I dig out reflector and run the ODP.Net assemblies through one of the reflector add-ins that brings it back to something more readable.
On inspection it seems that they’re mixing the domain values for db nulls. the OracleString performs a conversion when the column is null and actual returns the string “null”! Poor? Well I think so.
So, the next step is to look through the designer code that the ODT spits out when you drag a stored procedure onto a data set design surface. It appears to work ok, until you try using any procedure that involves varcar2 out parameters. Then it chokes. Nice.
The problem is it looks like their generated null checks aren’t working correctly. They’re testing the returned objects against NULL, and then if the object isn’t null they’re comparing the objects Value with System:DBNull. This obviously wont work since an they always return an Oracle type and the value throws an exception if the Oracle type is null. Not only that, but their implicit casting in the generated code is broken too, although that seems to be a symptom of their checks for null failing and going on the read the Value in order to cast it to a real .Net type.
The fixes are pretty simple, but it does involve editing the Table Adapters designer .CS file and fixing their ropey code.
I encountered these problems a couple of years ago, and swore never to trust them again, but heh, this is 3 years later, surely they’ve fixed the casting bugs?
Apparently not.
So, if you have the choice stick with SQLServer. For all MS’s flaws they seem to emit bug free code, and they do fix stuff.
<rant over/>
Apart from not understanding how to catch trains properly for the first 2days, everything’s going pretty well. The team is switched on, and the work is interesting so its all good
What I do find a bit puzzling is that other than Sheffield station there’s no way to find out which trains stop at your station, or what time it will arrive. Where there’s more than one train stopping at your destination you have no way of knowing which one will be quicker other than to ask. Even Sheffield’s fancy display board doesn’t show you the arrival times, but it does, however, show you which stations the trains will stop at.
So for instance, although there are trains that go direct from Sheffield to Leeds these can take up to an hour and 40 minutes. However, the cross country trains that start at Plymouth and end in Edinburgh also stop at both Sheffield and Leeds and yet only take 50 minutes. The trouble is you have no way of finding that out other than asking, or being a regular and already knowing!
It all seems a bit odd to me. Anyway, its no longer taking me 3.5 hours to commute! Yay!
As for the work, it does seem there’s more ASP.NET that I expected, but the data that’s driving the site is pretty interesting to work with, and because we’ve got a pretty switched on Oracle developer it’s making my life really easy! He has complete control over the organisation of the data, and if we need something that he hasn’t thought of it’s a simple task to ask him to add it, no politics involved which is a great relief.
For the T-Mobile internet dongle, apart from the slightly patchy connections whilst on the train I’ve actually used less than 80mb, which is pretty good really. I was thinking that I’d be going over my tariff limit but on reflection i doubt I’ll even come close.
That 80mb consists of email, some web research and a bit of online development i.e. uploading files to a couple of my sites. I have noticed that as soon as the connection is made, the tmobile connection manager’s transfer count starts climbing and reaches 160K of transfers, without me actually doing anything. my daughter has borrowed it too, so I was expecting the whole allowance to be used
but she only ended up using 28mb for a whole night of the usual facebook/bebo/tagged rubbish !
So, Good news I dont think I’ll end up going over the limit at all!
Image by Neil T via Flickr
Ok, so after after a short break over Christmas, I though I’d better pull my socks up and start looking for a new contract. As everyone returned to work on the 5th of Jan, I wasn’t expecting anywhere near the response I got after posting my CV online! Either my C.V. is absolutely amazing or the IT market is ridiculously understaffed! I’d like to think it was the former, but I suspect it’s the latter! Just over 3 days into the first week and I was getting over 25 calls a day. by Thursday I’m signed up for a 6 month contract in Bradford!
Since trying to get to Bradford by car would be a real PITA , I’ve opted for a more comfortable commute and gone by train. So not only can I get a good hour and half of work done I can actually blog more often too
Finally might get a chance to write as many articles as I keep promising!
I did buy a nice little T-Mobile internet dongle too, so I can be connected whilst travelling – T-Mobile seemed like to best deal because of their usage policy. If you happen to go over their limits, there’s no real penalty. Unlike all the other operators which charge over £1 a megabyte! £1 a megabyte! That’s totally ridiculous! If I accidentally went over my limit and watched a day of youtube videos (well ok, you’d have to be pretty brain dead to watch *anything* on youtube) I could end up with a bill of over £1000! . Anyway. after a few days of email / blogging and googling, I’ll post an update on how long my usage cap is likely to last!
Image via Wikipedia
nCode I.T. Limited! Yes, I’ve finally got round to setting up my own limited company. Since it makes more sense from a taxation point of view, and also gives me a platform to launch my own Micro-ISV. Since I’m deeply entrenched in the .Net world at the moment, I thought a bit of word play on the nXXX series of tools (nHibernate, nUnit etc) would have a cool geekiness to it. Anyway, the site basically gives a few details about my skill set & what I’ve been up to, purely for the contracting & outsourcing work, but the final (and as yet unlinked) section will pint to some of the work I’ve been doing outside contracting hours that’s helping me towards the fully fledged Micro-ISV status.
My first commercial product for my Micro-ISV will be a set of Bitmap Effects for .Net 3.5SP1.
This Effect pack will include :
Here’s an example of the skin shade effect. Two different ‘skins’ provided by applying the effect right at the top level window. Allowing an almost infinite range of skins is now only 3 lines of XAML away! This is the WPF outlook Hands-On-Lab that the effect has been applied to.
Fancy a rose pink outlook ?
and a fraction of a decimal away are shades of purple.
Notice that although the colours change, the intensity and saturation stay constant. If you have a nice pastel colour set, all you’ll get after applying the effect is more matching pastel colours.
Obviously these effects could be achieved by making sure you set all your element colours to dynamic resources, and then defining lots of resource dictionaries with colour schemes in, then adding an interface to load those schemes. Although this is the traditional way to manage themes (and obviously still has its place) making sure all your elements share the same styles or dynamic resources for colours its a royal pain, and error prone.
Using a single effect like this allows you to define one set of harmonious colours for your application, then get an almost infinite set of harmonious colours at the switch of a floating point value, without ever forgetting to set an elements colour, and also doing away with the resource hit of using dynamic resources for every screen element that you want to change colour.
Another feature of the Bitmap Effects is the ability to selectively apply the effect based on an Opacity value. This allows you to add the bitmap effect to your top level window but still maintain control of which elements actually get affected by the effect right down at the element level.
An example case where you would need this is an application that displays photographs. You really wouldn’t want your grandmothers purple rinse extending across the whole photo just because it was part of the visual tree that the Colorize effect had been applied to! Using a specific value for the Opacity we can exclude elements from the effect. There are samples provided which explain how to do this selective effect application.
All the effects in the library support selective application at the pixel level. Another useful thing this feature allows you to do is maintain a specific colour for your control’s text, and have it excluded from the application of the effects.
I’m currently working on the documentation and samples, but when these bits are done, you can purchase this effects library and get updates, support, and implementation help via the official nCodeFxLib Bitmap Effects site
Enjoy.
Rob
Image via Wikipedia
I’ve just tried to order my son a new LG Cookie for Christmas from the Carphone Warehouse. Tried being the operative word here. I’m absolutely amazed at how we’re still struggling to get the whole on line ordering experience right. I’d filled in the form, and the list of errors were almost as long as the form itself.
I’d like to think that I’m not really that big of an idiot that I can’t get an on line order form right…but Carphone warehouse succeeded in spectacular fashion. So when the website even gives me 3 errors regarding my home phone number I’m left wanting to click the close icon.
Error #1 – the phone number is too long. Why ? See error #2.
Error #2 – the phone number has spaces in it.
Error #3 – the phone number is invalid.
Forgive me for thinking that it’s really at the bleeding edge of technology to determine whether a phone number is valid or not. With or without spaces. Id entered 3 phone numbers. So there was a total of 9 errors, just for the phone numbers, when the code could easily have stripped out the spaces, or even god forbid, used something as technologically advanced as a regular expression to make sure it was valid.
After fixing the errors I’m left with the final error. It appears my credit car information is invalid. Why? Oh, we won’t actually tell you that. We’ll just say that there’s *something* wrong. Did anyone do *any* usability testing on this? I can’t believe it. Absolutely atrocious for a single page form.
Thank you Carphone Warehouse. And, Goodbye.
Oh, if anyone from the Carphone Warehouse by chance happens to read this, I’m available to help you out. Trust me, you need all the help you can get.
Where did that whole designer stereotype come from? I was amazed to see that it’s still alive and kicking when this pair of black turtleneck sweaters dropped into my inbox!
When I was heavily involved in the games industry, you could spot a designer a mile away. Strangely enough I didn’t see any at Team17 (everyone there was far too cool
, it was usually attending a show, or when we had visitors that the turtlenecks were out in force!
Black turtlenecks should be raised to the same status of socks and sandals.
Image by Getty Images via Daylife
On the home front it looks like my time at "EDS an HP Company" may be coming to an end! They’re big, but they’re just not big enough to contain my passion and enthusiasm! I’ll know more tomorrow after a discussion with my superiors, but I think my future lies elsewhere.
Hint : I’ve updated my Contracting CV.
Wow, its been so long since my last post that I’ve almost forgotten what a blog is. Well, almost.
Many things have happened both personally and professionally, hence the post hiatus.
But once again, I’m back and hopefully this time, I wont be straining myself trying to crank out humongous posts that take days to complete. Maybe if the posts are short and sweet i’ll end up with a more regular flow of useful snippets, rather than a 3 month delay then a 20 page monster article. These will still happen, but they won’t be the focus of my attention.
Anyway here’s a few things that have been keeping me away from the blog (if anyone’s interested!)
Anyway, that’s enough posting for this entry, or I’ll be back on a 10 pager. I *will* be back tomorrow with a post about a good way to allow assitive tech to read the stuff on a WPF application under Windows XP. Damn that was tricky.