How I survived one week without an adblocker

Last week I did a little experiment. I tried to surf the net without an activated adblocker. And I survived! Till then I never touched any site without one. Exactly like you do. For over 10 years. And then I turned it off. To be fair I have to say that I did not turn of the popup-blocker that is built into chrome, but everything else was deactivated.

At first I was a little bit afraid of doing this. Will I still be able to read my news, blogs and other content on the net? Will I see tons of click-overlays, blinking flash adverts and other annoying stuff that made me install an adblocker in the first place?

The first hour of surfing without an adblocker was eye opening. Advertisement has learnt a lot in the last 10 years. And the site owners too. Most of the sites changed from “ads right were the user is most annoyed to see one” into “ads were they don’t piss off the user”. And most of the ads have learned that lesson, too.

In the second hour of surfing I did something I would not expect to do ever. I actually clicked on an advert that interested me. It was the ad for a computer game I wanted to buy. And after seeing the trailer on the ad-site I bought it. To be fair I would have bought that game anyway and clicking on ads was very rare in that week. There were only a handfull of ads I clicked on. And most of them didn’t interest me after I saw their site.

In the next few days I got the feeling that I was wrong in activating the adblocker on all sites. Most sites do respect you and try to make money with ads and think hard on where to place them. Sadly there were exceptions. Some sites love to put a video ad in full browser window size that you have to click away. With activated sound. But those were rare.

After the week was over I thought about activating the adblocker again, but I felt I did not need it for most sites. I only want to punish sites that didn’t respect me and tried to do evil stuff with ads. Stuff that I think was not okay. Like those full screen ads.

Sadly Adblock Plus, the adblocker of my choice, did not have a nice gui interface for that “blacklist mode”. If you know how to write the filter rules, you could have the plugin only filter ads on certain sites. But I didn’t want to do that manually. So I forked the plugin and added that feature. The fork can be found here:

https://github.com/bitboxer/charma_adblockplus_chrome

If you clone that repo and load the plugin into your chrome, you can activate the blacklist mode in the last tab of the settings panel. After that the adblocker is deactivated on all sites and you can enable it for specific sites with a click on the icon in the url bar.

And I really encourage you to at least try this for a few hours. The internet can only be free if we allow ads. Only those few sites who do annoy you with bad designed ads need to be punished. Not all sites.

TL;DR: Ads are not that bad like they used to be. Try to switch to an adblocker that only enables adblocking on bad sites, not on all sites. I have created a fork of adblock plus for chrome that does this.

Posted in Development, Websites | 29 Comments

Hcking.de Hackathon!!

Lucas and I want to speed up the development on hcking.de a little bit. And for that we will do an all weekend hacking event called “hcking.de hackathon” on the weekend of 8th/9th october. It will be a weekend with coding, pizza, Club Mate and lots of fun.

Do you want to participate? Register for the event today! Details can be found on hcking.de.

Posted in Development | Leave a comment

My wordpress theme

This week I was asked to publish my WordPress theme and now I uploaded it to github. Basically it’s a modified Twenty Ten Theme. You can find it here.

Posted in Development, Software | Leave a comment

Hey OpenStreetMap, less is more!

I am really proud of you, OpenStreetMap. You collected tons of data. Tons and tons of it.

For example, look at the Cologne Zoo in OpenStreetMap:

And this is how it looks like in Google Maps:

A lot of information. Even the locations of the different animals are marked on the map. I love it. I love the fact that you have tons of bike paths that are unavailable in Google Maps. But please don’t show all of this information at once.

If you zoom out of Cologne, you will see what I mean:

Compare that overcrowded mess to the clean Google counterpart:

The Google Map Renderer highlights the important roads and fades out the unimportant onces. Sadly the OpenStreetMap-Renderer doesn’t. A few fixes in the color schemes in the smaller zoom views and a improved rendering of street names should fix this, shouldn’t it? You have tons of data, please make it look good.

Posted in Websites | Tagged | 3 Comments

Events for developers around Cologne, Part II

Last year I started hacking-cologne.de, a calender for hacking events around cologen. Now it is time to go a step further. I replaced the google calender with a small rails app.

At the moment it’s only a small app with the railscast default layout, but this will change soon.

And this is how it looks like:

Pretty, pretty, pretty …. pretty good!

If you want to participate somehow, feel free to contact me!

Posted in Development, Events | 2 Comments

Thanks Euruko Crew!

