Filed under Philtrat, Zwarwald & no comments & no trackbacks
One thing I’ve learned is, that one of the hardest things to create are examples. Most people do not use examples as what they are, they use it as templates. So examples have side-effects. You write an example to demonstrate how a certain component works or should be used, but you did not follow the coding style of your organization unit. Developers then going to copy your stuff and bang, your errors are repeated again and again. Or, just do it like Yahoo: add a small piece of PHP for demonstration purposes and introduce a huge security problem. Here it is. Lucky for them, they seem not to use the same code in their live example.
Filed under Development, PHP, Security, Yahoo, YUI & one comment & no trackbacks
Gegen so eine Scheiße ist Rosenzüchten geradezu ein Akt der Auflehnung an sich.
Filed under Stasi 2.0 & five comments & no trackbacks
It’s not that fast because of extensive JavaScript usage, but it is exactly the thing I want. I have asked myself many times, why we developers do not use the current state of web technology for our own tools. Try it!
Filed under MySQL, PHP, phpMyAdmin, TurboDbAdmin & no comments & no trackbacks
I like to have a procmail logfile to find possible bugs in my ~1000 lines of mail filter rules. But if you get around thousand mails a day, the logfile size becomes bigger and bigger. And I always forget to remove that logfile. So I decided to let procmail do that job. I want to have a logfile structure logs/procmail/$YEAR/$MONTH/$DAY.log and I want the logfiles to be compressed daily and I want them to be kept for one month. This is how it looks like:
PATH="/bin:/usr/bin:/usr/local/bin:/usr/sbin:$HOME/bin" MONTH=`date +%m` YEAR=`date +%Y` DAY=`date +%d` YESTERDAY=`echo $DAY-1|bc -l` LAST_MONTH=`echo $MONTH-1|bc -l LAST_MONTH=`test $LAST_MONTH -eq 0 && echo 12 || echo $LAST_MONTH` RM_RESULT=`test -d "$HOME/log/procmail/$YEAR/$LAST_MONTH" && rm -rf "$HOME/log/procmail/$YEAR/$LAST_MONTH"` MKDIR_RESULT=`mkdir -p $HOME/log/procmail/$YEAR/$MONTH` BZIP_RESULT=`test -f "$HOME/log/procmail/$YEAR/$MONTH/$YESTERDAY.log" && bzip2 "$HOME/log/procmail/$YEAR/$MONTH/$YESTERDAY.log"` LOGFILE="$HOME/log/procmail/$YEAR/$MONTH/$DAY.log"
Yes, I know, I could do this in a cron. But it was funny to do it in the procmailrc.
Filed under Logging, procmail & no comments & no trackbacks
It is pretty interesting to see how people release the actual tarballs of there free software. Some include there version controll systems metadata (I’ve once saw a release which was obviously done from the home-directory and therefore include a few private dot-dirs) and some also change tarballs silently. When you create packages for a distribution, such habits are pretty annoying and sometimes it is not possible to create sensible packages or build instructions from the official tarballs and therefore you have to recreate your custom tarball.
make clean before you release or provide a whitelist of files which should be included in a tarball. Oh, and do not release binaries, I will rebuild them anyway, because I have my own toolchain, thanks. In case of web development, please add a clean config-file, I do not need to know your weak database root password. Also please remove your version controll system files./test.c is wrong /mypackage/test.c is much better. Best is to include the version number in the subfolder too (/mypackage-0.2/test.c). Otherwise you will flood my filesystem, and you are not supposed to do.Filed under Free Software, Open Source, Release & no comments & no trackbacks
Mixins is a known multiple inheritance concept from languages like Python or Ruby or (but in a different way in JavaScript). In Ruby you can include another class definition, in Python you extend from multiple classes and in JavaScript you use prototype to copy methods from one class to another. In PHP there is no default strategy how to reach that, but nevertheless multiple inheritance leads often to the advanced usage of the mudclump pattern, sometimes it is practically. Think on PHPUnit and its assert*()-methods. They are defined in PHPUnit_Framework_Assert. PHPUnit_Framework_TestCase is derived from the last but it would be much nicer to have the possibility here to mixin my custom assertions. For example I have a custom assertion to ensure a certain object implements a valid singleton. Currently I need to patch PHPUnit, but why should I need to?
I am currently working on a half-automized storage component, which provides helper functions for database queries (auto-generate a WHERE-clause from a filter object, create a field list out of a dependency list and stuff like that). I do not want to pollute my class hierarchy but I want to have them pluggable and I want my collegues to add their own. So here is my naive approach (only works for methods).
Filed under JavaScript, Mixins, PHP, Python, Ruby & three comments & no trackbacks
»A shard is a piece of broken ceramic, glass, rock (or some other hard material) and is often sharp and dangerous. Sharding is the act of creating shards. Somehow, somewhere somebody decided that what they were doing was so cool that they had to make up a new term for what people have been doing for many many years. It is partitioning… sometimes that partitioning is proper federation. You don’t need a cool name to effectively accomplish what’s been around for a long time. Moreso, you don’t need a name that implies you broke something irreparably.«
Partitioning vs. Federation vs. Sharding – Theo Schlossnagle
(Sharding is an architectural strategy to horizontally split large datasets into smaller pieces in order to guarantee scalability)
Filed under Federation, Partitioning, Sharding & four comments & no trackbacks
Zwei lesenswerte Beiträge zur Stasi 2.0 Eierei: Editorial der Bahamas 53 und Daniel Kulla in der Jungle World.
(In beiden Fällen via Classless Kulla)
Filed under Schäuble, Staat, Stasi 2.0, Volk & no comments & no trackbacks
Lisa und ich hausen nun in der Nießenstraße 36 in 51103 Köln. Einweihungsparty findet statt am 8. September, also nächsten Samstag.
Salz und Brot haben wir selbst, auf Salzteigtürschilder stehen wir nicht so, freuen uns aber über diese Geschenke.
Filed under Me, Wohnung & five comments & no trackbacks