The other day I wanted to know how many unique domain names existed in the emails addresses of one of our databases. I started looking for an easily way to find them and how common each domain was. The query below will give you those details.
Read MoreMarch’s link.
Somehow I scheduled all my social media posts for March and not February so the Twitter feed is going to be FULL this month. :-)
Read More
PHP has a distressingly large number of functions that allow you to manipulate an array. In this post, we’ll show you how to use array_search()
to delete a specific value from an array.
Book cover copyright Martin Fowler
This chapter introduces the first set of refactorings we’re going over in this book. Each section explains why you would want to do the refactoring and then walks through an example.
I’m going to deviate from my normal structure in order to post two takeaways:
Book cover copyright Martin Fowler
This chapter explains the rest of the book and what’s to expect.
Normally, I have my co-workers skip these types of chapters because there isn’t anything of value in them. However, I think this chapter is important because it tells you that the following chapters contain refactoring methods that have been built up from Martin Fowler’s notes. I’m hoping that even two of them can be helpful.
In the past week I’ve had two weird bugs come up. After an hour or two of troubleshooting they both revolved around an extra character before the <?php
tag in a PHP file. In one case I added an extra return line before the <?php
and in another I added an extra “`”.
In trying to debug these problems I wrote a script to find PHP files with extra characters and I’ve added it to my pre-commit check.
Read MoreBook cover copyright Martin Fowler
This chapter explains the value of self-testing code and gives some examples.
The section “Probing the Boundaries” talks about writing code that tests for edge cases like negative numbers and invalid numbers/string. This is something I need to do more of in my own testing.
subscribe via RSS