Thursday, July 28, 2005

Limitations of Typed DataSets in Visual Studio 2005

The teams responsible for the new features in ADO.NET 2.0 and the typed DataSet designer included in Visual Studio 2005 deserve a good vacation. They have put a big effort on making typed DataSets a powerful foundation for our data access layers.

If you choose to go the typed DataSet way now, you will be able to create most of your data access layer without writing a single line of code. You just visually pick the tables or stored procedures, define relations, create SQL queries with parameters and all the code for your DataTables and DataTableAdapers is created behind the scenes. It all gets stored in a XML schema defition file, and a tool automatically generate a set of classes from it. The generated code itself is very simple, but in my opition is efficient, and it works. Moreover, if your data schema changes, you don't have to touch a single line of code.

Coupling typed DataSets with binding objects like ObjectDataSource and bindable controls like the new GridView, makes up a solutions that reminds me of Microsoft Access for its simplicity. I think this is the first time I have used a RAD tool that supports multi-tier development.

I have to say, I would love to use typed DataSets for all my future development.

Unfortunatelly, while normal DataSets are database engine agnostic, they forgot to teach the typed DataSet code generator (MSDataSetGenerator) about the new DBProviderFactory included in ADO.NET 2.0.

So, once you have choosen your data source in design time, the code generator will produce a DataSet that is database engine specific. You can still choose the OLEDB provider, but DBProviderFactory makes a much better model for ADO.NET, because it allows you to use a native managed provider in runtime, if it is available.

This is all a pity, because everything else in the DataSet is so well though. For instance, table columns and query parameters are all of database independent types. They even use Nullable for variables that can be null. The new ConnectionString setting stores a ProviderName attribute anyway. And it only takes a couple of lines of code to create a connection or command from a DBProviderFactory. So why did they do it this way?

I don't see technical reasons (maybe I am blind). So, I am suspicious that someone though: "Ok, let's make this database specific so we sell more copies of SQL Server 2005". OK, maybe Microsoft.NET makes SQL Server 2005 a more attractive SQL Server, but this doesn't work the other way.

For instance, in the software development company I work for, we do database engine independent software, and we are good at it. We have had the same factory pattern for some time.

Even if we love SQL Server, database independece has been always one of our top requirements. If a new customer comes to us, we will offer SQL Server to them, but in many cases, they have already a big investment in a databaes engine, and this can be any engine they like.

Since source code for MSDataSetGenerator is not available, and since it is not practical to touch ourselves the generated code, we need Microsoft to tweak this for good.

It is very late for this, but if you care, please, vote for this suggestion on MSDN Feedback.

Sunday, July 24, 2005

Codename Avalon and Indigo Beta 1 Comming Soon?

If what happened with Virtual Earth site is any indication (the site was down for some hours before launch), I think maybe Avalon and Indigo is comming soon to, as Beta 1 RC download page is off line.

UPDATE: This was obvious stuff. Codename Avalon and Indigo Beta 1 <=> Windows Vista Beta 1.

Nice British Sarcasm on Virtual Earth

The problem with Virtual Earth is that it only serves USA images. But this guy explains it much better in "Attention All Aliens".

How Honest Can a Zero Bug Bounce Be?

I have mentioned before how much I like reading Adam Barr's blog. This time a read a post about a few bugs in Monad and a few peculiarities of communication inside the Monad team. What got my attention is these two paragraphs:


...

Anyway Lee filed this bug and I resolved it back to him as "By Design", but then a few days later he opened it back up saying "We really should fix this." So I chonked it right back to him. We are nearing a milestone and need to get our bug counts down; this means that using the bug database as a form of communication works pretty well because people check their bugs often, but I also don't want bugs lurking around on my plate.

...

I could blog about it, but not much point in displaying code that I know doesn't work (I have posted some code that could be improved, like the -contains to -eq change, but at the time I posted it I thought it was right). I could file a bug, but at this stage every bug filed raises the stress level. I could email him, but it might be hard to explain. I could go talk to him, but then I wouldn't have the script on my machine to show him. Hmf. And to think that our group, for whatever reason, doesn't use Instant Messenger, or that could be another choice.

...


Now, I am currently diving in the Rational Unified Process and I have studied the Microsoft Solution's Framework in the past, but I would say I am a newbie when it comes to formal software engineering processes.

