ProtoLib - Book administration in .NET

Wednesday, November 16, 2005

Bearware

One book that I was reading these days is "The inmates are running the assylum", a computer book about design issues and problems in the actual software products, and it's discussion about bearware made me think about Protolib and it's actual implementation.

The point is, even than the program is more or less running and doing some of the things that I want it to do, it's really a kludge. I learned a lot about Visual Studio 2005, and generics, partial classes, object datasets and many other features of the tool, as well as many points in the .NET Framework, which is one of the objectives for this small project.

But, in the software product aspect, Protolib stinks. It's too near to a prototype and too far to the Librarian* to be something to be proud of. I feel embarrased each time I open it, thinking about the probable crashes accessing Amazon, the big pack of tweaks that I applied over time to work in my computer, the haywire user interface, and how difficult is to make sense on it if you are not the programmer. At the same time, a part of my mind shouts 'It's working! The code works, release, release, RELEASE!'.

During some weeks I was pondering the possibility of posting it here, or to show it to my friends to polish the roughest points, or starting again from scratch using the experience aquired, but I still haven't arrived to a conclussion. Until now, while reading this book.

My experience is that for a user, the program is the interface. I don't care about the inner workings of any program that I don't desperatly need and use (which I suppose will be the case with something so superfluous as Protolib, it's nice to have, but is not needed), if the installer complains too much about my computer, or if I can not find the feature that I want in less than five seconds, I just uninstall the program or start searching for another website "better done", or fetch the keyboard to write my own application, wich probably will be worst than any other option but at least will be mine and I will know and understand it.

At the moment, Protolib is just a prototype, and as in this book and others said, you must be ready to throw the first version, and that is what I will do. I will collect my notes, draw a little, and start again with a 'Blank solution' of Visual Studio 2005 (now in it's final version).

* The Librarian is a program mentioned in "Snowcrash", a SciFi novel by Neal Stephenson. This program collect information and prepare reports for the protagonist. When I read the book, I thought 'I NEED something like that!', but the only thing that I can do at the moment is only a toy like ProtoLib :)

Friday, July 08, 2005

Development environment

It's a long time since the last post, but I wasn't in holidays. The case is that all my development environment was shaken, and as it's usual with me it only started as a small change that kept growing.

The first thing was the arrival of Microsoft Visual Studio 2005, with which I fell in love inmediatly. Generics are fantastic, and the refactoring tools are good to, but at the same time all the environment looks and feels better. By the way, I started using it at the office too, and now I hate when I must go back to version 2003, or worst, to Delphi.

At the same time, some time ago I started thinking about having a better development structure at home, starting with a simpler Internet boadband connection and finishing with dedicated servers for the web, SQL, version control and email.

My first step was to buy a router to replace the Pentium III that I savaged from the office garbage, which was working sharing the Internet connection for Flo's PC and my notebook. I bought a Linksys BEFSX41 router, which looked so beautifull in the photos that I never read it's full specifications. When it arrived I noticed that my USB modem can't work with it, so I bought a ADSL2MUE modem, also from Linksys, which not only looked as beautifull as the router, but also has the advantage of being from the same manufacturer. My reasoning was that the two products should work perfectly from the start, and that everything would be fast and clean.

I was wrong, because at first I couldn't figure how to configure them to work in a network (my network administration knowledge is very scarce, and at that time was even worst). When both where fine, they didn't want to work together, and the router make a warm boot each 30 seconds more or less. I downloaded some updates for both BIOS, and after a lot of testing and reading in dslreports (it was good to have the old configuration running, which drive me to think about having redundant connections in the future) my modem/router team started to work as fine as I liked.

After that I went for my now free PC, reformated it and installed Windows 2000 Server, basicaly to work with IIS. The thing was that it was working as file server too, and I wanted to keep the files in other place, so I bought a new 200 Gb disk. This disk was recognized by the PC as a 50 Gb disk, so finally Flo's PC got the new disk, which means that again I needed all the computers in the house running whenever I wanted to play with the network.

Now, they are not so many computers (except that in our tiny flat they look like a 1960 IBM laboratory), but I really don't like the idea of being messing around Flo's things, specially when we both are working at the same time, which means that sooner or later I will need another computer around to go as file server, but for a while I was conecting and desconecting the monitor from one PC to the other, because I only have one monitor at home (and that means that I will need another monitor too).

Finally IIS started working, and I noticed that not only my network knowledge is not as good as I like, but also my IIS knowledge was not enough, so I started reading and testing a lot of things around the new server. At the same time I started looking for tools to keep an eye over the router/firewall, but I suppose that the actual applications are not very happy with the new BIOS, because none of them worked as the manuals said, and I am checking the logs directly in the router, which is not very nice.

Given the monitor sharing problem, I started using the remote desktop from Windows to control the server and Flo's PC, which works fine and as I expected it to work. That ignited my curiosity about VNC programs, and I started testing some of them, in particular TightVNC, which is open source. I had it working over the Internet too, so I can connect from the office, but given that it's not encrypted, I started mesing around with OpenSSH, which at the moment is winning the battle, I couldn't figure how to make it work. The point of that experiment was that I bought an old notebook in eBay, and given that it has a Pentium I processor and few memory, I installed Damn Small Linux in it. Linux run great, and I even can have an X session running, but my Windows Remote Desktop is gone there and I want to be able to take control from any computer in the network (I am thinking about having some Linux servers too, but that will be in the future).

When the web server was finished, I started looking at how to make it visible from the Internet, and at the same time trying to add other services to my network. I tested a few FTP servers (IIS can't work with the router, Filezilla server works fine but doesn't like to access shared directories in the network), and installed a new version of SubVersion, which I also want to be accessed from the Internet. At the same time, given that my IP address is dynamic, I tried some services to have dynamic DNS. Some of them say that they can work with my router too, so I should be able to keep the configuration in the router, but at the moment I wasn't successfull with that. Really, the only thing working properly from the Internet is IIS, and I haven't a proper website!

Going around this last problem, I started looking on content management systems, and blog programs, and forum programs, and a lot of other strange creatures, but I haven't arrived to a conclusion yet. I like the web server based solutions, but at the same time I have the same prurit as Magoo, I want to be able to work from a disconected computer, and I want to have full control over my data and services. I will keep looking and testing, and I hope to have something done before long. By now, I feel much more confident around the network, and configuring services too, so I am happy enough with that and cursing with all the rest (I am not tearing my hair out because I haven't anymore hair).

