Monday, December 19, 2011
Fight the Blacklist ! What you can do
So, what can I do about it? I can spread the message and tell my friends and colleagues about it. What about you? Here are some ideas on how you can help out. Google, Aol, Facebook and others are already backing up the anti-SOPA movement. Remember, censorship is just another tool for big companies and powerful people to dictate what is allowed and what is not, and generally, that which is allowed is what pays enough ! We don;t want to pay for being able to be creative, innovative and continue the efforts to make technology available to everyone !
Cheers !
Sunday, December 18, 2011
Giant Nokia Windows Phone at Champs-Élysées, Paris

Among the things I saw, was another giant 30-foot-tall Nokia Lumia 800 Windows Phone along the Marche du Noel in Champs-Élysées.
This wasn’t only a giant ad, it was a functioning interactive screen emulating the actual phone and broadcasting Christmas activities every day, including Santa listening kid’s present wishes. The stand also had several real Nokia devices for people to test and play with.
After seeing the giant 4D projections in London, it was a nice surprise to see something similar in Paris. It seems to me that Nokia and Microsoft are doing a good job creating awareness. The Lumia 800 is definitely the sleekest Windows Phone out there, and I’m sure there are more to come.

Playing with Xbox Companion Application








Thursday, December 15, 2011
Installing Surface 2.0 Development Tools






Getting started with Microsoft Surface 2.0


Design and Interaction Guide
Development Whitepaper
Hands-on Labs
Surface Dev Center
WPF Dev Center
MSDN Surface Documentation
MSDN Surface Developer Samples
Tuesday, December 13, 2011
#RGAMakeDay

Last week we had our first Make Day at R/GA.

What?

Latest .NET Snacks
Lots of nice, sweet and delicious snacks from the .NET world recently.
Windows Phone 7 adoption and marketplace continues to grow, specially in Europe thanks to the release of the latest Nokia Windows Phone handset.
Windows 8 development is keeping many in the Windows ecosystem working hard after office hours building cool stuff with the new WinRT framework.
On other news, Microsoft just released Silverlight 5, the latest version of the technology that started as a browser plugin and a subset of WPF, but that has become almost a platform by itself, powering not only the browsers but also the mobile platform and rumours about Silverlight also powering the Xbox Live platform soon !
Regarding tools, there are several previews out there. Starting with Windows 8 Developer preview, you can get the corresponding Visual Studio 2011 and Blend developer previews. However, if you are still hesitating, there are a couple of really cool previews on Win 7 + .NET. Visual Studio 2011 Dev preview is also available for our stable win 7 platform and has a lot of new goodness for everybody. Along with that, check out the Team Foundation Service Preview, which brings you the power of TFS running on the Azure cloud.
All this is part of a huge effort from Microsoft’s part to align and integrate all the different services, platforms and technologies around the Windows ecosystem. Microsoft has tried many times and arguably failed, but for all people looking beyond the brand and stigma, this time it seems that Microsoft is doing the right moves at a steady pace from several different fronts. Consumer success story is what they are targeting in the most ambitious renovation of any of the big tech companies of our times.
This is the Windows Ecosystem and its BIG !
What are you waiting to get on-board?
Monday, December 5, 2011
XBox Live bigger inside the Windows Ecosystem
According to this article published by the New York Times, Microsoft will start working on the system to allow users to watch television through the console. On top of that, users will be able to enjoy an enhanced experience through the Kinect, powering users to perform search and browsing to gestures and speech commands.
Users will still need to cover the fees that Cable providers will for sure continue to impose on channels and films watched through the console and also cover the Microsoft Xbox Live membership which at the end might be even less that what you would pay for your cable box, but with the increasing prices of TV packages and the poor service that most of them give to consumers, I'll bet that it might be still a really competitive and satisfactory service.
Microsoft has already made great improvements to the XBox ecosystem including gaming, user libraries, computer interaction and Windows Media Center enhanced experience. It has come from a long road and although it had some bumps along the way, the console and the platform have been doing great in the past months.
Its a truly exciting time for the Windows platform, and honestly Microsoft seems to be putting together all the ecosystem pieces in a way that was not possible before. Although they might not be the first integrating and providing a functional and cohesive ecosystem, they seem to be willing to go beyond what the competitors (Amazon, Apple and Google) are doing on other fronts.
Its a challenge but most of all, a huge opportunity for the technology industry !
Cheers!
Sunday, December 4, 2011
Windows 8 Metro Style Hello World App
Although I have experience developing WPF, Silverlight and Surface applications, I always find interesting and fun to start from scratch with new technologies and frameworks and see how you can progress from the very basic start to more complex ideas and projects.
That being said, I have been coding Metro Style Apps during the weekend following the starter and sample articles published by Microsoft and the Developer Division.
Here is a video of my take of Hello World !
Saturday, December 3, 2011
Installing Windows 8 Dev Preview using VMWare Workstation 8
Recently I was able to finally install Windows 8 Developer preview in an old laptop and an Acer tablet to see how it feels and responds. I must say I really like the new touch interface, the cleanness and simplicity and all the new opportunities that will bring to .NET developers like myself.
Anyway, today I wanted to install the OS including the dev tools as a virtual machine on my Alienware M15x laptop (which by the way is now a conspiracy theory )and I run into some issues before I was able to make it work.
Once I manage to install the VMWare Workstation 8 and setup the Virtual Machine for my Windows 8 64-bit installation, I was getting the following error when powering on the VM:

