
Back to Blog index.
The Finnish Tietoviikko weekly newspaper has a section about Windows 7 and one of the topics is the change that developers face when focusing on the new operating system. Tietoviikko chose to interview me and ask questions like, "What's new and significant for developers in Windows 7?" The title of the article is "Kehittäjä kiillottaa pintaa".
You can read the full text in the paper dated 28th August, 2009 or online on Tietoviikko's web pages.
The August issue of the Finnish Prosessori magazine includes my latest software development article about .NET development and more specifically .NET 4.0's new concurrency technologies Task Parallel Library (TPL) and Parallel LINQ (PLINQ). The article is titled "Parallel-kirjastoilla rinnakkaisuutta .NET-ohjelmointiin".
Enjoy, and remember let me know what you think!
If you are already using SQL Server 2008, you might be aware that one of the new interesting features is the support for spatial data and coordinates. More specifically, the database supports new data types called "geometry" and "geography", and you can also use these directly from C#. I've found that although the data types itself are nicely documented for instance on SQL Server Books Online (BOL) on MSDN, C# code examples are scarcely available.
Thus, I wanted to briefly share a simple code example on how to add a single geometry point to a SQL Server 2008 database table, which contains a field called "point1" defined as a "geometry" type. In this case, the code that you could use would be:
using Microsoft.SqlServer.Types;
...
int x = 12;
int y = 23;
SqlGeometry geom = SqlGeometry.Point(x, y, 0);
string sql = "INSERT INTO [mytable] " +
"([point1]) VALUES (@point1)";
SqlConnection conn = ...
SqlCommand cmd = new SqlCommand(sql, conn);
SqlParameter param = cmd.Parameters.
AddWithValue("@point1", geom);
param.UdtTypeName = "geometry";
conn.Open();
int rows = cmd.ExecuteNonQuery();
I'm presently preparing a longer article on the topic for Developer.com, so stay tuned. The article should be published around late September/early October.
In SQL Server databases, the database owner, or dbo has special rights to the particular database. Sometimes however, it is necessary to change the database owner due to security rights, administrative convenience, and so on.
Although it is easy to view the owner of the database (for example through SQL Server Management Studio, from the properties window of a database), it is not immediately apparent how to change that value.
Luckily, SQL Server provides an easy stored procedure that you can use. This procedure is called sp_changedbowner, and works at least from SQL Server 2000 SP3 onwards. Using the procedure is very easy. For example, say you have Windows Active Directory domain "COMP" and user "Joe" whom you would like to assign as the new database owner. You would then execute following command in the context of the database in question:
EXEC sp_changedbowner 'COMP\Joe'
Of course, you must have the appropriate rights to change the owner. Also note that from SQL Server 2005 and 2008 and onwards, you should consider using the ALTER AUTHORIZATION command instead. The sp_changedbowner procedure will be deprecated in future versions of SQL Server.
Keywords: HowTo
Microsoft has just recently announced the availablity of Exchange Server 2010 Beta 1, which is now publicly available. The product itself should be ready in second half of 2009, meaning probably something around October-November timeframe (my wild guess).
The beta itself is available here.
Also, Windows Server 2008 R2 is now available on MSDN, so make sure you get the bits flowing. And as an additional bonus for today, there's now the final version of the Windows 7 Training Kit For Developers available.
Are you interested in developing applications for High Performance Computing (HPC) or clusters? If so, then you might be interested in Microsoft's Dryad. Dryad is "an infrastructure which allows a programmer to use the resources of a computer cluster or a data center for running data-parallel programs."
Sounds cool! Though I confess I don't have a computing clusted back home with which I could test this new technology, I'm sure the lessons learned with clusters will later on drop in the .NET Framework. It's easy to see that the number of cores in processors is getting up quickly (Intel's six-core processors (with Hyper Threading) will be here in early 2010), so in ten years you might have a nifty little cluster working inside every computer.
It's about time we're finding solutions to make programming easier.
If you are interested in attending Microsoft's developer related events in the future, then here's a list of forthcoming events in the U.S.
PDC, or Professional Developer Conference is the big and beautiful, solely developer-focused event. It is to be held Nov. 16 to 19 in Los Angeles. As you might know, PDC is only held if there is "enough" new technology content to show.
Of course in addition to PDC, there is TechEd. TechEd 2010 will be held in New Orleans from June 7 to 11, 2010.
And third, there's Microsoft Mix. This event is for designers and web developers interested especially in ASP.NET and Expression products. Mix 2010 will be held in Las Vegas on March 15 to 17, 2010. If I'm not mistaken, Mandalay Bay should be the hotel.
The Finnish Tietokone magazine has published my latest software article, titled "Digitähdet loistavat pilvisenäkin yönä". The article talks about different astronomical software and web sites, such as WorldWide Telescope.
Enjoy!
Recently, I've received many questions regarding MSDN DevLabs' recent addition, Code Contracts. The two most common questions were, do I need to install the DevLabs setup package for Visual Studio 2010 Beta 1 (#1), and secondly, why cannot I see the results of the static analysis anywhere (#2).
Herewith quick answers to these questions. #1: Yes, you need to install the package. You can use the Contract class(es) without the installation in Visual Studio 2010, but the static analysis and project settings won't be available then. #2: The static analysis appear on the Error List window in Visual Studio IDE. But, they are created using an asynchronous process, which is launched after the C# compiler. Because of the asynchronous nature, the results cannot immediately be seen; you might need to wait more than a minute to see them. Be patient.
Presently, I'm also working on a longer article on the topic, so stay tuned!
Today, computers are such a commodity that most users don't know much about the specifics of their desktop and laptop computers. Any why should they? Even the cheapest PCs today can run almost any business desktop application with ease, excluding maybe those high-end design and graphics software.
However, solving application problems often requires knowledge of the hardware, software and configuration done to the particular computer. Traditionally, this information has been asked directly from the user, but more often than not, the answer is: "I'm not sure".
Luckily, the built-in tools in the operating system are getting better, and I've earlier talked about Windows System Information utility called MSINFO32.EXE, often residing on the path "C:\Program Files\Common Files\Microsoft Shared\MSInfo\msinfo32.exe". This tool can be run by the user, and the results can be exported to a file and shipped to the developer/support person.
However, the information provided by this tool, although useful, is not always enough. Because of this, Microsoft has come up with a new utility, part of the Microsoft Fix It web site. This utility, officially called "Microsoft Product Support Reports" collects tons of information from the remote system, and thus can be very useful in solving customer problems. The tool can be run without installation, but the problem is that administrative rights are required. Also, depending on the amount of information selected to be collected, the tool runs for a good three to six minutes.
Even so, the tool is invaluable, and hasn't been available for long. You can download it here. Separate versions are provided for 32-bit and 64-bit systems.
Remember also, that Windows 7 will also contain new tools. My favorite is the Problem Steps Recorder tool or PSR.EXE. This tool can be used to show to the developer/support person how the application is actually being used before the error occurred.
There it is now: Windows 7 RTM on MSDN. At least initially, the site appears responsive, so just maybe, I might be able to download my copy this evening.
Meanwhile, be sure to download your copy while the bandwidth lasts. :-)
Edit: Windows Server 2008 R2 RTM will follow soon.
Programming for concurrency and parallel applications is hard. Of course, this is partially because of the right tools, but nonetheless having the correct mindset to develop applications for the latest multi-core processors will continue to require extensive effort for at least five to ten year.
Now, one of the biggest potential helpers to aid developers in writing concurrent applications is transactional memory http://en.wikipedia.org/wiki/Transactional_memory. If you've worked with almost any SQL databases, you are surely familiar with transactions. The basic idea of transactional memory is the same: you define which operations should be atomic, and the runtime (etc.) handles the rest.
For C# and .NET developers, there's now something new and interesting. Called STM.NET, all C# coders can use this new preview library and set of tools to investigate the promise of transactional memory. This package can be thought as of being an add-on to the current .NET 4.0 Beta 1. Says the STM.NET documentation:
"Transactional memory is considered a promising technology by the academic community and is repeatedly brought up as a welcome technology for the upcoming wave of applications which scale on modern multi-core hardware."
If this sounds interesting to you, be sure and go download the package today. It's available on MSDN DevLabs. Other interesting cookings at the DevLabs currently include Code Contracts (stay tuned for an intro later) and Axum, which is related to STM.NET.
Hello August! If you are interested in writing software for the Windows Mobile platform (WM, available on both smartphones and PDAs), then you have probably already heard of convenient software emulators that come with Visual Studio and/or the Windows Mobile development kits.
These emulators allow you to test your applications using a piece of software that works and feels like a real phone. However, many phone applications are related to real phone calls, SMS messages and so on, and thus will not work as expected on the plain emulator.
The good news is that I said "plain". Microsoft also provides another emulator called the Cellular Emulator, which can emulate a GSM/GPRS and/or UMTS network, and then the emulator can connect through it to a hard-coded set of phone numbers to make and receive calls and SMS messages and send data. All you need to do is fire up the Cellular Emulator, notice the used COM port on the left-bottom corner, configure the same port to the phone emulator, soft-reset the emulator, and then you will get a network like you were using a real phone (except you cannot make real phone calls, of course).
Of course, even with the Cellular Emulator in place, an emulator is still just an emulator. Real and final application testing should be done with real phones, but especially with the Cellular Emulator, the Windows Mobile emulators are a great start.
› Blog Archive