Just sharing some of my inconsequential lunch conversations with you... RSS  

Thursday, October 30, 2008

How to create and Publish your first Windows Azure application

Ok, I haven't the faintest idea how to do it other than the experience given by Olav Tollefen. I've applied for access and I'm still waiting - the list is long, I'm afraid. Here's the site to go: http://www.azure.com. Be sure to take your time reading Olav's great post!

PS: be sure to register soon, the list is getting bigger!

Wednesday, October 29, 2008

PDC Videos

Unfortunately I didn't find any site with the PDC videos. All I can find is channel 9 PDC videos sections. Here are some of Roy Osherove's recommendations:

Visual Studio 2010 and .NET Framework 4.0 CTP Direct Links

Here's a nice alternative to MSDN Downloads for downloading Visual Studio 2010 CTP - once you have the direct links :)

Enterprise Library 4.1

Enterprise Library 4.1 – October 2008 is Available for Download. Heard it on Guy Burstein's blog:

This release includes:

  • Support for Visual Studio 2008 and Visual Studio 2008 SP1.
  • Interception mechanism in the Unity Application Block.
  • Performance improvements.
  • Usability improvements of the config tool.
  • Fixes.

I'm always divided about EL adoption. Should we adopt best-of-breed libraries or incorporate best-of-breed concepts on a unique and consistent point? Oh well, until them I'll just use both :)

Tuesday, October 28, 2008

Windows Azure

Here's Windows Azure, not a classic OS as some could expected but many had already realized. Here's a cool presentation from Das:

Manuvir Das: Introducing Windows Azure

I've blogged about it some weeks ago, I'll be fun to see how are my forecasts :)

Monday, October 27, 2008

LINQ 'Row not found or changed'

This was pretty annoying... after a while getting an unexpected 'Row not found or changed', here's the solution:

disabled concurrency checks on *all* fields, then added them back one at a time.  Turns out the culprit was a string field that was nullable in the DB but not set as nullable in the designer.

Should probably have chosen EF. No comments...

Monday, October 20, 2008

LINQ to SQL Bug?

