Nov
26.
2004

The latest fashion in certain “elite” development circles is using (unfortunate name) software factories to automate parts of the development process.

It is questionable whether this will happen or not, but there is one other frequently mentioned idea that I do agree with – sometimes it is easier to solve a particular problem by designing domain specific language interpreter/compiler first, and then solving the problem in that language than developing a solution with a general purpose language (C++, C#, VB.NET).

Again, some will be intimidated by the “domain specific language” mambo-jumbo and call bullshit. To those I present one not-so-well-known yet concrete example of such an approach that actually works – crm114.

Crm114 (crazy name, but check out the site, the name has a funny history) is a variant of Bayesian text classifier (it’s just one of the back-ends, there are others) and is used to filter out spam email. The author, William Yerazunis, has first designed a language called crm114 and then proceeded implementing spam filter in that language. The results are pretty impressive, but the system is not user friendly and that’s why it is not in widespread use.

I am guessing that we don’t really have many examples of this kind of approach because writing compilers/interpreters is hard, even when you know how it is done.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Nov
25.
2004

Avalon in a virtual machine

Posted by: Drazen Dotlic in Categories: .NET (C#).
Tags:
After my initial frustration with Avalon installation and .NET Framework version(s) I have managed to (easily) install everything including (for the first time) Visual C# 2005 Express (beta1).
 
One of the most interesting features of Avalon is 3D support. Recommended configuration for testing is a computer with DirectX 9 capable video card. At the same time, the code is not even near production quality and thus perfectly suitable for a virtual machine, in my case from VMWare.
 
Knowing that virtual graphics adapter does not support Direct3D at all you'd think that it's impossible to run 3D samples like Boing (bouncing ball). However, don't forget that DirectX has software renderer as well, and it works like a charm!
 
Thus there is no excuse not to try out Avalon - it is the future of Windows GUI development, and we know how much users love eye candy.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Nov
24.
2004
As soon as Avalon for Windows XP came out I picked it up, Avalon being the most interesting new technology of them all (at least for me). Installing it is a pain, and if I haven't been using virtual machines for testing I guess I would be really pissed; this way, I just throw away virtual hard disk and start again. I actually read installation instructions, noted importance of order of installation, but I tried using CTP October 2004 version of Visual C# Express instead of Beta 1 which is what this release seems to expect (I am still not sure). The problem is in .NET Framework 2.0 betas that cannot be installed one over another, and the framework installation is always tried first.
 
I had the same issue recently with SQL Server 2005 CTP October 2004 and Visual Studio 2005 Beta 1 refresh with Team System - .NET Framework would crash during installation of either of these two depending on the order of installation.
 
I'd really like for MS to stop throwing us scattered bits and pieces and unify release strategy, at least for products that are planned to simultaneously launch like SQL Server and Visual Studio. Thus when Visual Studio beta 2 comes out, it would be great if we got SQL Server beta 2 and not what is most likely going to be beta 3 or God know which refresh of which community test preview or whatnot.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Nov
23.
2004

Stored procedures debate

Posted by: Drazen Dotlic in Categories: .NET (C#).
Tags:
I completely forgot to comment on another thought provoking post from Jeff: Who needs Stored Procedures, anyways?
 
The gist is that traditional mantra of putting all (or most) of your DB-related code in the stored procedures (SP from now on) is overrated. The reasons stated are not really convincing to me, but there are some good points made.
 
I'd like to add a bit more to the picture. Let's assume first that you do want to keep your code in stored procedures - they look like functions, so programmers are used to their invocation style, they are explicitly parametrized and hide the underlying DB schema, plus are separately securable. I don't think that problem lies in these facts, but in what follows from here.
 
If a project is reasonably complex, it becomes tempting to put all DB related code in SP, and just one step from there all business logic as well. Due to various reasons that Jeff listed (one of which to me is especially annoying - you can't debug SP the same way you do the rest of your code) this is not a Good ThingTM. The feature that made this possible is archaic evolution of SQL language to allow non-DB operations like type manipulation. You can slice and concatenate strings in SQL if you like, transform dates and whatnot. Why not add a bit more on top of that? But soon “a bit“ becomes a lot.
 
SQL as a language was not made for this*. Relational databases are based upon a relational algebra, a very formal and powerful theory. Using SQL for anything more than relational data manipulation is just calling for trouble. Don't compute values using complex formulas in SP, don't parse string values. Operate on tables, and spit out tables. SP are a line between your table based data storage and your true business logic, which is written in another language suited perfectly for general purpose programming tasks.
 
This is all nice and well, but practice shows that sometimes it very desirable to have general purpose processing weaved with relational manipulation. That's exactly why SQL evolved to allow such a use, by adding non-relational based operations. But if this is wrong as I claim, what is one to do?
 
Enter SQL Server 2005. It allows you to mix .NET code with the SQL code in exactly the right way. You can't all of the sudden start writing SP in C#, but you can make table columns of any .NET type you like, and very easily add and transparently debug code that will handle all type manipulation. That is enough. Keep your relational processing in SP, add .NET types for more complicated column types, and leave the rest for your C#/VB.NET business logic.
 
So the question is not if we need SP or not (I think we do), but where is the line between them and the rest of the (business logic) code.
 
 
*Actually, SQL is a language initially designed so that non-programmer types (i.e. accountants) can extract data from the DB themselves. But the underlying processing language is heavily relational algebra based, and SQL cannot escape being influenced by that.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
2 Comments
Nov
22.
2004
In another great post Jeff wrote yesterday: Good programmers get off their butts. One particular thought resonated very much with my own observations: As software developers-- and especially if we have pretensions of being so-called "architects"-- we should always make decisions based on experience and data.
 
I have noticed a trend among more experienced developers of calling themselves “software architects” [I have been guilty of this myself as well]. There is a great quote that defines software architects (came from Don Box, not sure who said it) Software Architects - over 40, over confident ;). Now, I am not over 40 yet (haven't even made mid-thirties) but I admit being most likely over confident :) Still, considering yourself an architect is justified if you get off your butt and write code as Jeff nicely puts. Too many people assume being an architect relieves you from having to write code. Considering how much design process is mixed with actual development, that cannot be true.
 
Few more notes on design/coding... I find writing code helps with “designer's block”. Every now and then you get stuck with your design, just like a writer cannot continue writing until he/she is inspired again. I like to bridge these gaps by writing some code. There is always some low level (trivial from design point, thus boring) building block that needs to be implemented, or something needs to be refactored. If nothing else, there are unit tests pending (admit it, you are delaying writing these as long as you can ;)). Usually, while writing this code it dawns on me what I should do with the design.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Nov
13.
2004

I bought Half-Life 2 yesterday over Steam, Valve's online games distribution system. The price is the same, the delivery much faster than waiting for the delivery of physical product, not to mention the fact that game developer actually earns a lot more this way, hopefully giving them enough incentive to continue producing great games.

This model is similar to musicians selling songs over iTunes, but better - iTunes (Apple) is still the middle man, and takes a big chunk of profit for themselves. I wonder if success of Half-Life 2 (over Steam) might revolutionize the way we buy games in the future, maybe even the way we buy music and movies online?

Needless to say, publishers (and by extension retailers as well) are not happy about this, and the consequence is at least one lawsuit between Vivendi Universal (game's publisher) and Valve going on at the moment. Additionally, even though I have already downloaded the game I can't play it till November 16th, when the retailers will start selling it - on the same day, the game will be unlocked and you'll be able to activate it online and then play (offline).

I tried the engine stress test and my laptop is definitely going to play the game with good frame rates. The great news for wide-screen laptop owners out there is that wide-screen gaming is supported out of the box and actually works!

In the end, a small bit of trivia for Half-Life fans - did you know that Valve hired Bram Cohen, author of BitTorrent, to work on the aforementioned Steam system beginning this year?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments
Nov
11.
2004

New MSN search is great

Posted by: Drazen Dotlic in Categories: general.
Tags:

Unlike some people, I have not been frantically trying to get my weblog high in the Google search on my name, but that should be a natural consequence of the fact that this is my home page on the Internet.

Everybody knows that Google's results have been skewed to an extent by weblogs to a point where something was done to the engine to reduce the influence of weblogs over other content. However, to this day, if you search for me using Google you will first find some of my posts on Boost mailing list, then some of my comments on Scobleizer weblog, followed by other comments I made on some other blogs and finally a few links below (strangely enough) a link to the RSS of entrepreneurship category of my weblog (go figure).

Naturally, now that MSN search (link to French version) is in beta, I tried it out immediately. Somewhat to my surprise, when searching for me, the first link is my weblog.

Way to go Microsoft! I don't know what you did, but in this particular case the first link is definitely more relevant. Just like I am pleased to see MS having competitors in various areas, I am pleased to find new competitors of Google in the search space.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments