C++
I made a vow about 20 years ago not to attempt to learn C++, when a colleague went on a C++ course. I did buy a C++ book, but it wasn’t that useful. I have looked at the source of various C++ programs over the years to attempt to find out how they worked. I have, until recently, invariably found that the code that does something useful is either hidden in include files, or buried so deep in obscure code that just seems to create and do strange things with various objects, that I have been unable to find it.
Read more →Java Collections
I find Java Collections frustrating and insane. I have been through this loop on several occasions. I decide I want a list to do whatever. So I look up List in the docs and find it’s an interface, ie: roll yer own. So I look down the hierarchy and find AbstractList, which is abstract, again: roll yer own. So finally I get to ArrayList which might do the job, but the docs aren’t too clear, so I try it and it works.
Read more →Download streamed video
Online video providers tend to stream the video to a javascript player, so making it extremely difficult to capture the video. This blog explains a method using Chrome to spoof the user agent string, pretending to be an iPad. Unfortunately, this doesn’t seem to work any more in the latest version of Chrome. So I tried installing a user agent spoofing plugin in Firefox. It seemed to work, but the video didn’t play, so I couldn’t find the url.
Read more →Concurrency, Threads, Semaphores and Mutexes
I have written several applications in both Java and C that involve running an audio thread in the background to read or write audio from or to the audio system while displaying the results and interacting with the user in the foreground. I have used lots of threads, but never a semaphore or mutex apart from the odd boolean variable. This issue is reminiscent of back in the day when you actually had or could get a circuit diagram of your computer and could understand it.
Read more →Upgrading WordPress
This site has the firewall set up so that the web server has no external access. This means that I can’t use the usual WordPress update mechanism to keep it up to date. I use FileZilla for maintaining the server, and I recently discovered you can use drag and drop to move stuff around remotely. So my easy WordPress upgrade method is: Download the latest zip file and unzip it. Rename the wordpress folder to something else, like wordpress-old.
Read more →