Monday, December 31, 2007
NetTiers on Visual Studio 2008
Netscape has finally capitulated
Web Client Software Factory 2.0 Sample Application
- Show recommended practices in incremental Web development.
- Demonstrate how a WC-SF project can be faced and developed.
- Demonstrate how Web Client Software Factory 2.0 assets help to solve common technical challenges.
Please start with the kick-off article.
Heard about it here.
Sunday, December 30, 2007
Red Gate SQL Data Generator 1.0 Beta
Features:
- Full SQL Server 2000 and 2005 support
- All data types supported except CLR types
- Pre & Post Scripts execution
- Command-line access version
- Import data from CSV or SQL tables
- Customizable generator settings that allow configuring the amount of nulls, unique values, minimum and maximum values, etc..
- Diverse range of inbuilt generators
On my first test I didn't find a simple dictionary generator like we have on hour internal generators. Oh well...
Heard it from David Hayden.
AideRSS.com
I've just gave it a try with a site I don't watch everyday: arstechnica.com. Here's the result. It's incredible, it ranked first this article: First look: Firefox 3 beta 2 officially released. Cool.
Changing from NHibernate back to NetTiers
Don't get me wrong, NetTiers is great. NetTiers garantees:
- generation of repetitive and mundane coding;
- code generated according to P&P's Designing Data Tier Components and Passing Data Through Tiers;
- the projects architecture does not depends solely on the architect;
- the standardization of our code base - which not only raises internal know-how about the this layers, but also helps swapping coders between projects;
- the projects are guaranteed to scale - they are so conservative :);
- more precise metrics - it's easier to define metrics on code generators then over developers;
- architecting over a logical model, not a conceptual one like on NHibernate;
- lack of support for inheritance;
Saturday, December 29, 2007
Why is Time-Machine so overrated?
we are forced to explain what PCWorld so well knows: Vista does have the concept, probably the usage is not as simple and evident to most users. Leopard didn't get this concept into mainstream OSs, Windows did. From Wikipedia:Innovation: Backs up changes hourly to an external drive behind the scenes, then lets you "go back in time" to restore data.
Benefit: Makes light work of the one task that every computer user should do and most people put off--and gives the function a pretty face, to boot.
Time Machine is the killer feature in Leopard. You'll either love or hate this wild and wacky space-and-time user interface, but performing backups will never be the same. One question: Why doesn't Windows Vista have anything this simple and useful?
The snapshot facility was first added to Microsoft Windows in Windows XP; this version could only create non-persistent snapshots (a temporary snapshot, usually used for creating a backup or more generally accessing copies of files that have been locked by applications for editing). The creation of persistent snapshots (multiple snapshots which remain available until specifically deleted from the system) was added in Windows Server 2003, allowing up to 512 snapshots to exist simultaneously for the same volume, from which maximum 64 snapshots could be used for the Shadow copies for Shared Folders feature.Shadow Copy does exactly the same - well, except for the cool Time Machine view... We have a not so cool list of previous versions, but the versions are there, on the properties window. On an enterprise level, I believe most remote file systems on Windows 2003 are guarded with Shadow Copy, preventing the last resource tape restore - which need the presence of an administrator.
Vista comes with a simpler backup/restore strategy, but we can always setup file system versioning like on Time Machine.
In fact, this is funny: there are endless Mac forums saying that Shadow Copy copied Time Machine. And this, my friends, is only possible due to a real time machine :)
Friday, December 28, 2007
2007 Most Innovative Products
Here's PCWorld's List:
- Google Gears Story
- Apple iPhone Review | Prices
- One Laptop per Child XO Story
- Apple Time Machine (in Mac OS X 10.5 Leopard) Review | Prices
- Amazon Kindle Review
- NetGear Digital Entertainer HD EVA8000 Review | Prices
- HP TouchSmart PC Review | Prices
- AT&T Tilt Review
- Facebook API Story
- DeviceVM Splashtop Story
- Toshiba Portege R500 Story | Prices
- Data Robotics Drobo Review | Prices
- Hybrid Hard Drives
- Eye-Fi Card Review | Prices
- Panasonic TH-42PZ700U Review | Prices
- Yamaha Tenori-On Story
- Zoho Notebook Review
- Radiohead, In RainbowsStory
- IOGear Wireless USB Hub and Adapter Review | Prices
- Mint.com Review
- Microsoft Popfly Story
- Ask.com Story
- Sprint Airave Story
- eXpresso Review
- Kodak EasyShare All-in-One Printers Review | Prices
DRM: 3 down, 1 to go
in: arstechnica
Design Guidelines for Developing Class Libraries
Pex: Dynamic Analysis and Test Generation for .NET
According to Pex:
Cool! Hope it can get out of the R&D lab and get to see the light of day :)Pex (Program EXploration) is an intelligent assistant to the programmer. By automatically generating unit tests, it helps to find bugs early. In addition, it suggests to the programmer how to fix the bugs. Watch the screencast!
Pex enables a new development experience in Visual Studio Team System, taking test-driven development to the next level. Pex analyzes .NET applications. From a parameterized unit test, it automatically produces traditional unit tests cases with high code coverage. Moreover, when a generated test fails, Pex can often suggest a bug fix.
Pex performs a systematic program analysis. It records detailed execution traces of existing test cases. Pex learns the program behavior from the execution traces, and a constraint solver produces new test cases with different behavior. The result is a minimal test suite with maximal code coverage. When a test fails, Pex uses detailed dataflow information to determine the root cause and a potential bug fix.
pontonetpt.com
- this is the language chose to name symbols and comment code;
- I could reach a broader community;
What I would really like was to write on both languages, but that is not easy. I've also tried automatic translation, but the results were just terrible.
Thursday, December 27, 2007
Top 10 RFID Developments of 2007
#10 -- The Time is Now for Real-Time Location SystemsThe Microsoft proposal to reduce or eliminate the need for middleware, custom programming, and integration is definitely a bold bet. We've been benchmarking Microsoft and other offers in this area, hopefully I'll post about it when I can.
#9 -- EPCglobal Ratifies Data-Sharing Standard
#8 -- Who Says There's No Such Thing as Bad Publicity?
#7 -- Microsoft Offers Embedded RFID Support
Microsoft released its first major IT infrastructure product with native RFID support, which has important implications for RFID users and vendors alike. BizTalk Server 2006 R2 became the first Microsoft product to ship with RFID support when it was released in September. The software integrates various enterprise applications and data structures, and is the latest major update to the BizTalk software line, which Microsoft reports is used by more than 7,000 organizations worldwide, including 90 percent of the Fortune 100 and 12 of the 15 largest retailers.
BizTalk Server 2006 R2 includes APIs and other features to manage RFID data and devices. Microsoft is positioning the product as a plug-and-play solution to help users integrate RFID tracking capabilities into their supply chain applications. Native RFID support in enterprise IT systems would reduce or eliminate the need for middleware, custom programming, and integration, thereby making RFID easier to use and changing the role RFID integrators play in developing and implementing solutions. Microsoft has already announced several blue-chip RFID customers who use the new BizTalk release and RFID vendors who support it.
A number of industry observers were very bullish on the impact that BizTalk's native support for RFID will have on adoption, including John Fontanella of AMR Research, who called it nothing less than a "watershed moment."
Related coverage:#6 -- Intel Introduces Chip That Could Commoditize RFID Readers
- Microsoft Announces Availability of its RFID Software
- Microsoft's RFID Offering a "Watershed Moment"
- Sushi Restaurant is Swimming in Benefits from RFID
#5 -- Wal-Mart: Price Leader, Yes; Thought Leader, ?
#4 -- Vendor Focus Shifts from Broad to Deep
#3 -- METRO Moves Ahead
#2 -- Strong European Innovation & Adoption
#1 -- Cautious Optimism Emerges
Non responsive FeedDemon
Querying Many To Many associations using the Criteria API
Ayende as just posted about querying many to many associations using Criteria. Here's how:
DetachedCriteria blogAuthorIsJosh = DetachedCriteria.For<User>()
.Add(Expression.Eq("Username", "josh")
.CreateCriteria("Blogs", "userBlog")
.SetProjection( Projections.Id())
.Add(Property.ForName("userBlog.id").EqProperty("blog.id"));
DetachedCriteria categoryIsNh = DetachedCriteria.For(typeof(Category),"category")
.SetProjection(Projections.Id())
.Add(Expression.Eq("Name", "NHibernate"))
.Add(Property.ForName("category.id").EqProperty("postCategory.id "));
session.CreateCriteria(typeof (Post),"post")
.CreateAlias("Categories", "postCategory")
.Add(Subqueries.Exists(categoryIsNh))
.CreateAlias("Comments", "comment")
.Add(Expression.Eq("comment.Name", "ayende"))
.CreateAlias("Blog", "blog")
.Add(Subqueries.Exists(blogAuthorIsJosh))
.List();
I had already tried it but with no results. Looks like a refactoring week is approaching for me if I can get it to work over our HBMs :)
Vista vs XP
the hardware:
dual quad-core Penryn HP xw8600 PC with workstation-class NVidia Quadro FX 4600 graphics, all eight processor cores running at 3.16GHz, a 15,000rpm SAS hard drive and 4GB of RAM
the results:
their conclusion:
- on this kind of hardware, Vista is faster than XP
- except for network copy and HD speed
- this results are somehow amplified on Vista SP1
Wednesday, December 26, 2007
How to Install Lookout on Outlook 2007
IIS 7 Breaking Changes
- Traditional HTTP Modules and Handlers have to be reconfigured in the web.config files.
- Impersonation in the BeginRequest and AuthenticateRequest stages are no longer supported.
- Applications can no longer use both Forms and Windows Authentication at the same time.
- Non-standard HTTP clients may have problems using Windows Authentication because of how authentication has been moved into the kernel.
- Other authentication issues revolve around timing such as when client impersonation comes into play.
- The global event DefaultAuthentication_OnAuthenticate method is no longer supported and the event WindowsAuthentication_OnAuthenticate won't always be fired.
- Passport authentication has been completely deprecated. Unlike all of the previous breaking changes, there is no workaround for this one. Passport isn't even available when running IIS in classic mode.
IEEE's patent portfolio survey

