Skip to main content

Tip: Finding out, where an AdSense flash banner links to without violating the TOS

Posted in

Over the last few months, I noticed a steady decline in AdSense earnings. Checking the statistics revealed, that this was neither due to decreasing traffic nor a lower clickrate. Both, traffic and clickrate, have been fairly stable. What went down instead, was the earnings per click.

After looking through my website, I came across a couple of well-visited pages, featuring ads for free smiley downloads. Ok, culprit found. Someone, who offers things for free cannot afford to pay a lot per click.

Parsing email addresses in Java (without having the JavaMail API available)

Posted in

Today in the "can't be that hard to code" category: parsing email addresses.

Boss comes in and tells you, that some Java project will now allow the user to submit an email address. It is your task to write the sanity checks, rejecting anything, that is not compliant with the address specification found in RFC 2822. Oh, and by the way, the customer does not have the JavaMail API installed and cannot be brought to do so. Meaning, you have to re-invent the wheel.

How to recover an email account and password from the evolution mail client

Posted in

Ever wondered, where GMOME's mailclient "Evolution" stores the passwords for mailaccounts? Me neither. At least not until today, when I learned, that the credentials for a certain account were only known to a certain Linux box. This computer had some kind of hard disk related hiccup, which trashed a few things, vital to evolution. This little incident pretty much required setting up the mail client from scratch again. Only problem here: For that, username and passwords were required, which were now inaccessible.

Java GUI building with the GridBagLayout manager, made easy

Posted in

Update: The utility, described in this blog post has moved to it's own project page.

Every Desktop application pretty much needs a GUI. No problem so far. The trouble starts however, when components have to be arranged visually in a container. The preferred method for doing this is in Java, is to use a layoutmanager instead of specifying absolute pixel coordinates for component placement.

Writing modular Java applications (a suggestion for a simple, but versatile plugin architecture)

Posted in

Some things sound trivial to do, but on closer look turn out to be a formidable brainteaser. One of them is writing modular Java programs, where the core program can be extended using plugins. Such a design might be desirable, when extra program functionality is either to be licensed separately, to be contributed by third party, or generally "to be decided later".

Saving preferences for JToolBar location and window geometry

Posted in

Have you ever played the desktop puzzle? The goal of the game is to move around and resize the windows of all the applications you are currently using, to best fit the limited space available on the screen. A lot of people spend (or rather waste) a lot of time doing this and worst of all, they have to do it over and over again, as most programs forget their geometry setting after being shut down.

An introduction to compiler construction using flex and yacc

Posted in

Ever wondered, how compilers work or wanted to build one yourself, but just didn't know where to start? Seen the tools commonly used for compiler construction, but just couldn't wrap your head around on how to use them? Well, you have come to the right place then. In today's blogpost, I'd like to give an introduction on how to use flex and yacc, by showing how to implement a toy programming language, as well as a virtual machine able to run the compiled code of programs written in this language.

Drupal not showing javascript (e.g. AdSense) in nodes or blocks?

Ok, you have a shiny new website, you have Drupal as a CMS and you have an AdSense account. The only thing you don't have is a clue about why banners are not showing up on your website, even though you copied the AdSense code verbatim into your nodes/blocks.

A design pattern for menubars (Performance test)

Posted in

Three days ago, I posted a design pattern for menubars. While the article was mainly about code clarity and the clumsiness of inner classes, it also contained some remarks concerning performance and naturally this puts me in a put up or shut up situation, even though a performance discussion was not really my intention.

An email with an offer to buy textlinks

Posted in

Today, I found something in my inbox, sent to me by XXXX@gmail.com, which I shall quote here with the name removed.

Hi,

Thank you for reading this. I am XXXXX XXXX and I own a number of
websites. I came across your site http://www.onyxbits.de/ today. I found it
really enthralling.
I hope you will consider my proposition of buying text-links on your site.
Let me know if you would like to know more about this.
Best regards,

XXXX XXXXX

Syndicate content