I’m constantly thinking of ideas, and I find myself wanting to develop all of them. Unfortunately I’m just one incredibly handsome man, and all my time is spent on BugMuncher.
It’s starting to feel like these ideas are weighing me down, I find myself dividing my thoughts between all of them, and I want out.
So I’m going to put these ideas here, for all to see, in the hope that it offloads them from by brain. If you like any of these ideas please feel free to take them and develop them. All I ask is that you let me know, as I’d love to see how it turns out. (more…)
I’m currently working on a Google maps based project for a client, which deals with large numbers of points and overlays. At one point in the program I was getting around 16,000 Lat/Lng points from the database, which formed 70 polygons. Before the polygons could be rendered on Google Maps, I needed to group the points by polygon in an array. (more…)
So I’ve just set up a GitHub account and put a couple of little projects on there, I’ve always been an SVN man, so bare with me while I’m still getting to grips with Git.
My GitHub account is https://github.com/mattbearman I’ll be adding a lot more to it in future, so be sure to keep an eye out.
Just a quick one today, I’ve seen a few people asking how to convert an array to an object in PHP. All the responses to these questions seem to involve creating a recursive function to loop through the array and create corresponding properties in a stdClass for each key in the array.
There happens to be a MUCH simpler way built in to PHP from version 5.2, all you need to do is this:
$object = json_decode(json_encode($array));
This works because when you encode an array using JSON in PHP, non-numeric keys become object properties, so when the JSON string is convered back to an object, the new properties remain instead of being turned back into array keys.
Give it a try, it works perfectly.
In the last few years I’ve learned a lot in this area and I thought I’d share my knowledge with the world. I realise there are other, possibly better techniques than the ones I list here, and I’d love to hear about them in the comments. (more…)
Well, it happened, I finally turned 25. I genuinely thought it would never happen to me, a little naive, I know. I figured I’d just stay 21 forever, maybe 22 on a bad day. Turns out time waits for no man, not even me.
Anyway, it was a combination of reaching this milestone in life, and just generally getting fed up with the stress of running a business, that led me to a life changing decision (I’ve always wanted to have one of those). (more…)
I think all website designers like to think they know what’s good and bad in a design, yet if you get a bunch of us together we’ll disagree on a lot of things, after all design is very subjective. (more…)