[85115 views]

[]

[toggle ads]

Odi's astoundingly incomplete notes

New Entries

Gentoo ACCEPT_LICENSE

Portage 2.1.7.16 is now stable. And with it comes a new feature: The ACCEPT_LICENSE variable (in /etc/make.conf). It allows you to disable packages based on their license. You may see that emerge would now unmerge some packages (Java for example) because the default filter is not blank. To allow all licenses simply set it to ACCEPT_LICENSE="*"
posted on 2010-01-27 18:10 CET in Code | 0 comments | permalink

Deutsches Gentoo Buch (PDF)

Soeben ist ein Buch über Gentoo frei im PDF Format erschienen.

Gunnar Wrobel
Gentoo Linux - Installation - Konfiguration - Administration
2008 Open Source Press

PDF Download


posted on 2010-01-22 10:03 CET in Code | 0 comments | permalink

Windows annoyances: unresponsive tasks

Usually I don't blog about Windows. But since I (have to) use it at work I am exposed to its flaws. Today I am particularly annoyed by the slowness of Eclipse, which is mainly caused by a lot of disk activity (due to a large number of large projects checked out) which is utterly slow on Windows (XP). Occasionally Eclipse would become unresponsive. What happens then is:
This all creates the impression that the OS has fallen victim to an application which has taken control over the UI outside of its window. And the IO scheduler has fallen victim to an application. Somehow I would expect the OS to be in control and not some application.


posted on 2010-01-15 10:10 CET in General | 2 comments | permalink
Use a Virtual Machine running Ubuntu (or some other distro). Simple.
Uhm... maybe I should really run Windows in a VM on top of Gentoo instead :-)

Routing through a parking

Google Maps has mapped an underground parking in Zurich and includes it into their routing data. This can lead to funny routes:


posted on 2010-01-14 12:36 CET in General | 0 comments | permalink

Don't use gdbm

GDBM is a tiny embedded database. Convenient as an internal data store for applications. However, as you can see from this Gentoo Bug, the database format is highly dependent on the architecture and even compiler flags. So it is far from portable. You can not necessarily exchange its files between platforms or different machines of the same platform running different OS versions. It may even break like in this case during a simple upgrade, when the configure flags change.

Having such an unstable database format is inherently bad architecture. I recommend not to use this library in any application. It will cause someone a bad day.

posted on 2010-01-05 10:58 CET in Code | 0 comments | permalink

No ext3 on Android?

It seems like the only filesystem supported on the HTC Hero's SD card is FAT. That is sad, since Linux supports no less than 40 filesystems. And the only option you have is the worst of them? Something is going terribly wrong at Google.

posted on 2009-12-11 09:39 CET in General | 2 comments | permalink
has it occurred to you that FAT is the only file system that works when you insert the SD card into a Mac or PC?

Gregor Rothfuss
Who cares if all I want is interop with a Linux system? Besides, there are drivers for the others. Even if I take the SD card and format it with ext2, the Android would reformat it with FAT. Again, something is going terribly wrong here.

Unexpected Date.before() / .after() performance impact

The java.util.Date class has two convenience methods before() and after(). If your application is very intensive on these Date operations, be careful of a performance bottleneck here!

Each call to before/after (and even getTime()) may have the cost of an internal object allocation. However not always. If you had called toString() on the instance before, then an object allocation will happen. Otherwise probably not.

To understand this we need to dive into the source code of Date. If you think about it, Date should be nothing more than a wrapper for a long variable holding a system timestamp. This variable is called fastTime. However the Date class has some deprecated methods that deal with a calendar date. These methods are from a time when original developers were confused about Date and Calendars, but have since been deprecated. But to support them Date still needs an internal Calendar instance of type sun.util.calendar.BaseCalendar.Date which is held in the variable cdate. Today this variable is usually null. That is as long as none of the deprecated interface has been used on the instance! Whenever it needs to convert the fastTime to a real date it will instantiate a BaseCalendar.Date in cdate. The problem is that toString() also performs a conversion to a real date. Too bad, toString() is very handy for logging. So any Date instance whose toString() method has been called once, will be slow and a memory waster.

The before/after methods are particularly bad because they will clone the cdate object on each call! The getTime() method is not as bad, but may still allocate a GregorianCalendar object.

My advice is, to never use Date.toString(), or completely work with long timestamps directly.

The bug has been reported to Sun.


posted on 2009-12-07 10:01 CET in Code | 0 comments | permalink

Layer popups vs. Window popups

It has become very popular to use JavaScript to create modal dialogs and popups "in-page". That means they are overlayed over the content of the webapp window. Before this trend, the standard way to show a popup dialog was in a new window.

Anybody who implements JavaScript popup layers PLEASE make sure not to break the usability that a normal popup window has: If you opted to use the old-fashioned popup windows there is also stuff to care about: Choosing a popup window or an overlay is not just a question of fashion. There are also some technical reasons to prefer one or another.
posted on 2009-12-03 12:34 CET in Code | 0 comments | permalink

I hate Snap previews

You know, these litte annyoing pop-up previews, that some idiots of webmasters include in their websites. Luckily you can globally disable them, by clicking a link on the Snap website. See For the Visitors section in their FAQ.

posted on 2009-11-03 10:18 CET in General | 0 comments | permalink

Campaign for less configuration

I am currently cracking down on the amount of configuration of our product. Join the campaign and do the same for YOUR product: Lastly you can use conventions instead of parameters:
posted on 2009-10-29 10:55 CET in Code | 0 comments | permalink