09:33 PM
Ever since setting up our CruiseControl.NET server for our internal projects, I wanted to integrate a Gendarme run to catch all those nasty little things that slip through, like not checking arguments for null.
Now that I finally found some tuits to do it, the next problem became obvious: doing a quick commit often lead to a quick build fail. Gendarme would have no use if it didn’t find anything, no? So the missing piece was integration into Visual Studio. Arthur hacked together a little XSLT+PowerShell and voila, Gendarme now runs on every build right from the studio and populates the “Error List” window with properly linked entries. Yay!
Read on for the details of the implementation. The complete source is downloadable at the end of the article.
Read the rest of this entry »
Posted in CodeProject, Microsoft, Open Source, Tech | No Comments »
05:03 PM
All tests ok, but still a NUnit failure?
Seeing unexplicable “System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.” errors?
You might be a victim of nunit’s bug #423611.
See also here, here and here.
A typical error message looks like this:
Unhandled exceptions:
1) : System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
I’ve uploaded a minimal solution exhibiting the problem to the bugreport and I hope that’ll help clearing the issue up.
Posted in Open Source, StackOverflow, Tech | 1 Comment »
12:49 PM
Recently I’ve spent some time setting up a CruiseControl.NET instance for our internal projects. Using this project, we have an automatic and immediate feedback whether our checkins work without having to waste developer time waiting on the full unit test suite.
To improve response times of the server running CC.Net while integrating, I’ve applied the ProcessPriority patch from CCNET-504 and now run all processes at BelowNormal. Now there is no noticeable impact on other services on the server while a build is running. Since the patch didn’t apply cleanly to the newest CC.Net version, I updated the patch to current HEAD and posted it in the bugtracker. Thanks to Craig Sutherland the patch is now applied in the HEAD and will be released with 1.5. Having already wet my feet, I proposed a refactoring for the Tasks to move all common properties to the BaseExecutableTask class, thereby removing ~300 lines of code and unifying the diverse set of properties currently in the wild. This will have to wait for the next release in order to not interfere with a timely 1.5 release.
Currently CC.Net builds the projects from subversion, runs all unit tests with NUnit and checks code quality with Gendarme.
While integrating Gendarme in our build process, I found and reported two bugs in the rules, which triggered false positives on our code. Thanks to Sebastien Pouliot both appear to be already fixed and slated for release with the next Gendarme (2.8).
Posted in Business, Open Source, Tech | 2 Comments »
12:00 PM
After looking for quite a while (it is unbelievable, no?) I have to accept that Microsoft’s SQL Server 2000, 2005 and 2008 do not fully support IEEE-754 floating point numbers. Specifically NaN (Not-a-Number) and +/- Infinity are not allowed. While the 2000 Server seemingly allows such values to be inserted, but breaks badly afterwards, the newer versions disallow inserting such values. Here is the MS Connect article requesting the feature. There is also the documentation about float data and a read-between-the-lines hint in the documentation for XPath numbers. The article describing floats is very circumspect about this:
The behavior of float and real follows the IEEE 754 specification on approximate numeric data types.
[emphasis mine]
The XPath article states it clearly:
However, float(53) is not exactly IEEE 754. For example, neither NaN (Not-a-Number) nor infinity is used.
.
For completeness, here’s a little review about other DMBS’ support for NaNs and Infinity:
Posted in CodeProject, Microsoft, Open Source, SQL, Tech | No Comments »
09:40 AM
Thanks to Clifford, the videos from the Linuxwochenende are available now. Here’s the direct link to my german puppet talk.
Posted in Open Source, Puppet | No Comments »
02:56 PM
On Saturday the 24th, I’ll be holding a short talk about puppet at the Linuxwochenende (Linux-Weekend) in the Metalab, a hackerspace in Vienna, Austria. I’m looking forward to spreading “the message”
.
Posted in Open Source, Puppet | No Comments »
04:25 PM
After installing the Android 1.5r3 SDK and Eclipse 3.4 with the matching ADT plugin, I soon encountered this error message:
[2009-10-16 15:02:09 - ddms]Failed to reopen debug port for Selected Client to: 8700
[2009-10-16 15:02:09 - ddms]Address family not supported by protocol family: bind
java.net.SocketException: Address family not supported by protocol family: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at com.android.ddmlib.MonitorThread.reopenDebugSelectedPort(Unknown Source)
at com.android.ddmlib.MonitorThread.run(Unknown Source)
[2009-10-16 16:29:40 - ddms]Can't bind to local 8600 for debugger
[2009-10-16 16:30:14 - ddms]Can't bind to local 8601 for debugger
[2009-10-16 16:30:14 - ddms]Can't bind to local 8602 for debugger
[2009-10-16 16:30:15 - ddms]Can't bind to local 8603 for debugger
[2009-10-16 16:30:25 - ddms]Can't bind to local 8602 for debugger
[2009-10-16 16:30:25 - ddms]Can't bind to local 8606 for debugger
[2009-10-16 16:30:25 - ddms]Can't bind to local 8607 for debugger
[2009-10-16 16:30:25 - ddms]Can't bind to local 8610 for debugger
As it turns out, the debugger tries to connect to “localhost” which is resolved by Windows Vista via the Windows\System32\drivers\etc\hosts file, which contains the IPV6 address “::1″. Since Android’s IPv6 support is still under development, none of the development tools can cope with it, resulting in above error messages.
Substituting the IPv4 127.0.0.1 as localhost address made it work fine.
Posted in Android, CodeProject, Open Source, Tech | No Comments »
12:27 PM
Using == to compare floats and doubles is not only problematic when dealing with numerical precision, but also when dealing with NaNs: In C#, the equals-operator returns false when comparing NaNs. If NaNs shall compare equal (e.g. when suppressing PropertyChanged events, as I’m doing), use Double.CompareTo(double). The IComparable<> interface requires that A.CompareTo(A) always returns zero and therefore does correctly (for this case) work with NaNs and +/- infinity.
Posted in CodeProject, Tech | No Comments »
11:12 PM
Today I was cleaning out some old logical volumes. Since they resided on rented harddisks, I chose to overwrite them with zeroes to avoid leaving data tracks on someone else’s disks. The first thing that came to my mind was this:
dd if=/dev/zero of=/dev/vg/lv
Read the rest of this entry »
Posted in Benchmarking, CodeProject, Open Source, Tech | No Comments »
01:30 PM
Because it was so easy, here a little HOWTO describing the simplest OpenVPN setup: connect two servers with a virtual, encrypted ethernet cable:
/etc/openvpn/cable.conf:
local [IP1]
remote [IP2]
port 1194
proto udp
dev tap
secret cable.key
keepalive 10 120
comp-lzo
persist-key
persist-tun
status cable-status.log
verb 5
# openvpn –genkey –secret /etc/openvpn/cable.key
# /etc/init.d/openvpn start cable
Posted in Open Source, Tech | No Comments »