January 2005 - Posts
The W3Cs Daniel Dardailler has a proposal for a alt text server to assist with alt text population, a commonly overlooked area of accessability. I have recently had a need for a scalable, manageable alt text population method. Daniel has some good ideas, but I am thinking about making the model slightly easier with a web service/class/image-control combo.
Got a few posts on unit testsing lined up, I wanted to start with what can be a tricky issue, false postives. A false postive you may have encountered before, largely its a test that works but is actually wrong. You could consider it a bug with the test but really its an approach thing.
Consider the following.
Private _expiry as date
Public WriteOnly Property CacheExpiry as date
Set(ByVal value as date)
_expiry = value
End Set
End Property
Public Sub CacheAdd(ByVal strItem as string)
Try
HttpContext.Current.Cache.Add("test", strItem, Nothing, _expiry, TimeSpan.Zero, System.Web.Caching.CacheItemPriority.Normal, Nothing)
Return True
Catch exp as exception
Return False
End Try
End Sub This code snip adds a string of data to the cache, if an exception is thrown then it returns false. The unit test then looks like the following (using MbUnit)
Assert.IsTrue(CacheAdd("test data")) We run the test, its green and the unit test passes. However when we test the cache we find the cache is empty, so why did the test pass. The issue is with the testing of the cache add. The cache expiry date is set via property and if its never set in the unit tests then the cache defaults to the date and time the cache code was run, in other words the cache expires almost stright away. So the test passes but the cache is never set.
Lets imagine that the routine is within a different class, is not shared and can be re-used by what ever code was wants to make use of it. If the expiry date was passed within CacheAdd then we could enforce that date/time must be passed, however as this code is a seperate object to other code a programmer want want to set the expiry date once and not have to carry values around what ever code he is developing. For a tester, such debates we can understand, our job is to make sure the code gets tested. So with the problem identified lets look again at the test.
In addition to our orginal test lets also test the cache contents
CacheAdd("test data")
Assert.IsEqual("test data", HttpContext.Current.Cache.get("test")) I have tested the cache as is here but I would expect that our cache object would have a get method of some kind. If the first test fails we would also expect this test to fail as well. I hope you found this topic interesting, any unit testing approaches folks want to share then please let me know.
Joe has one of those "I was in charge of the big company" posts, I thought it was on MS at first, confusing "big company" with "big house" :) Joe has some interesting points, the MS point is a valid one. Pricing in my IMHO is something that can be addressed as when other pricing schemes are known. What is more important at this stage is hearts and minds, on this subject I have said plenty, lets hope MM are listening.
Joel gives an indication of the
new additions to the CLI standard and asks
what else should be in the standard. Would love to see the research across the CLI camps on dynamic languages being standardised. Of course this would mean pooling the research but that is really what is needed. The various work on
Aspects should also be pooled and standardised either that or a standard proposal for a
MOP.
Heres a few resources,
course materials,
resources and a
book.
Chris Sells has a link to a post by
Jason Olson on interviewing for the SDE/Test postion. A few things struck me about the
questions posed for this interview as well as Jasons actual experinces.
- It was for a product code name 'Sparkle', last I heard that was the code name for the Avalon editor (and called by some in the past a 'Flash Killer' - don't got for such branding my self). As such I would be asking questions on testing Avalon its self, how are they proposing to do it, does it dogfood with Burton (mapping up the Avalon APIs to Butrons Unit Testing APIs is the approach I would consider) etc and if not what APIs are they using and why.
- SDE/Test are asked to code and then write tests for the code. I can see why this is done, to test code you must be able to understand how that code works. However, every peice of code is written differently. Even with code standards and a complete design model (e.g. RUP or MDA etc) the actual approach taken by the developer may differ each and every time. So to write tests you will need the ability to write code combined with the ability to know what a developer was thinking when they wrote that code and the spec and standards they were using. Of course with Agile the model changes again, but thats TDD and in that world the tester is the coder, maybe thats Microsofts model?
- One point was changes to the source 1 week before ship and a defect no one is willing to fix.
- One the first point I assume that such changes are allowed. If such a critical defect was found that it was a show stopper (I would be asking why this defect was being resolved so late in the process and what caused the defect) or if a sighed off change request then fair enough but anything else would have be pushed back until after shipping. If your test lead then you would have the authority to push this back to QA who in turn could push back to the business owners, if not then bounched back to your test lead. Either way a process should be in place that could manage this.
- On the second point. Depending on the nature of the defect would state what happens. If the SDE/Test identfies the issue has critical then hopefully a process would be in place that would mean the issue is raised with the program manager and the dev manager can state his reasons as to why the defect is not being resolved. If the issue is not critical then I would expect that the defect remains managed (that is identified and raised as open) and that its sighed off by the dev lead (and I mean written agreement and sighed off). Either way its about process so that test and dev can follow set procedures and project resources and times are not risked.
This is my view point on the role, not saying by a country mile I would actually do any good in the SDE/Test interview but I found other peoples experiences interesting.
Been a busy week, got lots on so tommrow (Saturday) will be a all nighter I think.
- As Robert mentions, Brad has a post on the CLR dev lab that is happening, its aimed at CLR compiler writers but anyone who is interested in the depths of the CLR and wants to understand how the internals work then this lab will a great education. It will be on the Whidbey changes so I would expect items like Generics and LCG will be covered. Hopefully info on the Rotor branch of this code will be made available to folk attending (its a NDA event) so they can start to target there compilers towards the new IL op codes and internal changes to the GC, JIT etc etc. As this event is Redmond there is no way on earth I can attend, prehaps if MS Research UK hold a simlar event I may be able to attend. The event will also give you a chance to meet other compiler developers for the CLR, I know Ernie is attending and I am sure many others will attend.
- Xamlons Flash compiler for XAML has gone into beta, looks like Robins hard work over the Xmas holiday know means a product we call all try out. Robin also reports that the compiler is compiling down to IL before creating the SWF, this means that any .NET language can be used. In the comments are notes on how this was done, an interesting read. Not tried this my self yet but I will :)
- Dare has post on a few C-Omega articles he has written for O'Reilly, got some mad ideas around C-Omega so I'll be checking them out.
- Next book target, Linux Kernel Development 2nd Edition. I have the 1st edition and its a great book, looking foward to this new edition.
As Robert mentions his recent .NET rocks show is available, I enjoyed listening to it today and hearing Robert talk about subjects like running as non admin, secruity in longhorn, service broker and Rotor. As Robert mentioned its one of the best ways of seeing what the CLR is doing under the hood and a great learning resource.
Music to code to: 2 many DJs
So the reason I am up at almost 4am and the reason I posted on work flow engines is that I am looking into how to build business process's and rules into a system in an extendable fasion. That is not hard coded into the application but a services that the application calls into, in this way they can be extended and added to in a very flexiable fasion.Here is a few I hve found, as before please do share you experinces.
I was involved in the Aglets framework a few years ago so I find work to combine agents and .NET interesting, here is a description on getting the Java Agent DEvelopment framework compiling and running on .NET. Plenty of other Java agent research, anyone know of any .NET research work going on in this area let me know.
More Posts
Next page »