Skip to content
accelerando

Tag Archives: Rants

Wütend

25-Feb-09

Oh man, ich bin so verdammt wütend, ein Tweet reicht nicht aus.

Es ist so zum kotzen, dass es Programmiersprachen wie PHP den Leuten so leicht machen, hübsche Sachen zu programmieren, die auseinander fallen, wenn man sie mal schief anschaut.

“Hübsche Gui” und “Ich weiß, was ich da gerade in die Datenbank schreibe” sind zwei Paar Schuhe.

Wie kann man eigentlich eine Checksum Routine so implementieren, dass sie auf unterschiedlichen Architekturen unterschiedliche Ergebnisse liefert? Braucht es da mehr als einen mittelmässig begabten Affen, zu erkennen, dass das eine scheiß Idee ist? Und noch spannender ist es natürlich dann, diese Funktion auch zu nutzen.

Boah echt ey.

Leute, lasst die Finger von PHPs crc32() Implementierung oder benutzt sie richtig.

Frustration

25-Feb-09

if you want something done right, do it yourself

If you happen to use the mint tracking tool like me, be careful when migrating from a 32bit to a 64bit server or vice versa. Mint saves ip addresses and a buttload of checksums as signed long values. That bites you right in the ass when the first visitors starts arriving at your site. All from 127.255.255.255, or at last visitors with an ip starting with > 127.

If you read this post before migrating, just add the following to your migration:

ALTER TABLE mint_visit 
  MODIFY COLUMN `ip_long` BIGINT NOT NULL,
  MODIFY COLUMN `referer_checksum` BIGINT NOT NULL,
  MODIFY COLUMN `domain_checksum` BIGINT NOT NULL,
  MODIFY COLUMN `resource_checksum` BIGINT NOT NULL,
  MODIFY COLUMN `session_checksum` BIGINT NOT NULL;
 
ALTER TABLE mint_debugger   
  MODIFY COLUMN `ip_long` BIGINT NOT NULL;
 
ALTER TABLE mint_geo  
  MODIFY COLUMN `ip` BIGINT NOT NULL;
 
ALTER TABLE mint_hostnames  
  MODIFY COLUMN `ip_long` BIGINT NOT NULL;

and you’re done.

If it’s too late, change your tables as well. You then also have to delete your entire mint_visit data, as the records are already corrupted. Great fail.

However, why on earth store an ip address as a long value?!? It’s an ip address and if i want to look at it, the program needs to go the other way round. To me: It’s just stupid fucking with datatypes and problems as that is what you get if you do so. It maybe makes sense for computation of networks, but not for a statistic tool. At least, i don’t see any sense in this.

Actually, the problem is known.

Comments are evil?

23-Feb-09

What can cause this snippet to fail:

<% if !@day.user.is_rateable?  # Workaround für Darstellungsfehler mit Tabellen ohne Bodies im Safari  %>
<!-- blah -->
<% end %>

This little snippet fell apart today. I don’t know if it is passenger, a newer ruby version, RubyInline. All i know is that i am so totally pissed of this incredible amount of incompatible versions of just 3 modules that i literally feel like puking. What a hell of a day.

By the way, the thing that broke was the one-line comment right after the if.

Tired of all the powerpoint presentations…

23-Apr-08

Right now i’m in Wiesbaden, attending the JAX 2008 conference.

The mood is somewhat different compared to the DOAG i used to visit the last years. The people are more open minded, partially much younger and generally try to be much cooler. And for the sake of it, some are even more interesting and after all, there isn’t that ongoing whining about Oracle not engaging in Forms 6i Client Server any more (although, i must admit, i somewhat like Oracle Forms 6i, maybe it’s a love/hate relationship, trust me, i know both worlds, Java and Forms).

The sessions suffer from one big problem: Many of them just seem to play powerpoint karaoke: Throw in a bunch of crappy slides with a handfull code snippets and sing-a-long to that stuff which means basically: Hind behind the slides.

Let me tell you: This is so boring and pointless. In the past i tried to be polite and always stayed to the end of a session but the last 2 or 3 conferences i can’t stand it any more. I can read myself, thanks. If you haven’t got anything additionally to say, just pass me the slide and i’m fine.

