As you can probably tell, the title of this post is based off the common saying "The Grass Is Always Greener On The Other Side." I've always been amazed by this saying, because while we can find countless cases of it being true, we can also find countless cases of it being completely and utterly false. Take smart-phones for instance. People are quite dogmatic about which they choose, and they believe that the grass is definitely not greener. This is something that's bothered me for a while. But yesterday, I think I've made a cognitive leap towards understanding why it works for some things and not others...
Monday, July 30, 2012
Friday, July 27, 2012
In this day in age, it seems that the community trend is completely and unequivocally trending towards the use of web application frameworks. So much so that the defacto first comment to someone asking how to do something seems to be "Just use a framework, and it'll solve the problem for you." While I completely understand why this is the case, I can't say that I agree with it. And while I do believe that frameworks serve a purpose, I think that they are vastly over-used. Let me explain why...
Wednesday, July 25, 2012
In response to last week's ask for questions, I received a number of questions that I'd like to address. Since it would only do the question justice to have a dedicated post for each question. So I'm going to try to do one post per week on a user-submitted question (probably on Wednesday, but no promises). This week's question is a rather abstract one:
I've been learning a lot about service layers and managers and domain objects and one thing really confuses me. Why is MySQL being turned into a non-relational database? It has so much power, so much flexibility, but it seems like many programmers want to abstract it to the point of near uselessness.
Now, there are so many facets to that question that it's hard to find a starting point. But let's try:
Monday, July 23, 2012
The concept of generators was recently proposed for addition in PHP's core (Possibly for 5.5.0). While I believe that this is a great tool, it appears that many PHP developers aren't familiar with the concept of generators. So I thought I would take a little time and explain some of how it works, and how it can be used to greatly simplify code.
Friday, July 20, 2012
One of the most powerful changes that PHP5 brought to the table was the ability to autoload classes. It's such a useful tool that it was the first standard the FIG group put forth. Almost every single major PHP framework and library uses an autoloader to include its classes. It always felt somewhat wrong to me to autoload in production at runtime. So I decided to give it a bit more exporation...
Wednesday, July 18, 2012
I was asked an interesting question via email yesterday. The question is fairly simple. The answer, not so much... So, rather than reply in an email, I figured that I'd write a post about it instead. The question, simply stated, is:
When comparing a float to an integer using ==, where does the conversion happen?
So, let's begin...
Monday, July 16, 2012
Every day I come across code that is insecure. Sometimes the code is so hilariously insecure that any 10 year old could break it. I've also gotten into discussions with people who should know better about their practices. It's very, how to put this, disheartening. It's sad that the average developer knows (and cares) so little about proper security practices. So, I've put together a simple pledge (or manifesto, if you'd like).
Friday, July 13, 2012
One of the things that I see repeated over and over again is the simple question "What books should I read to become a better developer?". Or "How did you learn about that?". Or even "What does a coding standard matter?"... OK, so that last one was a bit of a sentinel question, but the point is clear. Where should you look if you want to read to improve your development abilities? Well, I figured I'd take a few pages out of my library and share which books worked for me, in order of significance. If you remember from a prior post, I indicated that you should choose concepts over implementations. This list should illustrate that.
Wednesday, July 11, 2012
This morning I was asked a question that took me by surprise: "Your examples for PasswordLib are in OOP style, how do I write it in procedural style"... This took me by surprise, because the examples actually are in a procedural style. So I felt that I should write a post about the real differences between OOP and Procedural coding styles. Hint: whether you use classes and objects or not has very little to do with the answer...
Monday, July 9, 2012
I've been using Jenkins to manage builds of my projects for a while now. This was fine for a while, but now that my projects need to support multiple versions of PHP, it left something to be desired. I wanted a system that could build against multiple versions of PHP. And more so, I wanted to be able to build against multiple compiles of the same version (different options, etc). This is how I built just such a system...
Friday, July 6, 2012
There's been a lot of traffic lately about what's wrong with PHP, and counter posts about how good it is. I've even fallen into the fray in an earlier article trying to step up and defend the language. The problem with almost all of these posts is that they focus on the language itself and what's wrong (or right) with it. This is not one of those posts.
Wednesday, July 4, 2012
As recently as 5 years ago, I barely understood the meaning of Open Source. I had been working with computers for my entire life (I was using a Commodore 64 before I could walk). I had been programming them nearly as long (I wrote my first program before I started grade school). I was an early adopter of Linux (I still have a Red Hat 1 disk somewhere). But I never guessed the impact that open source would have on my life. I never appreciated the impact that open source would have on the world. The past 5 years have changed me forever. This is my story.