If you wan to to see the data, please follow the image link. If you want to see the original data on the rest of the industries, this link.
This couldn't show on a better day - last week a friend of mine insisted on how Microsoft was incapable of innovation and R&D. Here's the objective answer.
Heard about it in: cnet
PS: where is Apple and Google? Yes, I know, their impact factor is huge, but doesn't seem to help them here. Remember the The Great Double Standard?
Tuesday, December 25, 2007
Reusing the gifts paper

The house design is cool and simple - my father just did it while we were opening the presents, from a single piece of paper card, on a very elegant and simple design. I'll try and reverse-engineer the schematics and post it here. Hopefully next year we'll waste less paper while creating new toys :)
If someone knows of a site with schematics with this kind of models please post me a comment. Thanks in advance.
Merry Christmas
Monday, December 24, 2007
Windows Vista / Mac debugging a Silverlight app using Visual Studio 2008
Note to self: when their prices fall, I have to by a Mac...
Patterns and Practices Guidance
The screencast highlights:
- WCSF Add View (w/Presenter) Recipe and Dependency Injection.
- Various ways to provide View-Presenter Communication.
- Rhino Mocks as a Mock Framework.
- Castle Windsor, Spring.NET, and StructureMap DI Tools.
- Supervising Controller and Passive View MVP.
Sunday, December 23, 2007
techdays.pt
.NET Ajax Survey results
- most used Ajax toolkit is ASP.NET Ajax, with 73,7%, followed by the Ajax Control Toolkit which is used by almost half of the .NET developer that are using Ajax
- Adding to the ranks of the ASP.NET Ajax users also the ones that only checked the Control Toolkit, the final percentage grows to 84%: this means that 8 out of 10 .NET developers use ASP.NET Ajax.
- Partial Rendering / Update Panel: 91,8% (oops...)
If 97% of the developers is using Webforms, it also means that 3% of them is not using it.
What are these hard core developers using?Option Response % ASP.NET MVC 45,5% MonoRail 27,3% SubSonic 13% WCSF 9% There is still one category of developers: the ones doing only ASP Classic development. They are only 7 (0,7%) and are mostly using hand coded Ajax calls (60%). (my comment: we have to be careful about this reading, it can be misleading if we try and read as "there are less then 1% of classic ASP programmers over there...")
Google Analytics changes
Thanks for the tip, Pedro. And those of you that followed Tiago's instructions on how to exclude your own hits, please don't forget to update your code.
Saturday, December 22, 2007
Installing SubVersion
Then I've moved into Microsoft technology, and adopted the infamous and ubiquitous SourceSafe. And though I had contact with CVS, SubVersion and TFS, RCS and SourceSafe were the systems I used the most.
The other day I had to install Subversion, and for some strange reason I've never installed SubVersion! I've always been a client to SubVersion. Whenever possible the TortoiseSVN kind of client, not the command line one - except for checking out opensource projects on Linux just to build them.
So I've started browsing the web for help. My first impressions were not encouraging: except for installing the bits, most of configuration had to be made my hand over configuration files. I then found this wonderful SVN 1-Click Setup, who did most of the initial heavy lifting configuration. It was up and running in 5 minutes!
I still have to dump into the configuration files to tune SubVersion, federate it to our Active Directory and assure I'm not installing the fastest troyan on our DMZ (yes, we'll be exporting this to the outside world). Don't worry, I intend to ask for help from my colleagues that really know about SubVersion before exposing my rookie installation into the outside wild :)
Continuations
Ok, continuations is not the way we from the imperative world are use to think. Yet Another Language Geek defines it like this:
CPS (Continuation-Passing Style) turns a program inside-out. In the process, the programmer may feel that his brain has been turned inside-out as well.
He carries on defining some simple samples. Here's his factorial sample:
static void fact(int n, Action<int> action)
{
if (n == 0)
{
action(1);
}
else
{
fact(n - 1, x => action(n * x));
}
}
static void Main(string[] args)
{
fact(5, x => Console.WriteLine(x));
}
Please follow the rest of the his post - it's loaded with samples usable on the real world.
Zero defects
The very first version of Microsoft Word for Windows was considered a "death march" project. It took forever. It kept slipping. The whole team was working ridiculous hours, the project was delayed again, and again, and again, and the stress was incredible. When the dang thing finally shipped, years late, Microsoft sent the whole team off to Cancun for a vacation, then sat down for some serious soul-searching.
What they realized was that the project managers had been so insistent on keeping to the "schedule" that programmers simply rushed through the coding process, writing extremely bad code, because the bug fixing phase was not a part of the formal schedule. There was no attempt to keep the bug-count down. Quite the opposite. The story goes that one programmer, who had to write the code to calculate the height of a line of text, simply wrote "return 12;" and waited for the bug report to come in about how his function is not always correct. The schedule was merely a checklist of features waiting to be turned into bugs. In the post-mortem, this was referred to as "infinite defects methodology".
To correct the problem, Microsoft universally adopted something called a "zero defects methodology". Many of the programmers in the company giggled, since it sounded like management thought they could reduce the bug count by executive fiat. Actually, "zero defects" meant that at any given time, the highest priority is to eliminate bugs before writing any new code.
The Joel Test: 12 Steps to Better Code
- Do you use source control? yes
- Can you make a build in one step? yes
- Do you make daily builds? kind of... not on all projects - I inherited an old .NET 1.1 project without daily builds and haven't configured yet :(
- Do you have a bug database? yes
- Do you fix bugs before writing new code? yes
- Do you have an up-to-date schedule? yes
- Do you have a spec? yes
- Do programmers have quiet working conditions? kind of... most of them use headphones, and some of them use noise reduction headsets - yeap, we can still ear people, but stop earing fans
- Do you use the best tools money can buy? yes great software kind of... we don't have the best hardware money can buy, but we are not far from there no there are still developers with only one monitor
- Do you have testers? no another lost practice
- Do new candidates write code during their interview? no we did it in the past and we are just preparing the come back of this great practice
- Do you do hallway usability testing? no another lost practice
World Domination Mad Plan