There are several posts out there to help you perform the installation step by step. You can take a look here and here.
Basically, I needed to remove and setup the Windows 8 VM specifying that I was going to setup the OS later, to avoid the Product Key and unattended installation error.

Then, once the VM setup is completed, VMWare Workstation will try to power on the VM, but since there’s no OS installed it will fail. At that point you need to mount the ISO image to install Windows 8.
To mount the Windows 8 ISO image, click on the tab for your virtual machine in VMWare Workstation window and select:
Removable Devices / CD/DVD (IDE) / Settings

Once you configure the source ISO image, restart the VM and that should run the OS installer successfully.

After that is just a matter of personalizing your installation and done. You will have your virtual Windows 8 Development Preview 64bits with Development Tools ready to go !

My Windows Metro Style Ecosystem development workshop is ready !

Get on the MS Ecosystem and Happy Windows 8 Development !
Windows Phone 7 Development Resources

Hi chaps, wanted to share a couple of ‘straight from the source’ really good development sources for windows phone 7 applications and games development with code samples and documentation.
Check it out:
Windows Phone App Code Samples
Windows Phone XNA Code Samples
Also, if you are looking for a good book that cover all aspects of Windows Phone 7 development, including the submission to the Marketplace and helpful practical tip and tricks to further improve your knowledge and skills on the platform, I greatly recommend Adam Nathan’s 101 Windows Phone 7 Apps.
Happy Windows Phone 7 development !
-arbbot
Localization Resource Files in ASP.NET
However, we also needed to localize several HTML templates generated by the system upon request. Since the templates text and layout is pretty much fixed, we decided to go with ASP.NET resource files.

