2 Jul 2020
jQuery formBuilder is a lovely stylish formbuilding tool, with all the front-end features a developer could desire. But the documentation is a little short of examples for integration with a backend system + database, and the gitter chat is completely full of people struggling with the basics.
I’m writing down some integration notes to keep it clear for myself in my head.
I’ve tried to keep this code as simple and as framework agnostic as I can.
Example code = dirty code. Do not use in real-life.
4 Jun 2020
What is a finite state machine?
A finite-state machine (FSM) is a mathematical model of computation. It can change from one state to another in response to some inputs; the change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition.
Thank-you Wikipedia. That’s helpful.
16 May 2020
Over the years, I’ve built a whole library of helper functions for working with dates in php, but I think they’re all a thing of the past now. Because I’ve been playing with Carbon Date library by Brian Nesbitt. It’s best described as Php’s
DateTime for humans.
Here follows a quick summary, but I’m just looking at the very tip of the iceberg. Lots more!
9 May 2020
I use modal popups all over the place in my web applications. The most frequent use is to make the user confirm deletion, either by typing DELETE into a form or by giving a reason for deleting the item in question. And I want to make this work in Laravel.
Note: this is klunky. I’ve been playing with Laravel for a few weeks and if I end up using it as an ongoing development platform, then yes, things will be rewritten.
22 Nov 2012
Talking to a customer t’other day and I mentioned the (infamous) tree swing cartoon. He had no idea what I was talking about.
5 Aug 2012
I’ve recently had a completely new (to me) SVN problem. I’ve been trying to update my SVN working copy from the reposisty and I get this error:
Can’t move ‘.svn/tmp/entries’ to ‘.svn/entries’: Operation not permitted
I’ve tried running the svn cleanup, but no joy. Google is my friend… the fix is to run this command in terminal
chflags -Rv nouchg .
chflags – Change File Flags command
-R recursive, -v Verbose (tells you which files changed)
nouchg means the file can be changed (immutable bit cleared)
The immutable bit was a new one to me, so I had to go and look that one up as well. When you can’t take the chance of a file getting accidentally munged, you can set the immutable bit. Not even root can delete a file with the immutable bit set, unless they clears the bit first (making accidental removal highly unlikely). Very sensible, and since I’m exactly the kind of person who might accidentally delete whole swaths of files while in root mode, I can really see the point of an immutable bit.
However, I couldn’t work out how or where the immutable bit was being set. More googling … this seems to be a common problem where some developers are using windows & others are using mac os x. Still not sure of the WHY but the context makes sense.
3 Jul 2012
This came to me via one of my clients – they were talking about problems they’d had with another web developer.
The site in question is a standard ecommerce site where users have to register as part of the checkout process, and login to get downloads, and special discounts. Problem started when the site owner got this email from one of their customers.
I want to report that your site is NOT secure.
I had forgotten my password. So I did a Google search to see if I can find the webpage on how to re-set it.
Guess what? Someone has hacked your site and obtained all the passwords and email addresses and posted them online.
Sure enough, I found my email … and my forgotten password.
Basically, some script kiddies had hacked the site and posted all email addresses and passwords online with lots of (in)appropriate “ha ha, we got you good!” messages
22 Jun 2012
Every time. This happens every time.
I’ve been trying to find the source of this wonderful cartoon, but have just ended up with loads and loads of blogs where people go “me too!”
7 Dec 2008
var cars = new Array(
So I’ve taken to coding lists like this:
var cars = new Array(
I’ve taken to using the same style pretty much everywhere I have a comma-separated list of things – it’s particularly helpful in SQL server stored procedures.
insert into t_users (
) values (