mullie.eu
How to make your code scale · Matthias Mullie
http://www.mullie.eu/why-your-code-doesnt-scale
How to make your code scale. Scaling, php, and mysql. Building scalable software means that you are prepared to accommodate growth. There are basically 2 things you need to consider as your data grows:. Will requests be handled at a faster rate than they come in? Will my hardware be able to store all the data? Means adding more machines to your setup. In computer hardware, scaling horizontally (a cluster of lower tier machines) is usually cheaper compared to scaling vertically (one supercomputer). It...
mullie.eu
How JavaScript promises work · Matthias Mullie
http://www.mullie.eu/how-javascript-promises-work
How JavaScript promises work. The world of JavaScript has had promises since long, in the form of libraries like Q. And many others, like jQuery’s deferred. And it’s been native in JavaScript. Promises let you code asynchronously with ease, without having to resort to nasty callback functions and events. Here’s a small example:. Do something async here (e.g. an xhr call). Depending on the outcome of your operation, you either resolve or reject. If something went wrong, we would reject the promise like so:.
mullie.eu
Async processing or multitasking in PHP · Matthias Mullie
http://www.mullie.eu/parallel-processing-multi-tasking-php
Async processing or multitasking in PHP. In PHP, there are multiple ways to process data asynchronously, although not one will work in every single environment. There is no one true solution, and whichever suits you best will mostly come down to your specific task. Although both multithreading and multiprocessing can be used to process code in parallel, it probably makes sense to first distinguish between the two. Do some work */. Wait until thread is finished. We can now even access $thread- data. Compa...
mullie.eu
I had to display thousands of coordinates · Matthias Mullie
http://www.mullie.eu/i-had-to-display-thousands-of-coordinates
I had to display thousands of coordinates. Scaling, geography, php, and javascript. I recently pushed some PHP code to cluster coordinates. That helped me cope with hundreds of thousands of geographic locations. Turns out drawing all of those on a map isn’t that trivial. I was using Google Maps. Was looking for some JavaScript to cluster all of my coordinates: so many individual markers would just be unclear. There were some great clustering scripts out there! As much as the JS clustering tools surprised...
mullie.eu
5 things remote working taught me about productivity · Matthias Mullie
http://www.mullie.eu/5-things-remote-working-taught-me-about-productivity
5 things remote working taught me about productivity. Since I started working remotely, now almost 3 years ago, I’ve learned a thing or two about my productivity. These lessons are not necessarily tied to working remotely per se, they’ll also apply in a traditional working environment. The remote aspect just forced us to rethink how we deal with time and communication. 2 No meeting is urgent. In addition, this kind of asynchronous communication. 3 Find time to focus. Instead of scrambling for little bits...
mullie.eu
Matthias Mullie · Software engineer
http://www.mullie.eu/page2
Time, php, and mysql. If you’ve ever been far away from someone you want to communicate with, you’ll know how annoying daylight saving times and timezones make it to coordinate time across the world. You don’t want your users to have to have to reason about that, so you’ll have to make your application do the work for them and display them the time at their location. Dealing with time isn’t necessarily difficult, you just have to be consistent. I had to display thousands of coordinates. Will requests be ...
mullie.eu
Time & timezones · Matthias Mullie
http://www.mullie.eu/time-and-timezones
Time, php, and mysql. If you’ve ever been far away from someone you want to communicate with, you’ll know how annoying daylight saving times and timezones make it to coordinate time across the world. You don’t want your users to have to have to reason about that, so you’ll have to make your application do the work for them and display them the time at their location. Dealing with time isn’t necessarily difficult, you just have to be consistent. Get the correct timezone. Pick a standard time. Alex disagre...
mullie.eu
Matthias Mullie · Software engineer
http://www.mullie.eu/page3
You don't want to build your own minifier. Minify, php, js, and css. Every developer has likely at least considered writing their own framework or CMS. Until you start to realize just how much work it is and how much of your problems have actually been solved by someone else already. Then you throw in the towel and start using (and hopefully, contributing) to existing open source projects that suit your needs. Writing a minifier is very much alike. While working on a CMS. Geography, php, and mysql. Using...
mullie.eu
Regular expressions for pros · Matthias Mullie
http://www.mullie.eu/regular-expressions-advanced
Regular expressions for pros. Regular expressions are powerful string-manipulation tools, though chances are you probably don’t even know half of what is possible with them. Before touching some of the PCRE awesomeness, make sure you’re quite familiar with regular expressions already. If you know all about the stuff in the basics tutorial. Already, dive in! The PCRE toolset provides you with: back references! In the basic tutorial. We’ve already created a regex to find all link URLs inside an HTML source...
SOCIAL ENGAGEMENT