Archiv der Kategorie ‘Information Technology‘

JetBrains released TeamCity 4.0

Samstag, den 6. Dezember 2008

JetBrains (the once who also developed the fabulous product ReSharper) released a new version of their distributed build management and continuous integration server. I have never had the possibility to test this integration server but it seems to me a fairly cool product. Especially the web interface is a lot more advanced than cruisecontrol.net.

The professional and opensource version is free of charge. Here is the licensing overview:

http://www.jetbrains.com/teamcity/buy/index.jsp

You can check out installation videos and live demos on this site:

http://www.jetbrains.com/teamcity/documentation/index.html

  • Fastest build feedback in the industry

    Adaptive tests re-ordering, on-the-fly test results reporting, configurable notifications, and even making build artifacts accessible before the build is ready — TeamCity keeps you in the know with the most recent build updates and intermediate results, and shows how well your changes integrate into the project sooner. Learn more about TeamCity Continuous Integration.

  • Faster builds, better scalability — with grid computing

    TeamCity: Build Grid Click to enlarge

    Distributed build management helps optimize your hardware resources utilization by parallelizing product builds within the build agents grid. With build chains support, you can even break down a single build procedure into several parts to run them on different build agents — both in sequence and in parallel — using the same set of sources in all of them. Learn about TeamCity Build Grid.

  • Clean and error-free code base

    TeamCity: Pre-tested Commit Click to enlarge

    TeamCity automates over 600 Java code inspections, code coverage and duplicates search — out of the box. It also builds, checks and runs automated tests on the server even before committing your changes — keeping your code base clean at all times. Learn more about Pre-tested Commit.

  • First-rate control over large-scale environments

    Administer your large-scale build infrastructure from a central Web 2.0 interface. Monitor your team performance and track responsibilities. Easily manage all your builds and hardware resources with detailed statistics and trends reports. Quickly add more build agents, when needed. Learn more about Build Management and Administration.

  • Easy setup and adoption

    TeamCity: Environments which TeamCity supoports Click to enlarge

    TeamCity is at home everywhere. It supports both Java and .NET development. Setup is quick and easy under any platform, and offers out of the box integration with the most popular IDEs, build tools, testing frameworks and version control systems. Installation is a breeze — only 3 minutes from free download to a fully deployed and functional server.

  • Extensibility

    TeamCity encourages improvements by providing Java API for all sorts of user modifications, from integration with other version control systems and build tools, to creating specific Web UI elements and custom reports. Learn more about developing TeamCity plugins.

http://www.jetbrains.com/teamcity/index.html

Linq to SQL is announced dead…

Mittwoch, den 3. Dezember 2008

Now it’s almost official:

[...]

We’re making significant investments in the Entity Framework such that as of .NET 4.0 the Entity Framework will be our recommended data access solution for LINQ to relational scenarios.  We are listening to customers regarding LINQ to SQL and will continue to evolve the product based on feedback we receive from the community as well.

Tim Mallalieu
Program Manager, LINQ to SQL and Entity Framework

http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx

ConfigurationSectionHandler the easy way

Montag, den 1. Dezember 2008

Have you ever had the need to develop your own configuration section handler for application configuration files (app.config) in C#. Everybody that has been doing this lately knows how tedious this can be. But there is a quick and easy way to implement simple configuration section handlers in C#. This post shows you how…

Sample

In the sample we are going to implement a simple configuration section handler which will input an enumeration and a simple string constant. I quickly define the interface:

 

1
2
3
4
5
6
7
public interface ITracelightConfigurationSectionHandler : 
IConfigurationSectionHandler
   {
      LanguageEnumeration Language { get; }
 
      string SomeInput { get; }
   }

And the enumeration. Now here comes the first trick into the play. We are going to define our enumeration as a DataContract with the DataContractAttribute from the System.Runtime.Serialization namespace. Every enumeration member that we want to be able to serialize must be marked with the EnumMemberAttribute. This allows us later to transparently deserialize the enumeration from the application configuration file.

