Interesting concept, a piece of software that detects the amount of spin in a speech. The model is based on analysing the frequency of various kinds of words in a speech and professes to be able to detect levels of deception and insincerity in English text. I must confess, I'm more than a little skeptical. I just think there are so many variables, ie the speakers/speech writers proficiency with the English language, different styles of speech writing, different topics, different audience. All of these things change the way we use language and shape what we say.
I guess the ultimate test will come when they decide to commercialise the software and produce a website dedicated to selling it..... and then run the software over the site. I guess this could be seen as an extension of the halting problem.
Thursday, January 26, 2006
Friday, January 20, 2006
Arguments for continuous integration
The company I’m currently consulting to are pretty good when it comes to their internal development systems, although one of the main areas I can see for improvement is in continuous integration. They currently have a full build process is manually initiated, and works pretty well. I really think they need to go to the next step, that of continuous integration.
A couple of days ago I was checking in some very subtle but serious changes to the way we accessed SQL Server (we switched to use User Instances so that we could run as an LUA user). We were all a bit nervous about this change because although it was a relatively minor change, it was a significant unknown, in fact I was the only one who had any idea of how user instances worked. So as part of the code review, the reviewer asked me to run all of the unit tests just to be sure we hadn’t inadvertently broken anything, and sure enough a whole heap of them just curled up and died a horrible death. Being the insecure person that I am I immediately rushed to the conclusion that it was my changes and started questioning my own understanding of user instances. When running the application, I was able to reproduce the error under certain conditions on my machine, but no-one else was able to reproduce the error on their machine. The next day I spent the best part of the morning looking at the problem and eventually discovered that firstly the reason I could reproduce it on my machine was because I was using an obscure (non-default) option in the application, and secondly that the bug occurred with or without my changes from the night before. Armed with this information I then went to the team lead who then spent the next half of the day going back through labels in our source control attempting to find the release that this bug first occurred in. He eventually found it to be due to a check-in about 4 or 5 days prior. This indicated 2 things, firstly people had not been running even the effected unit tests for their check-ins, and secondly if we had continuous integration, and unit tests were run automatically at the point of check-in, we would not have wasted a day and a half of development time tracking down the origin of the bug. I told the development manager that this incident re-affirmed my faith as a unit-test evangelist.
A couple of days ago I was checking in some very subtle but serious changes to the way we accessed SQL Server (we switched to use User Instances so that we could run as an LUA user). We were all a bit nervous about this change because although it was a relatively minor change, it was a significant unknown, in fact I was the only one who had any idea of how user instances worked. So as part of the code review, the reviewer asked me to run all of the unit tests just to be sure we hadn’t inadvertently broken anything, and sure enough a whole heap of them just curled up and died a horrible death. Being the insecure person that I am I immediately rushed to the conclusion that it was my changes and started questioning my own understanding of user instances. When running the application, I was able to reproduce the error under certain conditions on my machine, but no-one else was able to reproduce the error on their machine. The next day I spent the best part of the morning looking at the problem and eventually discovered that firstly the reason I could reproduce it on my machine was because I was using an obscure (non-default) option in the application, and secondly that the bug occurred with or without my changes from the night before. Armed with this information I then went to the team lead who then spent the next half of the day going back through labels in our source control attempting to find the release that this bug first occurred in. He eventually found it to be due to a check-in about 4 or 5 days prior. This indicated 2 things, firstly people had not been running even the effected unit tests for their check-ins, and secondly if we had continuous integration, and unit tests were run automatically at the point of check-in, we would not have wasted a day and a half of development time tracking down the origin of the bug. I told the development manager that this incident re-affirmed my faith as a unit-test evangelist.
SQL Sever & file permissions
In the course of trying to track down a problem running the application i'm involved in developing at the moment, I stumbled across the following article describing what SQL Server does with file permissions when it attaches to a database file.
The article states that for security reasons it changes the file permissions so that if a file has been placed in an insecure folder, then it attempts to protect it from someone without the privileges from moving or deleting it.
It seems to me to be a little mis-guided. Firstly, I would assume that it's the responsibility of the DBA, to place all database files in an appropriate place with appropriate permissions to the various users that require access. The secure by default paradigm is all well & good, but there is no way to turn this behavior off. Secondly, it doesn't really achieve anything. If a DBA has been dumb enough to place a vitally important database file in a folder that anyone has full control over, then if SQL Server is not attached, the user can easily cut & paste the folder wherever they want which will have the same effect as moving the original file.
Maybe i'm not seeing something here, I can't really see the need for this.
The article states that for security reasons it changes the file permissions so that if a file has been placed in an insecure folder, then it attempts to protect it from someone without the privileges from moving or deleting it.
It seems to me to be a little mis-guided. Firstly, I would assume that it's the responsibility of the DBA, to place all database files in an appropriate place with appropriate permissions to the various users that require access. The secure by default paradigm is all well & good, but there is no way to turn this behavior off. Secondly, it doesn't really achieve anything. If a DBA has been dumb enough to place a vitally important database file in a folder that anyone has full control over, then if SQL Server is not attached, the user can easily cut & paste the folder wherever they want which will have the same effect as moving the original file.
Maybe i'm not seeing something here, I can't really see the need for this.
Saturday, January 14, 2006
New toy
Well, I'm now the proud new owner of an O2 XDA Atom.
I have been hanging out since my XDA II started playing up, but I wanted to hold out for a Windows Mobile 2005 device.
So far, mostly I have been impressed. I love the ability to switch between lanscape and portrait screen modes, I love the in-built wi-fi, I adore the tiny size (in comparisan to the XDAII) and it seems there have been some improvements to the predictive text which makes it easier to enter data into, but there are a few things I haven't been so impressed with.
Maybe it's just buggy early release software, but I have had three occasions so far where the phone has stopped responding to the on/off button. I have also not had any luck what so ever with the devices alarm. I have had almost a week now where it has not woken me up even though I have set it. My partner says I should read the manual, but I'm sorry, it goes against every rule of usability and good design if I have to read a manual in order to set the freakin alarm clock. I'm happy to read the manual for other more complex tasks, but not to set the alarm clock.
Anyway, I will persevere and hope a firmware update is close. I'm also hoping to get back into some Pocket PC Development, I'm really keen to put sql mobile and the new version of the .Net Compact Framework through their paces.
I have been hanging out since my XDA II started playing up, but I wanted to hold out for a Windows Mobile 2005 device.
So far, mostly I have been impressed. I love the ability to switch between lanscape and portrait screen modes, I love the in-built wi-fi, I adore the tiny size (in comparisan to the XDAII) and it seems there have been some improvements to the predictive text which makes it easier to enter data into, but there are a few things I haven't been so impressed with.
Maybe it's just buggy early release software, but I have had three occasions so far where the phone has stopped responding to the on/off button. I have also not had any luck what so ever with the devices alarm. I have had almost a week now where it has not woken me up even though I have set it. My partner says I should read the manual, but I'm sorry, it goes against every rule of usability and good design if I have to read a manual in order to set the freakin alarm clock. I'm happy to read the manual for other more complex tasks, but not to set the alarm clock.
Anyway, I will persevere and hope a firmware update is close. I'm also hoping to get back into some Pocket PC Development, I'm really keen to put sql mobile and the new version of the .Net Compact Framework through their paces.
Tuesday, December 06, 2005
Answer to question posed at VSLive
The thing I was most nervous about at my VSLive presentation was question time. I had an ingenious plan to avoid question time... I had timed my presentation, and it went for just over 1 hour, but in the words of a famous poet... "The best layed plans of Mice, Men (and Geeks) gang aft aglay". People from the audience stopped me mid-way through to ask questions. Most of the questions I was able to answer, but there was one that I said "I think the answer is yes, but I'll get back to you". The question was... "Does SQL Express support bulk copy?", and after some testing the answer is "Yes". As mentioned in my presentation (slides available here) SQL Express does not support SSIS (The replacement for DTS), however after testing, the bcp utility works fine. The following script can be used to verify that both import and export work fine.
use tempdb
-- Create a test table
create table BulkTest
(TestKey INT NOT NULL,
TestData NVARCHAR(50) NULL,
CONSTRAINT BulkTest_PK_Constraint PRIMARY KEY (TestKey ASC)
)
-- Add some test data
INSERT INTO BulkTest
(TestKey, TestData)
VALUES
(1, 'This is just some test data')
INSERT INTO BulkTest
(TestKey, TestData)
VALUES
(2, 'This is some more test data')
INSERT INTO BulkTest
(TestKey, TestData)
VALUES
(3, 'It is important to have test data')
-- perform bulk Export using bcp command line utility
-- bcp tempdb.dbo.BulkTest out BulkTest.dat -T -c -S ServerName\SQLExpress
delete from BulkTest
-- perform bulk Import using bcp command line utility
-- bcp tempdb.dbo.BulkTest in BulkTest.dat -T -c -S ServerName\SQLExpress
select * from BulkTest
Saturday, December 03, 2005
VSLive Seminar post mortem
Well, my VSLive presentation was on Wednesday, and I personally was quite pleased with how it all went. I must confess, I was a little nervous, but I didn't let my nerves get the better of me. I had really positive feedback from people after the seminar, and even one request for the source code for my Photo Album Demo... enjoy! The demo sort of loses a bit by distributing it in this form, as it was more about the process of building it and displaying the Visual Studio integration features of SQL Server Express. There are only 5 lines of user written code in the project, and they are all to do with implementing Drag-Drop on the picture box so that you can add the photos to the database, the rest is all IDE generated.
There was one point that given the discussions after the seminar, I feel I should clarify. I went into a bit of detail describing the SQL Express only feature "User Instances" or RANU (Run As a Normal User). I do think it is an interesting feature and I can see some real potential for it, however, from the discussions after the seminar, it appears that I didn’t stress enough, that User Instances are optional (in the connection string "User Instance = true"). You don't need to use it, in fact, I would suggest that in the majority of usage scenarios, you will use SQL Server Express in your traditional Database server scenarios where you have a dedicated server machine that a DBA logs on to allowing her to perform maintenance tasks like Attaching databases etc... multiple clients would then log onto the database from their own machines with only the privileges they require to perform the tasks they need to. User Instances are only really required when you want to deploy an application in a single user type scenario, and you want to deploy the database file along with the executables and have the user (who by best practice in security, should NOT be an administrator on their own machine) attach dynamically to the database. I hope this clears things up.
For a really good, in depth article on User Instances, see Roger Wolter's msdn article on SQL Express User Instances.
By the way if any of the people in the seminar find my blog, please feel free to leave any feedback on my performance, I would like to know how to improve my presenting.
There was one point that given the discussions after the seminar, I feel I should clarify. I went into a bit of detail describing the SQL Express only feature "User Instances" or RANU (Run As a Normal User). I do think it is an interesting feature and I can see some real potential for it, however, from the discussions after the seminar, it appears that I didn’t stress enough, that User Instances are optional (in the connection string "User Instance = true"). You don't need to use it, in fact, I would suggest that in the majority of usage scenarios, you will use SQL Server Express in your traditional Database server scenarios where you have a dedicated server machine that a DBA logs on to allowing her to perform maintenance tasks like Attaching databases etc... multiple clients would then log onto the database from their own machines with only the privileges they require to perform the tasks they need to. User Instances are only really required when you want to deploy an application in a single user type scenario, and you want to deploy the database file along with the executables and have the user (who by best practice in security, should NOT be an administrator on their own machine) attach dynamically to the database. I hope this clears things up.
For a really good, in depth article on User Instances, see Roger Wolter's msdn article on SQL Express User Instances.
By the way if any of the people in the seminar find my blog, please feel free to leave any feedback on my performance, I would like to know how to improve my presenting.
Monday, November 07, 2005
VS2005 SQL Server 2005 RC/RTM Gotcha with MARS
For those who are familiar with MARS (Multiple Active Result Sets) and have been excitedly using them with versions of visual studio 2005 prior to the the june CTP, you may be interested to know that there has been a change in the default behaviour.
MARS is OFF by default, and any code written to use it as in this code project article will cause an exception if you don't explicitly add the following to your connection string "MultipleActiveResultSets=true".
The exception you will receive is "There is already an open DataReader associated with this Connection which must be closed first".
Another resource of interest is "Getting the MARS Sample working in the june CTP".
MARS is OFF by default, and any code written to use it as in this code project article will cause an exception if you don't explicitly add the following to your connection string "MultipleActiveResultSets=true".
The exception you will receive is "There is already an open DataReader associated with this Connection which must be closed first".
Another resource of interest is "Getting the MARS Sample working in the june CTP".
Saturday, November 05, 2005
Blogging on Blogging
I don't usually blog about blogging, I find it a little too self referential for my liking, but last weekend I was talking to a friend about blogs and he told me he didn't particularly like the idea. His explanation of why he didn't see blogs as a valuable social construct went along the lines that on one side of the spectrum you had articles in journals which had high peer review, but were extremely narrow in scope. Blogs were at the complete opposite end of the spectrum, extremely wide in scope, but absolutely no peer review.
This got me thinking, and caused me to re-read the article that got me into blogging in the first place. I find it strange that whenever I mention Joi Ito, or his paper "Emergent Democracy" even to active bloggers, I get blank looks. I think it's a must read for any serious blogger. In the paper Joi Ito argues for the emergent nature of blogging and related social technologies. By emergent it is taken to mean the "self organising ability of complex systems". In refutation to my friends objection to blogs, I'd like to quote directly from the paper.
"Noise in the system is suppressed, and signal amplified. Peers read the operational chatter at Mayfield's creative network layer. At the social network layer, bloggers scan the weblogs of their 150 acquaintances and pass the information they deem significant up to the political networks. The political networks have a variety of local maxima which represent yet another layer. Because of the six degrees phenomenon, it requires very few links before a globally significant item has made it to the top of the power curve. This allows a great deal of specialization and diversity to exist at the creative layer without causing disruptive noise at the political layer."
I concede that any individual blog article by any individual blogger in and of itself has not been peer reviewed, and this is the way it should be. However the blogsphere by its very nature will self organise in such a way that it will give the effect of peer review / critique. I don't think we have reached utopia yet (my entry in this years "understatement of the year competition"), and I believe that there is still a way to go, still new technologies that are required, different online social structures to be explored, but when I originally read "Emergent Democracy" I was captured by the vision.
This got me thinking, and caused me to re-read the article that got me into blogging in the first place. I find it strange that whenever I mention Joi Ito, or his paper "Emergent Democracy" even to active bloggers, I get blank looks. I think it's a must read for any serious blogger. In the paper Joi Ito argues for the emergent nature of blogging and related social technologies. By emergent it is taken to mean the "self organising ability of complex systems". In refutation to my friends objection to blogs, I'd like to quote directly from the paper.
"Noise in the system is suppressed, and signal amplified. Peers read the operational chatter at Mayfield's creative network layer. At the social network layer, bloggers scan the weblogs of their 150 acquaintances and pass the information they deem significant up to the political networks. The political networks have a variety of local maxima which represent yet another layer. Because of the six degrees phenomenon, it requires very few links before a globally significant item has made it to the top of the power curve. This allows a great deal of specialization and diversity to exist at the creative layer without causing disruptive noise at the political layer."
I concede that any individual blog article by any individual blogger in and of itself has not been peer reviewed, and this is the way it should be. However the blogsphere by its very nature will self organise in such a way that it will give the effect of peer review / critique. I don't think we have reached utopia yet (my entry in this years "understatement of the year competition"), and I believe that there is still a way to go, still new technologies that are required, different online social structures to be explored, but when I originally read "Emergent Democracy" I was captured by the vision.
Friday, October 07, 2005
Speaking at VS Live
Well, this one hit me out of the blue. I have been asked to speak at the Sydney VS Live conference on SQL Server Express.
My fellow colleague Greg Low dobbed me in for this one, he made the assumption that because I've been working on a commercial project with SQL Server Express since January of this year, I might actually know something about it.
It's all very exciting, but I'm a bit nervous about it all, I haven't done any public speaking for quite some time now. I have a few ideas on what I want to talk about, but I'd love some feedback as to what other people want to hear about SQL Server Express.
My fellow colleague Greg Low dobbed me in for this one, he made the assumption that because I've been working on a commercial project with SQL Server Express since January of this year, I might actually know something about it.
It's all very exciting, but I'm a bit nervous about it all, I haven't done any public speaking for quite some time now. I have a few ideas on what I want to talk about, but I'd love some feedback as to what other people want to hear about SQL Server Express.
DB Performance tip
Normally when I think of DB Performance, I usually concerntrate on indexes, query structure, etc... all of which are quite important, but I have started listening to an msdn web cast series called "A Primer to Proper Sql Server Development" by Kimberly Trip, and in the very first episode was able to find the answer to a performance issue that had been puzzling me and the developers I'm currently working with for some months now.
The problem was that our application that is using SQL Express was having some serious performance issues. It was slow to start up, it took ages to save to the database the first few times, but then things seem to pick up a little, but not quite as much as would be ideal. Any one want to guess what the problem was????? I know all you SQL Server guru's out there have it already, but for the benefit of those who don't.... pre-allocating the size of the log file fixed the problem quite nicely.
We were already pre-allocating the size of our primary datafile to 4MB, so when we used the CREATE DATABASE ... FOR ATATCH statement, the logfile would be created by default at 25% the size of the primary datafile.... 500KB. The application is very database intensive, and filled up the log file very very quickly, and by default, the logfile would auto grow by 10% of it's original size... which would fill up very quickly again, and then auto grow by another 10% etc.... Of course this growing of the log file is quite costly, and we found that by setting the log file to be 4MB by default, with a 4MB file growth, we were able to achieve quite a significant improvement. We cut the initial loading by half, and the first few saves are now instantaneous.
If your working with SQL Server, then I'd highly recommend the web case series, there are lots of other useful tips and hints.
The problem was that our application that is using SQL Express was having some serious performance issues. It was slow to start up, it took ages to save to the database the first few times, but then things seem to pick up a little, but not quite as much as would be ideal. Any one want to guess what the problem was????? I know all you SQL Server guru's out there have it already, but for the benefit of those who don't.... pre-allocating the size of the log file fixed the problem quite nicely.
We were already pre-allocating the size of our primary datafile to 4MB, so when we used the CREATE DATABASE ... FOR ATATCH statement, the logfile would be created by default at 25% the size of the primary datafile.... 500KB. The application is very database intensive, and filled up the log file very very quickly, and by default, the logfile would auto grow by 10% of it's original size... which would fill up very quickly again, and then auto grow by another 10% etc.... Of course this growing of the log file is quite costly, and we found that by setting the log file to be 4MB by default, with a 4MB file growth, we were able to achieve quite a significant improvement. We cut the initial loading by half, and the first few saves are now instantaneous.
If your working with SQL Server, then I'd highly recommend the web case series, there are lots of other useful tips and hints.
Tuesday, September 13, 2005
Pointless rant against the full sale of Telstra
As Telstras last few remaining shares are sold off at the hands of a party that really should be there to protect rural Australia from the whims of narrow minded economic rationalism, I'd like to take this opportunity (not so much as a eulogy, however apt the metaphor, more as an exercise in futility) to express a few of my (increasingly pointless) objections.
The free market, according to the economists, is meant to maximize profit. Ignoring the fact that there are no guarantees about how that profit will be distributed, there are a number of axioms that underpins this assumption. One of those axioms is that there are no externalities, or at least if there are, they are compensated. This is quite a big assumption even for some of the simplest economic transactions, but when we come to communications, this axiom doesn't even begin to stand up.
There are numerous externalities most of which are so intangible they can't even begin to be compensated. One of the externalities that most concerns me is that communications is such a valuable resource resource not only to building communities, but also to business in general. The governments 2 billion dollar trust fund is to get current services to the bush, however, being a technology professional, I know how quickly communications technologies change. Telstra are even struggling to get adequate mobile coverage to rural areas, let alone other technologies such as broard band internet. The communications technologies of tomorrow is what will drive business, and without the power to regulate the egalitarian dispersion of these technologies, certain sectors of the community that, those that a privatized company can't see immediate profits to pass on to their share holders. This I believe has the potential to seriously impact on Australia as a whole.
The free market, according to the economists, is meant to maximize profit. Ignoring the fact that there are no guarantees about how that profit will be distributed, there are a number of axioms that underpins this assumption. One of those axioms is that there are no externalities, or at least if there are, they are compensated. This is quite a big assumption even for some of the simplest economic transactions, but when we come to communications, this axiom doesn't even begin to stand up.
There are numerous externalities most of which are so intangible they can't even begin to be compensated. One of the externalities that most concerns me is that communications is such a valuable resource resource not only to building communities, but also to business in general. The governments 2 billion dollar trust fund is to get current services to the bush, however, being a technology professional, I know how quickly communications technologies change. Telstra are even struggling to get adequate mobile coverage to rural areas, let alone other technologies such as broard band internet. The communications technologies of tomorrow is what will drive business, and without the power to regulate the egalitarian dispersion of these technologies, certain sectors of the community that, those that a privatized company can't see immediate profits to pass on to their share holders. This I believe has the potential to seriously impact on Australia as a whole.
Monday, August 29, 2005
ADSL - the saga continues
Well after my previous hassles (here and here), I was at my wits end. I had pretty much eliminated most variables before I’d even rang my ISP, but after they insisted I had my modem double checked by plugging it into a friends ADSL line and watching it work, the only variable was the alarm system. When we moved in, there were no instructions on the alarm system, and to be honest, it wasn’t high on my priority list, but the tech support person at my ISP insisted that I get it checked out because it may still be plugged in to the phone line and causing interference. Well, I checked the alarm myself and couldn’t find any connection to the phone line, but then again, I’m not a trained alarm system technician so what would I know, and as the tech support person at my ISP kindly informed me, "If Telstra send a technician out and they find out that it’s your fault, they’ll charge you $99". So I had an alarm technician come around and verify ($75 later) what I already knew, the alarm was not plugged in to the phone line. So finally the coast was clear and I could insist on them sending a Telstra technician out… still with the warning of being charged if Telstra concluded that the issue was anything to do with my setup. Like all service companies these days Telstra would only give a 4 hour window, during which they would be performing the work, this meant that I was required to stay home from work during this time. Fortunately the technician called me fairly early in that period to tell me “yeah mate, it should be right now, there was a problem at the exchange”. And sure enough I now have ADSL internet access again.
Having ascertained that it was Telstra’s fault, and having been threatened with being charged if it was my fault, I am just wondering if I should send Telstra a bill for my time and the expenses I’ve had to incur to determine that Telstra didn’t do a proper job in the first place. Another thing that has crossed my mind is would I have got the same run around had I been a bigpond customer, ie is this Telstra’s way of using their monopoly on the network to make it difficult for other ISP’s to compete on an even footing. Maybe that’s a bit too much of a conspiracy theory, and Occam’s razor dictates that possibly a mixture of incompetence and/or apathy may be a better explanation, which essentially reduces to Hanlon’s Razor "Never attribute to malice that which is adequately explained by stupidity".
Having ascertained that it was Telstra’s fault, and having been threatened with being charged if it was my fault, I am just wondering if I should send Telstra a bill for my time and the expenses I’ve had to incur to determine that Telstra didn’t do a proper job in the first place. Another thing that has crossed my mind is would I have got the same run around had I been a bigpond customer, ie is this Telstra’s way of using their monopoly on the network to make it difficult for other ISP’s to compete on an even footing. Maybe that’s a bit too much of a conspiracy theory, and Occam’s razor dictates that possibly a mixture of incompetence and/or apathy may be a better explanation, which essentially reduces to Hanlon’s Razor "Never attribute to malice that which is adequately explained by stupidity".
Friday, August 26, 2005
Quality on the web
I recently was asked to review some changes to a corporate website, and it got me thinking about what I expect for web sites from a quality perspective.
One thing that I think should go without saying, (but obviously doesn’t) is validation. I would say at least the 2 biggies xhtml and css validation are a must. These validators check through either your xhtml or css code and verify it against the generally accepted standard. Now if your designing a site that you know is ONLY going to be run with Internet Explorer, or whatever browser happens to be the flavour of the month for you target audience then fine, code to that browser if you really must, however, if your website is public facing you have no such control, and with mobile devices becoming more and more popular, you can never guarantee what your web site will be viewed under. I challenge anyone reading this blog to validate their corporate website, you’ll probably be very surprised what you’ll find, I know I was surprised just doing a minimal amount of research for this article.
I actually made the suggestion in the review that anyone doing web development should have every browser known to mankind and a few others installed on their machine, NOT JUST INTERNET EXPLORER. I am always frustrated when I’m using firefox, and I come across something that doesn’t look quite right, and have to exit and view it in ie.
Another big thing for me is that tables should NEVER be used for formatting. Tables are great... For tabular data. Nothing else in xhtml renders tabular data more elegantly and describes it more precisely than tables. But when it comes to formatting they suck. I know in the dark ages of web development there was little other choice and I myself used them prolifically before I stumbled upon the css zengarden. This is one of my favourite sites ever, and gave me the impetuous I required to sit down and learn css properly. I can also recommend a book "HTML Utopia : Design Without Tables Using Css". The other advantage as can be seen by css zengarden is that if you write your page properly, when marketing come down and say "we want to change our corporate look" as marketing are want to do (they have to justify their existence during the quiet periods somehow), it is a matter of replacing a few css files and putting up the new corporate logo, and suddenly the entire website looks completely different. You can then spend the rest of the month it would take for someone who formatted their website with tables doing something far more productive like getting your site up to accessibility standards like 508 or WCAG 1.0.
One thing that I think should go without saying, (but obviously doesn’t) is validation. I would say at least the 2 biggies xhtml and css validation are a must. These validators check through either your xhtml or css code and verify it against the generally accepted standard. Now if your designing a site that you know is ONLY going to be run with Internet Explorer, or whatever browser happens to be the flavour of the month for you target audience then fine, code to that browser if you really must, however, if your website is public facing you have no such control, and with mobile devices becoming more and more popular, you can never guarantee what your web site will be viewed under. I challenge anyone reading this blog to validate their corporate website, you’ll probably be very surprised what you’ll find, I know I was surprised just doing a minimal amount of research for this article.
I actually made the suggestion in the review that anyone doing web development should have every browser known to mankind and a few others installed on their machine, NOT JUST INTERNET EXPLORER. I am always frustrated when I’m using firefox, and I come across something that doesn’t look quite right, and have to exit and view it in ie.
Another big thing for me is that tables should NEVER be used for formatting. Tables are great... For tabular data. Nothing else in xhtml renders tabular data more elegantly and describes it more precisely than tables. But when it comes to formatting they suck. I know in the dark ages of web development there was little other choice and I myself used them prolifically before I stumbled upon the css zengarden. This is one of my favourite sites ever, and gave me the impetuous I required to sit down and learn css properly. I can also recommend a book "HTML Utopia : Design Without Tables Using Css". The other advantage as can be seen by css zengarden is that if you write your page properly, when marketing come down and say "we want to change our corporate look" as marketing are want to do (they have to justify their existence during the quiet periods somehow), it is a matter of replacing a few css files and putting up the new corporate logo, and suddenly the entire website looks completely different. You can then spend the rest of the month it would take for someone who formatted their website with tables doing something far more productive like getting your site up to accessibility standards like 508 or WCAG 1.0.
Sunday, August 21, 2005
More hassles
I can't believe what has happened over the past few days.
After my previous hassles, I patiently waited til Friday. According to my ISP's web site they would notify me on a designated phone number I provided when I filled out the online form requesting my change of phone line. I guess I was expecting an actual human (of some description) to call me and pleasantly inform me that I was once again connected to the information super highway, but why pay someone to talk when a simple automated SMS will do. OK I can handle the SMS, but what I find completely unacceptable is after my previous argument with them over them not divulging information to me because I wasn't the person who set up the phone line with Telstra, they have the ordacity to send an SMS with my user name and...... PASSWORD in plain text. I am seriously concerned now that they have no real idea about security.
To add further to my problems, I hadn't actually unpacked my ADSL modem from the move, and of course we've got boxes every where, so I spent most of Saturday trying to find my modem, and when I finally got it unpacked..... I couldn't get things working. I've been pretty busy this weekend looking at furniture for the new place so I haven't had a great deal of time, so I decided to wait til I came home tonight to go through all the different possibilities and test all my cabling etc.... before I call my ISP and spend 30 mins waiting in the phone queue to maybe find an answer. Well the good news is I didn't spend 30 mins in the queue, the bad news is that the reason for this was the call centre closed at 6pm. So til tomorrow after work, I'm still on dial up.
This is getting beyond a joke.
After my previous hassles, I patiently waited til Friday. According to my ISP's web site they would notify me on a designated phone number I provided when I filled out the online form requesting my change of phone line. I guess I was expecting an actual human (of some description) to call me and pleasantly inform me that I was once again connected to the information super highway, but why pay someone to talk when a simple automated SMS will do. OK I can handle the SMS, but what I find completely unacceptable is after my previous argument with them over them not divulging information to me because I wasn't the person who set up the phone line with Telstra, they have the ordacity to send an SMS with my user name and...... PASSWORD in plain text. I am seriously concerned now that they have no real idea about security.
To add further to my problems, I hadn't actually unpacked my ADSL modem from the move, and of course we've got boxes every where, so I spent most of Saturday trying to find my modem, and when I finally got it unpacked..... I couldn't get things working. I've been pretty busy this weekend looking at furniture for the new place so I haven't had a great deal of time, so I decided to wait til I came home tonight to go through all the different possibilities and test all my cabling etc.... before I call my ISP and spend 30 mins waiting in the phone queue to maybe find an answer. Well the good news is I didn't spend 30 mins in the queue, the bad news is that the reason for this was the call centre closed at 6pm. So til tomorrow after work, I'm still on dial up.
This is getting beyond a joke.
Thursday, August 18, 2005
Winge about ADSL hassles
I haven’t blogged in a while, and there is a damn good reason why. I have been in the middle of moving house. My partner and I have recently purchased a fantastic place in Fitzroy (inner city Melbourne). 
The moving process is quite stressful, but I must confess I wasn’t expecting so much hassle with my ADSL line. We needed to get a new phone line at our new place, and so of course we had to switch our ADSL plan to that new line. We made this request on Monday the 8th of august, and waited…. Now I was under the impression that this would take up to a week. I have to confess that I think this is a particularly ridiculous amount of time considering that there is not really all that much work involved. They have to test the line, and then re-route my connection to my ISP. Sounds like all of about half an hour to me, and the fact that I had paid $99 for the work to be done, I would think that Telstra would be able to afford to resource this role fairly well….. We are still waiting for this to happen. On calling my ISP, he gave me the standard response of “Telstra say that it will take between 5 and 10 working days”. This is completely ridiculous, I’m an IT professional and because I move I can’t have an ADSL connection for 2 weeks. I do have dial up access, but that’s not a real internet connection…. Ever tried downloading webcasts and podcasts over dial up, it’s plain infuriating. To make matters worse, they actually wouldn’t give me any specific details of the status of my request because the my previous phone line was registered under my partners name. This I was told was for security reasons…. Lets see now, the guy at the help desk of my ISP had already asked me my address, the account name and my phone number, he then proceeded to ask me if I was Androniki Papapetrou, my partner (obviously not realizing that Androniki is a greek girls name (the male equivalent being Andronicus)). If at this point Id’ve said “Yes that’s me” he would have proceeded to divulge the information I required, but stupid honest me said “No that’s my partner”. So after he insisted that he wouldn’t tell me for security reasons, I got my partner to ring. I had to tell her our account name as she didn’t know that, and when she rang the questions they asked to verify that she was who she said she was….. account name, address and telephone number. Hmmmm top notch security there guys, if this information was genuinely sensitive, then we’re in a lot of trouble here. I think this incident raises a lot of questions about security. I am a firm believer in privacy, but if you really need to identify which pieces of information should be secure and then secure them appropriately, the rest can just be broadcast on your website…. It’ll save people so much frustration.
The latest on our ADSL connection is that it should be ready by Friday….. thanks Telstra.
The moving process is quite stressful, but I must confess I wasn’t expecting so much hassle with my ADSL line. We needed to get a new phone line at our new place, and so of course we had to switch our ADSL plan to that new line. We made this request on Monday the 8th of august, and waited…. Now I was under the impression that this would take up to a week. I have to confess that I think this is a particularly ridiculous amount of time considering that there is not really all that much work involved. They have to test the line, and then re-route my connection to my ISP. Sounds like all of about half an hour to me, and the fact that I had paid $99 for the work to be done, I would think that Telstra would be able to afford to resource this role fairly well….. We are still waiting for this to happen. On calling my ISP, he gave me the standard response of “Telstra say that it will take between 5 and 10 working days”. This is completely ridiculous, I’m an IT professional and because I move I can’t have an ADSL connection for 2 weeks. I do have dial up access, but that’s not a real internet connection…. Ever tried downloading webcasts and podcasts over dial up, it’s plain infuriating. To make matters worse, they actually wouldn’t give me any specific details of the status of my request because the my previous phone line was registered under my partners name. This I was told was for security reasons…. Lets see now, the guy at the help desk of my ISP had already asked me my address, the account name and my phone number, he then proceeded to ask me if I was Androniki Papapetrou, my partner (obviously not realizing that Androniki is a greek girls name (the male equivalent being Andronicus)). If at this point Id’ve said “Yes that’s me” he would have proceeded to divulge the information I required, but stupid honest me said “No that’s my partner”. So after he insisted that he wouldn’t tell me for security reasons, I got my partner to ring. I had to tell her our account name as she didn’t know that, and when she rang the questions they asked to verify that she was who she said she was….. account name, address and telephone number. Hmmmm top notch security there guys, if this information was genuinely sensitive, then we’re in a lot of trouble here. I think this incident raises a lot of questions about security. I am a firm believer in privacy, but if you really need to identify which pieces of information should be secure and then secure them appropriately, the rest can just be broadcast on your website…. It’ll save people so much frustration.
The latest on our ADSL connection is that it should be ready by Friday….. thanks Telstra.
Sunday, July 17, 2005
Evaluating VSTS
Well, today I finally start evaluating Visual Studio Team System. Yesterday I upgraded my PC to 2 Gig of RAM as the Virtual PC image with VSTS beta 2 requires 1.5 Gig on it's own.
I am excited about the new version control system (SCC) mainly because having worked with Visual Source Safe in previous projects, I am all too aware of the need for a decent offering from Microsoft in the Source Control department, although I am going to be quite hard to please given that I have been using Subversion for my own projects for some time now, and have found it to be very good.
I am also interested in the unit testing and code coverage modules.
I have to confess though, I don't think the productivity gains are going to be quite as dramatic as the Microsoft hype is making out. The best that we can hope for is that with the tighter integration of all these aspects of the SDLC, there will be a small time saving in people not having to switch between applications to perform development related tasks, and that reporting on project status will become easier.
There are a few reasons I believe this.
- A good, productive software development team will already have processes in place that suit there projects, their tool set and their team structure, they will already have worked out procedures around the fact that their tools aren't completely integrated, so the integration of the tools can save a small amount of time here.
- A good team will also be disciplined in following procedure, If a code review or static code analysis is required before checkin, a disciplined team will adhere to this, and do not really need software to tell them that they've forgotten to write unit tests. In this case the only benefit I can see is when new staff are introduced to the development cycle, the procedures will be more evident and they may learn them quicker.
- A good development team will have good leadership that will keep an eye on the processes tweaking them if there are issues with the code produced, or if the procedures are becoming too burdensome.
- A bad development team would have discipline problems that require more than just some software rules to solve. In my experience, where there is a lack of discipline, it is either out of laziness, or a lack of understanding of the reasons behind the procedures and policies. Laziness is a serious problem, however a lack of understanding can be solved only through education and experience.
- A good team will have communications in place. One presentation I've seen suggests that with VSTS there will be no more need for weekly status meetings because the work item tracking and the automatic reporting will be enough to display status. Maybe the actual status reporting in such meetings could be simplified, but I have always found these kinds of meetings vital as they provide a forum for everybody, (not just the project manager) to get a feel for what is going on across the entire project, so developer X might be complaining about a problem he's having and developer Y says that he has just finished some code that solves a similar problem, and would just require some re-factoring to solve his particular issue, while tester A is struggling with a particular concept in the use cases, so one of the BA's offers to explain it a bit more thoroughly for the entire team who then suggest she re-word the use case slightly. These kinds of informal meetings are invaluable to a dev team, and until we start writing software with advanced AI, they cannot be replaced by software.
Anyway, I still think VSTS will be a worthwhile tool, but I just think we need to be realistic about how far software tools can take us, and we need to not under estimate the human side of software development.
I am excited about the new version control system (SCC) mainly because having worked with Visual Source Safe in previous projects, I am all too aware of the need for a decent offering from Microsoft in the Source Control department, although I am going to be quite hard to please given that I have been using Subversion for my own projects for some time now, and have found it to be very good.
I am also interested in the unit testing and code coverage modules.
I have to confess though, I don't think the productivity gains are going to be quite as dramatic as the Microsoft hype is making out. The best that we can hope for is that with the tighter integration of all these aspects of the SDLC, there will be a small time saving in people not having to switch between applications to perform development related tasks, and that reporting on project status will become easier.
There are a few reasons I believe this.
- A good, productive software development team will already have processes in place that suit there projects, their tool set and their team structure, they will already have worked out procedures around the fact that their tools aren't completely integrated, so the integration of the tools can save a small amount of time here.
- A good team will also be disciplined in following procedure, If a code review or static code analysis is required before checkin, a disciplined team will adhere to this, and do not really need software to tell them that they've forgotten to write unit tests. In this case the only benefit I can see is when new staff are introduced to the development cycle, the procedures will be more evident and they may learn them quicker.
- A good development team will have good leadership that will keep an eye on the processes tweaking them if there are issues with the code produced, or if the procedures are becoming too burdensome.
- A bad development team would have discipline problems that require more than just some software rules to solve. In my experience, where there is a lack of discipline, it is either out of laziness, or a lack of understanding of the reasons behind the procedures and policies. Laziness is a serious problem, however a lack of understanding can be solved only through education and experience.
- A good team will have communications in place. One presentation I've seen suggests that with VSTS there will be no more need for weekly status meetings because the work item tracking and the automatic reporting will be enough to display status. Maybe the actual status reporting in such meetings could be simplified, but I have always found these kinds of meetings vital as they provide a forum for everybody, (not just the project manager) to get a feel for what is going on across the entire project, so developer X might be complaining about a problem he's having and developer Y says that he has just finished some code that solves a similar problem, and would just require some re-factoring to solve his particular issue, while tester A is struggling with a particular concept in the use cases, so one of the BA's offers to explain it a bit more thoroughly for the entire team who then suggest she re-word the use case slightly. These kinds of informal meetings are invaluable to a dev team, and until we start writing software with advanced AI, they cannot be replaced by software.
Anyway, I still think VSTS will be a worthwhile tool, but I just think we need to be realistic about how far software tools can take us, and we need to not under estimate the human side of software development.
Sunday, July 10, 2005
The code wars have begun
Fellow collegues Mitch Denny and Joseph Cooney have started the "Iron Coder" challenge over the question is it better to sub-class or use extender providers. It will be a very interesting battle, with dark lord Darth Denny defending extender providers, and the young Jedi Joseph upholding the cause for sub-classing.
Use the source young Jedi.
Use the source young Jedi.
Friday, July 08, 2005
Great use for nested classes
When I first read about nested classes I thought it was just one of those obscure parts of c# that I was never likely to find a decent use for, but today I found quite a good use for it, and it was sitting right there in my previous post.
Usually we use a custom control to contain an UltraGrid like so
In my last post I offered a solution to adding record headers to an UltraGrid, but I passed the RowHeaders in as a List parameter to the constructor, now in the problem I'm trying to solve, this list is already maintained by the user control, so it means I have to maintain in 2 separate places..... Well not any more
Then at the business end of things in DrawElement I use the following
This means that I can let the user control maintain the row names and no-one ever needs to know about our RowSelectorDrawFilter class as it's happily nested in MyControlClass.
Usually we use a custom control to contain an UltraGrid like so
public class MyControl : UserControl
{
...
private UltraGrid myGrid;
}
In my last post I offered a solution to adding record headers to an UltraGrid, but I passed the RowHeaders in as a List
public class MyControl : UserControl
{
...
private list myRowNames;
private UltraGrid myGrid;
private class RowSelectorDrawFilter : IUIElementDrawFilter
{
private RowSelectorDrawFilter(MyControl control)
{
myControl = control;
}
...
private MyControl myControl;
}
}
Then at the business end of things in DrawElement I use the following
...
drawParams.DrawString(drawParams.Element.Rect, myControl.myRowNames[row.ListIndex], false, false);
...
This means that I can let the user control maintain the row names and no-one ever needs to know about our RowSelectorDrawFilter class as it's happily nested in MyControlClass.
Saturday, July 02, 2005
Row Headers in infragistics UltraGrid control
A problem was puzzling me with the infragistics UltraGrid control the other day, how to get row headers in the grid?

