Thought on Technology

I’ve owned this Nitin Sawhney track on CD for some time but as it’s good food for thought I’ve found the associated music video and posted it up here.

Comments off    

WordPress in Education

Always keen to post when I find someone who’s using my Calendar plugin for something big or exciting, this week I received an e-mail from Adam Scott informing me that Calendar had received a mention in his book, WordPress for Education. If you work in academia or have an interest in expanding the focus of your WordPress work, this book may just be worth a look.

Comments (1)    

Programmers vs Users

I was sent this amusing cartoon the other day, never have truer words been spoken!


Comments (2)    

Custom linux service at boot

So you’ve created a service in Linux, written a start/stop script for it, stored it in /etc/init.d/ and now you want it to actually run on boot/restart. This little line of code at a root terminal will do the trick for you.

update-rc.d <script> defaults 98 02

The <script> should be replaced with the file name of your start/stop script in /etc/init.d/ the 98 ensures it’s (likely) to be the last script to start and the 02 ensures it’s (likely) to be the first to stop.

Comments off    

Stalling File Transfer Over VPN

The other day I had cause to allow someone to access their corporate VPN over my home internet connection. After I had configured the appropriate pass-through settings for the IP address that my DHCP server had allocated their laptop they were able to connect easily. One issue remained however; whenever they checked a file out of sharepoint that was over 250Kb or so, the file transfer to their machine would stall and consequently crash the browser.

Google threw up all sorts of possibilities but the more things we tried (and that failed) the more I couldn’t escape from the idea that it must be some network related issue. I got to thinking about the nature of VPN and how there is an initial connection and then a large stream of UDP packets over the tunnel for the data transfer. That’s when a light bulb switched on – I’d seen something like that before in my Draytek router settings.

Draytek have a nice selection of anti denial of service features which I have activated to protect my network. Some of these concern certain types of flood defense; where a count of packets is maintained and if it exceeds a certain threshold then the connection will be dropped for a period of time. This would result in the appearance of a stall for any file transfer caught up in the melé. Bingo!

The culprit setting is shown in the screen shot below, “Enable UDP flood defense”. Originally this was set to 150, I had to set it to 1000 in order to eliminate that VPN issue.

Draytek DoS UDP Settings Screenshot

It’s worth discussing why the number has to be so high for my fix and why it may not need to be so high for you. Most home connections over VPN end up being below 5Mbit or so with the corporate end point on the other hand being capable of 100Mbit. This results in the overall speed obviously being tied to your 5Mbit speed. In my case I use the FTTC technology and thus have speeds up to 80Mbit. This means I can transfer many more packets per second than most people on home connections so it is likely that you won’t have to go so high as 1000 to get the desired result in the Draytek settings.

I hope this helps someone out, feel free to get in touch with me if you have any questions.

Comments (4)    

Photos too dark

I’ve been told by a number of people in recent times and have received a number of e-mails stating that the photos on my website are too dark, somewhat under exposed. This has always puzzled me as while the photos do look a little on the dark side, the exposure is almost always set correctly based on my camera’s light meter when I’m composing shots. This has almost made me believe that the light meter was faulty but looking at the photos on the screen on the back of the camera I can see that this is not the case. Time to delve deeper.

In order to publish my photos to the web I have to extract image data from the RAW files my camera generates and compress into a JPEG file that can be delivered to and opened by a web browser. To to this I make use of dcraw, a nifty little application authored by Dave Coffin. This will pass data out from the RAW file to be collected on stdout by a program such as cjpeg.

As I like to publish exactly what my camera has stored to the file (with a little compression for portability) I don’t use many of the options on dcraw, just invoking the ones that read the values from the file it’s self and use those. Looking down at the parameter list I suddenly wondered if perhaps I’d mistakenly used the wrong parameter somewhere, so I started to check each one I’d used against the documentation.

Everything checked out apart from one very small anomaly; -w was documented but -W was not. The documentation states that -w tells dcraw to use the white balance value stored in the RAW file when processing which is what I wanted but -W seemingly did nothing except it threw no errors when used so must have some function.

Plunging deeper into the documentation I found the bombshell I was looking for; -W is used for switching off the exposure compensation value contained within the file! I ran a quick test and changed to lower case while decoding a photo I’d taken recently and the effect was perfect, the correct brightness and also the correct white balance (it hadn’t been far wrong but was much better now).

I’ve now updated my script that I use to call dcraw to invoke the correct parameters and hopefully dark photos will be a thing of the past on my website. The thought of having to re-decode some 3000 odd photos that have already been uploaded doesn’t fill me with joy though…

Comments (5)    



Kind regards,

Kieran O’Shea BSc (Hons) MBCS
+44 (0)1133 508345

Comments off    

Akismet for Zenphoto Fixed

As a user of Zenphoto for my gallery of photographs I’m pleased to report that I’ve corrected an issue with the long standing Akismet plugin for the platform allowing it to work with the latest version of the application, thus restoring anti-spam functionality to comment forms on both my sites and any others that care to use the plugin.

Rather than re-post all the details here you can follow the discussion and download the fix from the Zenphoto forums.

Comments off    

Anti-Spam Effectiveness

What website are you looking at? Sounds a simple enough question right? Well for a human maybe but perhaps not for a CAPTCHA reading online bot. A problem that’s plagued bloggers and forum administrators for years is how to stay ahead of the comment/post spam that invariably results from putting one of these sites online.

The solution until about a year ago has been to go for a centralised solution like Akismet or make your CAPTCHA ever increasingly harder to read and thus harder to crack. Unfortunately the latter has simply increased the number of frustrated users resorting to e-mail to ask for access or giving up altogether. Akismet has stayed ahead of the curve and for one-off comments on blogs and other types of media has proved invaluable. For forums however there isn’t really a reliable connection between most forum systems and Akismet and administrators have been left wondering what to replace their ageing, difficult to read and fundamentally ineffective CAPTCHAs with.

Welcome the Q&A. While this concept has been around for a while, Q&A really comes into it’s own when you factor in randomisation. If a particular style of CAPTCHA is in use by many sites then it’s well worth a spammer trying to crack it as they reap large rewards. Custom solutions on the other hand have the advantage that unless you run a huge site like BBC News, they’re not going to be worth cracking as there are easier rewards to be reaped elsewhere. While you could use a custom CAPTCHA this requires some effort and you’ll probably end up re-using someone else’s code which defeats the uniqueness objective. This is when we resort to the simple question, unique to every website. Where am I? Who is my admin?

Having implemented such unique questions to all of my forums recently I can report a resounding success. No automated registrations leaving just the handful of spamming manual ones which are easy to weed out of an early morning. The big bonus here is legit users find it a doddle to register as they either know by heart or can easily look up the answer. I also now have the slightly tangential advantage that if I were to start getting automated registrations again then my sites may well have become as popular as BBC News which would certainly bring a smile to the face.

Comments off    

Jack Kelly’s Sailing Dream

A friend of mine, Jack Kelly, whom I met at Leeds University while studying in the School of Computing, has taken it upon himself to join the crew of a tall ship, Windeward Bound, for a 6 month stretch. As a fellow sailor I was delighted to find that he has decided to write a blog about his experiences while on board and I’ve begun avidly following his updates. Jack, I wish you all the best for your travels on the high seas!

Comments off    

Next entries » | « Previous entries