And not only the network at home were under changes, but also my notebook was edited. I have a multiple boot configuration, with a Linux and three Windows boots available. I use one Windows to make tests of new toys, other is for my normal applications, and the other to program. Each has a 6 Gb partition to keep the system files, and I have another 30 Gb partition with my data and the apps that doesn't need to be in the system disk.

After installing VS2005 in the programming disk (where I also have Visual Studio 2003) the notebook started complaining about having too few free space, and doing strange things, so I finally erased the normal disk, uninstalled VS2005 from the programming disk, and installed it clean in the fresh partition. Everything goes fine since then, but I think that 6 Gb is too few for .NET 2, and probably 10 Gb will be my next system disk size. With all this installing/uninstallig/formating activity, I updated my utilites list a lot during these days. I finished compiling a CD with all my tools (most freeware/open source, and some shareware). I will post about them in the future, and an ISO image if somebody like it and I can manage the space/bandwith bussiness.

Finally, I was working in ProtoLib too, going from .NET 1.1 to version 2. The task is very interesting, and as I said before, I love Visual Studio 2005 and it's posibilities. I changed the solution structure a few times to see how to make it clearer, and gone heavily with generics, specially with lists. I will fly to Argentina next week to see my family, dog and friends, and also to talk with the same friends about how to go with this project and to set up the working environment. A problem with all this conectivity changes was that my communications, usually not in very good shape, gone completelly crazy during the last month. I think that some brainstorming with everyone in the same room will be extremelly usefull for the next steps.