My first thought was "well the UltraGrid is such a huge control, there must be some property somewhere I can set to do this", something like.... myGrid.DisplayLayout.Rows[i].Header = "Row Name" or myGrid.DisplayLayout.Override.RowSelectors[i].Text = "Row Name" etc.... I spent ages looking all to no avail.
After all else failed, I resorted (as a last ditch attempt) to the infragistics knowledge base where I found this article.
Now this just talks about getting rid of the pencil, but slightly adapt it and you get the following
then add the following line to the OnLoad method
and providing the row names list is in the same order as the underlying table, it all just works. It is important that row.ListIndex is used to index into the rowNames array instead of row.Index, as row.Index is the display index, and if the grid is sorted, the row names will not be sorted.

Hope this helps someone else out there.
My first thought was "well the UltraGrid is such a huge control, there must be some property somewhere I can set to do this", something like.... myGrid.DisplayLayout.Rows[i].Header = "Row Name" or myGrid.DisplayLayout.Override.RowSelectors[i].Text = "Row Name" etc.... I spent ages looking all to no avail.
After all else failed, I resorted (as a last ditch attempt) to the infragistics knowledge base where I found this article.
Now this just talks about getting rid of the pencil, but slightly adapt it and you get the following
class RowSelectorDrawFilter : IUIElementDrawFilter
{
public RowSelectorDrawFilter(List<string> rowNames)
{
myRowNames = rowNames;
}
public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams)
{
// Drawing RowSelector Call DrawElement Before the Image is Drawn
if (drawParams.Element is Infragistics.Win.UltraWinGrid.RowSelectorUIElement)
return DrawPhase.BeforeDrawImage;
else
return DrawPhase.None;
}
public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams)
{
// If the image isn't drawn yet, and the UIElement is a RowSelector
if (drawPhase == DrawPhase.BeforeDrawImage && drawParams.Element is Infragistics.Win.UltraWinGrid.RowSelectorUIElement)
{
// Get a handle of the row that is being drawn
UltraGridRow row = (UltraGridRow)drawParams.Element.GetContext(typeof(UltraGridRow));
drawParams.DrawString(drawParams.Element.Rect, myRowNames[row.ListIndex], false, false);
return true;
}
// Else return false, to draw as normal
return false;
}
private List<string> myRowNames = null;
}
then add the following line to the OnLoad method
myTableGrid.DrawFilter = new RowSelectorDrawFilter(myRowNames);
and providing the row names list is in the same order as the underlying table, it all just works. It is important that row.ListIndex is used to index into the rowNames array instead of row.Index, as row.Index is the display index, and if the grid is sorted, the row names will not be sorted.
Hope this helps someone else out there.
Monday, June 27, 2005
Simple fix for nunit
The simple fix for the nunit problem was to find someone with nunit already installed, and copy the binaries across onto my machine, everything works fine.
PS oh and load nunit.core.dll and nunit.framework.dll into the GAC using gacutil.exe
PS oh and load nunit.core.dll and nunit.framework.dll into the GAC using gacutil.exe
Subscribe to:
Posts (Atom)