The 3 most interesting sessions where the sessions spoken freely with the slides just illustrating the speech. I especially liked Brian Chans presentation of Liferay Portal, Rod Johnsons keynote on the future of J2EE and the most witty one, Ted Newards talk about the renaissance of languages. It was funny, included the audience, was well prepared and freely hold, not to forget the topic: It wasn’t about the nth framework around the corner but about the nearly philosophy topic about the “perfect programming language”.

I really wish that i’d be creative and intelligent enough to design a language that is not predestined to die an early death, but i ain’t. But i can distinguish a sharp tool from a spoon if i see one and i can adopt to it very easily. And in that sense i share Teds opinion that a discussion about abstracting things and about the tool itself is of much more value than implementing some arbitrary pattern (i.e. one be the GOF) in just another framework. For example, many implementations of some patterns in frameworks have been rendered obsolete by more powerful and more expressive languages and i’d like to see this trend go on.

Beyond all evil: Javas definition of an object

09-Apr-08

Some days i ago, i decided to revamp my ambitions to get the scjp thingy done. What exactly for, i don’t know. But working to the self tests, i found the following:

class Ring {
  final static int x2 = 7;
  final static Integer x4 = 8;
  public static void main(String[] args) {
    Integer x1 = 5;
    String s = "a";
    if(x1 < 9) s += "b";
    switch(x1) {
      case 5: s += "c";
      case x2: s += "d";
      case x4: s += "e";
    }
    System.out.println(s);
  }
}

Questions is: Some arbitrary output or a compilation error and if, on which line.

Answer: Compilation fails due an error on line 11. What the frag? The obviously totally retarded switch statement can only handle constant values in its branches. So what? x4 is declared final static, as constant as it can be in Java. But no… Because its a big difference between int and Integer and due to the auto boxing and unboxing in Java 5 and up, the object Integer isn’t constant opposed to the scalar int.

Summary: A big deal with the SCJP is to teach the contestants how to work around some brain dead things in Java. Don’t get me wrong, i actually like Java, but the more i do in Ruby and the likes, the more some concepts in Java seem and are just wrong, like the for example not being all things equally objects.

3 days with Linux

08-Feb-08

Since Tuesday i installed Debian Linux 4 times on my new Dell Vostro 200.

The choice of hardware was kinda stupid. I thought, well this thing is not a special thingy but plain standard. Well, seems, it isn’t.

The first setback was, that the Debian installer booted from CD-Rom but didn’t recognize it afterwards. Yippie… I had to change the SATA Bios settings from IDE to RAID which means in reality, to AHCI. 2 things changed: Debian can be installed from CD-Rom and the dualboot Windows went nuts, i.e. crashed with a BSOD, even in safe mode. Solution to that was first switching back to IDE mode, installing some Intel driver for RAID thingies (really, there’s no raid in the machine… *sigh*), switch back et voila.

Next thing: The ethernet controller was to new. It’s kinda e1000 but not yet supported in the current testing kernel. The driver can be downloaded at intels site. I’ve chosen to skip network while installation and downloaded a full image. If you want to install from a netinstall image and have no 2nd nic at hand, here you’ll find a precompiled module. The blogs seems well written, but i wouldn’t call the Vostro a bunch of crap. The thing is very low noise, with Windows XP rock solid (at least at my workplace {i actually have two of them, at work and now at home}) and i appreciate the Dell pickup service. Another great howto is presented at the Ubuntu forums.

The next closed source thing i installed where the ATI drivers from here without a problem.

The things that lead to multiple reinstalls where the decision between KDE and GNOME. I just wanted to test them and didn’t want to purge every single package afterwards. In the end i went for GNOME.

So now i have a Desktop with the preinstalled Vista on a one partition and my new all day Debian system on a fully encrypted LVM partition. The later one was really no big deal to create with the Debian installer. The whole filesystem is encrypted except a boot partition and a relatively big space which i wanna spent on virtual machines.