Saturday, May 21, 2005

Visual Studio 2005 Beta 2

Yesterday I received a box with four DVDs with the materials from the Visual Studio 2005 Beta experience, containing VS2005 and also SQL Server 2005 and 'We fly 24/7', an end to end project done with VS2005 involving Windows, Web and mobile applications.

I was using the Beta 1 Express edition of C# for a while, but given that I find easier to work with VS2003 I haven't used it to do any real job. So I was taking it out of my notebook and installing the new tools. I started at 9 in the morning while working in the office, and finished ten minutes before 12, a long process but not so different from VS2003.

I made a mistake in the middle because I went first for VS2005, then for MSDN documents and finally for SQL Server, and in my haste to have everything ready I didn't read the installation notes for SQL which specify that you need to uninstall the Express version before. That is, I uninstalled my Beta 1 versions of everything, but never realized that VS installs a SQL Express by itself, and when I started looking for Server Management Studio I found my menu with only the SQL Express and no tools at all. After reading the notes and following the instructions everything was completed without major problems (a funny thing happens in my notebook because my screen resolution is 1400 by 1050 pixels with 120 DPI fonts, and the images and some buttons during installation were out of place, but in the desktop computer everything goes smoothly). Now is time to start running!

Wednesday, May 11, 2005

What I want from ProtoLib

This are the kind of questions that I want to answer using ProtoLib, and a small real life example for each:

1 - Do I have any book about unit testing?

I have lots of books that I haven't read yet, specially in digital format, and as part of my training I choose a field and study about it between three and six weeks. A list of what I have around is a good starting point to make a schedule, and usually I spent an evening preparing that list. Also, sometimes my friends ask for something to read, and it could be easier for them to start wandering around instead of resting in my memory.

2 - Do I have any book writen by Isaac Asimov?

Sometimes I read a book or article and if I like it, I start looking for other works from the same author. This happens frecuently with the articles which I read in the Internet, but also with books (my last chase is for Neal Stephenson books).

3 - Do I have any good book about Science Fiction?

I heard this kind of question each time that I start talking about books, probably because I go very enthusiastic in many topics, very fast, and this seems to be contagious at least while I am around (later people wonder why in the world do they have a book about ants in their hands, o other fields equally funny).

4 - Is 'Writing secure code' a heavy book or can I have it in my pocket for my que waiting moments?

This came when I am preparing my study list because I usually have something to read with me at all times, just in case to been stuck somewhere with nothing to do.

5 - Where is my copy of 'Inside C#'?

This is an issue with my paper library, and a big problem with the digital books.

6 - Which books are lent?

Just to keep track of them, even than sometimes they get lost in time and space.

The biggest issue with this kind of questions are about how to capture the data of each book, which was the main reason to which I haven't made a program in Delphi ten years ago, because I prefer to spent my time reading instead of completing boxes in an window. I started thinking again about this project when Amazon opened their web services, which allows you to retrieve books data from their servers. That way I will be able to answer other questions:

7 - Is there any book like 'Lord of the Rings'?

Amazon have a list of 'similar products' for most of their inventory and it's a good way to know about books that I liked.

8 - What is people saying about 'C# in a nutshell'?

There are two kinds of reviews, one editorial and other made by the customers of Amazon. Even than I am not very confident in reviews made by people that I don't know, they are a starting point to decide if it could be worth to invest some time looking a book.

9 - How much is costing 'The soul of a new machine'?

They have a list price and also other offers, mainly used books. This is also a good way to know how much money I have spent in paper.

10 - Which books are in my shopping list?

I take some time regularly to go to the books shops and browse the shelves, but usually I wait for a while before buying, to have time to think if I will read that book or not (my budget in money and space for books is very limited), and sometimes I forget many books until the next time that I go to the shop. Having them in a 'wish list' might be a solution for that.

