09 Jan 2011
At work we are using Redmine with the repository references enabled. When adding special terms like refs #1234 or fixes #1234 to the commit message the commit is automatically assigned to ticket 1234 and shown with the ticket. Only commiting code that references a ticket is considered to be a best practice as all changes are documented with a ticket.
Read more
06 Jan 2011
While writing this post I noticed that I am just wrong with my assumptions on my GoGear device. Read on to learn why. I'll publish it anyway as the information should still be valid for older versions of GoGear.I've been looking for a way to enable the bookmarks feature for audio books for my
Philips GoGear SA1922. Unfortunately according to
this image, which is only displayed on the german site, it's not supported for this version though with the latest firmware there's a special menu option for audio books.
While experimenting I learned a few things along the way that are quite interesting. GoGear uses
Sqlite for managing all meta information of the audio files stored. I use
golb to transfer music from my Linux machine which does all the magic of extracting ID3 tags and inserting all data in the database. Normally you would use
golb -f _system/media/audio/MyDb
in the root folder of the mounted storage device to scan all files on the device and write it to the database _system/media/audio/MyDb.
If you want to see or manipulate the data you can use the sqlite client: In the same folder call
sqlite _system/media/audio/MyDb
. This will open a client console similar to mysql:
flo@hank:/media/PHILIPS$ sqlite _system/media/audio/MyDb
SQLite version 2.8.17
Enter ".help" for instructions
sqlite>
To see the schema information you can issue the .schema command, which display information on all the tables and its indexes:
sqlite> .schema
CREATE TABLE albumTable( iAlbumId INTEGER PRIMARY KEY, cAlbumTitle VARCHAR(100) );
CREATE TABLE artistTable( iArtistId INTEGER PRIMARY KEY, cArtistName VARCHAR(100) );
CREATE TABLE dirTable( iDirId INTEGER PRIMARY KEY, cDirName VARCHAR(260),iParentDirId INTEGER );
CREATE TABLE genreTable( iGenreId INTEGER PRIMARY KEY, cGenreName VARCHAR(50) );
CREATE TABLE playlistTable( iPlaylistId INTEGER PRIMARY KEY,cPlaylistName VARCHAR(100), cFileName VARCHAR(260),iDirId INTEGER );
CREATE TABLE playsongTable( iPlaysongId INTEGER PRIMARY KEY,iPlaylistId INTEGER, iOrderNr INTEGER,iSongId INTEGER );
CREATE TABLE songTable ( iSongId INTEGER PRIMARY KEY,cSongTitle VARCHAR(100),iArtistId INTEGER,iAlbumId INTEGER,iTrackNr INT8,iTrackLength INT16,iNrPlayed INT16,cFileName VARCHAR(260),iDirId INTEGER,iYear INT8,iGenreId INTEGER,iBitRate INTEGER,iSampleRate INTEGER,iFileSize INTEGER,iMediaType INTEGER );
CREATE INDEX album_cAlbumTitle ON albumTable (cAlbumTitle);
CREATE INDEX artist_cArtistName ON artistTable (cArtistName);
CREATE INDEX dir_cDirName ON dirTable (cDirName);
CREATE INDEX dir_iParentDirId ON dirTable (iParentDirId);
CREATE INDEX genre_cGenreName ON genreTable (cGenreName);
CREATE INDEX playlist_cPlaylistName ON playlistTable (cPlaylistName);
CREATE INDEX playsong_iOrderNr ON playsongTable (iOrderNr);
CREATE INDEX playsong_iPlaylistId ON playsongTable (iPlaylistId);
CREATE INDEX playsong_iSongId ON playsongTable (iSongId);
CREATE INDEX song_cFileName ON songTable (cFileName);
CREATE INDEX song_cSongTitle ON songTable (cSongTitle);
CREATE INDEX song_iAlbumId ON songTable (iAlbumId);
CREATE INDEX song_iArtistId ON songTable (iArtistId);
CREATE INDEX song_iDirId ON songTable (iDirId);
CREATE INDEX song_iGenre ON songTable (iGenreId);
CREATE INDEX song_iTrackNr ON songTable (iTrackNr);
To see some of the song information you can query the songTable:
sqlite> select * from songTable limit 3;
1|CRE041 Sprachen|1|1|0|4476|0|chaosradio_express_041.mp3|28|2007|1|128|44100|71709702|1
2|Java Posse #331 - Roundup '10 - Modules|2|2|331|3783|0|JavaPosse331.mp3|28|2010|2|96|44100|45460832|1
3|CRE080 Geschichte der Typographie|1|1|0|7947|0|chaosradio_express_080.mp3|28|2008|3|128|44100|127247455|1
You can use standard sql to update the information:
sqlite> update songTable set cSongTitle = "Sprachen - Chaos Radio Express 41" where iSongId = 1;
At this point I was about to hit the publish button for the post. Luckily I tried if the update happened at all. Turned on my device: Still the old title. Rebootet the device, deleted and recreated all indexes, inspected the Golb sourcecode, found nothing. After a while it struck me: I don't need golb for my GoGear version. This device seems to extract all information from the id3 tags directly, very likely during startup. Classic fail!
Read more
31 Dec 2010
As I'm walking to the office every day I've incorporated the habit of listening to podcasts on my way. I'd like to list some of them which might be of interest to other developers.
An almost legendary Java podcast. Interesting development news are discussed in short and sometimes in length.
Scott Hanselman is a .Net developer who also likes to see beyond his own nose. There are a lot of topics he discusses that are also relevant and interesting if you're not into Microsoft.
A sometimes weekly show where different people from the open source universe are interviewed. I only listen to some episodes that attract my attention but it's always enoyable.
The two hosts rant about everything Linux and open source. It's always a lot of fun but the episodes tend to get quite long for a weekly show.
Mainly an interview podcast on everything software development. A lot of high class guests have been featured so far.
Covers web development topics using different server side technologies, from ASP to Grails.
A company podcast with some development episodes and a lot of agile topics. I get the feeling that it's slowly dying as only few new episodes are produced.
The discontinued podcast of Jeff Atwood and Joel Spolsky. A lot of episodes are still worth listening to.
German Podcasts
Es gibt natürlich auch interessante deutsche Podcasts.
Manche Episoden sind ziemlich interessant und unterhaltsam, ich habe mich jedoch auch schon über manche Inhalte geärgert. Hängt glaube ich ein bisschen an den jeweiligen Hosts, ob es ein für mich interessantes Thema wird oder nicht.
Der Interview-Podcast des Chaos Computer Clubs. Es dreht sich nicht alles um IT, wer beispielsweise wissen will, wie das Universum aufgebaut ist oder einen Einblick in das Leben in der ehemaligen DDR haben will ist hier auch genau richtig.
Read more
21 Nov 2010
I just uploaded the slides and sample code for my talk about
Apache Solr at the
Java User Group Karlsruhe.
The sample consists of an example solr configuration and some scripts that can be used to index files in Solr. A simple Spring MVC app can be used to search the content. Go to
Github and grab the application as well as the
slides if you're interested.
Read more
07 Nov 2010
For several years I have been running a web site for
my father which contains some information about his work. It started out from html that was served statically, in the beginning of 2007 I migrated the content to
OpenCms. During this time I was very eager to learn everything that was related to building a web site from scratch, from the internal workings of OpenCms to Apache configuration and CSS and its peculiarities.
Not that any of these are areas that are not important to know as somebody who is doing web development professionally. But for spare-time projects you have to be careful that you do not run out of time, which is exactly what happened to me. Especially for the styling of the page I did not invest as much time as I would have needed. I started from plain html and did all of styling my myself. I read a lot about the box model and how to apply CSS correctly. Unfortunately only the basic structure was finished before I ran out of time so I published the page with nearly no styling for the content. And that's how it stayed for 3 1/2 years ...
Recently I invested some time in it again. I ported the layout to use the
YAML framework with its standard design and reorganized the structure of the content. Also, while at it, I updated from OpenCms 7.0.2 to OpenCms 7.5.2. In nearly no time the site was in a much better state than before without having to fight several browsers.
The main things I should have done from the beginning:
- Use a CSS framework or a ready made template unless you're willing to invest a lot of time
- Take extra care when structuring the content in OpenCms. Do not nest too deep if it's not necessary.
- Use a source code versioning system even if you're not planning to have a huge project
Things that worked well during the relaunch:
There's still a lot of work to do: Some pages still use tables for layouting which especially doesn't work well anymore when using yaml as it highlights cells when hovering. Also, I'm planning to add a contact form using Ruby on Rails. Of course this could be easily done using
Alkacon Webform but that's a good opportunity to learn a new technology.
At least SEO-wise the site seems to be OK: We are
beating the famous
singer as well as the
bavarian wheat beer company with the same name :)
Read more