Thursday, 29 May 2008

Blake's 7!

Update 24 Aug 2013: SyFy rejected the Blake's 7 idea. That may be a good thing, though, as it apparently was taken by Microsoft, to be made as an XBox series.

Update: The previous attempts to revive Blake's 7 have failed, but a new venture to do so was announced on July 23 2012: Martin Campbell And Georgeville TV Shop Reboot Of Cult U.K. Sci-Fi Series ‘Blake’s 7′. I just hope they don't screw it up.

When I was a very young boy, during the Romanian communist era, the only entertainment available was the Bulgarian television (also a communist country, but with a more relaxed regime) who's signal would reach Bucharest to the delight of many. I have always remembered vaguely a British series called Blake's 7, a sci-fi show that I've enjoyed tremendously at the time. Recently I was reminded of it and I was lucky enough to find the torrent for all four seasons. Having watched it now, I have mixed feelings and a new understanding of my child mind.


A short description of the show first. Imagine a team of space wanderers a little in the style of Farscape's crew (civilians, each one with their own ideas and motivations), stuck in a universe that resembles the Star Wars universe (an oppressive Federation ruling the galaxy with an iron fist) and has similar effects and inspiration as Star Trek TOS. All this with a budget that was probably several levels of magnitude smaller than that of ST TOS and also with effects and script a whole lot cheesier (and by that I mean that if I work out the percentages, more than half of the show was just cheese). The actors themselves were British and Welsh TV theater actors and they behaved as such the whole series. Not that it wasn't a refreshing perspective, even now. It was actually original enough and if it weren't for the production values, it might have been a world class classic.

Of course, I didn't watch it now because of the cinematographic value, but because it meant so much to me when I was a child. And I was stunned to see that the things that I remembered fascinated me were quite different in the show. Some weren't even there. For example I remembered that the show was called Blake's 7 but that one of them died in the second episode, which I attributed to British humour. But no, that happened at the beginning of season two. The introduction and music I remembered to be dark, impressive and scary. They were really funny now. There were scenes I remembered in a completely different way, with more emotion and action and the things that happened in the show had another sense altogether.

The structure of the series is funny to follow. The crew of seven was always only of six people. The computer counted as the 7th man. In the second season Gant dies so they are temporarily left with only 6. In the third season Blake leaves the show as well as others of the crew, only to be replaced by other actors and another computer. So they are 5 people and 2 computers and no Blake in Blake's 7. The only constant things are the ship, which is destroyed at the end of the third season, Avon and Vila. Oh, and sexy Servalan, the evil female villain. With a ship that can go anywhere in the galaxy, they always stumble in the same people! The ending was hilarious also, but you have to click here to see what I mean, I would hate to spoil it for you:
Click here for ending spoiler


Here is a sample of the show:



And here is a video from an interview with the actors interpreting Blake and Servalan, old now and talking fondly of the series:



But there are also good news, Blake's 7 could be revived! I found an April 2008 link that says Sky One has commissioned two hour-long pilots for a new Blake's 7 series! Here is also a BBC News entry.

Update: Blake's 7 will be back! I doubt it will pack the same punch, unless done right. BBC should have remade it, but it seems that it will be a SyFy show, which may not be a good idea. The news confirming the comeback can be found here: Blake's 7: Classic BBC sci-fi to return on Syfy channel

Tuesday, 27 May 2008

Default values for the ASP.Net Login control

Well, I don't know who still uses it, but I had this old application that we reused and it had a Login control in the login page (obviously!). And I got tired of always entering the name and password every time I tested the site, so I went to the username and password TextBoxes and added a Text="something" bit. And it didn't work.

Why? First of all the TextBox control with TextMode="Password" ignores the Text property completely. Then the Login control only acknowledges the values of the two TextBoxes on change.

The solution: add a value="something" instead of Text="something" and it will be added like an oldfashioned HTML attribute. And it will also fire Changed since the value the .Net control is string.Empty.

That's all, folks, remember to remove this in the production site :)

Friday, 23 May 2008

Microsoft Software Development Training 21-22 May 2008

Petru Jucovschi was nice enough to invite me to a software development training organised by Microsoft and partly presented by him. The first of the two days of training was about the theory behind software development practices like agile development and CMMI, part presented by Victor Mihail from Trilex. The second was about the Team System Foundation Server and Visual Studio 2008 Team Edition integrating for a better software development practice.

Well, I am working on remembering everything that was said and done and I will make some longer posts that will describe at length what was presented.
As a short summary, I was familiar with a lot of the concepts from the first part, since I've done a little research into agile development in order to pass it on to my managers. The theory and principles behind Agile were detailed, then the major Agile methodologies were described, including eXtreme Programming, Scrum and (very shortly) MSF. Also concepts of Test Driven Development.
The second part was also partly known to me as I have seen another similar presentation at the previous RONUA meeting, but this time it lasted for 8 hours, so I had the opportunity to ask questions and see things done step by step. Basically, TFS is the tool that combines project management, business analysis, architecture, development, debugging and testing into a single useful bunch. The issue tracking is linked to reporting, integrated with Microsoft Project and Microsoft Excel and concepts like Continuous Integration are directly available along a better source control solution than Visual Source Safe. Bottom line, I can barely wait to start work in a rational, managed way.

Stay tuned for the details.

Wednesday, 14 May 2008

Dynamic GridView with paging throws 'Object reference not set to an instance of an object.'

Well, someone asked me today about why his dynamically generated GridView throws a 'Object reference not set to an instance of an object.' exception at DataBind when he sets AllowPaging to true. I replicated the error and looked at the stack trace, it looked like this:
   at System.Web.UI.WebControls.GridView.BuildCallbackArgument(Int32 pageIndex)
