GeekMeet Brasov 5 Presentation

I spoke about rule based systems at GeekMeet Brasov 5. My presentation, in Romanian, can be downloaded from the link below:

Download IconDownload the presentation

The video recording of my speech can be see below:

Read the rest of this entry »

Tip 2: #if

This is a C# tip

When the C# compiler encounters an #if directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined. Unlike C and C++, you cannot assign a numeric value to a symbol; the #if statement in C# is Boolean and only tests whether the symbol has been defined or not.

A predefined (by default) symbol on the “Debug” build configuration is DEBUG. Using this symbol you can define code that will be compiled only in Debug; for example, a debug window will be shown only when needed.

using System;
using System.Text;
 
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
#if DEBUG
            Console.WriteLine("Debugging information");
#endif
            Console.WriteLine("Code that always executes");
        }
    }
}

The code above will print “Debugging information” and “Code that always executes” when build on Debug and will display only “Code that always executes” when build on another configuration.

You can suppress the definition of the DEBUG symbol from the project properties or by removing the DEBUG from the build argument “/define:DEBUG”. Also, you can define your own symbols in order to accommodate your needs.

Define as many build configurations and symbols you need but don’t abuse this feature!

Windows 7 RTM Date Announced

Windows7LogoYesterday, Brandon LeBlanc, announced on the Windows 7 Team Blog, the official release dates for Windows 7 RTM (Release To Manufacturer).

Depending on who you are you will be able to get W7 RTM sooner or later:

  • Partners & OEMs
    • ISV (Independent Software Vendor) and IHV (Independent Hardware Vendor) Partners will be able to download Windows 7 RTM from Microsoft Connect or MSDN on August 6th.
    • Microsoft Partner Program Gold/Certified Members will be able to download Windows 7 RTM in English through the Microsoft Partner Network (MPN) Portal on August 16th.
    • Microsoft Action Pack Subscribers will be about to download Windows 7 RTM in English starting August 23rd.
    • OEMs will receive Windows 7 RTM software images beginning approximately 2 days after we officially RTM.
  • Business Customers
    • Volume License (VL) customer with an existing Software Assurance (SA) license you will be able to download Windows 7 RTM in English starting August 7th via the Volume License Service Center (VLSC).
    • Volume License customers without a SA license will be able to purchase Windows 7 through Volume Licensing on September 1st.
  • IT Professionals with TechNet Subscriptions will be able to download Windows 7 RTM in English on August 6th.
  • Developers with MSDN Subscriptions will be able to download Windows 7 RTM in English on August 6th.
  • Beta Testers & Enthusiast will not receive a free copy of W7 and will be able to purchase it after the official release.
  • For Consumers: will be in retail stores and shipping on new PCs starting October 22nd.

New Windows Azure Tools (July 2009)

AzureLogoAfter releasing the pricing scheme and the business model, Microsoft announced a new set of tools for Windows Azure.

Windows Azure Tools for Microsoft Visual Studio extend Visual Studio 2008 and Visual Studio 2010 Beta 1 to enable the creation, building, debugging, running and packaging of scalable web applications and services on Windows Azure.

The most interesting feature is probably the support for multiple roles. Now one can deploy many web/worker roles.

What’s new in the Windows Azure SDK?

  • The Windows Azure SDK supports developing and deploying services containing multiple web and worker roles. A service must include at least one role, of either type, and may include zero or more web roles, and zero or more worker roles.
  • The new PowershellRole sample hosts the Powershell runtime within a Windows Azure role. It demonstrates a simple remote console web role as well as a worker role whose implementation is a Powershell script. The host also includes the CloudDrive sample snap-in to provide access to Windows Azure Storage from script.

What’s new in Windows Azure Tools for Visual Studio

  • New project creation dialog
  • Support for developing and deploying services containing multiple web and worker roles. A service may contain zero or more web roles and zero or more worker roles with a minimum of one role of either type.
  • Ability to associate any ASP.NET Web Application project in a Cloud Service solution as a Web Role
  • Support for building Cloud Services from TFS Build
  • Enhanced robustness and stability

The new CTP Release can be downloaded from this link.

Tip #1: Backup Outlook 2007 Accounts’ Information

This is a series of different tips and tricks for computer users. It will include: software usage tip, hacks, development tips, hardware tips, etc.

I will try to post tips every day but I don’t know if my schedule will allow me.

When you need to reinstall Windows and/or Outlook you might backup the .pst files (Outlook data files). Unfortunately these files do not contain account information. After reinstall and restore of backup files you need to reenter all information about each account which is a boring process – at least for me because I have 5 e-mail accounts.

If you want to backup accounts information you have to export the “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook” key from Registry.

