Channel 4 in France

Slight obsession some would say, but I enjoy F1… not that much that I’m prepared to pay Sky whatever extortionate fee they’re come up with today though so I tend to watch the highlights only on C4. Nice coverage btw guys – shame to lose you next year.

Anyway, I have a VPN (OpenVPN) running off a Synology DiskStation to allow me to tunnel through home when I’m abroad. Works a treat… normally. Channel 4 does not.

Initially I thought it was DNS leakage picking up that name resolution is from french servers. You can see this by visiting www.dnsleaktest.com and running the “standard test”. Even though I’m reported as being in the UK, all my DNS servers are in France… Humm, I smell a fish…

Screen Shot 2016-09-02 at 12.30.40 Screen Shot 2016-09-02 at 12.30.51

Am I in the UK or France?

To work around this I setup a proxy server on the DiskStation and the same test now reports UK DNS servers as everything goes through the proxy.

Screen Shot 2016-09-02 at 14.53.35

Definitely looks like I’m in the UK… But still no luck on C4…

Finally, I set the timezone I was in to UK rather than France and this seemed to do the trick. Note that you need to change the timezone on the laptop, not the time itself or you’ll have all sorts of trouble connecting securely to websites including C4.

In the end, the proxy doesn’t seem necessary so they don’t appear to be picking up on DNS resolution yet though it’s the sort of thing that they could look at adding (that, and device geolocation using HTML5 geo API  though for this there are numerous plugins for browsers to report fake locations).

Incidentally, BBC iPlayer works fine and does so without fiddling with timezone.

The net wasn’t really designed to expose your physical location and IP to location lookups such as MaxMind are more of a workaround than truly identifying your location. Using TOR as a more elaborate tunnel makes you appear to be all over the place as your IP address jumps around and corporate proxies; especially for large organisations, can make you appear to be in all sorts of weird places. Makes you wonder.. All these attempts to limit your access based on an IP address to prop up digital rights management just doesn’t work. It’s all too easy to work-around.

p.s. Turns out that whilst France doesn’t have free-to-air F1 coverage, most places have some form of satellite TV via CanalSat or TNT which includes the German RTL channel. It’ll do nothing to improve my French but at least I get to watch the race on the big screen…

Hack a Mousetrap

My 10 year old son and I have been playing with Arduino recently… specifically to build a mouse trap alarm. And clearly we’re not the only ones thinking about this… Some guys over at MS have tried to hack a mousetrap using every piece of technology they can get their hands on (I’m sure I saw the kitchen sink in there somewhere). Nice 🙂

Traceability

We can have a small server…

Screen Shot 2016-02-13 at 11.43.20

…a big server (aka vertical scaling)…

Screen Shot 2016-02-13 at 11.43.27

.. a cluster of servers (aka horizontal scaling)…

Screen Shot 2016-02-13 at 11.48.34

.. or even a compute grid (horizontal scaling on steroids).

Screen Shot 2016-02-13 at 11.43.41

For resiliency we can have active-passive…

Screen Shot 2016-02-13 at 11.52.46

… or active-active…

Screen Shot 2016-02-13 at 11.52.51

… or replication in a cluster or grid…

Screen Shot 2016-02-13 at 11.59.01

…each with their own connectivity, load-balancing and routing concerns.

From a logical perspective we could have a simple client-server setup…

Screen Shot 2016-02-13 at 13.03.29

…a two tier architecture…

Screen Shot 2016-02-13 at 13.03.35

…an n-tier architecture…

Screen Shot 2016-02-13 at 13.03.40

…a service oriented (micro- or ESB) architecture…

Screen Shot 2016-02-13 at 13.03.44

…and so on.

And in each environment we can have different physical topologies depending on the environmental needs with logical nodes mapped to each environments servers…

Screen Shot 2016-02-13 at 13.04.01

With our functional components deployed on our logical infrastructure using a myriad of other deployment topologies..

Screen Shot 2016-02-13 at 13.04.21

… or …

Screen Shot 2016-02-13 at 13.04.37

… and on and on and on…

And this functional perspective can be implemented using dozens of design patterns and a plethora of integration patterns.

Screen Shot 2016-02-13 at 12.08.46

With each component implemented using whichever products and packages we choose to be responsible for supporting one or more requirements and capabilities…

Screen Shot 2016-02-13 at 13.20.31