prego stated that i should spent some energy into compiz. I already are accustomed to continuous zoom in the whole desktop, some nice effects and semi transparent windows through Mac OS X, for that to say, but i didn’t want to add non “official” repositories. In the end, i give it a try and followed the instructions here and used the instructions for the xorg.conf from here without that Xgl thingies. What can i say: It works and looks great. The wobbling windows are hilarious :D

For my photo collection i already installed digiKam, which is a great tool.

Next steps are migrating my email from Apple Mail.app to a local IMAP server. Anyone suggestions which email client to use?

A friend tried to convince me several times to reinstall my Macbook for good but i don’t want to. Things used to work and broke with an OS update. And no, i’m not using *any* of the OS X system hacks. I used to be able to upgrade from release to release (hell, the iMac made it from 10.3.8 to 10.5.1 without a problem) and all of sudden i’m back in windows times: Upgrade and you’re doomed. Suck my dick… I don’t wanna go this path ever again. And then there the recent developments with Apple. I’ve been wearing a t with “Think different” know for about 5 years, i always like their products, the integration of Unix and eyecandy. But the apps are getting worse with every new release the last months. Apples behaviour to make you pay for a simple software upgrade (sarbane oxley my ass…, i’m expecting the first bugfix to be payed because the OS is no abo related model). OS Xs unablity to encrypt the whole volume (it can encrypt your home folder in some silly image file) without external tools (recently, Truecrypt can do this.

Stop. Must… breath… again.

In the end, i think three days without much sleep were well spend.

As before, i’ll keep you updated, if you like :)

Apple’s making me sick…

04-Feb-08

iTunes changing music tagged Soundtrack to Filmmusik, another thread and guess what, i experienced the same feature.

I really like some of the “i take care of your problems stuff” like don’t thinking in mp3 files anymore but in a collection but this is nuts. I choose soundtrack as a genre intentionally and nothing else.

I really do like Apples iTunes but thats way over the top. Why not randomly rename the songs instead? And please nobody tell me i have a problem with id3tags. I tagged every single file with id3tag v2.3 after encoding them with lame, the tags are correct. Bah, i think i’m gonna puke.

Negative Erlebnisse

11-Dec-07

Ein kurzes Update bzgl. meiner Installation von Oracle VM Server.

Der VM Server ist stupide einfach zu installieren. Alles, was danach folgt, ist eine Qual, wenn man einmal den Komfort von apt-get, debian und co. kennen gelernt hat. Ich habe gerade das Gefühl, ich werde wahnsinnig dabei.

Es ist unter Oracle Enterprise Linux ohne weiteres nicht möglich, nachträglich noch weitere Pakete aus den Installations CDs zu installieren. Dazu braucht man einen Account im Oracle Unbreakable Linux Netzwerk. Ich will die Schuld nicht alleine Oracle anlasten, bei RedHat läuft es wohl genauso.

Worauf ich hinaus will: Der Erfahrungsbericht folgt, allerdings später, als geplant.

Why Apple users seems odd sometimes

29-Oct-07

Some Apple users are happy about a “goto line xy” function in a shitty text editor:

Leopard Love: “Go To” in TextEdit

A muzzle for WordPress 2.3 and the Akismet Plugin

26-Sep-07

As reported here and elsewhere, Dexter is somewhat talkative.

I recommend the following 2 steps program:

Stop sending your url

If you already have used WordPress 2.3, use the 123 Anonymer Versionscheck 0.10. It will anonymize your data, but a minimum of 1 request with personal data will happen, that is while using the plugin page.

If you do a fresh install of WordPress 2.3, i’d go with the my-hacks.php solution, because that way, no personal info will be send.

Lots of unnecessary Akismet informations

After finding the update problem this morning at Lumières dans la nuit, i read the following group. To my surprise i’ve learned, that the Akismet Spamchecker sends all of the $_SERVER environment variables from your server to the Akismet server. W T F?? I myself use Akismet in a custom project, there is absolutely no need to send this information. To stop sending this information, open akismet.php in your favorite editor, search and remove the following lines:

foreach ( $_SERVER as $key => $value )
    if ( !in_array( $key, $ignore ) )
        $comment["$key"] = $value;
Close
E-mail It