Wow. The Eurko 2011 was one of the best conferences I ever attended. Tons of great talks and super friendly attendees. Sadly we had to travel back to cologne and couldn’t go to the github meetup on sunday :( . The next time I will plan with more time afterwards.

If you have missed my talk, you can find the slides here:

If you haven’t done yet, please rate my talk here and leave a few hints on how to improve it.

See you in Amsterdam!

Posted in Development, Events | Tagged | Leave a comment

The book that changed my life

If I had to name one book that changed my life, it will be the book on the lower right. It’s the handbook of a Commodore 64. I will never forget the “Ahhhh” moment I got after entering the first lines of basic into our brand new computer on christmas eve:

1
2
10 print "Hallo"
20 goto 10

Actually the first lines of basic I entered into the c64 were from “Fix and Foxy”, a German magazine for kids. But after entering the few examples from that little magazine, I started reading the handbook. And I started to understand what I just wrote.

Nowadays “handbook” means a PDF on a disc that only shows how to do very basic things. In the 80s, it was more than that. Way more. It covered everything from first steps in basic to a few examples on how to access the graphic memory to create images and move them around on the screen. And it was well written. Well enough for a child to understand it. Well enough for me to start writing my first few little games.

It ignited a fire that is still burning inside me and hopefully will burn a few more decades.

What was your book that changed everything?

Posted in Books | Tagged | 1 Comment

Meet me @euruko !

I will present a talk about arduino and ruby at the euruko this year. Hope to see you there!

Endless fun with Arduino and Eventmachine

After seven years of working as a java developer, Bodo fall in love with ruby and moved to cologne to work as a full time ruby developer. He started tinkering with hardware as a teenager with his C-64, his dad created the robots and he wrote the software that made them move. Besides coding Bodo loves diving, traveling and biking.

In his talk he will show how to connect an arduino with ruby using eventmachine. He will also show potential use cases and projects that can be created using this technique. Most of the projects can be finished on one weekend.

If you didn’t manage to get a ticket, but you would love to talk with ruby developers in Berlin, maybee the eurucamp is a good alternative for you.

Posted in Uncategorized | Leave a comment

Javascript: The good parts

Another week, another book. JavaScript: The Good Parts. But I can’t recommend this book. Imagine your worst teacher. The guy who could put you into a coma only by thinking of him. A boring guy that can’t teach, but tries to speak about fact after fact. Using huge diagrams and tons of boring examples. And now try to imagine that this teacher tries to write a book. This is exactly what you will get.

It’s a sleeping pill in book form. Unbelievable. The author really thinks that by showing railroad diagrams he can explain the language. But we don’t want to write a lexer for a compiler. We want to learn good Javascript. And tons of diagrams won’t help here. He even tries to explain RegExp-parsing with those Diagrams.

And the pages where he shows how to write a JSON-Parser?! Why?! Oh my god.

In short: stay away from this book. Really far away.

Posted in Books, Development | 8 Comments

Arduino Experiment 1 : Volume Slider for OSX using Eventmachine

At the moment I am experimenting a lot with Arduino. Arduino is an open-source electronics prototyping platform that helps you to build hardware solutions in a very short time.

Arduino can be used as a stand alone solution and can run software on a little chip that is onboard of the circuit. You can write a little weather station with it or create a little device that twitters messages if a certain input is triggered. There are tons of examples for this online. It’s also possible to connect it to your pc and use it as an input device for your program. One solution to react on input from the Arduino board is Eventmachine, an event driven I/O framework for ruby.

This is a little program that reads data from the serial port and sets the volume of my mac:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'serialport'
require 'rubygems'
require 'eventmachine'

if ARGV.size < 1
  puts 'ruby example.rb /dev/tty.your-usbdevice'
  exit 1
end

sp = SerialPort.new(ARGV.shift, 9600, 8, 1, 0)

EventMachine::run do

  EventMachine::defer do
    loop do
      line = sp.gets
      if line
        puts "New volume : #{line}"
        `osascript -e "set volume #{line}"`
      end
    end
  end

end

sp.close

Before you run it, you need to install the needed gems with gem install eventmachine serialport. After that you can start the script with ruby example.rb /dev/tty.your-usbdevice.

But what will it read? At the moment it doesn’t read anything because the Arduino isn’t transmitting data to it. We need a little program that runs on the Arduino and computes the input and sends a new volume to the serial port. That code is a little bit longer because it has to reduce the jitter from the data. You don’t want the volume to constantly switch between 50% and 52%, am I right :) ?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// analog pin used to connect the potentiometer
#define POT_PIN        2  

// READ_AVG is how many readings to average
// set it to one less than the actual #
// e.g.: 10 readings = set to 9
//
// the more you average, the more accurate your reading is likely to
// be -- too many though, and you'll start missing changes if the motor
// is moving quickly
#define READ_AVG       9

// variable to read the value from the analog pin
int val;    

// our current and previous potentiometer readings
int cur_reading = 0;
int pre_reading = 0;
int steps   = 0;

// our current readings array, and our previous average readings array
int vals[READ_AVG + 1];
int prev_posts[2]  = { 0, 0 };

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
}

int read_pot() {
  //read the voltage on the potentiometer:
  cur_reading = analogRead(POT_PIN);
  int diff = 0;
  int post = prev_posts[1];

  // we're going to average the last READ_AVG reads
  // put in a value for our current step
  vals[steps] = cur_reading;

  // if we've saved enough values to go ahead and perform an average...
  if( steps >= READ_AVG ) {
     // reset our read counter
     steps = 0;

     // determine the average value read
     // -- this is mostly to deal with big jitter
     int tot = 0;
     int avg = 0;

     // sum up totals
     for (int i = 0; i <= READ_AVG; i++) {
       tot += vals[i];
     }

     avg = tot / READ_AVG + 1;

     // ignore current reading if it was either of our last two readings
     // avoid bouncing back and forth between two readings (slight voltage
     // variation in the same range)

     if( avg == prev_posts[0] || avg == prev_posts[1] ) {
       return(post);
     }

     // determine the absolute difference between the current average
     // and the previous average
     diff = avg > prev_posts[1] ? avg - prev_posts[1] : prev_posts[1] - avg;

     // if there's a difference between the averages
     if( diff > 0 ) {
       // move our last reading back, and put our current reading in
       // our array to track the last two positions
       prev_posts[0] = prev_posts[1];
       prev_posts[1] = avg;
       post = avg;
     }
  } else {
    // increment our saved value # for the next loop
    steps++;
  }
 
  return(post);
}

void loop() {
  // reads the value of the potentiometer and scale it to use it for volumes (between 0 and 7)
  int newVal = map(read_pot(), 0, 1023, 7, 0);    

  if (val != newVal) {
    val = newVal;
    Serial.println(val);
  }

}

Now you have to compile and upload the code ( For details on how to do this, there is a good documentation about it ).

Connect a potentiometer to +5, GND and Pin 2 and after that it should look something like this:

More links around Arduino can be found in my delicious account.

Posted in Development | Leave a comment