Category Archives: Geekiness

Classes, inheritance and encapsulation in php

meterboard2

I have been, and probably remain somewhat of a cottage programmer.  Completely self taught.  I have heard the terms “Classes, inheritance and encapsulation” for years and not really understood them.

I have spent a lot of time over the last week or so working on a row tracker for my virtual rowing team.  I wrote it without using a single class.  I then (for reasons I don’t remember) decided it was about time I got to grips with them.  Suddenly, and I am not sure how, I understand them and how to use them.  Oh, the power!

I appears from this useful (but soporifically voiced) youtube video that I have been doing procedural programming all these years.  Object oriented programming is a very different way of looking at it.  But inheritance makes a lot of sense.  Now.  I am still trying to wrap my head around why encapsulation is ‘better’ but I understand what it is and how to do it.

Golden Stag Summer Ale

2013-12-24 13.36.46

I have spent a lot of time recently writing the code for a row tracking tool for my virtual rowing club.   People have been appreciative and one so appreciative that he sent me a kit from my Amazon wish list.  This is very encouraging and certainly makes me have a strong warm feeling about the time I have given (it has been a labour of love really).  Thank you Paul.

RPizeBox + Soundblaster Play!

I hated the fluttery background noises on the standard analogue audio jack on the RPi, so bought a Soubdblaster Play! for £20 from eBay.

http://elinux.org/RPi_VerifiedPeripherals#Class_compliant_USB_sound_cards said:

edit /etc/modprobe.d/alsa-base.conf and comment out the last line; options snd-usb-audio index=-2

I actually commented out all the extra lines that ended -2 and now I have excellent quality audio.  Really pleased.  The RPiBox is complete.  Wires for the GPIO and an improved larger screen have arrived.  I just need to find a container.