I’m currently in the process of switching my webserver from Apache with mod_php to the much faster NGINX with PHP-FPM, as I’m finding BugMuncher is running out of memory on the old apache set up.
I’ve been using Apache on webservers for as long as I can remember, so switching to NGINX has been a bit odd so far, especially understanding requests. So I’ve decided to write a series of posts documenting the lessons I learn, partly so I can refer to them, but also for anyone else making the switch to NGINX.
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…)
As if I don’t have enough going on already, I’ve decided to launch another web app, allow me to introduce you to DashPoll.
DashPoll came into existance as I wanted to be able to put surveys into the BugMuncher dashboard, but all the existing options came as pre-styled widgets that would have been hard to integrate.
When I couldn’t find something more API based, I decided to create my own. I also set my self a hugely unrealistic time frame, one day. (I like a challenge)
I almost succeeded too, a total of 10 hours development later (spread over a week) I launched DashPoll.
Check it out and let me know what you think.
I woke up this morning, and went through my usual routine: grab my iPhone and check the time, (7:15am, awesome). Then it’s over to facebook, to see if anything noteworthy has happened overnight.
The first thing that grabs my attention is that two of my friends status’ are “R.I.P Steve Jobs”. My immediate reaction is “it’s a hoax”, after all, the internet seems to love pretending people are dead, so I fire up Safari to verify the news.
I go straight to Hacker News, which is normally the third stop on my morning routine anyway. If Steve really has passed, Hacker News will certainly have some stories about it.
I didn’t expect this:
So I’ve just launched a new project, the BugMuncher feedback tab widget, and it’s (as far as I know) the only visual feedback tool for websites.
If you want to know what it does, you don’t even have to go to the site, as I’ve installed it on this very website, simply click the ‘feedback’ button at the bottom left of any page on this site, and you can see BugMuncher in action.
I’d love to hear what you think, either in the comments or by using BugMuncher, after all, that is what it’s there for.
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…)
So, it’s come to my attention that all though I’ve pretty much abandoned this corner of the web, people are still visiting, around 50 a day. Admittedly that’s a paltry amount in the grand scheme of things, but considering I haven’t even visited here in a good few months, I’m rather surprised.
Unfortunately I don’t have anything worth wile to offer right now, so here’s a crude drawing of Futurama’s Bender, illustrated by myself in none other than Microsoft Paint: (more…)