My Linux Cheat Sheet

I frequently use Ubuntu or Debian to run my applications. Here is my cheat sheet of how to perform commonly required tasks on these Linux distributions.
Read more

Disable “LF will be replaced by CLRF” warning in Git on Windows

If you’ve ever used Git in windows, you may have seen something like this every time you add files to Git:

warning: LF will be replaced by CRLF in www/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in www/templates/dash.html.
The file will have its original line endings in your working directory.

If you want to turn it off, type this:

git config --global core.safecrlf false


OnePlus One ADB Access over Network on Windows 10

So I recently upgraded to Windows 10 and also upgrade my OnePlus One to CyanogenMode 12 (Lollipop). Decided I would do a bit of Android development, so I’ve spent most of the weekend trying to locate some ADB drivers which work with my computer and phone. So far I found nothing.

After trying a number of different versions of the Samsung drivers, following countless guides and shaking my phone very hard, I noticed an option on the phones Developer options called ADB over network. My first thoughts were “this was too good to be true”, but lo and behold, after some investigation it’s far easier than locating and installing drivers which allow me to connect my OnePlus One to my Windows machine for ADB debugging (although, brain surgery is probably easier than that).

So here is how you do it.

Read more

Virtualenv with Eclipse with PyDev on Windows 10

This article will explain how to install virtualenv and create a new Python Project in eclipse which uses a custom virtual environment. There is also a little Hello World style example at the end!

This article assumes that you have Python, Eclipse and the PyDev plugin installed on your machine. If you need to know how to do this, please see my previous post: Setting up your Windows 10 System for Python Development (PyDev, Eclipse, Python).

In the current public version of Python, there is a bug in one of the packages which will display the following error message if you try to install any packages using pip:

Fatal error in launcher: Job information querying failed

This bug has been fixed in the current dev release but still exists in the production version at the time of writing this article. If you want to learn more about the status of this, you can track it via this ticket:

Read more

Setting up your Windows 10 System for Python Development (PyDev, Eclipse, Python)

In this article I’ll explain how you can set-up your Windows 10 machine for some extreme Python development.

Read more

Installing Eclipse Luna on Windows 10

Hey guys, I have recently been playing around with the insider preview of Windows 10. Love it so far, and since everyone will likely upgrade form Windows 8 to Windows 10, I thought I’d write some articles using it.

This article explains how to install Eclipse Luna on Windows 10. Eclipse is unique to most IDE’s in that it doesn’t have an installer.

Read more

How to install Eclipse and PyDev

If you are just starting to learn Python development, you may be wondering what is a good IDE (Interactive Development Environment) you can use to get the code flowing? My personal favorite is Eclipse with the PyDev plugin.

Why is it my favourite? For a few reasons:

  • Eclipse is a powerful IDE with many built in features.
  • Eclipse has an extensive marketplace for plugins.
  • It’s Open Source.
  • Easily sync projects to remote servers over SSH.
  • Nice Git integration.

So, how do you get going with this awesome IDE?

In this tutorial I will be using Windows 8.1, however it will work equally as well on a Mac or Linux machine.

Read more

How to completely uninstall MariaDB from a Debian 7 server

There are many guides about how to install and configure popular applications on Linux servers, but not much on how to remove them.

I found this out when I needed to install a MariaDB Galera cluster on a server which already had a stand-alone MariaDB server installed. Having the older version of MariaDB installed (and the older repository in the source list) meant all of the guides I was following didn’t work due to conflicting packages.

This guide will explain how to completely remove MariaDB from your system (including any databases). Read more

It doesn’t bloody work! 4 things to keep in mind when reporting a bug

Picture of a ladybug

As a professional software engineer, I deal with bug reports all the time. As a result, I have had my fair share of tickets which read something along the lines of: “<insert arbitrary feature here> is not working!!!”.

Don’t get me wrong, I am a strong believer in Kaizen (Japanese for a “system of continuous improvement”) and as a result, I love getting bug reports. They create a great opportunity to fix something in the software which may have otherwise gone unnoticed or turned a user away from out software. I do however, also believe that a lot of time could be saved if bugs are reported properly, so here are some tips on how to report bugs:

1. Take screenshots

A picture paints a thousand words. Where possible, always provide a screenshot of the error message or problem you have. These are very helpful when debugging an issue because the developer can get see exactly what the error looked like when it appeared.

2. Describe the steps

List the steps you took before you saw the bug, in a number list. This might look like this:

  1. Logged into the app
  2. Selected messages on the right
  3. Opened my latest message
  4. The app crashed

3. Give specifics

Assume that everything is relevant. Be as specific as possible when describing the issue. Provide details such as:

  • The username of the account you were logged in as
  • Operating system/device you were using
  • The time the bug appeared
  • The last screen you saw before the bug happened
  • Any error code (developers LOVE error codes)
  • What you ate for dinner

The more specific the information you give the more the developer has to work with.

4. Include only one problem per ticket

If you have noticed more than one bug, it might be tempting to bundle them all into the same ticket. The problem with this is that an engineer will likely add specific notes relating to a bug to the ticket as they are debugging the issue. This is so if a bug is assigned to a colleague, they can easily pick up where the previous engineer left off. This can become confusing if a ticket is referring to multiple different bugs.

Do the above and your bug will likely be identified and fixed much faster by the development team.



Ladybird photo by Alfie Ianni:

Excellent Command Prompt Alternative

My good friend Alireza recently sent me a link to an alternative command prompt application for Windows called Cmder. When I first clicked the link, my initial thought was “this looks nice, but is it really worth installing a whole application just for a nicer looking command prompt window?”. I quickly dismissed it and carried on with my coding.

A couple of weeks later I receive an email from the MongoDB University. It was a notification that the course I had enrolled in a few weeks back (MongoDB for Python Developers), was available for me to start.

Being the type of person who likes to get things done early, I click the link and begin the course. After a few video lectures in, I have already installed the enterprise NoSQL database server on my local machine. Before I know it, I am busy bashing commands into a Microsoft Windows 8.1 Command Prompt dialog, adding and searching for JSON objects containing information about peoples names and their favorite fruits. After about an hour of squinting at the screen trying to establish if I had typed a regular or curly bracket, I remember the link my friend had previously sent me:

Screenshot of a regular and  curly bracket in Command Prompt highlighting how similar they look

After installing Cmder and running it for the first time, I quickly saw the value in having a “nicer looking command prompt window” which I had previously overlooked. I am immediately in awe of the crystal clear clarity between any type of bracket you could possibly find on an English (United Kingdom) keyboard.

Unbelievably, it doesn’t just look great, it comes equipped with some great built in features too, such as:

  • Build in SSH Client
  • Ability to SCP files
  • Git version control system
  • Other useful tools commonly found on Linux machines such as: wget, curl, ls

I am now hooked on this awesome tool, and highly recommend it to anyone looking for a replacement of the oppressive, unattractive Windows Command Prompt window.

Windows Command Prompt alongside commander

Thanks for reading, and I have you have as much fund with Cmder as I have.