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

Thursday, January 31, 2008

Design Patterns Card

Here's a great card with essential design patterns a friend just sent me. For much that some people believe design patterns are just covering for poor language concepts, we still have to write and maintain code on those languages. For the rest of us, this is still a great poster to post on our walls :)

PicLens: great UX!

Here is the greatest user experience I have being seeing for the last months: PicLens.

PicLens is a browser add-in that jump into a "3D Wall" of images, where you can then scroll and zoom into images, jump back to the corresponding webpage, and even toggle into full-screen mode.

PicLens provides an immersive full-screen experience for viewing photos on the supported sites listed below and on sites that support Media RSS. Sites like:

Flickr
Photobucket
Picasa Web Albums
DeviantArt
Smugmug
Facebook
MySpace
Bebo
Hi5
Friendster
Google Images
Yahoo Images
Ask Images
Live Images
AOL Images

You've got to try it!

Scott Guthrie: What's Coming for Mix - IIS7 for Developers

Here's a great Channel9 presentation: Scott Guthrie talks about IIS 7.0 for developers, how they've improved hosting scalability, improvements to configuration management and deployment with the recent release of Web Deployment project tools, and the improvements to production debugging and instrumentation.

For those few that don't know Scott, he's the guy behind ASP.NET. And no, not the marketing guy, so we can listen to what he as to say.

Wednesday, January 30, 2008

Choosing a developing laptop

Once in a while we get to write a letter to Santa Claus asking for hardware. This letter is about laptops, and this one goes like this:

Dear Santa Claus (the manager who signs the checks, thankfully someone who understands the value of a fast machine),

Here's what we need for laptops to our .NET division (yeap, the guys that use dynamic environments don't need as much power):
  • Dell Latitude D830
  • Intel® Core™ 2 Duo T7700 (2.4GHz/4MB/800MHz) with nVidia Quadro NVS 135M
  • 2.0GB, DDR2, 667MHZ [1X2GB DIMMS]
  • 160GB serial ATA HDD 7200RPM
  • 8x DVD+/- RW Drive
NOTE1: A T7500 could also be an acceptable solution.
NOTE2: VT, x64, Santa Rosa and Vista compliance seem to be guaranteed; no 64bit drivers availability for now :(

This laptop should be upgraded to 4GB 1 to 1,5 years from now, extending the laptop's lifetime to 2.5 to 3 years. The thing is, we should probably be forced to install 64 bits then to see more then 3.5GB...

The laptop's lifetime can be shorter if:
  • core needs raises / price per core prices drops
  • SSDs prices drops / performance raises way over 7200 rpm's disks
  • memory need raises above the 4GB limit
As for the development workstations needs, those will be covered on a latter letter (post).
Here it is. As most letters kids send to Santa Claus, we should always be prepared to get a not so cooler toy. And don't forget to state how much we loose waiting for long compilations on slow machines. And if this works out, the next level is the rest of The Developer Bill of Rights.

Monday, January 28, 2008

Software is hard

Here's a great article proving it. It makes reference to the axiom:

It is impossible, by examining any significant piece of completed code, to determine within a factor of two how many man-hours it took to produce that code.
And the corollary:
If you can't tell how long a piece of code would take when you have the finished product available, what chance do you think you have before the first line of code is written?
And he goes on with this other axiom:
Rosenberg's Law: Software is easy to make, except when you want it to do something new.

The corollary being:
The only software that's worth making is software that does something new.
But the best reference was yet to come:

Even the term "software engineering," Rosenberg writes, is a statement of hope, not fact. He quotes the 1968 NATO Software Engineering Conference that coined the term: "We undoubtedly produce software by backward techniques." "We build systems like the Wright brothers built airplanes--build the whole thing, push it off the cliff, let it crash, and start over again." Certainly statements that could still be made forty years later.

Makes you think... Thank André Cardoso Lourenço for the finding of this little jewel :)

Editing boot operations on Vista

Oops, just found out Vista doesn't use boot.ini anymore. Now we have a BCDEdit command line utility to manage this configurations.

For those that don't like command line utilities, here's a nice free GUI: EasyBCD.

MSDN Code Gallery

Here's a cool link a to get code from: MSDN Code Gallery.

Thank Paulo Torres for the tip :)

Sunday, January 27, 2008

Dynamic Lookup

For much as I like the world to be a statically typed and known at compile time, their are cases where late-binding and duck-typing comes handy.

C# couldn't handle runtime name resolution easily, but it will in a (near?) future. Here's how, according to Charlie Calvert:

static void Main(string[] args)
{
dynamic
{
object myDynamicObject = GetDynamicObject();

myDynamicObject.SomeMethod(); // call a method
myDynamicObject.someString = "value"; // Set a field
myDynamicObject[0] = 25; // Access an indexer
}
}

Nice and simple. Man, I just love C# plasticity....

TDD

Phil Haack found a great paper published in the Proceedings of the IEEE Transactions on Software Engineering entitled On the Effectiveness of Test-first Approach to Programming. They end up concluding:

Our main result is that Test-First programmers write more tests per unit of programming effort. In turn, a higher number of programmer tests lead to proportionally higher levels of productivity.

[...]

Test-First programmers did not achieve better quality on average, although they achieved more consistent quality results. We attribute the latter observation to the influence of skill on quality, which Test-First tended to dampen.
Writing more tests improved the minimum quality achievable and decreased the variation, but this effect does not appear to be specific to Test-First.
In summary, the effectiveness of the Test-First technique might very well hinge on its ability to encourage programmers to back up their code with test assets. Future experiments could focus on this ability.

