Romhack.Net, the alternative IT magazine

To content | To menu | To search

Category - Development

Entries feed

How to search Objects in SQL Server 2005/2008

SQLServer2008Logo Software evolves… new versions of major software are released once every few years, they contains improvements, bug fixes, but sometimes, some features disappear just like they appeared… without any seemingly valid reason…

So is the case, with the useful “Object search” feature, which was present in SQL Server 2000 Query Analyzer but somehow didn’t make its way into SQL Server 2005 and 2008’s Management Studio.

Continue reading...

Open-Sorcery: the default answer to a feature request is "no, do it yourself"

Open-Source Open-source is often acclaimed by its supporters for empowering the users using the products rather than big corporations only out for the money and leaving users with closed and static software. My point here is not to start another holy war about Open-Source vs Proprietary Software but to debunk some myths about open-source and how many of the advantages promoted by the open-source movement simply do not work as smoothly in the real world. In this article, we will see how getting a little and insignificant feature (like adding a command-line switch for an already existing feature available through the GUI) implemented in an open-source software often feels like an assault course, especially if your feature request happens to be rejected for a more or less acceptable reason: priorities, not useful to most people, laziness, or just because you can do it yourself, so doing so should you!

Continue reading...

C# generics vs. code analysis

A few days ago, I published an article on heterogeneous collections in C#, proposing various possibilities to solve this problem given a specific set of constraints. My final pick was using generics, the built-in template feature of C#. But what the story did not say is that this solution triggers a code analysis warning at compile-time...

Continue reading...

Heterogeneous collections in C#

During my previous software development project, I found that the handling of heterogeneous collections was one of the most interesting development problems. Because there are many possible solutions whose validity depends mostly on your more general problem, this issue is very representative of software design in general: making the best choices and finding the best compromise for a given set of constraints.

In this article, I will focus on a very specific problem: designing a C# interface for an easy read/write access to a list of settings. This list is not fixed and depends on the implementation class, but as part of a more general API, the interface must also be quite secure, especially in terms of type casting.

Continue reading...

Windows Vista and batch files: UAC changes the rules (Part 2 of 2)

In the previous entry of this series, we discussed about how Windows Vista forced a path change when running a batch file elevated with UAC enabled, which causes the current directory to be different from the batch file location, which creates some problems when running some external tools residing in the batch file directory. The solution I found was to change the current directory at the very start of the batch file execution using a simple sequence.

Continue reading...

Windows Vista and batch files: UAC changes the rules (Part 1 of 2)

Windows Vista… whenever I hear this name, the first I think about is the polemic and only then about the Operating System. Vista has been the target of many criticisms, some justified, some simple matters of personal taste, and some only created to put gasoline on the fire. As such, many IT professionals expressed a great dislike of UAC (User Account Control), one of the main new security features of Vista, especially because they felt it was getting in their ways too often and that they knew their job well enough to not be bugged by it. Even if they are of course able to disable it on the computers they use, they would still have to bear with it on the other computers of their networks or on their customer’s machines: they simply can’t disregard UAC’s existence and have to cope with it and make sure their software and products get along nicely with it.

Continue reading...

The case of the quirky memory violation crash

Some years ago, I wrote a small Win32 program in x86 assembly as I wanted it to be fast and very compact (but actually, more as a personal challenge than anything else). Explaining what this program does would take some time and is irrelevant to what I want to tell, so I will skip this part, but I may publish a new version along with the source code to it in the near future so I may have another opportunity to talk about it.

Anyway, I didn’t use this program for years but it was still used by a good number of people, and I never heard any mention of a bug. I also remember that it was tested with different input files when I was developing it. However, I found myself needing it again recently and found out was crashing on a input file somebody else created. Initially, I thought the input file was malformed or corrupted so I used a command-line C version of the same program I wrote and found out it was working as expected, so the file was not at cause.

Continue reading...