Export accounts’ information:

  1. Tip_01_01Start the Registry Editor (Start -> Run -> “regedit”) – in Windows Vista/7 you need administrative rights to start it.
  2. Navigate to the previously mentioned branch (HKEY_CURRENT_USER\Software\ … ).
  3. Right click the “Outlook” tree node.
  4. Choose export.
  5. Name the file accordingly.
  6. Click “Save”

After reinstalling Outlook, you have to import the accounts. Follow the steps below for this:

Import accounts’ information:

  1. Double click the exported file.
  2. Choose “Yes” when asked if you really want to import.

100000+ Downloads

SkypeGadgetDwlI am proud to announce that SkypeGadget was downloaded more than 100.000 from gallery.live.com.

There is a problem with the posted date but I remember that I uploaded it on gallery.live.com at the beginning of 2008 (or late 2007). So, I think that it was downloaded 100K times in ~19 months.

SkypeGadget is a Windows Vista Sidebar gadget that allows you to control Skype. If you want to download SkypeGadget and/or get more info about it, visit the project page at: http://victorhurdugaci.com/projects/skypegadget/.

Software Craftsmanship

Writing code and creating working software is not hard but writing quality code and creating valuable software is.

The software craftsmanship manifesto values:

Not only working software, but also well-crafted software.
Not only responding to change, but also steadily adding value.
Not only individuals and interactions, but also a community of professionals.
Not only customer collaboration, but also productive partnerships.

That is, in pursuit of the items on the left we have found the items on the right to be indispensable.

One can hardly doubt that the principles from then manifesto can be satisfied in other way than through passion. Of course, not all individuals involved in the process of software creation do their job with passion and dedication. Some do their job just because they need money or because they have some other interest and they really don’t care about the final product. They create software because they have to and usually is bad software.

Bad software is not software that does not work! Bad software, from my developer point of view, is software that was created chaotic. The project, from the beginning or from another point in the project’s timeline, was not governed by some rules and tenets. The individual involved in the project did not adhere to some standards and everyone was doing anything just to make a piece of working software.

This kind of projects are like pipes with rubber tape. You add more and more rubber tape (bad code/ideas, hacks) where you find a crack and in the end you will be over whelmed by the mess you created. Also, the fixing cost (refactoring) will be enormous.

Read the rest of this entry »

What is Windows Azure?

Just found a nice video describing what Windows Azure is.

I already explained what Azure is a previous post, Windows Azure Application Architecture, but I find this video funny and interesting.

PS: Sorry but this post is not XHTML valid :( I haven’t managed to embed the object in a proper way. Does anyone have a suggestion of how to correct this?

Azure Pricing Revealed

Today, at PDC, Microsoft announced the pricing for Windows Azure, SQL Services and .NET Services. The business model is the one described in the table below:

Windows Azure SQL Azure .NET Services
Compute: $0.12/hour Web Edition (up to 1 GB relational database): $9.99 Messages @ $0.15/100K message operations , including Service Bus messages and Access Control tokens
Storage: $0.15/GB stored Business Edition (up to 10 GB relational database): $99.99
Storage Transactions: $0.01/10K
Bandwidth across all three services will be charged at $0.10/GB in and $0.15/GB out

Windows Azure compute hours are charged only for when your application is deployed so while developing and testing your application you may want to remove the compute instances that are not being used to minimize compute hour billing. Windows Azure storage is metered in units of average daily amount of data stored (in GB) over a monthly period. Storage is also metered in terms of storage transactions used to add, update, read and delete storage data. These are billed at a rate of $0.01 for 10,000 (10k) transaction requests. Bandwidth is charged based on the total amount of data going in and out of the Windows Azure platform services via the internet in a given 30-day period.

Microsoft Partners receive an additional 5 percent promotional discount on Windows Azure compute, SQL Azure and .NET Services.

A more detailed description on the pricing model is available on the Windows Azure Blog.

Windows Mobile “Storage Card2″ Problem

If you have an Windows Mobile phone or PDA you might have had this problem. Sometimes the “\Storage Card” folder gets renamed to “\Storage Card2″. What are the consequences of this? Each file reference to the “\Storage Card” will not work; this includes the shortcuts from the start menu to applications installed on the SD card.

The big problem is that if you don’t notice the folder rename and soft reset the device it will create an empty “\Storage Card” folder that will be used as the storage card. However the old “\Storage Card2″ will still be there and you will not be able to delete the new “\Storage Card”. Also, applications from “\Storage Card2″ will not be launched from shortcuts.

After many ROMs updates I am not able to fix completely this problem but I figured out how to fix it without hard resetting the device. The new “\Storage Card” folder cannot be deleted but… it can be renamed. So all you have to do is to rename “\Storage Card” to something else like “\Storage Card3″ and reset the device. After this, “\Storage Card2″ will become “\Storage Card” and you are free to delete “\Storage Card3″.