Strange as it may seem, the Test-First wasn't as important as the Test-a-Lot. I still feel the Test-First is of great importance, but then again I don't have a paper to back it, just unmeasured empirics.

32 bit memory limits

Here's a great post about 32 bit by process and 32 bit total limits. His advice is:

  1. Keep your video memory to a minimum. This will allow you to use as much of the 4 GB of RAM as possible
  2. Go 64-bit and keep your eyes peeled for the programs that really take advantage of it. But beware. Some 32-bit applications can cause you some grief.
    1. Make sure your chipset supports at least 8GB of address space.
    2. Ensure the CPU supports the x64 instruction set.
    3. Get 64-bit Vista.
  3. Make sure any new hardware that you purchase supports PAE.
  4. Enable PAE in Windows using the BCDEdit /set command. But be aware of the risks (see above).
  5. Look for applications that support AWE and PAE.
  6. Keep your RAM requirement under (gasp!) 3 GB.
Here's another one from Atwood.

Windows Live Writer Plugins

Here's a great source for Windows Live Writer Plugins: wlwplugins.com.

Windows 7 M1

I've been holding back posting about Windows 7, mostly because I haven't tried it yet (mental note: this time try getting it from Microsoft, the Windows 7 torrents for now seem like fakes).

The good thing about not accessing a preview is that I'm not bound to an NDA, so I can post pretty much what I feel like :)

Many claim from a recently distributed roadmap for Windows 7 release to manufacturing in H2 2009. I have many doubts about this date.

Even if Windows 7 was a Vista facelift, this would be an achievement - just the betas and RCs cycle would eat up most of the time until H2 2009. The thing is Windows 7, according to some sources, shares most of Vista UI, making changes where it hurts: under the hood. On the other hand, it is possible that Microsoft is hiding UI changes and trying out only the kernel changes, much like the auto industry does when trying out new cars on the road, with a masked look.

These sources state Windows 7 features:

  • build 6.1.6519 - clearly an intermediate numbering
  • supporting heterogeneous graphics system consisting of multiple graphics cards even from different vendor
  • new revamped version of media center
  • The GUI [...] is very much like Vista [...] very responsive, using barely 480MB of memory after boot
  • Gadgets are now integrated into explorer
  • The start menu features a pin besides each item
  • XAML fonts, called the “Composite Fonts” are now added to the font folder
  • A new application is added, dubbed the “XPS Viewer”
  • The feedback tool - lists the “pillars” of Win 7”network aware”, with improved connection tools and detections. It will have the ability to detect which network you’re in and switch your settings and devices accordingly; with Live account, you can carry your IE settings and favorites with you;
  • Gadget data caching;
  • New Calculator, Paint, and Wordpad using WPF
  • install to desktop in 10 mins with only 1 reboot
  • instant streaming;
  • better battery mileage
  • A new boot screen
Hope I can get a Windows 7 copy real soon, and above all that I can get authorization to post it back here. Then we'll see if this review I'm referring to is worth the time you are spending reading it.

Saturday, January 26, 2008

Microsoft Web Deployment CTP1

Deploying applications is a tedious and error prone process. Microsoft has just released a CTP 1 of a command-line tool called msdeploy.exe that provides support for deploying, synchronizing and migrating IIS 6.0 and 7.0.

The Microsoft Web Development Team blog states:

It supports moving configuration, content, SSL certificates and other types of data associated with a web server. You can choose to sync a single site or the entire web server. Because we know that one tool can never ‘automagically’ guess what your application relies on, we’ve tried to be pretty flexible and powerful – you can customize exactly what you want to sync using a manifest file. You can also skip sites or other objects, or you can perform regular expression replacements during a sync (like changing the home directory on the destination machine).

The goal of the tool is to help you keep servers in sync, to make deployment easier and also to help with migrating to new versions of IIS. You could use a sync on two machines in a web farm, for example. Or maybe you need to move to a new server of the same version, you can use this tool. Of course, we also enable you to do a migration from IIS 6.0 to 7.0.

Here are the walkthroughs, x86 version and x64 version.

Friday, January 25, 2008

Update to the F# 1.9.3 Release

Here is the last stable version from F# (release candidate), from Don Syme's blog:

An updated release candidate for F# 1.9.3 is now available (MSI, ZIP). This is F# 1.9.3.14. Here are the full release notes for 1.9.3.14. This is primarily a stabilization release.

Understanding art for geeks

Here's a great way to explain art for geeks.

Thursday, January 24, 2008

SplendidCRM - ASP.NET Open Source

Seems like the OpenSource commercial software is on the rise on the .NET platform. Here's a CRM product.

Commercial open source software is a concept that is strange for many people. Software tends to be commercial or open source. But this concept is merging the best of those worlds, and is hitting .NET.

HTML 5 Draft

W3C is preparing HTML 5. According to slashdot:

Some of the most interesting new features for authors are APIs for drawing two-dimensional graphics, embedding and controlling audio and video content, maintaining persistent client-side data storage, and for enabling users to edit documents and parts of documents interactively.
Seems like the user and disconnected experience is getting a lot of support these days...

Tuesday, January 22, 2008

Syndicated Client Experiences Starter Kit

Here is a great Syndicated Client App: MSDN Reader, including sources! Strangely enough, they seem to forgot announcing yet another cool syndicated client app: the Architecture Journal Reader. Or isn't it using the Syndicated Client Experiences Starter Kit? Uhm....

