December 27, 2009

Not much to report

As the title says. Not much has happened since the last posting. Christmas has been a bit stressful with several attempts of appropiate gift-finding and driving around followed by a quite nice Christmas Eve. On 25th I felt a bit sick followed by massive down-ness yesterday and a bit relief today. I hope the trend continues so that I'm healthy again soon.

December 20, 2009

Still choosing a project hoster and name

Some time ago I've been thinking about where to make my project from last semesters project work lecture pubicly available. I'm still undecided between Sourceforge and Google Code but I'm leaning towards Google Code because I have participated on both platforms and my impression is that Google Code is easier to set up and maintain for smaller projects. And I think that I don't need the more advanced management possibilities from Sourceforge. Furthermore my last impressions from it have been that it has a more complicated interface.

The next thing I have to think about is under what open source license I should put the work. I do want to put it available for anyone but still be credited and maybe receive changes or enhancements to the source.

And finally I still have no proper idea for a name of the whole package. What I can already put public is that it's a piece of code which takes a description of a file-format and generates Java-code which parses files in this format into a defined data structure. I'd like to have a name somehow pointing into that direction but that's not a must.

If you have an idea or suggestion you can leave me a comment :)

December 15, 2009

On Duct Tape Programmers

I just read the article from Joel Spolsky "The Duct Tape Programmer". I know, the article is already a bit dated but for some reason I didn't come to it earlier. I'd suggest to read the article before reading on here but for the curious ones: "duct tape programmers" are a type of software developers who don't care about mighty frameworks and nifty language features but just hack the code down and get it shipped.

I have to admit that initially my first reaction to that article was that it was complete nonsense and suggested plain crazy stuff. But then I reminded myself that it had been written by Joel Spolsky, a person with a lot of experience who usually writes quite clever and well thought out articles using his knowledge of software development as well as management.

So I reconsidered my initial judgment, read the article again (and even one time more) and tried to have a look at these statements from different angles.

From a modern point of view it looks quite disturbing if someone decides to just crunch code and forget about modularity, fancy stuff like inheritance or clever frameworks and even skip everything near the area of testing your code. It just seems insane to reinvent the wheel or cripple yourself and don't even check the sanity of the outcome. Like a lemming on its march to the cliff.

But then lets look at it from the markets view: customers don't always buy the best products. They buy the stuff which can fulfill their needs. They're willing to live with some rough edges and can also learn to live with restarting the application every now and then and that's why they often just buy the first thing that's available. And if this first thing is not YOURS but your competitors, you'll have a hard time to regain this marked advantage. So just get the damn thing to the customer as early as possible. For many businesses this is the key to keep them alive. And duct tape programmers are what you need to accomplish this as they don't waste much time with bringing in another framework and reworking lots of code but just use their brainpower to get the stuff done. And they're capable of doing it.

On the other side customers tend to get annoyed with your application if it's already out in the market for some time and there is still no update available to smoothen some of the little buggers. Customers are used to upgrade stuff these days every now and then. Now is the time for polishing a bit, take aside some resources, gather the complaints from the customers and do some analysis of the most critical usage scenarios for your application. Now fix the bugs and add tests. That's the time when your defensive developers are in demand. At this time you can invest a bit and solder out the holes and make it maintainable for others but the initial writer of the code. But don't forget to keep your product still up-to-date and a tad ahead of your opponents or you'll hear the roaring sound of them overtaking you on the market faster than you may expect.

I have to agree that this balance between innovation and stabilization is not that easy to find but it's essential to do so and satisfy your customers so you can keep your business running.

My personal conclusion on this topic is, that it's maybe a good thing to have developers of both camps. If you're under business constraints duct tape programmers help you to get the stuff out of the door, but to make it sustainable on the long run for the hard market you need defensive developers to keep the product stable and maintainable. But you also have to take care on this effort and don't spend too much resources on stabilizing or polishing and let your competitors whoosh past.

Still, one hard to tackle problem I can immediately think of is the everlasting conflict situation between the academic developers and the duct tape MacGyvers but that's a bit out of the scope for this posting :)

December 4, 2009

Pimp your Skype mood message

As I already mentioned last time when I did some digging in its internal database, Skype allows users to have rich-formatted mood messages. It's just not possible to create rich formatted messages with the Skype client alone.