Here a great little LINQ to SQL bug. Consider the following code:

    IEnumerable<MasterEntity> masters = db.ExecuteQuery<MasterEntity>(
@"select * from MasterEntity master join DetailEntity detail on master.id = detail.MasterId

Not imagine if you have the same name column both on MasterEntity and DetailEntity, let's say 'IsMandatory'. When you try and get a this property form a MasterEntity object, what should you get?

  1. MasterEntity.Name?

  2. An exception, as Name can be ambiguous?

Well, on my code it happen to return... DetailEntity.Name! Yes, on my dev box the implementation seems to return the first projection by name. If you really want MasterEntity.Name to get returned, you'll have to get:

    IEnumerable<MasterEntity> masters = db.ExecuteQuery<MasterEntity>(
@"select master.* from MasterEntity master join DetailEntity detail on master.id = detail.MasterId

Funny, right? I'd expect MasterEntity.Name to get returned, as your asking for a MasterEntity object, right? No ambiguousness here, or am I wrong?

Wednesday, October 15, 2008

Mac buyers pay Apple tax

Nothing new here except for the confirmation of what we already new: the return of the Microsoft / Apple wars!

Here a great chart (original chart here):

Mac buyers pay Apple tax

Yes, it's a tax. It's called a luxury tax, and only those who can afford it will pay it. It's not fair, it's not rational, but's that's how it is.

Yes, from the hardware value, the price we pay for Macs is too high. The value has been centered on the exclusivity, and that is changing as we can see by Apple's crescent market share, price dropping and Microsoft's discomfort.

Daily I use XP, Vista, Windows Server 2008, Mac OS X and Ubuntu. If I had to choose, I didn't have to think twice: I had to choose Windows. For it's maturity, for it's completeness, for it's application support, for it's hardware support, for it's backward compatibility, for it's great development experience.

But I believe in diversity, so I'm happy with Mac OS X raise on the market. And this is the turning point to Apple, has they seem to already have saturated the market of geeks and people that buy luxury products. Though comfortable with the consumer market, let's see how they cope with the price dropping. And finally, let's see if Apple continues to feel uncomfortable on Microsoft's stronghold: the enterprise market.

CSS Techniques

Whenever I have to create the structure of a site using CSS I usually end up here. Mind as well share it :)

Silverlight 2 Released

Silverlight 2 has been released! Let's see how deep can it go. For me, I've bought the concept - boy, won't HTML/javascript ever go away?...

Monday, October 13, 2008

Windows Cloud again

No, not blogging about the rumor on the name Strata - strata.com is taken, and unless Microsoft has already purchased the domain name, no strata here for them.

Just posting wikipedia's definition on cloud computing:

It is a style of computing in which IT-related capabilities are provided “as a service”, allowing users to access technology-enabled services from the Internet ("in the cloud") without knowledge of, expertise with, or control over the technology infrastructure that supports them. According to the IEEE Computer Society, "It is a paradigm in which information is permanently stored in servers on the Internet and cached temporarily on clients that include desktops, entertainment centers, table computers, notebooks, wall computers, handhelds, etc."

Cloud computing is a general concept that incorporates software as a service (SaaS), Web 2.0 and other recent, well-known technology trends, in which the common theme is reliance on the Internet for satisfying the computing needs of the users. For example, Google Appsprovides common business applications online that are accessed from a web browser, while the software and data are stored on the servers.

Uhmm, and what can Microsoft offer us here? Let's try and guess: well, they have been investing like crazy on huge datacenters, so they will clearly sell “as a service”, but what? Besides the obvious storage and databases, Microsoft can provide a desktop in a cloud to manage it (Live Mesh?), integrated with officelive.com, above the "interconnecting devices" paradigm. They will probably start offering on the cloud all enterprise as services products they offer today as servers (ex: Exchange and Sharepoint) on multitenancy. They will probably lend their platform to others on the SaaS (sorry, Software + Services), making use of the BizTalk Services platform. Finally they can bring a huge marketplace with UDDI and infrastructure services, along with identity, claiming and federation.

On the client, all of this will probably run mostly over a cross-platform desktop application, not over browser. And what about the connected / disconnected model? Well, it has to be supported by a cross-platform framework, and there is where Silverlight can play a significant role. Though Microsoft has not yet decided what is the disconnected persistence framework to adopt, I'd love if they chose something like Bamboo Prevalence over a classical relational based engine.

But what about the consumer market? Lately Microsoft has been traditionally in trouble on consumers. Can they pull an anti-iTunes service? Most unlikely. Can they capitalize their not so cool Mobile Platform by integrating into the Cloud? Well, there's a cool way to go, though traditionally Windows Mobile support is always the last one to get updated.

Let's wait and see.

Sunday, October 12, 2008

A Cray for $25k

I was reading InfoQ's article on MPI.NET and the trend keeps on going: hardware is getting cheaper! Yes, this post is not about MPI, is about getting a Cray CX1 for $25k!

On the early 90's I remember a lecture at college where about a distributed system of Unix servers taking over the responsibility of a Cray supercomputer - apparently the only reason the Cray wasn't disconnected was for the tape library it controlled.

So then I believed Cray were a dying breed of dinosaurs. I was wrong, they are alive and kicking, and you can get one for the price of a regular server 10 to 15 years ago.

I never had so much need for computational power has I did on project SADPOF, an operational decision system for the forest. I'm talking about Simulated Annealing with multi-objective evaluation, huge parallel processing needs of huge chucks of data, with inner LP solving problems. When I'm talking about huge data, I'm talking about simulation variables of matrixes of floats of 6000 x 36 x 32 x 15. And calculating about 30 complex restrictions and a huge objective function.

Our test box was a 2x Quad core and it costed about $5K. A Cray would be welcomed, though MPI doesn't seem to much appealing to work with. What seems appealing is PLINQ, which will no doubt updated to work on HPCs using MPI.

Saturday, October 11, 2008

jQuery strange caching behaviour on IE8 beta

I hate javascript. And the more you hate it, the more you'll like jQuery. Usually it shelves us from browser implementations, this time it didn't.

I have a standard pair of dropdowns with depending values I'm loading with jQuery. Something like:

"ID=" + $(dropdownlistFrom).val(),
function(data) {

On Firefox all works as expected. But on IE8 beta, it activates the caching mechanism! I had to rewrite it to something like:

url: "myJsonService",
cache: false,
dataType: "json",
success: function(data) {
data: "ID=" + $("dropdownFrom").val()

I've also tested on Chrome and Opera working as expected, not caching the data.

Finally I've tested on Safari 3 on Windows, and it just didn't work, cache or no cache! Strange, as jQuery should work on Safari.

Man, I hate javascript...

Tuesday, October 07, 2008

Deploying ASP.NET MVC on a production server

I've just installed my first ASP.NET MVC application on a IIS6 staging server. It's was a Preview 5, and here's how to:

  1. Dependencies: just what you'd expect: Windows Server 2003 and .NET Framework 3.5 (just missed an opportunity to use Microsoft Web Platform Installer Beta);
  2. Web Setup: Created a Web Setup as usual. For some reason it didn't detect System.Web.Abstractions.dll and System.Web.Routing.dll as dependencies, so I had to add them manually. Above all, I didn't have to add assemblies to GAC. Run it as usual;
  3. Tweaking: on my first install I had to set wildcard mapping for aspnet_isapi.dll, as my beautiful restful pages kept returning 404... Here's my first approach, courtesy of Steve Sanderson (option1):

This tells IIS 6 to process all requests using ASP.NET, so routing is always invoked, and there’s no problem. It’s dead easy to set up: open IIS manager, right-click your app, go to Properties, then Home Directory tab, then click Configuration. Under Wildcard application maps, click Insert (not Add, which is confusingly just above),  then enter C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll for “Executable”, and uncheck Verify that file exists.

Done! Routing now just behaves as it always did in VS2008’s built-in server.

Option 1 is a temporary one, I have some time to choose the final one. This solution raises the performance problem posed by Omar AL Zabir that I'll have to address.

Monday, October 06, 2008

Looking out for development info

Searching for development information is paradoxically getting easier and harder. Easier because there is more data to search. Harder for the same reason.

Though Google is always an option, it may be too broad place to search. So I often look for .NET related info on http://searchdotnet.com/, and probably should use more often the http://pipes.yahoo.com/pipes/ concept.

A cool site that has been re-launched http://blogsearch.google.com/. It's a bless if you're lost on a sea of results. One feature I just love is the published date filtering.

Mono 2!

Mono 2 has been released!

Here are my highlights from Mono's highlights:


Microsoft Compatible APIs

  • ADO.NET 2.0 API for accessing databases.
  • ASP.NET 2.0 API for developing Web-based applications.
  • Windows.Forms 2.0 API to create desktop applications.
  • System.XML 2.0: An API to manipulate XML documents.
  • System.Core: Provides support for the Language Integrated Query (LINQ).
  • System.Xml.Linq: Provides a LINQ provider for XML.
  • System.Drawing 2.0 API: A portable graphics rendering API.



  • C# 3.0 compiler implementation, with full support for LINQ.


Windows.Forms: New Controls

  • ToolStrip and MenuStrip
  • DataGridView
  • WebBrowser (based on Gecko!)
  • TableLayoutPanel
  • FlowLayoutPanel
  • SplitContainer


Pretty cool. Can't wait to get it on my Mac OS - hopefully I can get Windows.Forms to work there, Apple has broken Mono's Windows.Forms on 10.5. Let's see if can get back to writing cross-platform Windows.Forms apps again :)

Microsoft Web Platform Installer Beta

The Web Platform Installer Beta (Web PI) provides a single, free package for installing and configuring Microsoft's entire Web Platform, including IIS7, Visual Web Developer 2008 Express Edition, SQL Server 2008 Express Edition and the .NET Framework. Using the Web Platform Installer’s simple user interface, you can select specific components or install the entire Microsoft Web Platform onto your computer. To help you stay up-to-date with product releases, the Web Platform Installer always contains the most current versions and new additions to the Microsoft Web Platform.

Haven't tried  it yet, but Hanselman has mentioned some cool options like "PHP Developer" or "Classic ASP Developer".

Saturday, October 04, 2008

Best practices for creating websites in IIS 6.0

Now that IIS6 is being replaced by IIS, here a cool set of best practices. Don't worry, most of them should be used on IIS - you just have to figure out where they are hidden :)

The best of Steve Ballmer

Well, Microsoft clearly is not as cool as Apple. But with this man as CEO, they seem to be on the right track:

Yes, I know, some of you must be saying: "are we aiming for cool or goofy? ". Well, it seems to work, as Microsoft developers seem to feel supported by this approach. And it is cool to work on technology on a company still lead by techies, not by suits.

Be sure to follow the related videos. Here's one about MacBook Air:

Microsoft's new operating system

Ballmer is announcing a new operating system, Windows Cloud, at the company’s annual developer conference later this month, on a series of presentations.

Yesterday he did it again in Lisboa at Dreamway - unfortunately I couldn't attend, but everyone that I talked with was quite excited about it.

Microsoft has been working on the software + services for long (for instance in devCatharsis: Microsoft is Googling up, Software+Services != Software as a Service and Microsoft Architect Forum 2007 :: Session1: Software+Services), but this is the first time it is branded as a Cloud Operation System. Will the PDC show us a really all new concept, or just a service placeholder for connecting OSs to?

Pararede branding

On the early 2000s I remember having a conversation with a friend about name branding, and used Pararede as an example.

Pararede started its business on networking infrastructures, hence the name (in english something like "For-net"). But the company grew out of its early market and the name just stopped making sense.

On that conversation I advocated Pararede should change its name. My friend disagreed, as a brand's name is a value asset that takes ages to build.

Well, it seems like Pararede opted to change it's name after all. Now it's called Glintt. How strange, a Web2 like name on a company like Pararede...

If you're reading this post, my friend, I'm imaging your reaction: "this doesn't mean they are right, they could be making a big mistake". Well, you're right, Borland did go forth and back to Inprise, only time will tell.


Well, Glintt is not really Pararede rebrandind, is more like the result of Pararede and Consiste merge. Still Pararede is acquiring Consiste...


A common MVC mistake

One of the first errors I've detected on my early MVC code was the tendency to load some list of values directly on the view. For instance:

    <%= Html.FormHelper().Select(
new Hash(selectedValue => new[] { ViewData.Model.Item.MyListOfValuesID }, firstOption => "")

This loading is clearly a controller's responsibility, but I've found it very easy and natural code to write. Too easy.

That brings's me a question: aren't we making a design error when we write controller and views on the same assembly? Shouldn't we make sure all behavior a view could get their hands on should be given by controllers, and never by services? We do it for ages on other layers, for instance we don't expose data layers to UI.

That said, it's really strange no MVC project I got my hands on has ensured this isolation. Probably because these project are all demos, and demos have to be short and concise.

Development Catharsis :: Copyright 2006 Mário Romano