Jekyll2019-07-08T17:54:52+00:00https://samuel-turner.co.uk/feed.xmlSamuel-TurnerSoftware Testing. Linux. Gaming. Overclocking.Samuel TurnerNot all bugs are defects2018-02-13T00:00:00+00:002018-02-13T00:00:00+00:00https://samuel-turner.co.uk/not-all-bugs-are-defects<p>As software testers we often come across aspects of a piece of software that might not necessarily be defects, but they still don’t feel right. It may be an intended feature that sounded great on paper — or in the mind of the stakeholder writing the requirement — but now we’re testing it in context, it feels like a bug.</p>
<p>I once met a wise old tester on my travels who went by the name of <a href="https://twitter.com/badbud65">Stephenus Bloweronius</a> 4th century BC, who growled out from under the brim of his fedora something which has stuck with me ever since:</p>
<blockquote>
<p>A bug is anything that bugs you, my lad!</p>
</blockquote>
<p>If I identify something about a piece of software that I wouldn’t be happy leaving in when the software is shipped, I’ve always raised it and tried to get it fixed. This can be tricky at times, especially when I’m trying to get a stakeholder to revise a requirement.</p>
<h2 id="case-in-point">Case in point…</h2>
<p>I recently came across such a dilemma with my bluetooth headphones. (Which I’ve <a href="/fixing-bluetooth-headphones-in-ubuntu-16.04/">posted about recently already</a>).</p>
<p>The headphones have an adjustable volume, however that’s just for the sound you’re transmitting into the headphones. The other sounds it plays (connection established, connection lost and battery low warning) are delivered at at least 150db over the top of the music. While these sounds are annoying in themselves, the real bug lies within the logic that delivers the low battery warning.</p>
<p>When the battery is low, the klaxon sounds, and continues to sound every 30 seconds. <em>Even if you plug them in to charge.</em></p>
<p>This simple feature, reminding the user that their headphones are about run out of electricity, effectively renders them useless until they’re charged again. The only option I’ve found is to turn them off for 20 mins so they can charge enough for the klaxon to stop.</p>
<p>You could interpret this as a missing requirement — plugging the heaphones in should switch off the klaxon. You could also interpret it a misunderstood requirement — the sound only needs to alert the user, it doesn’t have to make them jump out of their skin. The conclusion however remains the same. It really, really bugs me.</p>
<h2 id="rant"></rant></h2>
<p>Bugs can often be tricky to describe, but it gets a lot easier if you keep them in context. I often see bug reports which try to describe them without mentioning <strong>who</strong> they impact, which makes it very difficult to describe <strong>how</strong> they impact users. Sticking to the format of “If a customer performs an action, an event occurs, and the impact is thus”. This format avoids describing a defect, and instead describes an action, a result, and an impact. This way it doesn’t matter if it is considered a bug, an updated requirement or an entirely new requirement — we focus on the impact, leaving decision makers free to choose whether to change it now, later or not at all.</p>Samuel TurnerOften testers find issues with software that are not defects, but still don't feel right... so are they bugs?Fixing Bluetooth Headphone Sound Quality in Ubuntu 16.042018-01-29T00:00:00+00:002018-01-29T00:00:00+00:00https://samuel-turner.co.uk/fixing-bluetooth-headphones-in-ubuntu-16.04<p>For as long as I’ve used 16.04 LTS in all flavours - I’ve had the same issue with my bluetooth headphones sounding terrible. This is due to an inability to select the A2DP profile for “High Fidelity Playback” and it defaulting back to the “Headset Head Unit”.</p>
<p>This method is roughly described in a <a href="https://askubuntu.com/questions/863930/bluetooth-headset-cant-set-a2dp-high-fidelity-playback-poor-sound-quality/864312#864312">comment on Stack Overflow</a>, but I’m going to flesh it out a bit.</p>
<p>First, install Bluetooth Manager:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt install blueman
</code></pre></div></div>
<p>Next, edit the config file for bluetooth…</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/bluetooth/main.conf
</code></pre></div></div>
<p>…and add the following lines:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Disable=Headset
Enable=Source
</code></pre></div></div>
<p>Now just restart the bluetooth service:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo service bluetooth restart
</code></pre></div></div>
<p>From now on, when you need to manage any bluetooth devices, do so through Bluetooth Manager.</p>
<p>That’s it! The original comment does mention installing <code class="highlighter-rouge">pavucontrol</code> as well, but I’ve not needed to install it so far.</p>Samuel TurnerHow to fix sound quality issues with bluetooth headphones in 16.04 LTSCross Browser Testing Reloaded2017-11-15T00:00:00+00:002017-11-15T00:00:00+00:00https://samuel-turner.co.uk/cross-browser-testing-reloaded<p>We’ve had a big problem at <a href="https://www.uaccount.uk/">U Account</a> for a while now. Our analytics tell us that over 70% of our traffic is mobile, but that traffic is distributed across over 400 devices, with the most popular device only accounting for 5% of that traffic. This leaves us at a bit of a loss as to how we can possibly support that many devices, and how to choose which ones we should support!</p>
<p><a href="https://opensignal.com/reports/2015/08/android-fragmentation/">In 2015 OpenSignal were having a similar problem, and put together a brilliant report on this subject</a>.</p>
<p>This problem has spawned two main questions for us to answer:</p>
<ul>
<li>How do we decide which devices to support?</li>
<li>How do we perform cross-browser testing more efficiently, so that we can cover more ground in the time we’ve got?</li>
</ul>
<p>The first question has proven almost impossible to answer thus far, so today I’m going to describe how we’ve gone about attempting to answer the second question.</p>
<h2 id="browsersync-physical-devices--sizzy">BrowserSync, Physical Devices & Sizzy</h2>
<p>Our current chosen method of cross-device testing, is a combination of <a href="https://www.browsersync.io/">BrowserSync</a> and <a href="https://sizzy.co/">Sizzy</a>. We proxy one of our test platforms through browsersync, using the proxy option:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ browser-sync start --http --proxy https://www.uaccount.uk
[Browsersync] Proxying: https://www.uaccount.uk
[Browsersync] Access URLs:
---------------------------------------
Local: https://localhost:3000
External: https://192.168.60.101:3000
---------------------------------------
UI: https://localhost:3001
UI External: https://192.168.60.101:3001
---------------------------------------
</code></pre></div></div>
<p>We then point a physical mobile device (or several) and Sizzy at this proxy. BrowserSync then synchronises any interaction with one device across all devices, which means we can test the physical interaction on one device, while seeing how the page looks on many devices at once! We can easily switch to physically interact with any connected device at any time, meaning we could log in on one device, then switch to another to continue testing.</p>
<p>Not a “perfect” solution (is there such a thing?) — but it’s working for us, for now.</p>
<figure>
<a href="/images/browsersync-sizzy-full.jpg">
<img src="/images/browsersync-sizzy-full.jpg" />
</a>
</figure>
<p>There are however, a couple of gotchas…</p>
<h2 id="x-frame-options">X-Frame-Options</h2>
<p>Most semi-security conscious people will have X-Frame-Options set to deny in their http headers. You may need to change the settings with this to allow Sizzy to connect to your test environment. <em>Don’t have this set to allow on a production system!</em></p>
<h2 id="3rd-party-hosted-fonts">3rd Party Hosted Fonts</h2>
<p>Some paid for font services only allow their fonts to be loaded from pre-defined URLs; certainly not on an internal IP, meaning that these fonts won’t load if you’re proxying through BrowserSync. I don’t have a fix for this yet, unless anyone can suggest one?</p>
<p>Enjoy!</p>Samuel TurnerHow can you perform cross device testing, when the most popular device only accounts for 5% of your traffic?Altered CSS Search Tool2017-09-13T00:00:00+00:002017-09-13T00:00:00+00:00https://samuel-turner.co.uk/altered-css-search-tool<p>I came across a bit of an issue at work recently - if some CSS in a large codebase gets altered as part of ongoing development, how can we find out what the affect on the website may be? How do we know where the classes are being used?</p>
<p>It’s possible to get a list of classes from <code class="highlighter-rouge">git log</code>, then pass those into <a href="https://github.com/keeganstreet/element-finder">Element Finder</a> to search the codebase for uses of those selectors.</p>
<p><a href="https://gist.github.com/SamuelTurner/d79822fb79cd30a678630f831e3ea308">The script can be viewed here</a>.</p>Samuel TurnerScript to compare a git branch with a base branch, find the changed/added/removed CSS classes, and search the codebase for usesMy Linux Development Environment… Again2016-07-16T00:00:00+00:002016-07-16T00:00:00+00:00https://samuel-turner.co.uk/my-linux-development-environment-again<h2 id="introduction">Introduction</h2>
<p>I play around with my preferred desktop linux environments a lot for various reasons, but every now and again I arrive at a setup I really like and end up sticking with it for a while. This is the latest iteration.</p>
<p>This time around, I’ve fallen for Kubuntu 17.04 (KDE is just awesome these days), and don’t actually need to change very much about it any more…</p>
<h2 id="install-kubuntu">Install Kubuntu</h2>
<p>Start by downloading the Kubuntu .iso from <a href="http://kubuntu.org">kubuntu.org</a> and install using the <a href="https://userbase.kde.org/Kubuntu/Installation">installation guide on userbase.kde.org</a>.</p>
<h3 id="enable-trim">Enable Trim</h3>
<p>If you’re running from an SSD, you should probably <a href="http://www.webupd8.org/2013/01/enable-trim-on-ssd-solid-state-drives.html">follow this tutorial on enabling trim</a>.</p>
<h2 id="removing-pre-installed-software">Removing Pre-Installed Software</h2>
<p>I actually like most of the default programs in Kubuntu, so there really isn’t much to remove compared to my previous configs.</p>
<p><strong>Some of these commands use the * wildcard to remove all related packages. Take great care in checking the list of packages that will be removed.</strong></p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt remove ktorrent ktorrent-data
sudo apt remove konversation konversation-data
sudo apt remove akregator
sudo apt remove kmail
sudo apt remove ktnef
sudo apt remove kaddressbook
sudo apt remove kontact
sudo apt remove korganizer
sudo apt remove knotes
sudo apt remove skanlite
sudo apt remove kde-telepathy*
sudo apt remove kleopatra
sudo apt remove kate
sudo apt remove libreoffice*
sudo apt remove dragonplayer
</code></pre></div></div>
<h2 id="installing-preferred-applications">Installing Preferred Applications</h2>
<p>After removing the bloat, I tend to install most or all of these alternative applications and extras:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt install nautilus-dropbox
sudo apt install flashplugin-installer
sudo apt install openshot
sudo apt install htop
sudo apt install lm-sensors
sudo apt install terminator
sudo apt install git
sudo apt install ssh
sudo apt install xclip
sudo apt install vlc
</code></pre></div></div>
<h2 id="install-sublime">Install Sublime</h2>
<p>Follow the instructions on the <a href="https://www.sublimetext.com/docs/3/linux_repositories.html">Sublime Text installation page</a>.</p>
<h2 id="install-virtualbox">Install VirtualBox</h2>
<p><a href="http://tecadmin.net/install-oracle-virtualbox-on-ubuntu/">Follow this guide to install virtualbox</a>.</p>
<h2 id="install-jekyll-dependencies">Install Jekyll Dependencies</h2>
<p>This blog uses the <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/">Minimal Mistakes</a> Jekyll theme, and relies on a few packages being installed so the required gems can be installed..</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt install ruby ruby-dev ruby-bundler libffi-dev zlib1g-dev liblzma-dev g++ autogen autoconf libtool
</code></pre></div></div>
<h2 id="finished">Finished!</h2>
<p>All done! That’s pretty much all I need, but I’ll keep updating this
post as I change things.</p>Samuel TurnerHow I set up my development environment using KubuntuDiggy Hole - A watercooled, overclocked, ITX, 4.2ghz Minecraft server!2015-09-15T00:00:00+00:002015-09-15T00:00:00+00:00https://samuel-turner.co.uk/diggyhole-watercooled-overclocked-minecraft-server<p>I recently found I was having a problem with my current home server, in that the Minecraft Server application was struggling massively because I build a lot of large redstone machines. Minecraft Server runs the the main world engine thingy in a single thread, which means that it needed a big increase in single thread performance. Not something the 45w AMD Athlon X4 615E in my file server can provide, So I decided to build a separate box just for Minecraft Server.</p>
<p>I raided my spare parts cupboard, and found I had a 128gb Crucial M4 SSD, 4gb of Corsair XMS3 DDR3, some Bitfenix Spectre Pro fans, and a load of watercooling parts. After some deliberation, I decided that - given that single thread performance was key - an Intel Pentium G3258 CPU in a watercooled, overclocked system would be pretty cool, use up all my spares and it wouldn’t be too expensive to buy the other parts I needed. I’ve never built an ITX based system before, so decided this would be a good project to build on that platform seeing as there would be no GPU and only one SSD.</p>
<p>Here’s the spec I landed on:</p>
<ul>
<li>CASE: Silverstone Milo ML05B</li>
<li>MOBO: Asus H81I-Plus</li>
<li>CPU: Intel Pentium G3258 Anniversary Edition - 4.2ghz @ 1.2v</li>
<li>RAM: Corsair XMS3 2x2gb 1600mhz DDR3</li>
<li>SSD: Crucial M4 120gb</li>
<li>PSU: BeQuiet SFX Power 2 300W</li>
<li>CPU BLOCK: Phobya UC-2 LT</li>
<li>RAD: XSPC AX240</li>
<li>FITTINGS: Barrow 16/10</li>
<li>PUMPRES: Magicool DCP450</li>
</ul>
<p>Build was very simple, just chopped a couple of holes in the case for hoses and plugged it all together.</p>
<figure>
<a href="https://farm5.staticflickr.com/4316/35944284052_4030d51b67_o.jpg">
<img src="https://farm5.staticflickr.com/4316/35944284052_4030d51b67_o.jpg" />
</a>
</figure>
<figure>
<a href="https://farm5.staticflickr.com/4311/35944285262_7a63d0cc55_o.jpg">
<img src="https://farm5.staticflickr.com/4311/35944285262_7a63d0cc55_o.jpg" />
</a>
</figure>
<figure>
<a href="https://farm5.staticflickr.com/4314/35305083323_cdd9d068af_o.jpg">
<img src="https://farm5.staticflickr.com/4314/35305083323_cdd9d068af_o.jpg" />
</a>
</figure>
<figure>
<a href="https://farm5.staticflickr.com/4303/35979532161_cf5eb7f342_o.jpg">
<img src="https://farm5.staticflickr.com/4303/35979532161_cf5eb7f342_o.jpg" />
</a>
</figure>
<figure>
<a href="https://farm5.staticflickr.com/4330/35979532451_6d2be72f78_o.jpg">
<img src="https://farm5.staticflickr.com/4330/35979532451_6d2be72f78_o.jpg" />
</a>
</figure>
<figure>
<a href="https://farm5.staticflickr.com/4317/35305083833_98e49b1b09_o.jpg">
<img src="https://farm5.staticflickr.com/4317/35305083833_98e49b1b09_o.jpg" />
</a>
</figure>
<figure>
<a href="https://farm5.staticflickr.com/4318/35944284892_881768066b_o.jpg">
<img src="https://farm5.staticflickr.com/4318/35944284892_881768066b_o.jpg" />
</a>
</figure>
<figure>
<a href="https://farm5.staticflickr.com/4301/35305082643_f46ce608e4_o.jpg">
<img src="https://farm5.staticflickr.com/4301/35305082643_f46ce608e4_o.jpg" />
</a>
</figure>Samuel TurnerMy take on the ultimate local Minecraft server. Watercooled, overclocked and built with large redstone circuits in mind.Superlight Ubuntu Installation2014-11-16T00:00:00+00:002014-11-16T00:00:00+00:00https://samuel-turner.co.uk/superlight-ubuntu-installation<p>I have spent the last couple of years distro-hopping and playing around
with different software, and I realised that no matter what distro I
tried out I was removing most, or all, of the pre-installed software and
installing my own preferred stuff, so thought I could try starting from
fresh instead!</p>
<!--more-->
<p><a href="http://flux242.blogspot.de/2014/05/minimal-xubuntu-1404-lts-installation.html">I used this article as my starting point</a> and worked from there.</p>
<h2 id="installing-the-base-os">Installing the Base OS</h2>
<p>Download the <a href="http://cdimage.ubuntu.com/netboot/14.04/">mini.iso</a> and run through the installation, leaving all
the options blank when it prompts you as to which ubuntu OS you want to
install, so that it just installs the base OS.</p>
<h2 id="disable-recommends">Disable Recommends</h2>
<p>I prefer to disable recommends, as it massively reduces how many
packages get installed and I’m yet to find I need much of the
recommended stuff.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo 'APT::Install-Recommends "false";' | sudo tee /etc/apt/apt.conf.d/60recommends
</code></pre></div></div>
<h2 id="enable-trim">Enable Trim</h2>
<p>If you’re running from an SSD, you should probably <a href="http://www.webupd8.org/2013/01/enable-trim-on-ssd-solid-state-drives.html">follow this tutorial
on enabling trim</a>.</p>
<h2 id="speed-up-tweaks">Speed-Up Tweaks</h2>
<p>You can find plenty of tips and hints in <a href="http://community.linuxmint.com/tutorial/view/114">this post</a> and <a href="http://www.upubuntu.com/2012/06/11-tips-to-speed-up-computers-running.html">this post</a>
and lots of places on Google, but there are a couple of things that I do
that seem to make a difference to me.</p>
<h3 id="adjust-the-swappiness">Adjust the Swappiness</h3>
<p>This didn’t effect my boot time, but I did notice that my system feels
much “snappier” after the change. To find out what your swappiness is
set to, run this command from the terminal:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cat /proc/sys/vm/swappiness
</code></pre></div></div>
<p>If the value is the default (60) then lowering it (I tend to lower it to
10) can give you a welcome speed boost in certain situations. To do so
you need to edit the <code class="highlighter-rouge">sysctl.conf</code> file:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/sysctl.conf
</code></pre></div></div>
<p>Scroll to the bottom of the file, and add the following line:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vm.swappiness=10
</code></pre></div></div>
<p>Save and exit the file.</p>
<h3 id="install-preload">Install Preload</h3>
<p>Preload keeps an eye on what you do and what programs you use most, and
preloads them for a faster boot and snappier operation. This decreased
my boot time by about 15%. You can run your own config for Preload, but
the default one works just fine for me.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install preload
</code></pre></div></div>
<p>Reboot the system to apply these changes.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo shutdown -r now
</code></pre></div></div>
<h2 id="install-the-gui">Install the GUI</h2>
<p>I’m currently favouring the Xubuntu flavour of XFCE4 so I’ve just copied
most of this from the article I mentioned earlier. These packages
install the GUI, gets the icons working, adds the sound settings
manager, the network manager and a few bits and bobs.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install xubuntu-desktop xfce4-volumed xfce4-indicator-plugin xfce4-netload-plugin xfce4-screenshooter xubuntu-icon-theme xfwm4-themes thunar-archive-plugin indicator-sound indicator-application pavucontrol menulibre librsvg2-common hicolor-icon-theme xdg-utils libgtk-3-bin gvfs-backends gvfs-fuse network-manager-gnome gnome-keyring fonts-liberation fonts-droid unetbootin
</code></pre></div></div>
<h2 id="install-the-power-manager-optional">Install the power manager (optional)</h2>
<p>If you run a laptop, then you’ll probably want the power manager
installed.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install xfce4-power-manager indicator-power
</code></pre></div></div>
<h2 id="install-the-whisker-menu-optional">Install the whisker menu (optional)</h2>
<p>If you want to run the whisker menu (as I usually do), install it.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install xfce4-whiskermenu-plugin
</code></pre></div></div>
<h2 id="install-my-basic-software">Install my basic software</h2>
<p>This is my list of basic software and helpful packages that I tend to
install on whatever distro I’m running at the time.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install terminator firefox flashplugin-installer galculator evince gucharmap gparted hardinfo lm-sensors phoronix-test-suite libnotify-bin libqt4-opengl virtualbox virtualbox-dkms virtualbox-qt nautilus-dropbox banshee vlc xarchiver filezilla chromium-browser lame asunder brasero openjdk-7-jre openshot libreoffice-calc libreoffice-writer libreoffice-impress fonts-sil-gentium-basic ttf-dejavu keepass2 ristretto curl ruby git
</code></pre></div></div>
<h2 id="install-atom">Install Atom</h2>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
</code></pre></div></div>
<h2 id="install-skype">Install Skype</h2>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo apt-get update
sudo apt-get install skype
</code></pre></div></div>
<h2 id="install-lamp">Install LAMP</h2>
<p>I just follow the the <a href="https://help.ubuntu.com/community/ApacheMySQLPHP">Ubuntu guide to installing LAMP.</a></p>
<h2 id="install-mcrypt-for-php">Install mcrypt for PHP</h2>
<p>First install the packaged and enable mcrypt.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install mcrypt php5-mcrypt
sudo php5enmod mcrypt
</code></pre></div></div>
<p>This only gives mcrypt and php the ability to work together, but not
with apache. To do so, you must edit apache2’s php.ini file:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/php5/apache2/php.ini
</code></pre></div></div>
<p>Then add the following line under the dynamically compiled extensions
section of php.ini:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>extension=mcrypt.so
</code></pre></div></div>
<p>Then restart apache2:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo service apache2 graceful
</code></pre></div></div>
<h2 id="install-phpmyadmin">Install PHPMyAdmin</h2>
<p>Run the following command and follow the prompts:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install phpmyadmin
</code></pre></div></div>
<h2 id="install-sass">Install SASS</h2>
<p>SASS is a ruby gem, so installing it is very simple: (Note that no sudo
is used, as I want to install SASS in the default version of Ruby within
RVM)</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo gem install sass
</code></pre></div></div>
<h2 id="configure-git">Configure Git</h2>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git config --global user.name "username"
git config --global user.email "your_email"
</code></pre></div></div>
<h2 id="install-composer">Install Composer</h2>
<p>I tend to install composer globally so that I can call it easily with
<code class="highlighter-rouge">composer</code> rather than <code class="highlighter-rouge">php composer.phar</code>.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
</code></pre></div></div>
<h2 id="restart">Restart</h2>
<p>Restart the system now to get to the desktop.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo shutdown -r now
</code></pre></div></div>
<h2 id="set-up-the-panel">Set up the Panel</h2>
<p>I personally set up my panel almost like Windows XP… It’s embarrassing
but it works for me.</p>
<ul>
<li>Right click the panel and select Panel/Panel Preferences</li>
<li>Unlock the panel and drag to the bottom of the screen (grab it in
the top left corner of the screen)</li>
<li>Increase row size to 36px</li>
<li>Go to items and set the list up in this order:
<ul>
<li>Whisker Menu/Application Menu</li>
<li>Separator - expand unticked in config)</li>
<li>Launcher - File Manager</li>
<li>Launcher - Terminal</li>
<li>Launcher - Firefox</li>
<li>Launcher - Atom</li>
<li>Launcher - VirtualBox</li>
<li>Launcher - Keepass</li>
<li>Launcher - Skype</li>
<li>Launcher - Banshee</li>
<li>Separator - expand unticked in config</li>
<li>Window Buttons - untick “show handle”, “switch windows using the
mouse wheel” and “show windows from all monitors” and tick “show
flat buttons” in config)</li>
<li>Separator - expand ticked in config</li>
<li>Notification Area (external)</li>
<li>Indicator Plugin (external)</li>
<li>Separator - expand ticked in config</li>
<li>Clock</li>
</ul>
</li>
</ul>
<p>If you have any extra monitors:</p>
<ul>
<li>Add a new panel and drag to the intended monitor</li>
<li>Flick between panel 0 and the new panel on the Display and
Appearance tabs and make the settings match</li>
<li>Go to Items and add Window Buttons</li>
<li>Make the Window Buttons config match that of panel 0</li>
</ul>Samuel TurnerStarting with the mini.iso and building a lightweight desktop OS out of itTest Automation = Keyboard Cat2014-09-24T00:00:00+00:002014-09-24T00:00:00+00:00https://samuel-turner.co.uk/test-automation-keyboard-cat-comparison<p>Firstly, please take this with a pinch of salt. I’m not being serious
but the thought crossed my mind this morning and I thought I’d share.
For this to work you need to accept that the cat is trained to play the
keyboard, not that there’s someone operating its legs for it.</p>
<h2 id="testing-cat">Testing Cat?</h2>
<iframe width="420" height="315" src="//www.youtube.com/embed/J---aiyznGQ" frameborder="0" allowfullscreen="">
</iframe>
<p>What the above video shows, is a very skilled person (a pianist in this
case), using a very stupid thing to perform a relatively simple task. It
probably took many years for the pianist to train the cat to play that
one song, could the pianist have used that time more wisely?</p>
<p>Whenever the cat plays that song, the only thing that anyone can learn
is that it <em>appears</em> that the cat can still play the song. (The fact
that it’s actually a recording — an outside influence — shows how easily
automated test outcomes can be affected or changed).</p>
<p>Clearly keyboard cat has a place in the world, as does test automation,
but should you entrust your keyboard testing to a cat that doesn’t
understand keys, notes, pitch, tempo, sheet music or even electricity?
The cat is merely checking one specific thing, not testing. It hasn’t
got the capacity to notice when the keys it doesn’t use are broken, or
when the power has gone off. It just reports “yes I played the song” or
“no I did not play the song”.</p>
<p>The cat is stupid, don’t rely on the cat to test your product.</p>Samuel TurnerShort comparison of test automation and keyboard catInstalling Composer in Manjaro2014-04-16T00:00:00+00:002014-04-16T00:00:00+00:00https://samuel-turner.co.uk/installing-composer-in-manjaro<p>I couldn’t find instructions anywhere for installing composer in
Manjaro. I managed to get it working using <a href="https://coderwall.com/p/-hwixa">the technique described for
Arch in this article</a> but had to do the steps in a different order.</p>
<h2 id="editing-phpini">Editing php.ini</h2>
<p>In Manjaro we need to change the php.ini file so that Composer can
install.</p>
<p>Open php.ini for editing from the command line:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo gedit /etc/php/php.ini
</code></pre></div></div>
<p>Locate and uncomment the following lines:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>extension=openssl.so
extension=phar.so
</code></pre></div></div>
<p>Search (ctrl + f) for the <code class="highlighter-rouge">open_basedir</code> and add the following to the
end of the line:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>:/usr/local/bin/:/root/
</code></pre></div></div>
<p>Save and close the <code class="highlighter-rouge">php.ini</code> file.</p>
<h2 id="downloading-and-installing-composer">Downloading and Installing Composer</h2>
<p>Download and install Composer from the command line:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
</code></pre></div></div>
<p>Restart the httpd server:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl restart httpd
</code></pre></div></div>
<p>Update composer:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo composer self-update
</code></pre></div></div>
<p>That should be everything sorted!</p>Samuel TurnerShort guide on installing composer in ManjaroMy Linux Development Environment2014-01-03T00:00:00+00:002014-01-03T00:00:00+00:00https://samuel-turner.co.uk/my-linux-development-environment<p>I first wrote this post over a year ago when I was setting up my desktop
and laptop using Linux Mint, in order to give me a reference to follow
when setting up a new computer. Since then I’ve scrapped Mint, Manjaro
XFCE, Manjaro KDE and finally settled on Xubuntu. It gives the
simplicity and huge community of Ubuntu, without all the bloatware and
with the XFCE interface.</p>
<p>I’ve cut out much of the original post, as it was just me trying to
justify my preferences. This is just how I like to do things.</p>
<h2 id="install-xubuntu">Install Xubuntu</h2>
<p>Just download the Xubuntu .iso from <a href="http://xubuntu.org">xubuntu.org</a> and install
using the <a href="https://help.ubuntu.com/community/Installation?action=show&redirect=InstallingXubuntu">installation guide on help.ubuntu.com</a>.</p>
<h3 id="enable-trim">Enable Trim</h3>
<p>If you’re running from an SSD, you should probably
<a href="http://www.webupd8.org/2013/01/enable-trim-on-ssd-solid-state-drives.html">follow this tutorial on enabling trim</a>.</p>
<h2 id="speed-up-tweaks">Speed-Up Tweaks</h2>
<p>You can find plenty of tips and hints in <a href="http://community.linuxmint.com/tutorial/view/114">this post</a> and
<a href="http://www.upubuntu.com/2012/06/11-tips-to-speed-up-computers-running.html">this post</a> and lots of places on Google, but there are
a couple of things that I do that seem to make a difference to me.</p>
<h3 id="adjust-the-swappiness">Adjust the Swappiness</h3>
<p>This didn’t effect my boot time, but I did notice that my system feels
much “snappier” after the change. To find out what your swappiness is
set to, run this command from the terminal:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cat /proc/sys/vm/swappiness
</code></pre></div></div>
<p>If the value is the default (60) then lowering it (I tend to lower it to
10) can give you a welcome speed boost in certain situations. To do so
you need to edit the <code class="highlighter-rouge">sysctl.conf</code> file:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo gedit /etc/sysctl.conf
</code></pre></div></div>
<p>Scroll to the bottom of the file, and add the following line:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vm.swappiness=10
</code></pre></div></div>
<p>Click save, close and then restart the system for the change to take
effect.</p>
<h3 id="install-preload">Install Preload</h3>
<p>Preload keeps an eye on what you do and what programs you use most, and
preloads them for a faster boot and snappier operation. This decreased
my boot time by about 15%. You can run your own config for Preload, but
the default one works just fine for me.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install preload
</code></pre></div></div>
<h2 id="removing-bloatware">Removing Bloatware</h2>
<p>I like to remove a few things I never use or don’t get on with just to
tidy up the launcher and reduce the number of packages that get updated
when I update.</p>
<p><strong>Some of these commands use the * wildcard to remove all related
packages. Take great care in checking the list of packages that will be
removed.</strong></p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get remove gimp*
sudo apt-get remove abiword*
sudo apt-get remove pidgin*
sudo apt-get remove thunderbird*
sudo apt-get remove xchat*
sudo apt-get remove transmission*
sudo apt-get remove simple-scan
sudo apt-get remove gnumeric*
sudo apt-get remove parole
sudo apt-get remove gmusicbrowser
sudo apt-get remove file-roller*
sudo apt-get remove software-center*
sudo apt-get remove mousepad*
sudo apt-get remove onboard*
sudo apt-get remove gnome-mines*
sudo apt-get remove gnome-sudoku
sudo apt-get remove xfburn
sudo apt-get remove xfce4-notes*
</code></pre></div></div>
<h2 id="installing-preferred-applications">Installing Preferred Applications</h2>
<p>After removing the bloat, I tend to install most or all of these alternative applications and extras:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install nautilus-dropbox
sudo apt-get install flashplugin-installer
sudo apt-get install banshee
sudo apt-get install vlc
sudo apt-get install xarchiver
sudo apt-get install gedit
sudo apt-get install lame
sudo apt-get install asunder
sudo apt-get install openjdk-7-jre
sudo apt-get install openshot
sudo apt-get install htop
sudo apt-get install lm-sensors
sudo apt-get install libreoffice
</code></pre></div></div>
<h3 id="install-skype">Install Skype</h3>
<p><a href="http://xubuntugeek.blogspot.co.uk/2012/10/how-to-install-latest-skype-in-xubuntu.html">Install the latest skype in Xubuntu</a>.</p>
<h2 id="install-lamp">Install LAMP</h2>
<p>I just follow the the <a href="https://help.ubuntu.com/community/ApacheMySQLPHP">Ubuntu guide to installing LAMP</a>.</p>
<h2 id="install-mcrypt-for-php">Install mcrypt for PHP</h2>
<p>First install the packaged and enable mcrypt.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install mcrypt
sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt
</code></pre></div></div>
<p>This only gives mcrypt and php the ability to work together, but not
with apache. To do so, you must edit apache2’s php.ini file:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/php5/apache2/php.ini
</code></pre></div></div>
<p>Then add the following line under the dynamically compiled extensions
section of php.ini:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>extension=mcrypt.so
</code></pre></div></div>
<p>Then restart apache2:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo service apache2 graceful
</code></pre></div></div>
<h2 id="install-phpmyadmin">Install PHPMyAdmin</h2>
<p>Run the following command and follow the prompts:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install phpmyadmin
</code></pre></div></div>
<p>Once done, save and close the file. All that is left is to restart
Apache in order to get PHPMyAdmin to run.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo service apache2 graceful
</code></pre></div></div>
<h2 id="install-atom">Install Atom</h2>
<p>This installs Atom from the ppa.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo add-apt-repository ppa:webupd8team/atom -y &&
sudo apt-get update &&
sudo apt-get install atom -y
</code></pre></div></div>
<h2 id="install-ruby-with-rvm">Install Ruby with RVM</h2>
<p>I do an awful lot with Ruby alone, but it’s also required to run many
tools I use. Installing Ruby with RVM allows you to have multiple
versions of Ruby installed and switch between them as needed. First off
you’ll need to install curl:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install curl
</code></pre></div></div>
<p>Next you’ll have to use curl to download and compile RVM. (This will
take some time)</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo curl -L https://get.rvm.io | bash -s stable --ruby
</code></pre></div></div>
<p>To start using RVM you need to run the following:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source ~/.rvm/scripts/rvm
</code></pre></div></div>
<p>RVM will install with the latest stable version of Ruby, which at the
time of writing is Ruby 2.0.0. If you need any older versions, just run:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rvm install x.x.x
</code></pre></div></div>
<p>If you have installed an older version of Ruby that you want to use as
the default version, simply run:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rvm use x.x.x --default
</code></pre></div></div>
<h2 id="install-rubygems">Install RubyGems</h2>
<p>If you’re going to do anything with Ruby, you’re probably going to need
to install gems, so you’ll need RubyGems:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install rubygems
</code></pre></div></div>
<h2 id="install-sass">Install SASS</h2>
<p>SASS is a ruby gem, so installing it is very simple: (Note that no sudo
is used, as I want to install SASS in the default version of Ruby within
RVM)</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gem install sass
</code></pre></div></div>
<h2 id="install-git">Install Git</h2>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install git
</code></pre></div></div>
<p>Next you need to configure Git slightly.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git config --global user.name "username"
git config --global user.email "your_email"
</code></pre></div></div>
<h2 id="install-virtualbox">Install VirtualBox</h2>
<p><a href="http://tecadmin.net/install-oracle-virtualbox-on-ubuntu/">Follow this guide to install virtualbox</a>.</p>
<h2 id="install-composer">Install Composer</h2>
<p>I build a lot of stuff in Laravel, which requires Composer. I tend to
install it globally so that I can call it easily with <code class="highlighter-rouge">composer</code> rather
than <code class="highlighter-rouge">php composer.phar</code>.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
</code></pre></div></div>
<h2 id="finished">Finished!</h2>
<p>All done! That’s pretty much all I need, but I’ll keep updating this
post as I change things.</p>Samuel TurnerHow I tend to set up my development environment using Xubuntu