But after the initial great sensation, the data is sadly reveling: the world is not revolving at the same speed.
On one side there are regions like North America, Europe and Oceania where people can easily view my blog. On the opposite side stands Africa. And this is particularly sad for me, above all as Portuguese. Portugal, who on the past had the responsibility to open Africa's doors to the world, clearly didn't help to develop Africa as Africa needed.
Please don't get me wrong: all countries are very welcomed to devCatharsis, but if you permit me to post a Christmas wish, my wish will be that devCatharsis can get more hits from Africa. Particularly from countries where we, Portuguese, have more emotional, blood, cultural and language bounds. Countries like Cabo Verde, Guiné Bissau, São Tomé e Príncipe, Angola and Moçambique, and so many others that we lost count. And outside of Africa, Timor, Macau, Goa, Damão and Diu. And thank god for Brasil, who's devCatharsis development indicator can always keep me happy :)
[update]
Now that I think of it, Goa, Damão and Diu are very well represented on devCatharsis as part of modern India. Well done!
Thursday, December 20, 2007
Scaffolding in ASP.NET: Dynamic Data Support
- Define your model: this step is not specific to Dynamic Data, but this is where it all starts. You have a database, and you create a model for it. Currently, this is done using Linq to SQL. In the future Linq to Entities will be supported as well.
- Test a scaffolded version of your app: with no additional effort, Dynamic Data lets you run a scaffolded web application on top of your schema. Although this scaffold has a 'standard' UI, it lets you try all CRUD operations on your tables. Furthermore, it has full support for relationships. For instance (assuming Northwind), the Products page would let you navigate to a product's category info, and editing a Product's category would show you a rich drop down with category names (instead of IDs).
- Customize the shared page views: you then get to make changes to the page templates that are used to display the scaffolded views. That, you can make changes that will affect the view of all the tables.
- Customize the specific pages: the next step is to define some custom UI for specific pages. e.g. you could write one of Products and another for Categories. The nice thing is that while you do this, you still get the standard scaffolded view for all the other tables. This lets you create specfic pages at your own pace, while keeping a functional application at every point.
- Annotate your model: you can add attributes to your model to add extra knowledge about certain fields. e.g. you could set a Range on the product's UnitsInStock field so it only allows values between 0 and 50. The UI would then automatically pick this up and validate inputs accordingly. The great thing is that you are keeping this information on your model, and don't need to 'pollute' your pages with it.
- Create custom field templates: all fields in Dynamic Data are rendered via field templates, which are basically user controls. You can also create custom templates, which can be very powerful. e.g. in the above case, you could create a field template that renders a range as a slider control instead of a textbox. Again, your page would pick that up without you having to add this custom UI directly in the aspx file.
Continuous Integration For .NET 2.0 Development Environments: Downloadable Booklet
Using Linq to XML to extract data from... my blog roll!
using (XmlReader reader = new XmlTextReader(@"D:\Users\mario.romano\Documents\RSSs\2007.12.20.opml"))I just love Linq! And to get a final count of counts, I just have to:
{
var query =
from outline in XElement.Load(reader).Element("body").Elements("outline").Elements("outline")
where outline.Parent.FirstAttribute.Value.IndexOf(". ") != -1 // the blogs I read daily
orderby outline.Parent.FirstAttribute.Value
group outline by outline.Parent.FirstAttribute.Value into parentOutline
select new
{
Key = parentOutline.Key,
HowMany = parentOutline.Count()
};
foreach (var result in query)
{
Console.WriteLine("{1,4}: {0}", result.Key, result.HowMany);
}
};
Console.WriteLine("{0}", query.Sum(p => p.HowMany));PS: the results are: 152 feeds read daily, from a total of 430 feeds.
PS2: Yeap, the real reason to post this is to test my new CSS for a large width code :)
[update]
I give up, it works fine on Firefox but looks lousy on IE7. Argh......
[update II]
I've just fixed it for IE. Check it out.
Internet Explorer 8 correctly renders the Acid2 browser test
IEBlog states:
The key goal (for the Web Standards Project as well as many other groups and individuals) is interoperability. As a developer, I’d prefer to not have to write the same site multiple times for different browsers. Standards are a (critical!) means to this end, and we focus on the standards that will help actual, real-world interoperability the most. As a consumer and a developer, I expect stuff to just work, and I also expect backwards compatibility. When I get a new version of my current browser, I expect all the sites that worked before will still work.
The world is definitely changing :)
Spell checker for HTML, ASP.NET, JScript, VB, C#, CSS and C++ for Visual Studio 2005 and 2008
Wednesday, December 19, 2007
Blogging source code
I think I've found a good compromise - well, to be honest, I've copied from Hanselman's blog. Here it is:
pre {Noticed the overflow:auto? What it does is to show the code on all it's width if possible, and automatically pan when no width is available. Cool.
background-color:#FCFBF8;
border-color:#CCCCCC;
border-style:solid;
border-width:1px 1px 1px 2px;
line-height:1.2em;
margin:1em auto;
overflow:auto;
padding:1em;
width:90%;
word-wrap:normal; /* IE */
}
[update]
I've added word-wrap:normal, because of good old IE;
Declarative, Imperative, and Task-based Parallelism in .NET
Tuesday, December 18, 2007
Learn to “get traction” in your team
iterate more, plan less
Monday, December 17, 2007
Seamless Windows
So I can update my past post about Conciliating Windows and Linux, just imagine: hosting a Silverlight over Firefox on Ubuntu and a VMWare Workstation running XP, remotely debugging the Silverlight app on Visual Studio seamlessly on Gnome. Isn't this a dream for those people that love Microsoft Development tools but are not as enthusiastic about Microsoft OSs?
Heard about it here, making reference at this link.
Visual Source Safe 2005 Update for Visual Studio 2008
This update is a rollup of hotfixes for Visual SourceSafe 2005. This update includes many stability improvements, performance improvements, data improvements, integrity improvements, and usability improvements. This update also improves compatibility with Microsoft Visual Studio 2008 and with Windows Vista.
Heard about it here.
Sunday, December 16, 2007
Vista: where's "run as"?
Moving it up to the cloud
The way the samples were written seem to target product directories, and that makes sense, coming from Amazon :)
Scaffolding in ASP.NET
Scaffolding in ASP.NET is just as easy as creating a "Dynamic Data Web Application", enabling a setting on web.config and firing away a complete application.
I have no problem with the dynamic approach - just love the capability to work over generic templates, keeping the possibility to implement particular implementations whenever needed. The question I have to ask is: why in hell does ASP.NET keep insisting on writing this cumbersome user interfaces?
Do you know of many web applications that can be built with such user interfaces? People use radio buttons and check boxes to select rows in grids and seldom edit data on the grid itself. Yes, we can customize the templates, but isn't this a missed opportunity to standardize UIs?
My final question is: shouldn't this implementation be MVC based? How can we evangelize MVC when the coolest and more productive project just doesn't support it out of the box?
Oh, well, still a nice feature...
Friday, December 14, 2007
Vista on the Eeee!!!
The big surprise is how fast it seems to run. In the video, Vista seems nice and snappy, despite the Eee PC's 900MHz Celeron processor.Great tip, Marco Gonçalves.
ASP.NET 3.5 Extensions: Dynamic Data
He mentions some great links about dynamic data. Among them, this videocast from David Ebbo.
Thursday, December 13, 2007
Cheap minority report
And here's the guy who created this proof of concept: Johnny Chung Lee.
Now I really have to buy a Wii - well, at least a controller :) Isn't it great when people use standard protocols like blue tooth?
Thank Rui Rasteiro for the tip :)
ASP.NET MVC links
ParallelFX: Task and friends
Hyper-V beta
Wednesday, December 12, 2007
ASP.NET MVC - the alternative way
Having an iPod Touch is like...
Oh my old love-hate relationship with Apple is catching up...
PS: so why do I keep wanting an iPhone?... argh...
Good luck on your new job, Pedro :)
google reader. So here are some suggestions:
hosproxy
HttpOverSmtp
Tunnel HTTP through SMTP
Hope you won't get sacked for using it.
Best of luck to you, Pedro :)
Mono on OS X
Tuesday, December 11, 2007
iPod Touch
It's just soooooooooooo thin and cool. 8mm thin! It's sooooooo light. The usage experience is sooooo incredibly cool!
Now here's what I didn't like:
- too well designed for fingers - the screen is always dirty;
- too expensive for a phoneless iPhone - which is by the way too hyped for what it does;
- too much closed (to developing) power to carry around - I would hate myself for carrying such a cool gadget where I couldn't put my hands on programmatically;
- not mine;
Thank Nuno Ferreira for the demo :)
SAF - the Strategic Architect Forum
Here are the recordings from this year. On a simple good old fashion downloadable way. Don't you just hate Flash and Silverlight pages that want to make you stream the video over your browser making it hard to see it on your portable video player?
.NET Compact Announced for Symbian OS
C# 3.0 Functional Programming Series
Lambdas and Closures and Currying. Oh my! (Part 1)
Lambdas and Closures and Currying. Oh my! (Part 2)
Lambdas and Closures and Currying. Oh my! (Part 3)
Lambdas and Closures and Currying. Oh my! (Part 4)
Lambdas and Closures and Currying. Oh my! (Part 5)
Lambdas and Closures and Currying. Oh my! (Part 6)
Lambdas and Closures and Currying. Oh my! (Part 7)
NHibernate slow "warm-up" solved
<add key="hibernate.use_reflection_optimizer" value="false"/>
The solution was found here. Our startup is finally a fast one! We are now going to test our integration tests against this option to figure out the impact. One thing's for sure: on our development environments, this is definitely the best option.
Diogo Henriques, as our NHibernate guru, has also proposed an alternative approach: serializing the configuration. I'll post the results as soon as we get them.
First ASP.NET MVC impressions
namespace: System.Web.Mvc.BindingHelpers.BindingHelperExtensions
method: public static void UpdateFrom(this object obj, NameValueCollection values);
There are no words to express the brevity capabilities of this great extension method that allows:
myEntity.UpdateFrom(Request.Form);
This is the only CTP that got to run on my Vista host machine - all of the rest (Parallel Extensions, Entity Framework, Astoria, the dying Acropolis, ...) will remain installed on guest OSs to limit interdependencies. At least for now.
office.com Beta
Monday, December 10, 2007
All problems in computer science...
All problems in computer science can be solved by another level of indirection.
This is a famous aphorism of Butler Lampson, the guy who in the early 70s envisioned the modern personal computer. Sometimes it comes accompanied with an anonymous corollary:
All performance problems in computer science can be solved by removing one level.
Or even with:
Except for too many levels of indirection.
Enabling 'sa' in SQL Server 2005 Server express on Vista
MVCToolkit
To get some more View helpers that didn't make it into the CTP (but will), download the mvctoolkit http://asp.net/downloads/3.5-extensions/MVCToolkit.zip
Optimizing NHibernate
ASP.NET 3.5 Extensions CTP Preview Released
Here's the Download . Here's Scott Guthries's post.
[update]
From the QuickStarts page:
High-Productivity Data Scenarios
ADO.NET Data Services
ASP.NET Model View Controller Applications
Rich Internet Applications
Selected API Reference
Sunday, December 09, 2007
Concurrency: The Compiler Writer's Perspective
A short interview with Brian Grant:
SD Times: Is concurrency too difficult for developers accustomed to linear programming to grasp?
Brian Grant: It is challenging, but I don’t think it’s too challenging. I do think certain languages, especially C and C++, make it very challenging to write robust big multithreaded systems. Basically, they have features that are hostile to concurrency.
Does your experience in compilers give you a different perspective than the average developer?
[...]
Higher-level languages favor ease of correctness over ease of performance. For example, in functional languages such as Haskell, the code you write does not have any side effects. The model is that they don’t modify existing data; they generate new data. The advantage is that it’s easier for the compiler to reason about what different components of the code can do.
[...]
Oops, seems like fire for tomorrow's lunch with the usual geeks - too bad this discutions never end up here on the blogosphere, where they should take place...
An Architectural View of the ASP.NET MVC Framework
[By default] The MVC Framework doesn't support classic postbacks and viewstate and doesn't consider any URL as the endpoint to a physical server file to parse and compile to a class. In ASP.NET, you have a 1:1 correspondence between a URL and a resource.
He goes on:
In the MVC Framework, a URL is seen as the mean to address a logical server resource, but not necessarily an ASPX file to parse. So the URLs employed by the pages of an MVC Framework application have a custom format that the application itself mandates. In the end, the MVC Framework employs a centralized HTTP handler that recognizes an application-specific syntax for links. In addition, each addressable resource exposes a well-known set of operations and a uniform interface for executing operations.
Dino ends up defining REST, an architectural style that MVC fully supports:
REST is an architectural pattern that defines how network resources should be defined and addressed in order to gain shorter response times, clear separation of concerns between the front-end and back-end of a networked system. REST is based on three following principles:
- An application expresses its state and implements its functionality by acting on logical resources
- Each resource is addressed using a specific URL syntax
- All addressable resources feature a contracted set of operations
Acropolis is dead...
Blogging source code
ASP.NET MVC: Handling Form Edit and Post Scenarios
[update]
I didn't missed the CTP, just the postponing report:
Several people have pinged me [Scott Guthrie] asking for the download location of the ASP.NET 3.5 Extensions Preview. We were hoping to post it on the web Friday, but unfortunately found a late bug that we felt needed to be fixed. The team is working this weekend to sign off on the new build. We hope to be able to post it as soon as this is done - apologies for the delayArghh.... it's just like postponing Christmas....
[update II]
After the scaffolding demo, it will be fun to notice if a next demo will cover SubSonic - I'm curious about the ASP.NET commitment towards SubSonic.
Better user experience shopping on a supermarket
Here's a nice gadget to do your shopping: MC17 Portable Self-scanning Terminal. While a gadget for your use, it's owned by those shops that are interested in transforming the customer experience with new levels of convenience and self-service. Here's how it works:
When you enter the shop (typically a supermarket), you'll get this portable barcode reader into your basket. While you add products to the basket, you'll barcode the product them, keeping track of your shop list on the device.
The greatest part of the checkout process has just disappeared, opening way for possibilities like uploading the shopping wish list from the internet.
In Portugal, the first implementation is limited to people who carry the shop card. This is a solution we can adopt to raise the customer experience and keep them as customers, but it won't solve most of the problems. For that, we will still rely on RFID.
Saturday, December 08, 2007
IMSLP closed
Pedro Oliveira had introduced me to IMSLP, something like the PianoSociety.com for sheet music. IMSLP is (was?) a project for the creation of a virtual library of public domain music scores based on the wiki principle. Since its launch on February 16, 2006, more than 15,000 scores, for 9,000 works, by over 1,000 composers were uploaded, making it one of the largest public domain music score collections on the web.
For my surprise, I've just found out that IMSLP was forced to close! From Wikipedia:
On 19 October 2007 the IMSLP closed following legal demands from Universal Edition of Vienna, Austria.[17] The cease and desist letter expressed concern that some works that are in public domain in the server's location in Canada with copyright protection of 50 years post mortem, but which are protected by the 70 years post mortem term in some other countries were available in those countries.It seems like some of IMSLP content was failing to comply with the new 70 years post mortem term in some countries. In fact, one of the problems was related to Béla Bartók who died 62 years ago!
I have great doubts about this 70 years limit. Are we really defending authors rights 70 years after they are dead? Or are we just standing for the editors rights?
Anyway, too bad for IMSLP, hope they can soon get back in action. Until then, here are some suggestions: Mutopia, Choral Public Domain Library and Werner Icking Music Archive.
Friday, December 07, 2007
Architecting for other than SOA and Ux
We have to decide how much of this framework is built in house, how much from outside components/frameworks, and finally how much we just give up using.
We have to decide if we use standard ADO.NET, CSLA.NET compliant components, simple Datatables, iBatis, dOOdads, EntitySpaces, NetTiers, NHibernate, LINQ To SQL, LINQ To Entities, SubSonic or the next to be persistance framework, remembering that on the past we have choose OlyMars, Gentle.NET or WilsonORMapper.
We have to choose a DI framework. We have to decide between Enterprise Library, Spring.Net or CastleProject. We have to choose between MVC, MVP or WebForms. We have to choose between using our our in house code generator, CodeSmith, myGeneration or T4 GAT/GAX.
We have to choose what our model is on MDD. We have to choose when to use SProcs and when not to.
We have to choose between SQLServer, Oracle and other databases.
We have to choose a workflow system and a middleware.
We have to choose a unit testing framework, a mockable framework, a source control and continuous integration system.
Yeap, we have a lot to architect. Why does SOA and Ux gets most of the attention?
Learning the Model View Presenter Pattern
Bil Simser has just posted:
The guys over at Patterns and Practices got it right. They've put together a package (available via a CodePlex project here) on learning and understanding the Model View Presenter Pattern (MVP). It's kind of a "mini-guidance" package and not the big behemoth you normally see from these guys that:
- Provides guidance on how MVP to promotes testability and separation of concerns within the UI
- Illustrates how to implement MVP with standard ASP.NET
- Illustrates how to implement MVP with ASP.NET and the Composite Web Application Block
The package contains full documentation on the pattern, unit tests, and source code (for both WinForms and CAB) demonstrating it. Very nice and very easy to digest! Check it out here if you're just getting started and want to see what MVP is about.
Great F# arguments!
In F#, I wrote a function called CacheAndTrace that takes a parsing function as a parameter and returns a new function that adds the caching and tracing code. Since the new function has the same signature as the original parsing function, the caller can't tell the difference but it saves me having to write the boilerplate code over and over again.
Thursday, December 06, 2007
Configuring a VMWare Server
Each time we setup such a systems there's always a great fuss about what disks to buy and how to configure them. Here are some sources to help us figuring out the solutions:
- SAS Hard Drives: 15,000 vs. 10,000 RPM
- RAID Scaling Charts, Part 1
- RAID Scaling Charts, Part 2
- RAID Scaling Charts, Part 3
Apart from the question raised on these articles, we have the following:
- The benchmarks targets:
- File Server;
- Web Server;
- Database Server;
- Workstation;
- What about virtual machines servers? What benchmark should we use? Should it depend on the guests, should we use one of these (for example, database) or should virtual machines be benchmarked on future tests?
- What should be the cluster size of the host where the virtual machines are? Does it really matter?
Randy Patterson's 10 Development Podcasts
Polymorphic Podcast | Craig Shoemaker brings insight into software development in the .NET platform along with interviews with industry luminaries. Good content, good quality but an inconsistent schedule. | |
ARCast with Ron Jacobs | Ron Jacobs is a Microsoft employee and delivers a weekly podcast on Channel 9 that dives into some tough .NET architecture topics. | |
Software Engineering Radio | Not specifically .NET related but contains a wide spectrum of Software topics from Dynamic Languages to Transactional Memory to Fault Tolerance. | |
Software Quality Engineering Conferences Podcast | Interviews with speakers from the Agile Development Practices 2007 Conference | |
OnSoftware | Weekly interviews with some of the software industry's leading developers about a wide range of programming and development issues | |
WebDevRadio Podcast | Web Development Discussion | |
Agile Toolkit Podcast | Topics covering all things Agile. | |
.NET Rocks! | .NET Rocks! is a weekly talk show for anyone interested in programming on the Microsoft .NET platform. The shows range from introductory information to hardcore geekiness | |
Hanselminutes | Scott Hanselman discusses utilities and tools, gives practical how-to advice, and discusses ASP.NET or Windows issues and workarounds. | |
ASP.NET PodCast | The ASP.NET Podcast brings a technology focus to the area of podcasts. This podcast is geared towards developers with applications that scale to a large amount of data and users. |
I ear most of this while commuting, and will definitely try the remaining ones. Thanks for the link, André Lourenço :)
eBoostr brings ReadyBoost like technology to Windows XP
eBoostr allows you to use an additional drive (flash memory or hard disk) as another layer of performance-boosting cache for your Windows XP. There is no need to purchase a Vista upgrade to get the benefits of the Vista’s ReadyBoost technology. With the newly developed eBoostr, the booting of your OS and applications startup get much faster thanks to the smart caching mechanism.Here's the link. Please note that this is a commercial product.
Volta: the promised land?
Here's a nice post about it:
Programmers write web applications using familiar .NET languages, libraries, and tools. Volta splits the application into multiple parts potentially running on different tiers, say, client and server. Client code needs only a minimal, JavaScript-enabled browser, though Volta will take advantage of additional runtimes that may be present.
Programmers simply refactor classes that need to run on tiers other than the client and Volta injects the boilerplate code for communication, serialization, synchronization -- all the remoting code. The developer enjoys all of the benefits of .NET: a great debugger, test tools, profiling, intellisense, refactorings, etc.
[update]
Wednesday, December 05, 2007
Re-enabling Hibernate on Vista
After some googling I found out:
If you've found that your Hibernate option is missing from Windows Vista, it might be from running the disk cleanup wizard and removing the hibernate files.
This is due to a known bug in Vista that might not have been hotfixed already.
It goes on:
Turning it back on is very simple, however. Type cmd into the start menu search box, and use Ctrl+Shift+Enter to open in administrator mode. You can also right-click the item in the menu and choose Run as Administrator.
Uau! Simple, ehm?...
From the command prompt, type in the following command:
c:\> powercfg /hibernate on
And if this wasn't good enough for 'Mister M', it ended up:
You'll have to restart your computer before it will take effect.
Oh, well, I deserved it. 'Mister M' had his revenge :)
As geek as I can get