at System.Web.UI.WebControls.GridView.CreateNumericPager(TableRow row, PagedDataSource pagedDataSource, Boolean addFirstLastPageButtons)
at System.Web.UI.WebControls.GridView.InitializePager(GridViewRow row, Int32 columnSpan, PagedDataSource pagedDataSource)
at System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource)
at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.GridView.DataBind()
at Malaka.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\ScrollableFixedHeaderGrid\Malaka.aspx.cs:line 14
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


So, the error occurs at the BuildCallbackArgument method in the GridView object. I used Lutz Roeder's Reflector to see the source of the GridView object and I got to this piece of code:
        private string BuildCallbackArgument(int pageIndex)
{
if (string.IsNullOrEmpty(this._sortExpressionSerialized))
{
this._sortExpressionSerialized = this.StateFormatter.Serialize(this.SortExpression);
}
return string.Concat(new object[] { "\"", pageIndex, "|", (int) this.SortDirection, "|", this._sortExpressionSerialized, "|\"" });
}


The error appears to be thrown by the StateFormatter property returning null. It's source is:
        private IStateFormatter StateFormatter
{
get
{
if (this._stateFormatter == null)
{
this._stateFormatter = this.Page.CreateStateFormatter();
}
return this._stateFormatter;
}
}


Got it? It assumes you already added the GridView to a Page. Well, this is the usual issue with the GridView.

Solution: Add the GridView to your Page (or to a fictive Page) and then DataBind it.

Sunday, 11 May 2008

Body Language

There are a lot of movies about aliens, creatures from another world, coming here for whatever reason and trying to communicate. They usually are well versed in English, but sometimes they use some other language like the Klingons or they snarl and rip you to pieces or, sometimes, have to find a protocol of communication first, by using mathematics, gestures or music (like in Close Encounters of the Third Kind). Yet none of those creatures astound me more than some of the people on Earth doing things I could never ever imagine doing and using it to communicate.

One of these people is Michael Moschen, who uses juggling as language of sorts in order to comunicate his perception of time, space and movement. You can watch a small demo he gave at TED and have your own say:



You can see that he uses separate elements to create, to build, larger ansembles. He uses juggling moves like a language, with structure and building blocks and architecture. Now, what would we do if aliens would want to talk to us by moving objects around and making sounds with their limbs? Would be build a computer that can be programmed by juggling? Would we immediately fly in Michael Moschen as the Earth ambassador? Or is it too science fiction to imagine alien creatures communicating in the same way some people do?

Saturday, 10 May 2008

Bucharest RONUA meeting. 9th of May 2008

The level of satisfaction one gets from anything is inversely proportional with the level of expectation they have. I knew that in the RONUA meeting on the 9th there will be only two presentations, with subjects I can't use right now and with speakers I didn't exactly feel compelled to listen to. So, of course, I liked it!

But there was something more. Both speakers seemed more mature, more anchored on the subject than usual. It's not that Aurelian Popa did not seem overly arrogant or that the ever helpful Petru Jucovschi didn't have a lot more information than was humanly possible to present in the alloted time and resources, but their performance seemed way better than I was used to.

The subjects were pretty clear: WPF and VS TFS. If you are scared by acronyms you probably shouldn't be reading this :), but I did provide tooltips for them, so move the mouse over them.

The first presentation showed an ObservableCollection (new stuff from .Net 3.0 which allows notification on changing elements) containing SolarSystemItems, objects that encapsulated an image, a diameter, a name, an orbit and a temperature. It started from a simple listbox then, by changing only the presentation (Style) and the way data is presented (DataTemplate) in the XAML file, it gradually changed to a picture+details listbox, a combobox also with picture and everything, then with a details box next to it showing the current selected object, with filtering, sorting, grouping, etc. The grand finale was making the same listbox look like a solar system image, with selectable planets and the details on tooltip, with orbits and everything. The demo can be downloaded and seen at Beatriz Costa's blog.

The second presentation I was more interested in, since our company plans to use Visual Studio TFS to manage our work. Since that would mean a shift from the current Excel+Email+Messenger, I was glad to learn that the TFS learning curve is steep and usage can also start from source control only, moving ever so slightly towards a comprehensive development strategy, with testing, reporting, configurable XML files that describe any process (with out of the box or downloadable versions for MSF, Scrum, XP, CMMI) , etc.

I was surprised to see that not only the session was free, but we also received some gifts from Microsoft for attending. That included the MSDN subscription that I won, the WPF book that my colleague won, a kit with all kinds of goodies that I can't remember won by our boss and 40% discount for some Microsoft products for each. We cleaned house! No free food though :)

My conclusion was that the RONUA meetings are (as far as I have seen) the most techie, interesting and to the point Microsoft events. The MSDN briefings are nice, too, with more budget allocated to them and so on and so on, but they will never be able to replicate the sort of "gang of IT people" feel of the RONUA's meetings. And with people that are ever more implicated and interested in presenting, it can only get better.

Friday, 9 May 2008

Great tits cope well with warming

Reading the BBC News today I've stumbled upon a fascinating article called "Great tits cope well with warming". Let me quote a little so you can understand what it is about: The research uses a long record of great tits in a breeding site at Wytham Woods near Oxford, where observations began in 1947. "We think it’s the longest running population study of wild animals anywhere in the world where animals are marked (ringed),"

So, warming doesn't negatively affect great tits! You can warm them yourselves or get someone else to do it. Isn't that wonderful? =))

Update 9 Sep 2009: Great tits found hunting bats for food