Poor man's GPS

Here's something cool for people that don't have a GPS: Google Maps Mobile.

It can interface with your GPS, but can also try to figure where you are from your mobile positioning system.

Heard about it on an Hanselman's podcast.

Cupertino, start your copiers!

Do you remember these adds:

Well, ARSTechnica has posted a great article where they propose:

Cupertino, start your copiers!

Eh, eh, Microsoft as finally relented and approved the use of Windows Vista Basic and Premium Edition in virtualized environments for both "consumers" and business users, and Apple should do the same (to any of their Mac OS Xs!). The article really doesn't believe Apple will copy Microsoft supposed openness on this respect. It's a pity.

Monday, January 21, 2008

BIRT - Eclipse's Business Intelligence and Reporting Tools

A colleague of mine introduced me to BIRT, Eclipse's Business Intelligence and Reporting Tools (BIRT) open source project based on the popular Eclipse IDE. BIRT is used to build and deploy reports in a Java/J2EE environment.

Looks like finally some great quality BI tooling has reached the J2EE open source community. It's about time! Hopefully someone will port it to NBIRT - and then again probably not, as we on the .NET dark side have great tools on BI and charting.

Here's a InfoQ post about BIRT.

C#: the difference between const and static readonly

Here's a question that pops out every now and then. The biggest of the differences is that const is defined at compile time, as readonly is defined at runtime - limited to initialization and constructors. And both of them cannot be changed at runtime. Here's a sample:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication6
{
class Program
{
const int myConst1 = 1;
const int myConst2 = 2;
#if false
const int myConst = DateTime.Now.Second; // illegal
#endif
static readonly int myReadOnly = DateTime.Now.Second;

static void Main(string[] args)
{
#if false
myReadOnly = DateTime.Now.Second; // illegal,
#endif

switch (myReadOnly)
{
case myConst1:
Console.WriteLine("myConst1: {0}", myConst1);
break;

case myConst2:
Console.WriteLine("myConst2: {0}", myConst2);
break;

// case myReadOnly: ; // illegal on a switch
// break;
}

Console.WriteLine("myReadOnly: {0}", myReadOnly);
}
}
}

And here's the code re-engineered back from IL through Lutz Roeder's Reflector:

private static void Main(string[] args)
{
switch (myReadOnly)
{
case 1:
Console.WriteLine("myConst1: {0}", 1);
break;

case 2:
Console.WriteLine("myConst2: {0}", 2);
break;
}
Console.WriteLine("myReadOnly: {0}", myReadOnly);
}

And naturally:

static Program()
{
myReadOnly = DateTime.Now.Second;
}

There are some hints that may seem natural from this, like:

  1. if you need to port from C #define, use const;

  2. if you need to use switch, use const;

  3. If you want to guarantee a value type will never change, use const;

  4. If you are some paranoid needs of performance, or don't want to waste unnecessary memory, use const;

  5. If you need to set a value at runtime only for the first time, either because it is not a const, or because it depends on a constructor, use readonly;

  6. If you want a reference type other then string, use readonly;

  7. if you need to decouple constants on an assembly to another assembly, use readonly - but then it wouldn't really be a const, would it? More like a preset.

ISO 5218

International standard ISO 5218 defines a representation of human sexes through a language-neutral single-digit code. It can be used in information systems such as database applications.

Here's ISO 5218 for you:

    • 0 = not known,
    • 1 = male,
    • 2 = female,
    • 9 = not applicable.

The 'not applicable' seems to have been chosen with great wisdom! It can represent absence of male/female other then unknown! Uau!

But the politically correctness doesn't stop here. Look at this great disclaimer to possible feminine rights fanatics:

The standard explicitly states that no significance is to be placed on the fact that male is encoded as 1 and female as 2. The encoding merely reflects existing practice in the countries that initiated this standard.

Eh, eh, great ISO.

0xc0000142

Ever got this?

Application Error : The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
Once in a while, I got this message that prevents me to log back into my Vista back at work through a remote desktop. Then I'm forced to log as another administrator, kill the useless session (sometimes loosing some useful context), and finally logging back as my favorite user: me!

After googling around it seems like Windows still has some stupid limits hard coded, one of them seems to like the non-interactive window station desktop heap is too small. In fact it makes sense on my usage as I'm one of those guys that load thousands of apps.

Anyway, isn't it strange when one of the best desktop OSs money can buy still depends on these kind of static configuration?

Sunday, January 20, 2008

Sony shows the claws...

As promised, Sony is showing its claws: the upcoming 2.0 player profile will require Blu-ray players to be networked! So Sony will double the wins:

  1. PS3 is now the best positioned Blu-Ray player;
  2. Changing DRM keys and disabling players will be easier than ever;
The complete requirements are:
2.0 is the profile of the future, requiring the two secondary decoders, 1GB of local storage for updates and content, and an Internet connection.
More, early adopters are going to be frozen out of the latest and greatest Blu-ray features.

I did warn you about the danger of one company controlling too much of this market ...

Read about it at ArsTechnica

MapReduce wars

A recent article on the Database Column as started a little war over MapReduce versus classic databases. I have no experience whatsoever with the MapReduce (other then the functional concept), but I find

  • MapReduce is a poor implementation (in comparison to B-trees)
  • MapReduce is not novel
  • MapReduce is missing features (such as loading and indexing)
  • MapReduce is incompatible with the DBMS tools