So the infrastructure we rely on, the products we select, the components we build or buy; the patterns we adopt and use… all exist for nothing but the underlying requirement.

We should therefore be able to trace from requirement through the design all the way to the tin on the floor.

And if we can do that we can answer lots of interesting questions such as “what happens if I turn this box off?”, “what’s impacted if I change this requirement?” or even “which requirements are driving costs?”. Which in turn can help improve supportability, maintainability and availability and reduce costs. You may even find your product sponsor questioning if they really need this or that feature…

Jenkins on Raspberry Pi 2

I had an old Raspberry Pi which was fun to play with but really too underpowered to do much with. However, I recently took part in the BCS Womens App-athon World Record attempt where I had a chat with a guy about Pis and running Minecraft and he pointed out the newer Pi2 was quite capable of running MCServer (a C++ implementation of a Minecraft Server).

But I wanted a Pi2 for something more serious – something running Jenkins to manage the various bits of codes I knock up. I’d tried this on the original Pi but it was unusable…

Install from instructions Random Code Solutions were ok but the version installed via apt-get was old and slow and couldn’t easily be updated (managed package). I removed this and installed Tomcat 7 but this bizarrely used Java 1.6 and similarly wasn’t easily changed…

Managed packages, they make life easy but you’re dependent on them keeping things up to date.

So the process I finally used was:

1. Install Java 8, the Oracle version. This was already there on the version of Raspbian I was using.

2. Ensure this JVM is set as the default:

update-alternatives --config java

Should give you something like image below. Select the version corresponding to java 8…

update-alternatives --config java

3. Download Tomcat. Version 7.0.62 was the one I used.

cd /usr/local/bin
wget http://www.mirrorservice.org/sites/ftp.apache.org/tomcat/tomcat-7/v7.0.62/bin/apache-tomcat-7.0.62.tar.gz
tar -zxf apache-tomcat-7.0.62.tar.gz

4. Jenkins will complain about URI charset on startup so before installing change the URIEncoding parameter for Tomcat i18n in apache-tomcat-7.0.62/conf/server.xml to set the URIEncoding as UTF-8:

<Connector port="8080" URIEncoding="UTF-8"/>

5. Startup Tomcat

/usr/local/bin/apache-tomcat-7.0.62/bin/startup.sh

Check this is running by hitting the server: http://{server}:8080/ and you should see something like below:

Tomcat Successful Install

6. Download Jenkins (just grab the jenkins latest release though at time of writing the version I have is 1.617) and put this into the webapps folder under Tomcat. Or…

wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war -O /usr/local/bin/apache-tomcat-7.0.62/webapps/jenkins.war

7. Tomcat will now deploy the WAR. This can take a little time and the easiest way to see it running is to run “top” and you should see Java consuming 100% CPU. When this drops to 0% it’ll be done.

8. You should now be able to see Jenkins running on http://{server}:8080/jenkins/ (on my network it’s called raspberrypi2  – genius huh!).

All done! Kind of, it’s best to update all plugins and restart, configure security, set access control and configure an email server for alerting.

A simple task runs ok and Jenkins is quite responsive when nothing else is running on the server…

I can run MCServer ok at the same time but Jenkins gets slow when the world is in use. Otherwise no issues yet though I suspect as I add more jobs it’ll probably run out of RAM. We shall see. Perhaps I’ll be buying another one of these Pi2’s; wife will be pleased.. 😉

Power to the People

Yesterday I received my usual gas and electricity bill from my supplier with the not so usual increase to my monthly direct debit of a nice round 100%! 100% on top of what is already more than I care for… joy!

What followed was the all too familiar vent-spleen / spit-feathers etc. before the situation was resolved by a very nice customer services representative who had clearly seen this before… humm..

So, as I do, I ponder darkly on how such a situation could have arisen. And as an IT guy, I ponder darkly about how said situation came about through IT (oh what a wicked web we weave)… Ok, so pure conjecture, but this lot have previous…

100%! What on earth convinced them to add 100%? Better still, what convinced them to add 100% when I was in fact in credit and they had just reimbursed me £20 as a result?…

Customer service rep: It’s the computers you see sir.

Me: The computers?

CSR: Well because they reimbursed you they altered your direct-debit amount.

Me: Yeah, ok, so they work out that I’m paying too much and reduce my monthly which would kind of make sense but it’s gone up! Up by 100%!