1
2
3
4
5
6
7
8
9
using System.Runtime.Serialization;
 
[DataContract]
public enum LanguageEnumeration {
   [EnumMember]
   German,
   [EnumMember]
   English,
}

Next we need the concrete class which implements our configuration section handler interface. The class itself are we going to mark as DataContract with the DataContractAttribute. Important here is the Namspace property in the DataContractAttribute must be set to “” (see Line 7). In the Create Method from the IConfigurationSectionHandler interface we are going to use the DataContractSerializer and instantiate it with our concrete class (which implements the ITracelightConfigurationSectionHandler interface). In Line 19 we specify that we want to read the object out of the serializer and must also specify false as second parameter (this surpresses name checking while deserialization). Then we can read the properties out of the configSection instance. Set it on the properties on the instance and return a reference to ourself (this). And we are done!

You only have to remember to set the DataMemberAttribute on every property you want to serialize or deserialize. With the datamember property you can also define how the name looks like in the configuration. If you don’t define a name, the configuration file section must be exactly named as the property.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
...
    using System.Configuration;
    using System.Runtime.Serialization;
    using System.Xml;
...
 
[DataContract(Namespace = "")]
public class TracelightConfigurationSectionHandler :
ITracelightConfigurationSectionHandler
   {
         // From IConfigurationSectionHandler
         public object Create(object parent, object configContext, XmlNode section)
        {
            var xs = new DataContractSerializer(typeof(TracelightConfigurationSectionHandler ));
 
            XmlNodeReader xnr = new XmlNodeReader(section);
            try
            {
                var configSection = xs.ReadObject(xnr, false) as TracelightConfigurationSectionHandler;
 
                if (configSection != null)
                {
                    Language = configSection.Language;
                    SomeInput= configSection.SomeInput;
                }
 
                return this;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                Exception iex = ex.InnerException;
                while (iex != null)
                {
                    s += "; " + iex.Message;
                    iex = iex.InnerException;
                }
 
                throw new ConfigurationErrorsException(
                    "Unable to deserialize an object of type \'" + GetType().FullName +
                    "\' from  the <" + section.Name + "> configuration section: " +
                    s,
                    ex,
                    section);
            }
 
 
 
 
        }
 
        // Automatic property for the language
        [DataMember(Name = "language", Order = 1)]
        public LanguageEnumeration Language 
        {
            get; private set;
        }
 
        // Automatic property for the input, which can be omitted.
        [DataMember(Name = "input", Order = 2, IsRequired = false)]
        public string SomeInput
        {
            get; private set;
        }
 
   }

And how looks the App.config file?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="tracelightsection" type="Fully.Qualified.Namespace.TracelightConfigurationSectionHandler, MyAssemblyNameWithoutDllExtension"/>
  </configSections>
  <tracelightsection>
    <language>German</language>
    <input>SomeTextualInput</title>
  </tracelightsection>
</configuration>

And how can the data be read from the configuration file? That’s pretty easy…

var configSection = (ITracelightConfigurationSectionHandler)ConfigurationManager.GetSection("tracelightsection");

This works even with complex collections. All you need to now is how to handle the data with the DataContractSerializer. But this is fearly simple to learn.

Remarks:
When you see strange behaviour such as the data is not deserialized althoug set in the configuration file you need to specify the order property (especially if you are using non required properties or default values with EmitDefaultValue…).

Interesting thoughts about static methods on interfaces

Sonntag, den 30. November 2008

Jon Sket is arguing on his blog about having static methods in interfaces. I think his article is really good and worth reading. What do you think about this topic?

http://msmvps.com/blogs/jon_skeet/archive/2008/08/29/lessons-learned-from-protocol-buffers-part-4-static-interfaces.aspx

Really useless stuff you can do with G-Sensor

Freitag, den 28. November 2008

First of all I must say I’m watching a movie and at the same time I’m writing a blog post on my computer. I really miss my multi monitor environment I have at my office ;) Back to the topic…