But it seems to work for those who use it, it scales and is cheap. As Rich Skrenta commented:
...But if there's a 10X price win in there somewhere, the cheap rickety thing wins in the end. Think Linux vs. AT&T Unix, or mysql vs. Oracle...
It seems to me like too religious a war to take part in. Even stranger when we seem to know as fact that classic databases will keep there market share, as today MapReduce can only win on huge scenario usage.

Read the rest of this little war at InfoQ.

Saturday, January 19, 2008

About Sun buying mySQL

Let me start with the coherence (or lack of): last year Sun made available most of their Java technologies as free software under GPL. This year Sun bought mySQL.

Now let's look at the time chosen by Sun to get into the database market - clearly late. In my opinion, databases tend to be commodities, and Microsoft, Oracle and IBM already have them. Databases can be differentiated on another lever - with datawarehouses and data mining.

Which lead us to the final question: what will Sun do with mySQL? Many analysts see Sun's interest on selling software services and hardware over mySQL, guaranteeing better mySQL support under Sun's ecosystems. But I wouldn't be surprised if this was the first item on Sun's wish list, composed mainly on applications supported by mySQL.

InfoQ has summarized other analysis.

Thursday, January 17, 2008

SubSonic’s MVC: Makai

Here's an alternative to Dynamic Data Controls. Makai, SubSonic's MVC is a Rails like implementation, the first one to really scaffold on .NET, one or two years ago.

Cooler then the Dynamic Data Controls is the MVC approach. Too bad for the apparent lack of support interest from the rest of the Guthrie's team. Yes, Conery is part of Guthrie's team.

Is it lack of support or are they just leaving the options too wide? When Guthrie introduced on his team some of the Open Source culture, he also introduced diversity. And his success is bringing a new challenge: we have more from which to choose from.

Office Live Documents

I had already posted about it, but I finally had the chance to use them. Though a great user experience, I still rather use Office tools native to my desktop. Nope, I don't believe flash is the answer.

One thing is for sure: these kind of apps will surely raise the user experience level of demand on web applications.

PS: just loved the duality of this product: Office 2007 like apps with MAC OS like dock :)

Framework assemblies currently available for symbol/source loading

As Shawn Burke states, only a part of the Framework sources are available. They are:

  • Mscorlib.DLL
  • System.DLL
  • System.Data.DLL
  • System.Drawing.DLL
  • System.Web.DLL
  • System.Web.Extensions.DLL
  • System.Windows.Forms.DLL
  • System.XML.DLL
  • WPF (UIAutomation*.dll, System.Windows.DLL, System.Printing.DLL, System.Speech.DLL, WindowsBase.DLL, WindowsFormsIntegration.DLL, Presentation*.dll, some others)
  • Microsoft.VisualBasic.DLL
System.Core is out:



It's a pity, I'd like to peek into the matrix Cast inefficiency. Probably about boxing and the natural degradation on function calling...

.NET Framework Library Source Code available

Here's how. My first try didn't work, but my machine is experiencing some strange behavior over Visual Studio - for example, it refuses to install Parallel's Extensions claiming I need .NET 3.5 as pre-requisite.

Oh, well, I'll try it again tomorrow over my Studio 2K8 VM.

Wednesday, January 16, 2008

Benchmarking helper

As lazy as a programmer should always be, I've created a ConsoleStopWatch class for my previous article:

using (ConsoleStopwatch consoleStopwatch = new ConsoleStopwatch("sumOf += myHugeArray[i, j, k, l]"))
{
for (int i = 0; i < DIM0; i++)
{
for (int j = 0; j < DIM1; j++)
{
for (int k = 0; k < DIM2; k++)
{
for (int l = 0; l < DIM3; l++)
{
sumOf += myHugeArray[i, j, k, l];
}
}
}

}

consoleStopwatch.Report("{0}", sumOf);
}

Here's my first try:

class ConsoleStopwatch : System.Diagnostics.Stopwatch, IDisposable
{
private string message = String.Empty;
bool messageDisplayed = false;

public ConsoleStopwatch()
{
base.Start();
}

public ConsoleStopwatch(string message)
{
this.message = message;

base.Start();
}

private void InternalReport(string report)
{
Console.WriteLine("[{0}] {1} {2}", base.Elapsed, message, report);
}

public void Report(string format, params object[] args)
{
InternalReport(String.Format(format, args));

this.messageDisplayed = true;
}

#region IDisposable Members

public void Dispose()
{
base.Stop();

if (!this.messageDisplayed)
{
InternalReport("");
}
}

#endregion
}

Didn't quite like the implementation. Hope to post it right here after some serious refactoring.

Some performance tests

I was testing some code to help me architect a solution when I decided to do some (unfair) benchmarking over LINQ. Here's the classic code:

const int DIM0 = 6600;
const int DIM1 = 36;
const int DIM2 = 30;
const int DIM3 = 8;
...
for (int i = 0; i < DIM0; i++)
{
for (int j = 0; j < DIM1; j++)
{
for (int k = 0; k < DIM2; k++)
{
for (int l = 0; l < DIM3; l++)
{
sumOf += myMatrix[i, j, k, l];
}
}
}
}

On an old Dual Core (well, on one of the cores, actually, not using Parallel Extensions for now), it takes only 1 second. Quite impressive. Now I tried to query it using LINQ:

var query = (
from p in myHugeArray.Cast<System.Int32>()
select p
).Sum();

52 seconds. Ooops. Maybe I should check what this Cast is doing and post it back here.


[update]

Just to make it clearer: this is not a LINQ problem, just some trivia.

MacBook full of Air

