Swapping values in MySQL without violating constraints

I’ve learned something new! I am synchronizing lots of data coming in XML containers into a MySQL database. Some child nodes of that XML miss identifiers which could be used to update the table and hence I was just truncating the table and re-inserting those values (many to many relation, no id). But since this is a live-used database this lead to the problem that stuff disappeared while using it.

Continue Reading

Contao does not support prepared statements

Due to the naming of methods in Contao’s Database Layer one might get the impression that you might use prepared statements in Contao. Sadly that is not true. The goal of prepared statements is that the Database‘ query compiler does not need to run over and over again for the same query. Due to the method names „prepare“ and „execute“ I assumed (as a bug report shows, other people did as well) that Contao would offer prepared statements.
Continue Reading

rfc 5321 – prework for my policy daemon

In my last two articles My first Java Application (apache commons cli) #1 and Server / Thread (threading & connection handling) #2, I’ve started to write a Policy-Daemon for Postfix. In this article I’m stumbling through postfix documentation and the RFC to create a flowchart and a state diagram for my before-queue-filter. Hence I call that „pre“-work.

Continue Reading

My first Java Application (apache commons cli) #1

Recently I’ve started to write my first Java-Application. I’m developing a before-queue-policy filter for Postfix (aka smtpd-proxy) which allows to filter whole mails before they’re stored in postfix‘ queue. I’ll document my process of learning Java and writing that policy daemon here 🙂 Alright, I have to admit that I already have some experience with Java and due to my programming background the syntax isn’t very difficult to me. Also some friends are helping sometimes (thanks to Till, Stefan and Sven).

Continue Reading

Intellij Idea

Today my license key for Intellij Idea arrived; first time I bought something commercial (except for games) in the past years. I did start webdevelopment with some WYSIWYG editors in windows, back when I was 11 up to 14. Due to all the problems that caused (not w3c conform, having to add hacks for several browsers, precise work was impossible, those editors created table based layouts, etc) and me learning PHP I started to use simple editors with syntax highlighting. When I switched completly to Linux (14 years now linux only) I was using bluefish and vim to do webdevelopment. I think one or two years ago, Till was showing me eclipse, my first IDE – I’ve been pretty impressed because he was hacking down a simple CRUD application within less than 5 minutes and eclipse was doing a lot of stuff automatically, so I switched to eclipse. But…
Continue Reading