At the same time, I have some usability ideas about ProtoLib:

- For data entering

1 - I want to write a ISBN number, a title or an author's name, and receive a list of books to pick the right one to have it's full data retrieved.

2 - I want to be able to classify a book under many categories. For example, 'C# in a nutshell' could be classified as a book on programming, .NET, Windows, Web and maybe other fields.

3 - I want to drag a file from a CD and being asked for something to identify it (say, the ISBN), and ProtoLib must remember where is that file, and also to recognize it if I have another copy somewhere else.

- For presentation:

1 - I want a tree view of my library having each title inside each category assigned to it. Many books will appear several times in the tree, because sometimes I want a quick view of all the info that I have for a field, and it's easy for me to navigate a tree presentation and arrive to broad conclusions in a short time.

2 - I want an international application, because my library is in Spanish and English, and the same happens with my friends.

3 - I also want to know that 'TCP-IP Illustrated' is the same book as 'TCP-IP Ilustrado'.

4 - I want a list of my books, filtered by any criteria available for them. The data will be more or less the same than in the tree, but faster to group and sort.

5 - I want to have the option to run ProtoLib without install anything, just calling an application in Windows. I want this to be able to keep a list in a USB disk and to read in a cybercafe if I am on the road without my own computer.

On an structural point of view, I want to be able to extend ProtoLib to other kind of products (Amazon have a broad field of things offered in their website), and also to have different interfaces. I will start with a Windows application, but probably I will want it in my PDA a week after I have one, and a web front end could be good to interchange books with my friends, and having web services around could tie the Windows version with my friends libraries.

Next time I will review the programs that I found that are more or less in the same league than ProtoLib.

Tuesday, May 10, 2005

A bit of history

I like books very much. My library includes around 600 books and magazines, and I also have good number of manuals and articles living in my CD collection.

In 1995, when I started working with Delphi, I was playing with the idea to make a program to catalog my books and to share it with my friends to have a kind of semi-public library (some of them have good collections too), because at that moment I couldn't find a product for Windows with all the features that I wanted. Finally I made other kind of programs, with a broader approach to classification, and the book project went to the closet.

Usually I remembered where most of my paper books were and was able to go for each one in my shelves, but since we moved to Ireland a year ago (leaving the library at my mother's house) I must rely in the digital collection, which is more difficult to remember. I start shuffling my CDs, and sometimes directly jump to the Internet and download the files again (which is a problem with the excelent Microsoft 'Patterns and Practices' material, because I always got lost in the website). I started thinking again in a book management program, but now in C#, given that I like it much more than Delphi.

The biggest issue with that project, apart from the fact that I spent most of my day in the office, is that even I am using C# since 2002, I haven't done a complete project in it (something that I did a lot of times in Delphi). I made web services, Windows apps, ASP.NET apps, libraries, components and a lot of other things under the .NET Framework, but never started from nil and finished with a fully installed and supported product. This is a challenge, but at the same time it scares me a little.

At the same time there are other problems around. This will be my first atempt to write in English (as you probably guessed after the first sentence), and I will try to set up a development environment at home to use in other projects. I am waiting for a DVD with the Beta 2 of Visual Studio 2005, and probably I will finish the job using it, even than I will start with VS2003. Time constraints are in place too, because I don't want to spent more than four weeks of my spare time before having an idea about if I am able to do the job that I want in a reasonable lapse. I will start working only with my things at home, but later I might place the project in SourceForge, and I haven't done any serious job in open source before. Part of my idea is to learn from the comments from other people about tools and programming, but at the same time is a little scary to allow my creatures to run naked in the wild open (I *know* that my code is *perfect*, but there is a curse that make it become horrible each time that I show it to somebody I respect and admire, or to Magoo). I am also mentoring a friend in Argentina about the .NET Framework and probably we will use this project to set up the tools to have a distributed development team in place. All in all, the next four weeks looks very interesting :-)

My next post will be the specifications for ProtoLib.