So Apple didn't produce an ultraportable as so many predicted, they just announced an ultra slim notebook, the MacBook Air. To squeeze this baby into a ridiculously thin format (less than 2 cm), Apple dropped the DVD (a great way to promote movie rental service for iTunes) and the clocking - returning to what it was over a year ago (1.6 and 1.8 MHz).

The technical book I enjoyed the most

Yes, I know, to be technologically correct I should choose something like GoF's Design Patterns, McConnell's Code Complete or Rapid Development, Brooks's The Mythical Man-Month or even something from Fowler. But the technical book I enjoyed the most was: "Undocumented Windows".

I've lost track of my "Undocumented Windows" copy, but I've found a review which makes reference to some of the insane undocumented functions names like:

  • Death
  • Resurrection
  • PrestoChangoSelector
  • TabTheTextOutForWimps
  • WinOldAppHackOMatic
  • UserSeeUserDo
  • Bunny_351
  • Brute
  • FixUpBogusPublisherMetaFile
I still have to look for other crazy names, this list seems too poor. Oh, well, the next time you find a silly function name, just get back to this post and think again...

Tuesday, January 15, 2008

Old MSDN Magazine

Here are some my references I find relevant to recover from good old MSDN Magazine:

Matt Pietrek
Dino Esposito
Don Box
Jeff Prosise
Jeffrey Richter
For Petzold you'll get to go to old MSJ, here:
Back Issues — 2000
Back Issues — 1999
Back Issues — 1998
Back Issues — 1997
Back Issues — 1995-1996
Back Issues — 1986-1994
I remember splitting the signature with an old friend. Boy, am I getting old...

Dino Esposito's "ASP.NET AJAX: Together at Last"

I grew up professionally reading Dino Esposito's "Cutting Edge" column at MSJournal, so I couldn't miss his presentation on "ASP.NET AJAX: Together at Last" here in Lisbon.

This was a great presentation, not only for the AJAX.NET immediate content, above all for his clear vision on the way technology has and will evolve.

He divided the presentation into two blocks: the easy way (basically partial rendering, an easy way to face-lift legacy apps) and the not-so-easy way (script services over some harder javascript integration).

But his message doesn't stop here. He looks at AJAX as a temporary patch for the user experience. From his blog:

[...]

Once the next Silverlight is available you can develop for the Web with much of the same ease you experience today for the desktop.

[...]

I believe that you just have two options--deluxe experience with a 100% Silverlight solution or normally rich Web experience with a combination of AJAX and Silverlight in the same ASP.NET page. With Silverlight used in this case as a rendering engine for special data.

Hope this cropping of Dino's post didn't altered too much what he meant, above all I think it is aligned with his presentation. In his vision XAML and CLR will have to replace HTML and javascript, technologies that as long surpassed their original objective and life expectancy.

My friends Tiago and Pedro will attend to the intensive 2-day class on "ASP.NET 3.5, AJAX and Silverlight" - I'm sure they'll soon have news for us.

Until then let me I'll drop you some links:

Solid Quality Mentors
Provider of advanced education and solutions for the entire Microsoft Data and Development Platforms

Easytronic
The guys that have brought Dino to Lisbon for the intensive class tutoring.

Web Development Helper
A browser extension to provide tools for the Web developer including ASP.NET page and control developers.


For those few that stayed through the QA, accessibility and security (by growing the contact surface) seemed like the great issues that remain with no easy answer.

Sunday, January 13, 2008

Should the Java language stop adding new features?

About the language growing pains java seems to be in when trying to keep up with languages like C# and Ruby, I disagree with Bruce Eckel when he described new languages as the correct place for fundamental new features.

New languages are a cool thing, but old languages must keep evolving. They must be agile and elastic enough to accept new trends. For much comfortable as it may look, a closed language tends to be a dead language, no matter how popular it is.

We should be as economical and ecological as we can with our languages :)

FeedDemon is now free

Newsgator Goes Free. Isn't it funny, I payed 30$ 20$ for FeedDemon and now it's free. Oh, well, it was worth it, this is a great piece of software. Please download and enjoy. Yes, for free!

Philips SHN2500 review

As a geek commuter I listen daily to approximately 2 hours of podcasts on loudly trains, so noise reduction is a great issue for me. Here are the options I've used so far:

  1. I started using an in-ear passive noise reduction from Thomson; it was a fair solution, cheap, power-free and small, but in-ear systems pose 2 problems:
    1. I could hear myself - just moving the jaw would produce inconvenient noises;
    2. It wasn't the best solution from an hygienic perspective, as you may imagine;
  2. After a while I bought an inexpensive HN-700 active reduction headsets from Creative; again a fair product, not the greatest on quality, but fair; the only problem I have with these is that portability can be an issue;
Today I've found what I thought would be a great buy: a dual cancellation noise reduction system (both passive and active) for about 40€, the Philips SHN2500.

