Sunday, May 31, 2009

for-i-repeat 1.1

for-i-repeat screenshot

I just uploaded a new version of for-i-repeat. The only major changes are:

Download for-i-repeat 1.1.

Technorati Tags: , , .

Saturday, April 11, 2009

Onebit: cool free icons

I just found this little gem in my newsfeeds: Onebit, a free set of 50 icons (48 by 48 pixels) from Icojoy. The reason I’m blogging about this is because I think it’s a great example of a modern icon set that is not glossy or shiny and still looks very cool.

Technorati Tags: , , .

Thursday, April 02, 2009

Twitter

I’ve been trying out Twitter for about a week now. I’m still a bit skeptical about it, but I can see at least 1 advantage: there’s a very close contact between followers and followees. It’s a lot easier to write a quick tweet to someone than it is to comment on their blog. There’s a very convenient bi-directional communication. The 140 character limit is something to get used to, but it also makes you think about what you write. I do like the conventions of replying to someone or mentioning someone via @, or referencing an event via #.

My twitter address: @tommycarlier.

Technorati Tags: .

Friday, March 13, 2009

Launch of new Transceiver website

I haven't had time to write about this yet, but last week our company launched the new website of our flagship technology: Transceiver. We rewrote the website from scratch, making sure it's fast, accessible and tight. We kept the visual style of the old site, but tweaked it a bit. No more Flash, no more frames, clean XHTML, clean CSS, clean URLs, …

Transceiver is a technology we've been working on for a few years now that enables users to send and receive files in a very secure and private way. The core functionality is file delivery, but Transceiver also contains additional functionality, like digital signing of files, automation of processes, …

If you're interested, or you want more details, just visit the new website, check out the Transceiver products (Transceiver Communicator, Transceiver Automator, Transceiver Server), maybe subscribe to the news feed. If you need more info, or you have questions or suggestions, just use our contact form.

Sunday, February 15, 2009

for-i-repeat

for-i-repeat screenshot

Update 2009-05-31: New version 1.1.

I just finished developing a small tool called for-i-repeat that can duplicate a text-fragment a number of times using a counter. The reason I needed this is for the following scenario: at work we have a machine that has 50 databases that all have the same schema, but different data. If I want to modify the schema of all 50 databases, I create a SQL script that applies the modifications to 1 database, put USE Database01 in front of it, and run it 50 times, each time modifying the USE-statement with the next database number. for-i-repeat allows me to convert this input:

USE Database{0:00}
ALTER TABLE ...

into this output:

USE Database01
ALTER TABLE ...
USE Database02
ALTER TABLE ...
USE Database03
ALTER TABLE ...
...
USE Database50
ALTER TABLE ...

A real time-saver! To format the counter {0}, you can use the full range of .NET numeric formatting options, including hexadecimal formatting ({0:X}).

You can download for-i-repeat here.

Technorati Tags: , , .

Sunday, January 11, 2009

Visual Dooby 0.1

I just uploaded an initial version of Visual Dooby, a portable lightweight database client.

This initial release is quite limited. You can currently only connect to a SQL Server database, the database browser only displays tables, views and columns, and you can save the results of a query to an XML-file.

Some nice features are the advanced customizations when saving to XML, the visualization of data types in the result grid and the grid row numbering.

You can download it from this page.

Donate: USDEURGBPAUDCAD.

Tuesday, December 09, 2008

.NET BCL proposition: read-only collection interfaces

As a result of this thread on Channel 9, here's a proposition for a simple enhancement of the .NET BCL, related to collections.

If a class wants to expose a collection of items, the best thing to do is expose the collection as an abstract interface, so the internal class that is used can be changed without changing the API. If you want to expose a read-only collection, the options you have are IEnumerable<T>, ICollection<T> or IList<T>. IEnumerable<T> represents a read-only collection that can be enumerated, but you can't ask it how much elements it has. ICollection<T> and IList<T> represent collections that could be read-only, but this can only be checked at runtime and not defined at compile-time.

My proposition is to add 2 additional interfaces IReadOnlyCollection<T> and IReadOnlyList<T> that contain a subset of the members of ICollection<T> and IList<T> that can be performed on read-only collections. ICollection<T> could then implement IReadOnlyCollection<T> and IList<T> could implement IReadOnlyList<T> (and also ICollection<T>, like it does now). Adding these interfaces would not break existing code, they would be fully backward compatible and would not even require changes to the classes that implement ICollection<T> and IList<T>: they would automatically also implement the new interfaces (because ICollection<T> and IList<T> implement IReadOnlyCollection<T> and IReadOnlyList<T>).

The names of the new interfaces could also be ICollectionReader<T> and IListReader<T> or something similar. Here's how the interface hierarchy would look:

public class IEnumerable<T> : IEnumerable
{
    IEnumerator<T> GetEnumerator();
}

public class IReadOnlyCollection<T> : IEnumerable<T>
{
    int Count { get; }
    bool Contains(T item);
    void CopyTo(T[] array, int arrayIndex);
}

public class IReadOnlyList<T> : IReadOnlyCollection<T>
{
    T this[int index] { get; }
    int IndexOf(T item);
}

public class ICollection<T> : IReadOnlyCollection<T>
{
    void Clear();
    void Add(T item);
    bool Remove(T item);
    bool IsReadOnly { get; }
}

public class IList<T> : ICollection<T>, IReadOnlyList<T>
{
    T this[int index] { get; set; }
    void Insert(int index, T item);
    void RemoveAt(int index);
}

Extending this to dictionaries:

public class IReadOnlyDictionary<TKey, TValue>
     : IReadOnlyCollection<KeyValuePair<TKey, TValue>>
{
    TValue this[TKey key] { get; }
    bool TryGetValue(TKey key, out TValue value);
    bool ContainsKey(TKey key);
    ICollection<TKey> Keys { get; }
    ICollection<TValue> Values { get; }
}

public class IDictionary<TKey, TValue>
     : ICollection<KeyValuePair<TKey, TValue>>, IReadOnlyDictionary<TKey, TValue>
{
    TValue this[TKey key] { get; set; }
    void Add(TKey key, TValue value);
    bool Remove(TKey key);
}
Technorati Tags: , , , .