Tag Archives: Arbeit

A plea agains tofu

No, not the stuff made from soy beans. Tofu is the the german term for a behaviour most likely found in corporate email. It means “Quote full, add your text on the top”. That’s sort of reversed “AOL” behaviour.
When I started email, I came from a FIDO background (anyone remembers this? BBS and stuff?). Connection time was precious and expensive. Quoting rules existed like don’t quote too many levels, answer inline etc. When moving on to the internet, I mostly kept this.
I dropped writing emails like this like five years ago, when I entered the magical world of business emails. Noone understood inline replys and most people were complaining that the communication history was missing. So I adapted, at least at work. And Outlook 2007 even has support for navigating in mails like those. I also understand why a certain kind of people like it. When you print the mail, you only need to print one mail and have the whole conversation at hand.
But honestly. I’m doing a lot of mail on my mobile phone currently. Fetching mails is not too fast on there. I don’t want to download 200k for a simple “Me too”. I don’t want to scroll through all of the shit. I don’t event want to download the same shit again and again. I already have the communication history available.

Fake rpm database in ubuntu

At work I’m currently developing software which is supposed to run on openSUSE. I need to query the package database at some point which of course does not exist on my ubuntu machine. Here’s a quick setup how to create a fake local RPM database:

echo "%_dbpath /home/user/rpmdb" >> ~/.rpmmacros
mkdir /home/user/rpmdb
rpm -i --nodeps --justdb --force-debian *.rpm

And that’s it.

Using postfix and ActiveDirectory

Quick reference for using postfix as a “shield” server to Exchange to check valid mailboxes against ActiveDirectory (SBS edition):
create a LDAP configuration file:

server_host = ad-server.your.domain
search_base = ou=MyBusiness,dc=your,dc=domain
query_filter = (&(objectClass=*) (proxyAddresses=smtp:%s))
result_attribute = sAMAccountName
bind=yes
bind_dn = dn of user account
bind_pw = pw of user

Smart pointers…

Can someone explain me the following behaviour:
I have the following smart pointer:

class AlsaHwParams
{
public:
    AlsaHwParams() : m_params(0)
    { snd_pcm_hw_params_alloca (&m_params); }
    ~AlsaHwParams()
    { if (m_params != 0) snd_pcm_hw_params_free (m_params); }
    operator snd_pcm_hw_params_t*() { return m_params; }
private:
    snd_pcm_hw_params_t *m_params;
};

Thing is: It doesn’t work. Alsa behaves very strange if I use it. Even if I make the m_params member public and access it directly. The only way it works is to not allocate from inside the class but outside like

snd_pcm_hw_params_alloca (&(hwparams.m_params));

Update: Seems replacing _alloca with _malloc fixes it.
Update: Duh, that is because alloca allocates on stack and not on heap.