I just stumbled over two really cool programs you can install on your windows mobile device with G-Sensor. The first application is BeMario. BeMario is a cool implementation of the lovely Super Mario Game we all played till we had wound fingers. So you might asking yourself what is new with this game? The cool thing is that Mario only jumps in this game if you jump with your phone in your hands (or shake it accordingly) ;)

bemario

http://forum.xda-developers.com/showthread.php?p=2934494

The second one is the old game called spin-the-bottle. This romantic game should not be played with your work colleagues ;) Every shake with your phone will make the bottle spin. Hopefully the bottle will point to a nice cute person standing in front of you ;)

 http://blog.lieberlieber.com/2008/11/13/warum-programmieren-und-trinken-so-gut-zusammen-passt/

WordPress now supports Google Gears

Dienstag, den 25. November 2008

I just recognized that my newest wordpress version that I have installed on my server supports the google gears local server. This allows me to download my most used parts of the blog software directly into the google gears local server. This server then serves as a communcation part between my real webserver and the locally cached files. The often used files will be directly loaded from local so I expect a huge performance improvement… I will keep you posted.

What is google gears?

http://gears.google.com/

Extension Methoden unter Compact Framework 2.0

Sonntag, den 23. November 2008

Interessanter Artikel:

http://www.simonrhart.com/2008/11/extension-method-support-in-compact.html

Have fun

Grippeindikator google

Mittwoch, den 12. November 2008

Meistens haben wir ja uns gewundert, was wohl google alles sinnvolles mit den Tonnenweise erhaltenen Nutzerdaten und Statistiken über uns anfangen… Naja google beantwortet eine dieser Fragen direkt. So fand google heraus, dass es einen direkten Zusammenhang mit der Anzahl der Suchanfragen und der Grippe gibt. Google visualisiert diese Daten unter:

We’ve found that certain search terms are good indicators of flu activity. Google Flu Trends uses aggregated Google search data to estimate flu activity in your state up to two weeks faster than traditional systems.

http://www.google.org/flutrends/

Flu

Vernichtende Aussage über Entwickler

Freitag, den 7. November 2008

Und leider könnte er recht haben…

http://blog.opennetcf.com/ctacke/PermaLink,guid,38c27aaf-38b7-4e48-8dac-929a523f9d25.aspx

Die Zukunft von C#

Donnerstag, den 6. November 2008

Ich muss sagen ich war immer etwas skeptisch über die Entwicklung von C# in Hinblick auf die Dynamic Language Runtime. Anders Hejlsberg zeigt aber gerade im Hinblick auf COM Interoperabilität und zum Beispiel die Integration von Javascript in C# Code die wirklichen Vorzüge der dynamischen Aspekte von C# 4.0. Ich kann nur sagen: That rocks!

Aber glatt umgehauen hat mich der Ausblick auf C# 5.0. Dort heisst das grosse Paradigma Compiler as a Service. Bis anhin war der C# Compiler in C++ geschrieben. Microsoft hat sich nun entschieden den Compiler völlig in Managed Code zu entwickeln. Dies bedeutet, dass es in Zukunft eine Compilerklasse geben wird, deren man zum Beispiel einfach C# Code als String übergeben kann der dann zur Laufzeit kompiliert und evaluiert wird. Anders zeigt dies mit einer ultimativen Konsolenapplikation in deren man Live Code eintippen kann der dann ausgeführt wird. So instanziert er Live direkt in der Konsole ein Windows Form und fügt Elemente drauf etc. Einfach krass!

Überzeugt euch selbst. Das Video ist etwas lang aber unglaublich spannend und gut erklärt:

http://channel9.msdn.com/pdc2008/TL16/

Wie wurden einige der Probleme gelöst

http://channel9.msdn.com/shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly/

und das Design Team…

http://channel9.msdn.com/posts/Charles/C-40-Meet-the-Design-Team/