Now the basic concept is that you create a default resource file containing all your localized resources and then you create copies of the default resource file for the required cultures and locales. You can create resource files for general languages or specific country locales.
Most of the languages were created without issues. Later I needed to add a new resource file for a new locale, but when after adding the required resource file, I was getting the following error:
Compiler Error Message: CS0101: The namespace 'Resources' already contains a definition for ‘Templates’
This was really annoying because I was sure the resource file name was unique and the file was not duplicated. Refreshing the page sometime gave me variations of the same error, but nothing helpful.
Looking around online for answers, I found almost everybody saying that the problem was for sure that two entries in the same resource folder had the key of ‘Templates’. However, after checking several times, and deleting and re-adding the file, I got the same error message.
Suddenly I realised the true cause of the problem: the culture info suffix I was using for the new resource file was not recognized by ASP.NET and therefor the file was being seen as a duplicate. When you add a new resource file, I was using the same ‘Template’ naming convention, followed by the culture info (in this case en-HK) and the ‘.resx’ extension. The correct culture info was actually ‘zh-HK’. Once I changed the problematic culture info, the error was gone and the app was working as expected.
Hope it helps if you get into the same annoying situation with ASP.NET resource files !
-arbbot
Tuesday, November 29, 2011
Entity Library Quick Reference
Once helpful source for quick reference when getting started on the Entity Framework is the MSDN Entity Framework Quick Start. You will find four concrete sections covering the basics so you can get up and running.
Many information out there talks a lot about the code first features, but I find myself needing to create the .edmx file from an existing database, which could be tricky to find out there.
In the series of posts I’m preparing I’ll share how to use these techniques and approaches on a layered small, but well designed backed app that will empower RESTful services that can be consumed by any device.
In the meantime, have Entity Framework coding !
And no tech posts still…
I know….I haven’t been able to post any tech related posts for a while now, and I keep just blogging about how busy I have been and that I will soon start to post something at least remotely interesting….
Well, I’m still on the same position, but finally seeing some free time to work on my blog soon. I have been putting together a comprehensive sample/tutorial for building RESTful services with WCF, C#, Entity Framework and MS SQL. The code samples are already running, so is just a matter of putting together the posts.
Also, I haven been playing around with Windows 8 development preview and Windows Phone, so hopefully I’ll start posting about them too.
For now, it has been about finishing work related projects, enjoying some time off with my wife in Italy and getting used to the cold of London’s upcoming winter !
Cheers!
-arbbot
Saturday, October 15, 2011
London Calling
Moving to the UK implied some changes in my life and also say goodbye to family and friends for a while, but I'm happy about all the new opportunities. I came to Europe on holidays 10 years ago, and I couldn't wait to see what Europe had to give in my professional career.
It has been great so far, but also very busy. Settling in, arranging all my personal things and get up to speed with the new company, the new team and the new project have kept me away from writing on the blog. However, I hope to start writing more often in the upcoming weeks.
What I'm working, following, reading and playing with lately? Windows 8 for a start, Windows Phone 7, Continuous Integration, Multi-touch experiences, ASP.NET MVC 3.0 to mention just a few.
It has never been a better time to be a .NET Developer & Architect !!!!
Cheers!
-arbbot
Tuesday, February 22, 2011
Kinect Third Party Apps Development will be officially supported by Microsoft
More info here.
Cheers!
Saturday, February 19, 2011
Factory Pattern Using Unity Application Block
With Unity you can have the interfaces and their concrete implementation mappings in the Unity configuration file, giving you great flexibility to map whatever interface you want to their implementation. This way unity container will be able to resolve any contract you pass along.
/// encapsulates the instantiation of data provider classes
public static class Factory
{
private static readonly string containerName = "DALContainer";
private static readonly IUnityContainer container;
static Factory()
{
if (String.IsNullOrEmpty(containerName))
{
throw new InvalidOperationException();
}
container = new UnityContainer().LoadConfiguration(containerName);
}
/// Instantiates a data provider class
public static T CreateProvider < t >()
{
return container.Resolve < t >();
}
}
Then the only thing you need to do when you need to instantiate your data provider class ask your factory for it:
IUserProvider dataProvider = Factory.CreateProvider < IUserProvider >()
Notice how less code you need to implement the pattern and encapsulate the functionality with the convenience of leveraging the class resolution into a configuration file, which you can change without having to recompile the application !
Hope the tricks help out there.
Cheers!
-arbbot
Friday, February 18, 2011
What is SOLID
SOLID stands for:
S - Single responsibility principle (SRP):
The notion that an object should have only a single responsibility. You know how hard it can be to find the source of a bug/issue. If you encapsulate and abstract the functionality of your object, reducing its responsibilities to a single one, it would be a lot easier to find out if the problem is being generated by that object. The reason it is important to keep a class focused on a single concern is that it makes the class more robust. Look out for the separation of concerns concept, that´s a big deal in software development and software architecture.
O - Open/closed principle (OCP)
The notion that “software entities … should be open for extension, but closed for modification”. OOP basic principles. Inheritance, polymorphism and abstraction. Any good developer should understand and apply this principle.
L - Liskov substitution principle (LSP)
the notion that “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program”. See also design by contract. Put your interfaces to work dude, make sure you work with contracts, so you can modify, extend or replace implementations without breaking the whole thing !
I - Interface segregation principle (ISP)
The notion that “many client specific interfaces are better than one general purpose interface.” Again, we are trying to encapsulate and abstract functionality. The days of "one big file" are far behind, you should divide and conquer always, and not try to just throw everything in a single place.
D - Dependency inversion principle (DIP)
The notion that one should “Depend upon Abstractions. Do not depend upon concretions.”
Dependency injection is one method of following this principle. Dependency inversion is a very useful concept to understand, although I think is not that easy to master. This has become more important with frameworks and standard libraries and is about reversing the control in a program´s life cycle. Dependency Injections is related to the concept and is one of the methods to achieve it. Check out Enterprise Library and the Unity Application Block for .NET specifics and keep reading and revising general software development articles and documentation about DI. Its worth it.
Cheers!
-arbbot
The Three Laws of the "Indi" Developer
2 - A developer must obey any orders given to it by the Client, except where such orders would conflict with the First Law.
3 - A developer must protect its own existence as long as such protection does not conflict with the First or Second Law.
Wednesday, February 16, 2011
Unity Application Block Configuration File Setup
"The Unity Application Block (Unity) is a lightweight, extensible dependency injection container with optional support for instance and type interception."
This architecture approach and the use of Unity allow us to completely decouple the BAL from the DAL layer increasing the extensibility and maintainability of the system. We also get the advantage of simplifying object creation when applying the Factory Pattern for dynamic class instantiation/resolution. It also give us greater abstraction and allow different team members to work on different layers reducing the dependencies and increase the flexibility by deferring component configuration to the container.
Configuring Unity is generally straight forward, but your configuration file can become quite big, complex and difficult to manage. What we do to solve this issue, is to separate the unity configuration into a different file, say "unity.config". I wanted to share the tip on how to implement this approach of having multiple configuration files, breaking down the configuration settings and simplifying each of the config files.
First, you need to include the Unity config section in your main configuration file:
And then specify which is the file containing that configuration file:
And voila. Once you have the unity.config file in place everything will work and you will be able to retrieve the Unity configuration settings from the secondary unity.config file.
Now remember that on the unity.config file you need to specify the Unity container. The unity.config file should look something like this:
But since in your application code you will be resolving the container dynamically, you need to be able to retrieve the container configuration. For this, you will need to include the container name in the main configuration file as an application setting:
Then in your code, you can simply retrieve the container name from the configured app settings:
private static readonly string DalContainerName = ConfigurationManager.AppSettings["DALContainer"];
Then to resolve your container when creating the classes on the factory class, you need to declare a unity container and then resolve the container:
private static readonly IUnityContainer Container; Container = new UnityContainer().LoadConfiguration(DalContainerName);
At this point you have loaded the container specific configuration and dependency mappings, so you can go ahead and resolve the class you need:
public static T CreateProvider() where T { return Container.Resolve(); }
Where "T" will be the interface type (declared in the BAL layer) you need the container to resolve. That will give you the concrete class instance that implements the given interface. Remember that the interface will be declared at the BAL layer while the concrete class implementing the interface will be implemented in the DAL layer.
I hope it helps you out there to get the most of your configuration files, and I recommend keeping an eye on the Unity Application Block for extensible, loosely coupled application development.
Cheers!
-arbbot
Thursday, February 10, 2011
Getting DB project into Visual Studio
Cheers!
-arbbot
Cannot load file or assembly "Microsoft.SqlServer.Management.SqlParser"
Google Mail Label Filter
To filter your inbox using filters, you just need to enter the text "label:" followed by the label you want to filter your inbox by in the search box above your inbox.
Let's say you have emails tagged as "Family" so you can enter the following: "label:Family" and Gmail will filter the emails displayed by the tag "Family". You can also combine tags for filtering, which is very helpful: "label:Family label:unread". You will also notice that Gmail doesn't real time tag checking, so if you enter a tag that you haven't created Gmail will tell you. Also, the label filters are deep linked, so you can actually work out with URLs. In the case I mentioned above, the last part of the URL in the address bar will look similar to this: "?AuthEventSource=SSO#search/label%3Aunread+label%3Ainbox". Nice huh?
Anyways, simple and easy tip but really helpful. I hope it helps you to keep your inbox more organized.
Cheers!
Wednesday, February 9, 2011
2011 Roadmap
I have been also reading a lot of new and old books and I have been hearing that little voice in the back of my head telling me to start writing again. I used to write a lot of poetry and short tales when I was in high school studying literature and poetry. My high school is an arts conservatory mixed with all the other traditional academic classes and I dedicated myselft to study painting, poetry and acting. I stopped writing when I started to study Computer Sciences and act professionally in theaters and television, it was just a switch of my arts field focus. Lately I have been trapped by "The Name of the Wind", first fantasy novel of Patrick Routhfuss and I must say it is a wonderful and totally immersive book that inspires me to go back to writing. We will see how it goes !
Although I haven't been doing much Acting work in recent years, I have been doing a lot of radio commercials and voice over for different agencies, which is always fun.
On the technical field, I left Mysterious Development in December since I got an offer to work on a really big, cool and complex .NET backend project. I really enjoyed working on game development, specially having the opportunity to learn how to develop games with Unity3D and C#/Mono but I love .NET technologies and the current project and team is awesome and with an international quality level, so I'm very happy with the move and the current work. I have been working with WCF, Windows Services, RESTful services, ASP.NET, MS SQL, SQLite, WebORB and LINQ.
I'm planning some big changes soon, so hopefully this year will be full with opportunities, challenges and learning. I'll try to make some time and post some of the things I have been working with and learning during these months.
Cheers!
-arbbot
Monday, February 7, 2011
Good Reads Update: The Name of the Wind by Patrick Rothfuss

My rating: 5 of 5 stars
Reading the book right now. Magical and organic, impress by the way the book is written and how the story is told. I read Kafka when I was 12 years old, and The Lord of The Rings when I was 13 years old. I'm 30 years old now, and Rothfuss's book has such power that takes me away from reality and sometimes is very hard to come back. It gives me the same strong feelings of the great books I read more than 15 years ago. Wonderful book from a master writer.
View all my reviews