The Incredible Hatred for IE

As a developer the need to make websites cross-browser compatible is an every day task. On I have found is made a huge deal easier by a nifty website called

It allows you to fire up a Virtual Machine from within your web browser, great stuff.

However, if like me you use a Mac and you have fired up an IE browser to inspect a web page, but the web page opens in a pop up with no toolbars allowing you to select the developer toolbar.

You can try the shortcut but I had major issues with it, so I was able to get it on screen with the following combination.

  1. CMD Shift Ctrl Fn + F12 (Once)
  2. Shift Ctrl Fn + F12 (Once)

Its almost as if step 1’s key combination is a switch that allows the developer toolbar to be shown/hidden.

Activate it with step 1’s key combination and then you can toggle using step 2’s key combination.


The Bus Commuting Blogger

I decided to start blogging mainly to help myself out as a documentation diary, a bit of fun and something to keep me amused on the bus journeys.

I started taking the bus a month ago and I should have started long before.

  1. There is no concentration required which means you can rest to and from work if required.
  2. Its cheaper, I save 50% based on commuting by car with parking fees.
  3. I can attempt to write some really bad blog posts for yours and my amusement.

I don’t really have a theme for the majority of my posts as they will just be thought of on the spot or possibly based on one particular event that day.

If a day goes by (mainly the weekends) without a post and you are bored and feel the urge to write something please send it in and I will gladly make it a featured post (if it is appropriate). In fact if there are regular guest posts, I can dedicate the weekend days to you.

Any developers out there who disagree or just purely hate my solutions, please leave comments as I am here to learn and this is mainly a resource for my own learning, but if it helps others great.

Version Control

The Vitality of Version Control

Version Control in this day and age is on power with having internet on your smart phone. You could function without it but why should you and how badly would it affect your every day tasks.

Without internet on your phone you may miss a bus because you forgot the timetable and had no way of checking it via your phone or incurring bank charges because you were not able to transfer funds in time on a mobile app connected through the internet.

Version Control is the same, without it we would still be sending folders to one another through emails or usb pens.

Some major problems with the old style saving of files:

  • not sure which file/folder is the most up-to-date,
  • usb pens can get corrupted and lose your saved files (it has happened everyone at some stage),

A recent scenario reminded me just how vital to a business versioning files is. However it is equally important that everyone who is required to use it understands it and has been either given appropriate walkthroughs or has taken it upon themselves to learn it (ask questions and use

A popular version control system is Git, usually hosted on either github or bitbucket. There are many things that affect which one you should use but this post doesn’t go into that.

Some walkthroughs of version controlling using bitbucket to follow and also links to well written documentation (by seriously smart people).

OCD Squares

The Mythical 4px Margin

A while back a colleague seen a great tip for dealing with the 4px margin caused by using display: inline-block.

This is the best solution I have come across yet, if it’s possible to use in your circumstance (as it requires you setting the font-size property).

Fix: if you were using a ul to parent a bunch of li’s with display: inline-block, then you would set font-size: 0 on the ul (this appears to remove all spacing between the child items) and set or reset the font-size property on the li’s (for example: font-size: 14px or 1em or 1.5rem).

There are other methods of sorting out the problem that have been documented many places including the king of CSS over @

Off the top of my head would be using float: left on the li’s and making sure to clear after:


ul:after{ clear: both; content: “”; display: block; font-size: 0; height: 0; }


If you don’t like using float and have access to the HTML then you may change the markup to correct this problem. I am not a fan of this fix as it can make your code look pretty nasty. It requires you to remove any line breaks between the li’s (will update with an example when not on my phone).

Not so successful fixes including setting a minus margin but I never had much success with this fix as sometimes you like to use margins for styling.

It can be a headache to deal with for people who don’t know why it happens or methods of fixing so hopefully this helps people from pulling out their hair and tailoring their solution to best suit themselves.

The Laborious Invalid Login

So all was going well. The day had been productive and I also had the pleasure of introducing a new program to my workflow, to help with productivity – SourceTree.

However after documenting and changing my development setup I encountered a problem, one that proved to be especially annoying after finding out it was quite easy to fix (whether or not it was the correct fix or not).

Problem: when creating a local instance of moodle and using a database that was already setup locally, changing a newly created instance of moodle and pointing the config.php to look at the already existing database.

This resulted in not being able to log in as a user.

Issue: mnetlocalhost column on mdl_user and in the mdl_config tables had been set to 3.


Fix: changing all instances of 3 to a 1 in the mnetlocalhost column in both mdl_user and mdl_config tables, fixes this issue.



A colleague also pointed out (not yet tested) that there is a mdl_mnet_host table that the value 3 was pointing to.

Possibly updating this field would also fix this problem and would be much more convenient than updating the other 2 tables.