The passive noise cancellation works as expected, the problem is the active feature. When I power the unit, a loud electronic rain (is that how it's called?) is all I get. No noise cancellation whatsoever. Not even on the low frequencies.

I've found this troubling review:
I have no idea how these can claim noise canceling. When turned on with low or no source volume, there is ZERO reduction in background noise of any kind. There is not even a trace of a microphone in the unit...it does nothing different with varying noise or location of the unit. The only reason people might think it is doing something is that it amplifies the source about 6 dB, drowning out other sounds equally. But if you return the volume to the same level, you'll hear exactly the same amount of noise. This product is fraudulent in its claim of active noise reduction.
If this is true, I'm afraid fraud would be the only way to address it. I'm returning this product first thing tomorrow.

In the defense of the dying HD DVD

Yes, it is true, in comparison to Blu-ray, which also uses a blue laser, HD DVD has less information capacity per layer (15 gigabytes instead of 25). According to SuperMediaStore.com:

HD DVD is easier and cheaper to manufacture than a Blu-ray pre-recorded disc due to its sharing the same basic disc structure as a standard DVD: back-to-back bonding of two 120 mm diameter substrates, each 0.6 mm thick.
It seems to me like the size factor, the supposed Blu-Ray advantage, is a non issue: the 30 GB dual-sided HD DVDs have been used on nearly every movie released in this format. On the other hand, Blu-ray has only released movies on 25 GB single layer discs. The size should matter when using this disks to backup data. And there, Blu-ray is clearly ahead.

Saturday, January 12, 2008

Dependency Injection Frameworks Side-by-Side

Here's an old great sample on DI I felt the need to recover. I particularly liked the Side By Side Comparison, where Fowler's famous MovieFinder example is implemented over Enterprise Library's ObjectBuilder, Spring.NET and Pico.NET.

Friday, January 11, 2008

Mocking SMTP

Here's a great tip from .NetTipOfTheDay: a way to send e-mails with no SMTP server set up. Here's how:


<system.net>

<mailSettings>

<smtp deliveryMethod="SpecifiedPickupDirectory">

<specifiedPickupDirectory pickupDirectoryLocation="c:\Test\" />

smtp>

mailSettings>

system.net>


Thursday, January 10, 2008

People are still writing on Program Files

I was trying a free SQLServer compare software, when I've noticed that it wasn't working because my Vista didn't allowed writing on the Program Files directory. Isn't it strange that software still writes on Program Files today?

Too bad to be true

You have to read this. The true story of a sysadm that:

  1. planted code into his company servers designed to delete almost everything once triggered - he thought he was about to be laid off;
  2. when he discovered he wasn't the one to be laid off, he tried to disarm the trigger;
  3. he was so good at what it did, that the code was triggered anyway!
  4. in fact, he excelled in programming: the code just didn't delete anything!
  5. for some strange reason, he decided to let the code have another try one year from that (I have to give him credit for that, he didn't want to leave any bugs);
  6. his script was caught some time later by another sysadmin.
He just get sentenced to 30 months in jail. Probably material for The Darwin Awards.

Wednesday, January 09, 2008

How to recover from Winsock2 corruption

A colleague of mine just caught a virus that forced him to recover his installation. The system recover as expected, except for networking, that exhibit the strange behaviors typical to winsock mess up. Here how he recovered the Winsock2 corruption:


netsh winsock reset

Tuesday, January 08, 2008

Implicit features

When collecting requirements, users often forget to tell us what they take for granted - the invisibility of all that works well. Users usually focus their requests on what doesn't work. Here's a great true story a friend of mine told me years ago:

My friend had collected the requirements over an old salary processing application that was being rewritten - the original application used punched cards as a datasource, that's how old the application was! When he presented the new application for testing, the user complained about the lack of two features: defining the order of the reports and the removal of an employee from the salaries list.

"The old application didn't do that!" - he replied.

"Yes it did. Come with me to the systems room and I'll show you".

The user got the punch cards list out of the reader queue, each carrying an employee name, and showed how easily it can be reordered. "And there you go, all the reports in the application will use this order!". Oops...

"And look, if I want to remove this guy from the salary processing, all I have to do is to take his card away".

Here's implicit features for you...

Some ORM samples

Here they are, from David Tchepak:


Cool blog, great motto: "dave^2 = -1" - remember the Geek Joke? :)

Monday, January 07, 2008

Silverlight gets NBC 2008 Beijing Olympics

After rumors of getting desperate about the dismal rates of Silverlight adoption by consumers and developers, Silverlight got a break: NBCOlympics.com.


TechCruch remarks:

This is good news for Microsoft and their nascent Silverlight platform. What I want to know is how much Microsoft paid NBC to use this. It’s highly unlikely they chose it without an additional nudge. Testing a new platform at the Olympics carries significant risk. And since no one really uses Silverlight yet, this will require millions of people to download the Silverlight framework before they can use the advanced features of the site.

Silverlight 1.0 Fire Starter Sessions

The Silverlight 1.0 Fire Starter is a one-day event providing developers and designers information on the concept behind Silverlight as a technology, what tools are useful in development and the knowledge in order to start building their own applications. The eight sessions listed, are available to watch here and to be downloaded in video and audio formats.

Windows Mobile 7 To Focus On Touch and Motion Gestures

bink.nu has found this InsideWindows link with a great inside Windows Mobile 7 review:

Windows Mobile 7 will use touch gestures, similar to how the iPhone does. You will be able to flick through lists, pan, swipe sideway, draw on the screen. A lot of emphasis has been put on making navigation easier and doing away with scrollbars, including a new scroll handle that allows for multiple ways of finding items extremely fast.

Windows Mobile 7 will use motion gestures, something the iPhone does not. It will not use an intricate and complicated series of gyroscopes and accelerometers. Instead, it will use the camera on the phone to detect motions and create appropriate actions. You will be able to shake, twist and otherwise manipulate the phone and get things done. The phone will be able to perform actions when placed face down on a surface, and it will know when it is in your pocket or bag.
Please check all of the post, it's loaded with cool features. Will they hit WM7? Some of them will most definitively do - after my first contact with iPhone, they'll have to! Thanks, Apple, you've woke up a monster :)

Sunday, January 06, 2008

Software Factories Community of Knowledge

Here it is: http://sf.devrevolution.com/, the child site of one DevRevolution.

Heard it from Jezz Santos.

For those who love Linux and hate Apple

Definitely not my case, for much as I like Windows, I love above all the OS-diversity. But for those who love Linux and hate Apple, here are some reasons:

  • Apple has Microsoft Office, Linux doesn’t;
  • Apple has Adobe Creative Suite, Linux doesn’t;
  • Apple has easily accessed and easy to use service and support, Linux doesn’t;
  • Apple is driven by someone who has some understanding of end-user needs, Linux is not:
According to this site:

In the last two years, OS X has seen continual growth, from 4.21% in Jan 2006 (the first month of figures), to 5.67% in December 2006, to 7.31% in December 2007.

In the same time, Linux’s percentage has risen from only 0.29% to 0.63%. Although depending on how you apply the maths—you can put a positive slant on that by saying it’s more than doubled—the cold truth is Linux on the desktop is still barely worth mentioning. To paraphrase: reports of its life have been greatly exaggerated.

Please note that the 7.3% share is not a pacific one. But the trend is definitively there.

Apple antitrust suit alleges monopoly over music players

Apple has been sued once again for its iPod/iTunes tie-in. Eh, eh, happens to the best, happens to the rest :)

