Since version 1.7 the Go testing package provides the ability to run some of the tests in parallel (well not entirely in parallel but that is another blog post 😉). This is optional functionality you can enable by adding a single line of code t.Parallel() in your subtests. But how does that work exactly and what does Go actually do with these tests?
I find the way that strings have been implemented in Go to be really interesting but also a bit confusing when you are first introduced to them. Go has native UTF8 support, which flows through how the source code is written to how strings and “runes” are represented (runes is the thing that really got me by surprise but more on that later). So what does Go do differently with strings that is worth mentioning?
Doing a major version upgrade is always fun so this is no exception. I use Twig for my PHP projects so I run into multiple little snags whilst upgrading to version 2. I have listed the most interesting ones here with the errors I was seeing and the recommended updates:
But how can we know? The easiest way to get an insight of what the companies expect from their Tech Leads is to have a look at their job postings. So off we go to create our data set of job postings for Tech leads !
If you would like to debug one of your command line scripts using PHPUnit then you need to export one of the XDEBUG_CONFIG values. I read one post about this (unfortunately lost the link and cannot place it here as a reference) the general idea was to export the configuration for XDEBUG and then run phpunit as you would normally do. So, let’s say that you are using PHPStorm as your IDE then the script would be:
Postgres has the ability to create clusters of databases that run on the same machine concurrently. One thing that I did not know about postgres is that you can also run multiple versions of postgres at the same machine concurrently along with the mutliple clusters mentioned earlier. But how can one view information about all these instances and clusters and how can we connect to each of them and how can one upgrade the clusters running on one version to another?
I am running Debian on my personal computer and the rest of this post is going to be a very brief description of how I managed to upgrade and tidy up after my postgres instances running on my local computer. Please note that this is not an in depth post nor I suggest in any way this approach for a live / production upgrade of postgres.
So let’s get started!
First of all let’s see which versions of postgres are running on our box. As a super user execute the following command
What I was really interested to find out was how can I start Chromium with one of these profiles, instead of using the last one that was loaded. The answer can be found here: http://superuser.com/questions/377186/how-do-i-start-chrome-using-a-specified-user-profile. Unfortunately the man page for chromium does not list the specified option so it was really nice to find this question in superuser.com! But let me just give an example of how to use it under Linux.
Phing is a PHP build tool that you might be familiar with or you might be already using. The official Phing website can be found at http://www.phing.info/ and the initials stand for PHing Is Not GNU make. You can download or install it as a PEAR package and as long as you are a bit familiar with XML it is really easy to learn how to use. So, if you are reading past this point it means that you have actually used Phing before and that you are familiar with its CopyTask for copying individual files or filesets from one location to another.
Recently I was trying a new build file with Phing and came accross an interesting issue. The result of building a target that included copying a previously defined fileset from one location to another had a somewhat unexpected result. An empty folder that was contained in the source location for which all users had read, write and execute permissions on, was copied accross but the permissions were not kept. I was not receiving any errors and the folder was actually created in the destination folder. As it turns out the version of Phing that I was using did not support copying an empty folder with its permissions to a new location. So if you are having a similar issue do upgrade your package to the 2.5.0 version of Phing (as of the time of writting this is the latest stable release of Phing on PEAR). You can perform the upgrade quite easily as you would with any other PEAR package.