Having a bunch of computers at work didn't stop me. Using all USB ports was not enough. Neither having a datacenter at home, nor posting like hell on this pathetic little blog. I had to portrait myself playing the violin on a laptop! Worst of all, I even posted the darn picture! Arghhh!
Oh, well, this exercise of futile self-worship has got to stop :) Until then, this will probably be the next devcatharsis logo. Next logo? Like devcatharsis has ever had a logo...
Hey, and if you feel a sudden rush to help this poor blind violinist please don't hesitate to use my AdSense links :) Or in he words of a great advertisement genius I met begging on the streets of San Francisco: "Why lie, it's for beer. Help the beerless." In my case: "Why lie, it's for gadgets. Help the gadgetless."
PS: I haven't seen me in pictures for ages - boy am I fat!...
[Update]
Here's my next logo:

[update II]
On 2007.12.23, here's my next attempt:

Backing up VMs
A colleague of mine, Sérgio Caliça, just proposed a smarter solution: why not use Shadow Copy?
Shadow copy as the following pros:
- works on opened files;
- is checkpointed (at least, I hope it is);
- doesn't have downtime;
- is fast;
- it's the simplest of the disaster recovery methods;
- when the VM is recovered, it will probably act like someone as pulled the plug - so what?
- we haven't test it yet;
I'll give it a try one of this days and let you tell how it run. Thanks for the tip, Sérgio.
SQL Server Reporting 2008 Reporting Services does not depend anymore on IIS
- The first reason we moved away from IIS is for better configuration;
- The second reason for the change is a need for better resource management;
- A final motivation for the change was to remove adoption blockers;