HD-DVD is dying...

Warner Bros. Entertainment will release its high-definition DVD titles exclusively in the Blu-ray disc format beginning later this year.

Too bad, I would rather get a format that is not controlled from the content holders to the drives, including the format itself.

SCALEO Home Server

Here is a Home Server from Fujitsu/Siemens. Here's what I liked the most:

  • Energy saving
    • “always available” instead of “always on”, that means you decide when your system wakes up for backups and therefore it is energy saving
    • Windows® Home Server Power Management to control the daily backup-time of your SCALEO Home Server
I'm rather curious about this "always available" mechanism. Is this wake up on LAN, or timer based?

Remember Windows 3.1?

Windows 3.1 was the first version of Windows I used as a development workstation. Sure I used Windows 2, but only as a user, not as a developer.

No, I'm not bothering you to death with my Windows 3.1 memories, just letting you know that if you google for "pre-installed copy of Windows 3.11" you'll probably find a Parallel's image of Windows For Workgroups 3.11.

This was the only image I found for old Windows. If someone could find a Windows 1 and 2 images, please send me the link. Thanks in advance :)

Saturday, January 05, 2008

Remember NCSA Mosaic?

NCSA Mosaic is the grandfather of the internet browsers. I though we couldn't run it on our present OSs, but I was wrong, we can still run this 15 years old (yeap, 1993) piece of history!

I've first tried it on my Vista on the Office, but couldn't get it to connect - this version doesn't support proxying. I've installed it (ok, just copy 4 files I got from olddos.org) on an XP back at home, and it's working! Here's a screenshot:



Oh, that grey background... does brings back memories...

It may come as a surprise to some of you, but it doesn't support javascript neither CSS. And when it crashes, it crashes with a GPF!

I've them run Netscape 0.4 on my Vista, but apache.org was pretty much all I could see.

Lets thank olddos.org for keeping these bits. And please check this site, as it is loaded with other goodies.

[update]
I forgot to mention: Mosaic couldn't browse neither google.com, devcatharsis.blogspot.com and microsoft.com - probably why it failed to get to our era :)

Microsoft and UNIX

It may come as a shock for some of the younger people, but in the past Microsoft had a UNIX: Xenix. Xenix was Microsoft's version of Unix intended for use on microcomputers. On the late 70's, Microsoft purchased a license for Version 7 Unix from AT&T, running on the historical minicomputer PDP-11 (I learned assembly language on PDP-11, yes, I'm that old), and was ported to the 8086 in 1982.

In 1987 Microsoft transferred ownership of Xenix to SCO, renaming it to SCO UNIX, but continued to use Xenix internally as late as 1992. As a result of Microsoft's walk on the UNIX world:

In the late 1980s, Xenix was, according to The Design and Implementation of the 4.3 BSD UNIX Operating System, "probably the most widespread version of the UNIX operating system, according to the number of machines on which it runs".
Unfortunately SCO is closing, so Microsoft's UNIX is about to end. Luckily for us, Microsoft as a successful heir on their dissemination strategy: Linux :)

Friday, January 04, 2008

IPv6

ICANN/IANA's message:

On 4 February 2008, IANA will add AAAA records for the IPv6 addresses of the four root servers whose operators have requested it.
announces the first time IPv6 will run on the internet without relying on IPv4. I've been waiting for IPv6 for most of me adult live. Masqueraders and the IPv4 maturity (and routing tunning?) have delayed it for so long that I'm beginning to doubt of its importance...

read it at arstechnica

Framework Design Guidelines 2nd Edition

I've got good news and bad news. The good news is that the 2nd edition is on it's way, extending the guidelines to new features in the .NET Framework 3.0, 3.5 and new advances in languages as LINQ. The bad news is we'll have to wait until the end of 2008. Until then, we'll have to read a lot of the framework code :)

PointUI

After using yet another friend's iPhone for a while, I was beginning to feel my Windows Mobile interface just didn't work. So Marco Gonçalves sent me this cool app, PointUI, a skinning application that makes the kludgey WM interface more usable and accessible.

The result is just great! Not that it provides us with lots of new features, but the one we get are just awesome. And, above all, prove that we can get great software experience over WM on this kind of equipment.

