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.

Making WordPress comments form work with Bootstrap 3

While re-designing my WordPress blog template I came across the challenge of making the WordPress comments form play nicely with Bootstrap 3. Unlike the search form which is easily customized by simply adding a ‘searchform.php’ template file, the comments form is a little more complicated.

When making WordPress templates the comments area is modified by adding the ‘comments.php’ file. This however, is only the layout of the comments. The comments form itself is output by using the function:

'<?php comment_form( $args ); ?>'.

The output of this form can be modified using the arguments documented in the official documentation. However I found this handy article, that gives a brilliant and easy to understand breakdown of how to make the ‘comment_form()’ function output some Bootstrap 3 friendly code.

How to clone a GitHub project on Android Studio

You may have read/watched my previous tutorial How to use GitHub with Android Studio 1.x. This is a follow up tutorial which explains how to clone a project that has been added to GitHub. If you’re looking for more in-depth training, check out my ebook How to Use GitHub with Android Studio: A complete step-by-step guide to mastering the technology.

Click here to download an easy-to-follow PDF version of this post

Read more

How to remove a git remote

In the comments of my article How to use GitHub with Android Studio 1.x, Cynthia gets the following error:

can't add remote
fatal: remote origin already exists.
during execution git remote add origin

Read more

How to use GitHub with Android Studio 1.x

Previously, I wrote a post called How to use GitHub with Android Studio, which was based on the beta version of Android Studio. Since then, Android Studio has progressed past the Beta phase and is now officially the primary IDE for Android.

As I expected, they added GitHub support so you no longer have to follow the tutorial in my previous post to use GitHub with Android Studio.

If you’re looking for more in-depth training, check out my ebook How to Use GitHub with Android Studio: A complete step-by-step guide to mastering the technology.

Read more

Low cost backup solution for linux using Dropbox and a shell script

In this guide I will explain how to create a backup solution for your Linux server using a basic shell script and Dropbox. It’s good for text files but not so good for bigger media files such as audio and video.

It works as follows:

  • We install Dropbox on our server
  • Then we create a shell script that will copy all the directories you want to backup to a temp directory
  • An finally we compress that temp directory into our Dropbox folder and remove the temp files

I use this method to backup all my Git repositories, MySQL databases, project source code and my server configuration files. A free Dropbox account gives you 2GB of storage, which should be enough for some compressed text files as well as a couple of databases.

Read more

How to use GitHub with Android Studio

This article provides a basic overview of how to use GitHub with Android Studio. If you’re looking for more in-depth training, check out my ebook How to Use GitHub with Android Studio: A complete step-by-step guide to mastering the technology.

Click here to download an easy-to-follow PDF version of this post Read more