However, I am convinced a bug tracking system is a critical tool. Also, I always thought that bug convergence and the zero bug bounce were concepts intended to help you identify the right time for a project to ship a release candidate and jump to the next phase.

Maybe Adam is talking with a bit of irony, but I think when you begin tampering with your bug count just because you have a deadline approaching, I see no way you can avoid your product's quality from suffering. I would say it is preferable to cut features than to cut quality.

Anyway, I know us developers are human, and we don't set deadlines. So let's stretch things a little bit and suppose it is ok to stop registering new bugs because your boss wants the bug count to reach zero by yesterday, or because the staff is stressed. Then, what are you going to do with the bugs you didn't register?

Dishonest accountants solved this centuries ago by keeping a second set of books in the shadows. They did it because keeping accurate information of what was really happening was more important to them than evading taxes.

A Little of Feedback for Virtual Earth

UPDATE: After playing with it a little, I see some of my feedback is irrelevant. For instance, the scratchpad serves as a link collection (I don't know if you can persist it).
UPDATE 2: I am ashamed. I wish my English was better, and that I had enough time to correct this a little bit. I tend to correct my posts a few days after.


Just a few crazy ideas I am filling on VirtualEarth feedback forms:

What do you like about this design for Virtual Earth?

  • The general look is good. Labels, signs, panes, and the images themselves look great.
  • Mouse wheel support rocks!

What can we improve about this design for Virtual Earth?

  • I would like to have the option to see planet Earth as a globe instead of the projection, but this is impossible to implemente on DHTML, isn't it?
  • I would like to be able to search for a place based on cordinates.
  • I would like to be able to enter my exact cordinates in "Locate me" and maybe save a cookie.
  • Then I would like the "Locate me" button to change to a split button/drop-down, labeled "My locations", so I can go to my location on a single click.
  • Further, itegration with Passport should bring the ability to persist multiple preset locations to a server database.

What kinds of information would you like to see on Virtual Earth?

  • I would like it to be very extensible. For instance I would like to be able to subscribe to some kind of location web services or xml file, the same way today you subscribe to an RSS feeds on an aggregator.
  • Then any website could publish a geocoded file or web service (in case there are too many points to map), for instance, for its branch offices, or whatever makes sense to put on a map.
  • Ideally those points should be taken and rendered at the browser.
  • This could help information from other sources to be added to the map. For instance, blogs from FeedMap.
  • Going even further, integration with passport should allow some of those geocoding feeds to be saved on a server, for later display.
  • I could even like seeing the current location of my MSN contacts.

Anything else you'd like to tell us?

  • I am impressed with Virtual Earth. However, it is a little sad that in this first iteration the zoom levels for most cities I have lived in, are even poorer that on Google Maps, Google Earth or NASA's World Wind.

Virtual Earth is Online

I was seeing the whttp://www.virtualearth.com was down after reading the post by Seteve Rubel, but then I guessed that if they were going to go online on monday they would do it at http://virtualearth.msn.com/. And there they are!

Wednesday, July 20, 2005

Don't let us down again with the new Hotmail

I remember when I heard they were about to upsize Hotmail accounts from 2MB to some big number.

I want all of you to know that in most countries in Latinamerica that never happened. The reason? I guess there must be more than one, but I believe the most important is that MSN has been selling Hotmail Max in Latinamerica for some time.

Hotmail Max is a paid (cheap) service that enhances Hotmail basic services in various ways, includding storage capacity.

No matter how successful they have been on this, companies that decided not to discriminate the Latinamerican market like Google and Yahoo are getting a larger stake of it everyday, and I hope MSN will revise their plans with the upcomming version of Hotmail.

Apparently everybody else will get now 2 GB wich is on pair with GMail. Good! But I don't believe it until I see it on my mail box.

A note for those that tend to see evil on everthing Microsoft does: Microsoft believes in selling software and services. That pays their bills. They don't completely buy, as of yet, Jonathan Schwartz's "Free software is like TV" model. When they decided to give out Internet Explorer for free and later to bundle it with the operating system, they did it because they had no other chance. Everybody else was doing it already.

Hotmail has been an exception. They bough a free email company, and they saw the value of it. But don't expect them to give you something for free just because you think it is cool.

Fascinated by AJAX

I know I am not early to the party, but it is on purpose. I refused to blog about this before because I don't want to give anybody the false impression that I am a cool geek.

Anyway, I am seeing more and more AJAX (Asyncronous Javascript and XML, more less)applications emerge, and I since yesterday I see some AJAX in my future.

I am glad someone (yes, Microsoft, but also some independent developers) have listened to the call for an abstraction layer that will enable all of us to create richer experiences in Web applications.

By the way, Google is cool, but Microsoft has made some of the best AJAX applications I have ever seen. It just came to my mind the day I found MSDN replaced its Java based content tree with a DHTML based one. I am not sure this is AJAX as we conceive it today, but how many years ago was that? Six? And when did they come up with DHTML, eight years ago?

Now that I saw the light, I am really looking forward for Project Atlas.

Sunday, July 10, 2005

About OS/2 and the 850 million Microsoft paid IBM

Update: I cannot avoid editing this article, mostly because I see in my stats that a few (even from inside IBM) are reading it. I don’t want to change at all the sense of what I wrote, but I feel I have to correct mistakes and improve the style and tone of it in order to make it readable.

I received today the Stardock Magazine by email, and it contains a link to an article in which Stardock’s Brad Wardell discusses some of his experiences as an OS/2 developer and the deal that Microsoft and IBM have just cut:

...

Birthdays, anniversaries, whatever, I have trouble remembering. But OS/2 2.0’s release date is burned into my mind. And for the subsequent 6 years, I devoted nearly every waking hour to making OS/2 succeed. It wasn’t about money. It wasn’t about business. It was a cause. OS/2 was my cause. It was a better way of doing things. Some people get wrapped up in ideologies. Other people go on religious crusades. I was on an OS crusade.

And we lost. Badly.

Another date I remember well was Fall of 1996. That was when Microsoft release Windows NT 4.0. And within a year, the OS/2 market died. Microsoft’s effective FUD (fear, uncertainty, and doubt) combined with IBM’s unwillingness to strongly back OS/2 made it ripe to be toppled over by Windows NT 4.0 which, while not as good as OS/2 Warp 4, was "good enough" and had good industry support.

By 1998, our once thriving company was laying people off and struggling to survive. And I wasn’t a 20 year old college student anymore. I was 26, married, with a young son. I had responsibilities to my family and my employees. We limped our way into the Windows market, tail between our legs. Nowadays, we’re a pure Microsoft shop. .NET solutions across the board. Microsoft SQL. Microsoft Office. Our company makes a great demonstration of Microsoft solutions now. Which is pretty ironic since we were once OS/2 zealots. I’m not a Windows zealot today. I’m not even a Windows advocate really. It’s just business.

The romanticism of OS technology has warn off and there’s nothing as relatively cutting edge as OS/2 was back then. So now I don’t really think of the OS choice much beyond market share and what makes good business sense. Now it’s about the software WE make. I am still dedicated to a cause -- making stuff that enables people to use their computers however they want. And I want to make software that is cool and useful. That’s where software like Object Desktop and now ThinkDesk comes in.

So today IBM and Microsoft announced that they’re closing the books on that uglyness that was OS/2. Almost 10 years after Windows 95 was released, Microsoft is paying IBM off to not sue them over all the "unpleasantness" that Microsoft was involved in to ensure that 95%+ of you are using Microsoft Windows instead of IBM OS/2. We’ll never know if we would have been better off if OS/2 had won out instead of Windows. But at least IBM got to recoup some of their costs for trying.

Are you kidding? Do you call what IBM did "trying"? Well, maybe the tried, but they also gave up miserably. I understand how it will always be so cool for you to write "Microsoft" and "FUD" on the same phrase, however, as an ex OS/2 zealot, I disagree with you, 80%.

By 1988, I did programming and support for an organization that had tens PS/2 and PC computers connected on a Token Ring LAN. I was 18 and it was my first job. Even the servers ran PC DOS 3.30 and the PC LAN Program 1.3 (I think those were the version numbers).

I remember when one day, a new box with a few diskettes came to my hands. -"Try this", they told me. I was able to install and try OS/2 1.1, but it was very difficult to make the networking work. I remember I had the feeling that I was for the first time seeing a real operating system running on a PC. It also left me very frustrated.

On my second job, by 1991, I also worked in the same network, but this time I was hired by a company that provided much of the hardware and software for it. The network eventually grew to hundreds of nodes, and became a WAN using FDDI. Performance of file sharing database (Clipper based) applications on PC LAN Program was getting really bad.

OS/2 1.3 came to rescue. I remember being there with my boss the day we installed OS/2 1.3 on the new PS/2 Model 90 (or were them 95?) servers. It was the nicest piece of software, and the nicest piece of hardware that I had ever seen. Performance went up like a rocket. That was probably the greatest triumph I remember from that job, and I am sure for my boss it also meant a lot.

OS/2 was still the product of collaboration between Microsoft and IBM. OS/2 GUI, Presentation Manager was very resembling of Windows 2.x, a DOS GUI program I only knew because of Excel. I think version 1.3 was vastly optimized by IBM alone (or was it 1.4?). It included a 32 bit version of HPFS that installed in case you had a i386 or i486. I must say it worked like a breeze.

By the time Windows 3.0 was out, I was a deeply convinced OS/2 zealot. No way an "inferior product" like Windows was going to win in the long run, it was just impossible.

OS/2 2.0, the first fully 32 bit version of OS/2 came out late, but it was wonderful. I still remember the cover of BYTE magazine. IBM had gathered a great team for OS/2 2.0. They had such a great vision they didn’t know very well when the product was ready to ship. They kept adding more and more sophistication. On the technical side, as a fan of Object Oriented Programming, version 2.0 was full of interesting things to look at under the hood. Its compatibility with legacy software was also incredible.

Maybe it wasn’t a better Windows than Windows itself, but it was very close, and it was clearly a better DOS than DOS, and the best OS/2 ever. The Workplace Shell was not very polished and it was inconsistent at times, but it showed promise.

During 1993 and 1994, I had access to beta versions of OS/2 3.0 (Warp). I don’t remember if it was a formal beta or if somebody at IBM found a way to make the diskettes reach my hands. I saw the betas improve so much that, I was one of the first in my city to buy it when it was released. It was around USD 69 I think, and I wanted it for my home computer.

I was the last time I saw a new version of an operating improve its performance so much on the same hardware.

"Warp" helped to consolidate on us OS/2 zealots the feeling that we were on the right side and Microsoft was on the wrong side. We were sad and skeptic every time Microsoft made any progress.

For instance, we knew 1995 was the year of Chicago, the much improved Windows 95 that was supposed to steal much of the innovation made on the user interface of OS/2. But we were not too worried because Chicago was going to be just a DOS shell. OS/2, on the other side, was a full 32 bit operating system, and it was the best.

I must admit, I needed to be defeated first, so I could realize how ridiculous it is to be an OS zealot.

The first time I saw Windows 95, I just knew Microsoft were going to win the battle. It was simpler, more consistent, it performed better, it came with better hardware support, it used only the best UI artifacts found on OS/2 but also had some innovations of its own. Even if it was a DOS Shell it was 32 bit in most areas and multitasked relatively well. I saw it was a winner, but at first I didn’t see it as an OS/2 killer.

At the beginning I though OS/2 were going to survive, just not as a dominant platform. SMP was on the way and IBM was porting it to the Power PC Platform, which was poised to eventually displace the PC.

After that, we only got disappointments and more mistakes. OS/2 proved impossible or very difficult to port. The Power PC was abandoned, for no known reason.

Microsoft had an absolutely great team doing the architecture of their Windows NT (original though was OS/2 NT). Those people weren’t believers of using hand tuned assembler code in operating system, but of building hardware abstraction layers and designing operating systems to be portable. Ironically Microsoft got a commercial version of NT to work on the Power PC, something that IBM never fully accomplished with OS/2.

Now I think IBM lost this OS war by itself. Microsoft didn’t win it because of FUD, it just battled better on every front. While Microsoft was able to attract a lot of developer support. IBM just abandoned OS/2 development, like they abandoned every other related initiative, like Open Doc, Power PC, etc. I guess they fired every developer years before they publicly admitted they weren’t going to fight.

A few years later, Windows 2000 was, in my opinion, the first version of Windows NT that was better than OS/2 in every area.

The last time I saw OS/2 running was during a trip to Italy, I think during 1999 or 2000. My wife and I came to a train station and bought a ticket on an automated kiosk. When I saw the light yellow text and list boxes and the "^" and "v" shaped scrollbar buttons on that screen, I almost cried.

Let me be clear on this: I hated it when I learned that Microsoft bullied OEMs not to distribute Netscape. I think this kind of practice should be illegal in every industry, in any country, by any company.

But I think what happened to OS/2 was absolutely different.

Microsoft wasn’t the bad guy. They weren’t kicking a poor old man, but a stronger giant that would have loved to do the same to them. They simply were faster, smarter, successful, whatever. Eventually, it became almost impossible to buy a new PC with OS/2 preloaded, even from IBM.

Besides, I don’t think it is our mission as mere mortals to lick the wounds of big corporations. It was the case of two very capitalistic big companies fiercely competing. Neither needed our consolation.

So, the question is: What were the stakes for us zealots on it?

I mean, if you contribute to an open source operating system like Linux or FreeBSD, you have a clear justification to be zealot. After all, you have your beloved code in it. But why were we so passionate about OS/2? Why did we hate Microsoft so much? Was it because OS/2 was a "better way of doing things"?

Then I think we were probably a bunch of pathetic OS fascists.

About the USD 850 million Microsoft gave to IBM, I think it is just because Microsoft today prefers to donate the money to competitors in the tech industry than give it to the lawyers. They must be so sick of litigations!

But this doesn’t make this end any fair or happy, in my opinion. IBM does not deserve the money. Certainly, IBM is a company I could not trust again.

The best they can do is to distribute the money among people like Brad Wardell that dedicated their time and own money to a cause IBM embarked them on, just to abandon them in the middle of the journey. They could also give some to the original developers that made OS/2 one of the best PC operating systems of its time. And they could also give me 2 dollars, for my 2 cents.

If you think IBM should release their OS/2 source code, sign the petition here. It wouldn’t bother me that Microsoft allowed the parts that they co-own to be released too. I think Serenity Systems would still have a business model (maybe a better one) if OS/2 source code were to be released.

Friday, July 01, 2005

I don't agree with Bill Gates on H-1B Visas

I read a couple of months ago about Bill Gates remarks on the H-1B visas cap in the USA. While I can understand how he and other technology industry leaders got to think this way, I strongly disagree.

Like in many countries, in USA there seem to be plenty of people that think that foreign workers are stealing their jobs (look at the comments on the ZDNet's article for a sample). Most seem to feel fear, anger and hate. I don't agree with them either.

I am not American, and I am not thinking about going to work to USA. I am currently a foreign worker in the wrong country I would say, because here wages are very low compared to the cost of living.

My problem with H-1B visas is that it engenders the status of a second rate citizen, somebody that needs to comply to whatever her/his sponsor wants. It is not easy to switch to a different job if you go to the USA this way. Whatever mistake you make, or whatever changes with your job status (the company breaks, or your job requirements change, for instance), you will probably need to leave the country.

So this creates a deep distortion in the labor market. H-1B workers do not compete with American workers. They come from the beginning for lower wages that Americans would not accept. Corporations do not need to keep them happy like they need to do with the nationals. They have bargained for quasi-slaves instead. In my view, in this area the power of corporations has gained terrain over basic rights and law.

It rings an alarm to see Gates, an otherwise true philanthropist in my opinion, saying that he would eliminate the cap. He is, I think, defending the interest of his corporation over what is right.

I would say instead, eliminate the H-1B Visas altogether. And, if American tech corporations want access to the global market pool, replace H-1B for something that convert temporary foreign workers in immigrant workers and first rate citizens under the law. This will level the playing field, at least inside the borders.

So foreign workers will tend expect a higher income, closer to what natives have. And they will switch companies at will. There will be true competition.

American workers, and for the case, people from all developed countries in which income is over the average, will be still exposed to the uncertainties of off-shoring. This is the reason they need to support policies in their countries that help leveling the playing field all around the world.

This is a serious problem. They should act today or their children will face a very hard laboral environment.

Free your mind of fear, anger and hate. Stop the double standards. Welcome empathy.

Moving to MSDN

I haven't decided yet, but it is very likely that I will stop blogging here for some time. For some background, I have moved to the sate...