Carl on coding

Install fxruby gem on Ubuntu 12.04

I’m fiddling with ruby for some days now and it is great fun. Today I needed a GUI library and chose fxruby for various reasons. Turns out one needs some additional packages for that.

So as a reminder for my later self and anybody interested:

 

 

Share

Fixing random Wi-Fi problems with the Mac mini

I posted about the first day with my new Mac a long time ago. Time has passed but the wi-fi problem persisted: From time to time I could not get a connection to the wi-fi or the connection didn’t really work (over 60% packet loss for pings to google.com). I got the device to the Apple Store and they ran some tests over the course of a week but did not find anything. When I stopped by to get my Mac back the employee seemed to be troubled and tried to give some advice. His last idea was a dangerous though: “Maybe it works without encryption!”.

Needless to say I didn’t go down that road. But I thought it might be some incompatibility with my Fritzbox 7170. So I searched through my hardware junk box and found a D-Link Router (DIR-615) that I got from my ISP but never really had used before. I configured it to work as an access point and it worked reasonably well. But the wi-fi problems kept coming back. But as time was short the last weeks and I did not really use the device a lot I just lived with the occasional connection problem. But yesterday morning I decided to have another look as I could not connect to the wi-fi again.

To make a long story short: It seems to be that if a wi-fi nearby uses the same channel as the wi-fi you want to use the mini does not work correctly anymore. So I switched to an unoccupied channel. That also explains the random emergence of the problem: I live in a crowded area and wi-fi pop up and switch channels all the time. Another thing that helped significantly was to switch off the compatibility mode for b/g-network devices. Anyway I’m glad I figured this one out. Though I wonder why I did not find any information about this on the net as the mac mini seems to be a very popular device.

Share

Switch to mac – Day one

I just got a mac mini. My pc at home that I use for mailing, browsing, some office tasks and so on was starting to piss me off and I could not use linux (my choice on every other machine) because I need some software that’s not running under it. So as Saturn – an electronics retailer chain – just launched a campaign which gives customers a 100 Euro bonus if they make a major purchase I jumped at the chance and got the cheapest mac available: A mac mini with the most basic configurations. I got a SuperDrive too as they gave me the bonus. And I will get some RAM too (two gigs of RAM is soooo not up to date anymore). Anyway there is the first thing about apple products that I like: They cost the same everywhere – at least in Europe.
mac mini
So I got home and got all peripherals connected and pushed the button. This was when I remarked the second thing that I liked about my new mac: I don’t hear it. Well it’s not completely silent, but close. So that was pretty all the great stuff. After that it became less enjoyable. The first (little) downer was that my new mac wanted to know my apple id as part of the setup process. I know this from Android phones as well as Iphones but for a computer? Well, I’m not really dogmatic about this stuff so I just provided my id (got one long ago as I am a former Iphone user). The setup was finished in an adequate time and I was eager to fiddle around with my new toy…

The only problem was: Everything that took an internet connection (and what function does not have the need for one these days) was incredibly slow. We’re talking about waiting two hours for loading a simple web site here. So this was a major problem. Google search did not yield to anything useful. I moved my mini around, changed wifi channels – nothing helped. I was suprised: I have a high quality router (Fritzbox 7170) and all devices connected to it never had the slightest problem: Smartphones, Wii, Laptops – everything just worked like a charm. After a while I got really frustrated and ready to bring the device back and get a new one. As a last guess I deactivated 802.11g++ – that did the trick!

So my first day as a mac user was not that delightful. But I hope for long-term return on invest. So I will continue to explore my new computer in the next days and blog. If this was useful to you or you like to express critics or provide valuable information for a mac noob – feel free to comment or drop me a mail.

UPDATE:

The deactivation of 802.11g++ didn’t fix the issue: The next day the performance was as bad as before. There is no possiblity left than to carry my new mac to the local store and see what those “geniuses” can do.

Share

JadClipse and Ubuntu 11.10

I used the jd-eclipse plugin for some time until it stopped working yesterday without any clue whatsoever (Checked the log files and preferences and whatever people recommended to do on the net). As I really had to look into some class files today I tried to set up JadClipse instead. Turns out it needs JAD to do its work and you have to configure the path to it on the preferences. If you download it from here and try to run it, it will respond with the following error message:

error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory

I tried to install the missing package libstdc++2.10-glibc2.2_2.95 via apt-get but it turns out it is not included anymore since Hardy.

The simple and stupid solution works though: Get the deb from here and install it via dpkg – jad works fine with it.

After that, I had to fiddle with the editor preferences for the class files in order to get it working (it was opening the right editor but still no decompiled source until I deleted one of the other preferences for class files… :( ).

 

 

Share

Get selenium to work with proxy authentication

The problem at hand is to get Selenium working with an application, that is only reachable via a proxy that requires authentication. I thought that this is a very common setting, as most websites should be hidden until the day of the launch but it is not very well supported by selenium.

It was suprisingly hard to get up and running, so I”ll outline the solution here in order to save my fellow software writers / testers a couple of hours. I used the FirefoxDriver & Java for this one, but it should be applicable for other Drivers as well as Selenium APIs as well.

In short we will start up a proxy server on the machine where the test runs and make the FirefoxDriver use it. In order to make this all self-contained we need the browsermob-proxy and – of course – selenium.  So in Maven this means:

Configuring the proxy server takes a few lines, as we have to rely on reflection in order to configure the proxy to use the proxy ;) :

Ok, almost there – just a few lines to start up selenium and use the proxy on localhost:

So, happy testing!

PS: If you have a question or comments feel free to contact me or to post below.

Share