CSR: Well er yes. But I can fix that and change it back to what it was before…

Me: Yes please do!

CSR: Can I close the complaint now?

Me: Well, you can’t do much else can you? But really, you need to speak to your IT guys because this is just idiotic…

(more was said but you get the gist).

So, theories for how this came about:

  1. Some clever-dick specified a requirement that if they refund some money then claw it back ASAP by increasing the monthly DD by 100%!..
  2. A convoluted matrix exists which is virtually impossible to comprehend; a bit like their pricing structure, which details how and when to apply various degrees of adjustment to DD amounts and has near infinite paths that cannot be proven via any currently known mathematics on the face of this good earth.
  3. A defect exists somewhere in the code.

If 1 or 2 then sack the idiots who came up with such a complete mess – probably the same lot who dream up energy pricing models so a “win-win” as they say!

If 3 then, well, shit happens. Bugs happen. Defects exist; god knows I’ve been to root-cause of many…

It’s just that this isn’t the first time, or the second, or the third…

(start wavy dreamy lines)

The last time they threatened to take me to court because I wouldn’t let their meter maid in when they’d already been and so hadn’t even tried again..  and since they couldn’t reconcile two different “computer systems” properly it kept on bitching until it ratcheted up to that “sue the bastards” level. Nice.

(end wavy dreamy lines)

… and this is such an simple thing to test for. You’ve just got to pump in data for a bunch of test scenarios and look at the result – the same applies to that beastly matrix! … or you’ve got to do code reviews and look for that “if increase < 1.0 then surely it’s wrong and add 1.0 to make it right” or “increase by current/current + (1.0*current/current)”.

So bad test practices and/or bad coding practices – or I could also accept, really bad architecture which can’t be implemented, or really bad project management which just skips anything resembling best practices, or really bad leadership which doesn’t give a toss about the customer – and really bad operations and maintenance regardless because they know they’ve got some pretty basic problems and yet they clearly can’t help themselves to get it fixed.

It all comes down to money and with practices like this they’ll be losing customers hand over fist (they do have the worst customer sat ratings apparently).

They could look at agile, continuous-integration, test automation, dev-ops, TDD and BDD practices as is the rage but they need to brush away the fairy dust that often accompanies these concepts (concepts I generally support incidentally) and realise this does not mean you can abandon all sanity and give up on the basic principles of testing and coding!

If anything these concepts weigh even more heavily on such fundamentals – more detailed tracking of delivery progress and performance, pair-programming, reviewing test coverage, using tests to drive development, automating build and testing as much as can be to improve consistency and quality, getting feedback from operational environments so you detect and resolve issues faster, continuous improvement and so on.

Computer systems are more complex and more depended on by society then ever before, they change at an ever increasing rate, interact in an constantly changing environment with other systems and are managed by disparate teams spread across the globe who come and go with the prevailing technological wind. Your customers and your business relies on them 100% to, at best, get by, and at worst, to exist. You cannot afford not to do it right!

I’m sure the issues are more complex than this and there are probably some institutionalised problems preventing efficient resolution mores the pity. But hey, off to search for a new energy provider…

Sequence Diagramming Tool Thingumy-bob

I’ve used a variety of tools to produce sequence diagrams over the years, many of them very poor, some of them satisfactory, none of them what you’d call “good”. Usually because they force you to do battle with a plastic mouse for several hours to make anything other than the simplest of interactions come to life.

However, forced to ditch my old favourites (Rational Rose and Rational Software Architect) in favour of open-source alternatives (Papyrus), has not been as fruitful as I’d have liked. Papyrus does a good job but is just as bad as all the commercial variants at drawing sequence diagrams – resulting in micro mouse movements to get just the right connection in just the right position. I don’t get it, sequence diagrams are more like code than any other diagram and it’s easier to write them than it is to draw them… so with this in mind; and having tried websequencediagrams which is cool but doesn’t seem to handle life-lines properly (and I’m not paying for the commercial version to find out), I knocked up my own means in a couple of lonely evenings just to see how bad it is…

Turns out a reasonable approximation isn’t too hard and since I can make it do what I want to do with (relative) ease in the browser, so be it. Doesn’t do a lot, but then I don’t want it to do much. Anyway, try it out if you get some time at The Mighty Stellarmap.com sequence diagraming tool thingy… hummm…