Random user generation - optimized
I came across this blog posting about optimizing order by rand() and decided to make my queries better. Here is my real life example on how to optimize this query:
I came across this blog posting about optimizing order by rand() and decided to make my queries better. Here is my real life example on how to optimize this query:
Today, Big Boy sent me an e-mail at work talking about emulation of collections in his .net programming. He included a code sample (after the break). This got me thinking about how I am planning on handling data going forward.
I just finished reading a snippet of a book about design patterns - of which Strategy, Adapter, Decorator and others were discussed. It got me to thinking about my design patterns that I used in JEMDiary - and what I’ll be using in this project.
So, I started looking at a few load time analyzers for my sites - and I found an interesting plugin for firefox. I wasn’t too entirely sure what I was going to find - but I figured I’d try it out and figure out if it was useful.
I was recently reading an article (while researching for my website monitoring project), and there was a comment about PHP5’s lack of flexibility in its Object Oriented usage. Some people were arguing for it - and some against, the typical ranting that goes on in blog comments, etc. Instead of joining the argument, I wanted to do my proof of concepts myself. I’m going to explore (well I already know some of the answers - but it’ll be exploration to YOU reader ;)) public/private constructors, magic methods, and maybe a few extras (we’ll see when we get to the end!)
There seem to be two schools of design lately: Feature rich, RIA designs and simplicity.
In my “younger years” in the coding world, I’d have an idea like I have right now with the website monitoring project - and immediately start coding. I’d get the framework done, implement a feature or two, and then finally start thinking about my requirements. Predictably, the code would turn into an unmaintainable mountain of crap - and I’d be wasting more time rewriting and refactoring than I wanted. For this project, I decided to take steps against this happening.
(“the triangle”) just recently purchased a book for the library at my request, Test-Driven Development by example by Kent Beck. The current Amazon price for this book is $35. The book took me about 2 weeks of sporadic reading to finish. The first section took the first week, the remaining 2 sections and appendix flew by.
Recently, while working at (“the triangle”), I came across a project that I had to research. This project’s definition included finding an up-time monitoring system for our websites as well as a dead link finding feature. So, after doing about 8 hours worth of searching, I didn’t find anything that met our needs. There were tons of dead link finders that could be ran on demand off your desktop platform, but very few that could be scheduled and ran remotely. Additionally, it was hard to find any remote uptime monitoring systems that allowed the flexibility I was looking for - the ability to check for website up - to not give false positives, and to remotely test functionality (kind of like a remote unit test).