Posts for: #Coding

Laravel Model Caching

This post is about trying to limit SQL queries, by the use of a method called “caching”. I’m going to talk about different methods ways of thinking about caching.
Read more →

You can’t hide complexity without cost

In my 20+ year career as a coder I have seen, many times, cases where someone thought they had found a way to make things easier and simpler, and, this is the crucial bit, more powerful. I did a maths degree at Uni, and I intrinsically understood the problems here. It’s the law of diminishing returns. Let’s get concrete with some examples. The no code lego-esque dream that never dies The first time I thought about it was in my first job out of uni in 2002.
Read more →

Iplocate vs Cloudflare

I’ve been working for a client, and the e-commerce solution I built along with Mandy for them has a multi-currency feature. They wanted to have the customer shown the most suitable currency when they arrive on the site, and so we had to come up with a way to do that. The first thing was to find out which country they were in, and the answer we fell to first was a lookup service by IpLocate.
Read more →

Stress Free Timer

We use timers everywhere, and most of the time how they work is fine. But I’ve come across a slightly different need. For those who struggle with working, and procrastinate, there is the “Pomodoro” technique which advises on setting a timer for 20 mins and commiting to focusing on work throughout that 20 mins before stopping for a break. I like this and have used it a couple of times to just get going on a project, but this use case actually means a normal timer is often not quite the right thing.
Read more →

Schema Org Products

Schema.org is a website that holds the commonly used standards for encoding information about the content of your webpages in a way that makes it easier for the likes of Google and Bing to understand what your page is about. This post is about how products information is encoded. Here’s the page for a Product. The question I want to address is “How do I create an acceptable entry for a specific product”.
Read more →

Image Url Naming

I’ve repeatedly come up with the issue of “where do I put this file” and even “what should I name this file”. There’s a bunch of things to consider. Is it important that the original name of the file persists if someone were to “Save As” on it. That is, do we need to reference the original filename in the url it’s accessed from Is it important that the image cant be guessed.
Read more →