Thursday, January 03, 2008

Multiple web sites on Windows XP

Here's another CodePlex cool project: IIsAdmin.NET is a utility that allows the creation of multiple site definitions within Windows XP.

Wednesday, January 02, 2008

If only software development was that simple

Last Christmas my father made a cool house out of card paper. As promised, here's the schematics I've reversed-engineered.

Now this is quite disturbing: I wrote a simple document most people can read and comprehend describing how to build the house. If people get a sudden calling to build paper houses, they can follow my instructions (with no particular training from me) and build thousands of houses. More, they can easily predict how much time to spend building this house, the resources involved and to such degree the quality of the product user satisfaction - the 3 ways we evaluate software projects. Which is way more than we can say in our software industry...

[update]
Oops, it seems like I made a serious architectural mistake. Here's an untested patch:


Good to know the other engineers can also make the kind of mistakes we on software development run into :)

How to resize a VMWare disk

When we use VMWare to resize a disk, we are resizing the disk itself, not the containing partition. So after the VMWare resize, we had to use some kind of partition tool to get the size we want.

A friend of mine asked me if we could do it using VMWare Converter. I wasn't sure that it worked, so he had to try it: et voilá, it works!

If you want to do it the old way, here a great how to:

  1. Turn off the virtual machine;
  2. Commit/remove all the snapshots first!
  3. Create a good backup of the files!;
  4. Open a Command Prompt and go to:
    C:\Program Files\VMWare\VMWare Server

  5. Run this command to expand the virtual disk:
    vmware-vdiskmanager -x 12GB "My harddisk.vmdk

  6. Note: Because this only expands the disk and not the partition, you'll need to resize the partition table as well. This can be done by 3rd party tools like 'Partition Magic', but also with 'diskpart.exe', builtin into Windows. In my case, this disk is a boot disk, meaning it can't be done on the virtual machine itself. I used another my 2nd virtual machine, running Windows XP.

    Add the increased hard disk to a second virtual machine (must be turned off first!).

  7. Power up this 2nd virtual machine;

  8. Open a Command Prompt and type:
    diskpart

  9. Type:
    list volume

    Remember the volume number (#) of your volume!

  10. Type:
    select volume (the number from step 8)

  11. Type:
    extend

  12. Turn off this 2nd virtual machine and remove the hard disk from the virtual machine configuration;

  13. Finished! (Windows automatically recognizes the new and correct disk and volume size)


Uau. Thank God for VMWare Converter! :)

192.168.112.2O7.net

(Noticed the 'O' on 207? It's a DNS name!). No comments (not for the security issue, but for the suspicious and cumbersome stealth move).

Ok, I can't really resist... Are they mad? Is their defense "192.168.112.2O7.net is to stupid of a stealth attempt, so we are innocent"? Was the private class C chosen by accident or just to disarm some sleepy sysadm attention? These guys (Adobe and Omniture) are the players we should trust, and these are the kind of moves that don't help building the trust relationship...

Trust has to be built upon transparency. Please name it TrackingStatistics.Omniture.com.

3 MS Press FREE books

Microsoft has opened 3 MS Press books completely FREE for public.

The books are:

· Introducing Microsoft LINQ by Paolo Pialorsi and Marco Russo (ISBN: 9780735623910) This practical guide covers Language Integrated Query (LINQ) syntax fundamentals, LINQ to ADO.NET, and LINQ to XML. The e-book includes the entire contents of this printed book!

· Introducing Microsoft ASP.NET AJAX by Dino Esposito (ISBN: 9780735624139) Learn about the February 2007 release of ASP.NET AJAX Extensions 1.0, including an overview and the control toolkit.

· Introducing Microsoft Silverlight 1.0 by Laurence Moroney (ISBN: 9780735625396) Learn how to use Silverlight to simplify the way you implement compelling user experiences for the Web. Discover how to support an object-oriented program model with JavaScript.

The cool thing is that I'm just about to attend a Dino Esposito's workshop about Ajax.

Heard about it at .net wand.

Tuesday, January 01, 2008

Brad's predictions for 2008

Brad Abrams as posted is predictions:

1. User Experience Reaches the Enterprise
2. Testability Becomes a Requirement for Software Development Frameworks
3. The Companion Applications Become Practical

No doubt about any of the 3 except for... the fact that 2008 it's probably too soon. On regard to Nº2, it will take longer than one year for TDD to fully hit the UI. On regard to Nº3, though a gigantic step, bringing a subset of .NET to everywhere by itself doesn't garantee it. We have to look at it like a feet on the door (a Trojan could be missread :) ), let it mature and grow to a level of desktop usage.

Why are we still starting projects over NetTiers?

I'm helping starting a new project over a not so new technology like NetTiers. The question you people may very well ask is: why not the Entity Framework or something cooler?

Though not easy, the answer is clear: we tend to privilege proven technology over the uncertainty of new technologies. Well, at least on big projects.

Prior to jumping into new technology, we test-drive it on internal projects, and introduce them on key projects when we are sure about the technology success and maturity (whether proven by us or by others). For instance, that was what we did with NHibernate, and that's what we're internally preparing with Entity Framework.

Nettiers is or projects's bread and butter. It's not avant-guard, but it is something we all feel comfortable with, standardizing our projects, leveraging layers, security and instrumentation.

On the other side, we all want to grab the next big thing. But on most projects, it will have to wait :)

Development Catharsis :: Copyright 2006 Mário Romano