Saturday, July 24, 2004

A new book

I've just received the last book I've bougth thru Amazon (UK), .Net Compact Framework Programming with C#. I think it's quite good: clearly indexed and referenced, quite complete and with good, understandable examples. But of course it hasn't helped me to solve my problems, but that's the problem when you need very specific help and you only have access to generalist resources. Anyway, the book introduced me to Windows CE Developers, an email list hosted in Yahoogroups. In fact, Paul Yao, one of the authors of the book is a regular there and he has kindly replied me to a couple of questions. Deep thanks and best of lucks to him from this blog.

Speaking about other matters, my $250 bid for the new/old project in RaC has been accepted withouth a hassle. Seems like my nes customer is going tobe more likable than the last one(s). I'll keep you informed about this, with screen captures and some code, as soon as I get the time.

And about the PDAs project for my official job, we're making a slow but steady progress. I still don't know how to authorise myself to a WAN, but at least I've been able to refine (and understand) a lot my P/Invoking techniques thanks to this MSDN white papers:

An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework

y

Advanced P/Invoke on the Microsoft .NET Compact Framework


Really good (and really complicated) articles which show how you must cast types, how you must declare the variables and non-administered code, etc... Everything that's needed to use the Windows CE .NET API, and sadly you'll have to use it a lot. And I say, why are they comercialicing such an stripped version of the Framework? I agree it has to be much smaller than the normal desktop Framework, but I also think it should be a little more complete in some areas, for
example in the Interop assemblies, the management of unmanaged code, and the P/Invoking of APIs.

Trick.- Using Visual Studio .NET, both 2002 and 2003 versions, you can make a coordinated text selection. Instead of the normal line by line selector, if you click in some point of you code and then press and keep pressed the ALT key, move you mouse until it forms the desired area: violá, exactly that block of code is now selected for copying, cutting or deleting.

My new personal project

Well, today I start a new project at Rent a Coder. In fact it is a revision (more like a remake, although I do hope to make a better work than Gus Van Sant) of a program I did last year (in fact, it was my very first program for RaC), which consists of a small accounting application for eBay.

Well, there's another customer who read the bid description, thought he needed something like that and asked me: I provided him a demo version (in fact it was a complete version, but with the hard-coded inability to store more than 10 records in any table); and after checking the demo version he has decided that the program is perfect for him.

But I'm dealing with the old conflict of intellectual property and things like that. I've already sold that application (along with the source code, which by the agreement you sign on RaC belongs to the client); and selling this guy the exact same application is not ethic. Besides, I guess this client is not going to be the only user of the app, because he has also expressed interest in the demo version.

So I've proposed the client to improve the existing software: make it with VB .NET, instead of VB 6; using ADO .NET instead of ADO 2.6, and a database change: from Access (puagh!) to MSDE.

With that I believe I'm selling him a new program. After all, is not as if the previous program had IA routines, or complex mathematical functions or anything like that. A simple program for simple needs.

And I'm getting a bit tired of RaC, frankly; not only are my time and effort more valuable than the miserable amounts of money than buyers pay there. The previous client paid me $150 for a complete windows application, with 7 forms, database management and exporting, reporting capabilities and so on. And on top of that he wanted (and he got) it documented, with online help and an installation program. And, of course, he also wants to maintain the intellectual rights over my work for $150, which is more or less the money I expend a month in cigarettes. Maybe a guy living in India considers that a fair prize for a job, but not me pal.

Frell him.

I'm asking $250 from the next guy. ;)

Friday, July 23, 2004

.NET Compact Framework...

... and its frellin' mother.

My new project, on which I'm inmersed since last Monday, it's a testing to convince a potential client that the things they want to do with a PDA can be done.

And I'm beginning to feel really unsure about it.

Our client wants to use several PDAs just like the SWATs used their M-16s: they were in a file to enter their van and grabbing an M-16 each, without choosing it. I mean no PDA will belong to any of the users, anyone of them could use any of the machines.

When one of the users has grabbed a PDA, he must make a login against a WLAN domain, stating his username and password (and domain name), just the same he'd do if he was sitting in front of a desktop.

Quite beautiful, ain't it? But it clashes frontally against the design philosophy of a PDA: this machines are thought to be single-user. That's why you have the network identification located in the same dialog box as the PDA owner identification, under Control Panel, on a Windows CE OS. One's supposed to set hose settings when the PDA is bougth, and not changing them again; or very rarely if so.

To make a long story short, I have to program a little form that allows a user to log against a WLAN domain; stating domain name, user name and password.

And I'm blocked.

I've been hitting my desk with my forehead since last Monday, and it's starting to crack (the desk, not my forehead). I'm joyfully discovering that neither PDAs nor the .NET Compact Framework are really ready to admit network authentications such as NTLM, Kerberos, or anything. This doesn't mean that the things I want can't be done, this means it's complicated. In other words, I'll have to use APIs with P/Invoke callings.

And the API is, of course, poorly documented. In this particular case, the euphemism means the documentation is a frellin' sh*tload. Just for kicks, I've had to download and install a 120 days license of Microsoft's Platform Builder, each and every one of them 700 Mbs; only to find a single file (netui.h) and finding out the value of certain API constants.

And after all this work, just to make the P/Invoking calls and getting a single, constant reply no matter what one tries or changes: System.NotSupportedException. Translating that to standard it means more or less: "This application has crashed but I'm not going to tell you way, and get the frell out".

I quit. I'm gonna become a farmer, as Luke.

A good beginning

First post, and it has nothing to do with programming, instead it's about role-playing games. Anyway, I guess you'll get eventually used to the quite varied nature of this post, or so I hope.

If you play or ever played role-playing games, specially D&D, you must read this:
The giant in the playground

It has a comic called The order of the stick which is really funny. You won't be dissapointed.

Next post will say something about .NET programming.

Promised.

Pffff....