Well, always shutting down Skype to just change the mood message to something fancy is a bit annoying, so I sat down a few minutes and with a bit cheating by using this site I created a HTML site where you can directly edit your Skype mood message and update it instantly.

Edit the Skype Mood Message using Rich Formatting (with examples) (Internet Explorer and Skype Client with Extension Manager required)

A bit technical background for the curious ones: this webpage communicates with your Skype client using the Skype4Com API. Skype provides APIs for various technologies (eg. Skype4Py) which allow some sort of "remote-controlling" of the Skype client. Skype4Com is an ActiveX-interface so this means it just runs on Windows but can be used by any technology which is able to access ActiveX. The webpage loads the ActiveX API, connects to your Skype client and requests some status information as well as the current mood message. You can then edit the message and with the click of a button the webpage sends the updated mood message to the Skype client.

December 3, 2009

Messing with the Skype 4.0 database

Beginning with version 4.0 Skype changed its internal database format to SQLite (at least the Windows-client, could not yet check other platforms). Besides from better performance it also allows now any curious person to dig a bit into the internals of the local Skype account.

At first, you need a SQLite client to connect to the database. SQLite Database Browser is a good choice for this purpose. Then you need to open the Skype database in it. Shut down Skype (you won't be able to open the file otherwise) and load the file main.db from your Documents and Settings\<User>\Application Data\Skype\<Skype-account> directory. You can browse around in the database structure, have a look into the tables contents and even use a SQL editor to query the database. That's what we're going to need.

Now the fun begins :) In the following statements replace the values in angle brackets eg. <skypeid> with the appropiate correct values. Let's assume, you want to display all messages you exchanged with someone. Beware, that this only works gets the messages you exchanged in a private chat with someone and does not work on chats with more than two participants (you included).

SELECT author, timestamp, body_xml 
FROM messages 
WHERE dialog_partner = '<skypename>'

Or you want to list all chats, where there have ever been more than you and your chat-partner. So to list all group-chats:

SELECT name, participants, posters, activemembers, last_change 
FROM chats
WHERE type = 4

You could also be interested in all previous topics which were set on your group chat:

SELECT chatname, timestamp, body_xml 
FROM messages
WHERE chatmsg_type = 5
AND chatname = <chatname> -- get names from the previous query

By now you should have recognized, that the timestamps and change-values are not really readable dates in the database. Don't worry, it's not encrypted. Its just stored as plain Unix timestamp values. You can easily convert it to a readable time and date using for example the online UNIX Timestamp To Standard Time Calculator

When we're already with timestamps, you maybe also want to know when someone has also been online the last time when you have been online as well:

SELECT skypename, given_displayname, lastonline_timestamp
FROM contacts

So far we have fetched some interesting information from the database. But now we want to leverage our l33tness a bit and modify our mood message in our profile to include some rich formatting:

UPDATE accounts
SET profile_timestamp = current_timestamp, rich_mood_text = 'I feel <b>bold</b> now.'
WHERE skypename = '<skypename>'

Don't forget to save your database afterwards! This statement updates the profile-timestamp with the current time and adds some rich formatting to our mood message. In this case there is some bold text inside. You can look up some more possibilities (like smileys, font coloring, etc.) directly in the Skype API Documentation (from). Additionally I've found out, that using hyperlinks with the <a>-tag works as well as modifying font-size with the size-attribute of the <font>-tag.

Update 2010-02-14: Meanwhile you can edit your mood-message more easily using my online Skype mood message editor.

You can also delete the chat-history of only certain skype-contacts using the following statement

DELETE FROM messages
WHERE skypename = '<skypename>'

Again, don't forget to save your changes afterwards.

Update 2010-10-29: Skype has dropped the support for "/htmlhistory" since Skype 4.0. An alternate way to get all the messages for a chat is:

SELECT timestamp, author, chatmsg_type, body_xml  
FROM messages 
WHERE chatname = '<chatname>' 
ORDER BY id ASC;

You can find out the name of a chat when you write the command "/showname" in its chat-window.

I'll continue to play around with the database and if I find more interesting stuff, I'll keep this posting updated. Or I'll write a new one depending on what I dig up :)