Greatest Advice, Start Small and Think Small!

Every programmer comes across a point in their career where they think nothing will surprise them or fundamentally change the way they think about code. Every programmer would be wrong. Many programmers often run into these "inflection points" multiple times over the years. One such point came to me while reading the book Clean Code: A Handbook of Agile Software Craftsmanship. The book discussed a few topics involving function ...

Applying Enchantments for PHP RPG Games – One Approach

So you want to build a PHP game and are just now learning how to do it. You fired up your browser and began searching for various game articles and perhaps you have found very little. What you did find might not explain a flexible way to apply magical spells to units you create. After all, what is an RPG game without enchantments you can cast on your (or enemy's) ...

Don’t Be Afraid to Occasionally Hack

To hack or not to hack, that is certainly the question! Many programmers who are learning a language tend to follow the structure laid out in a book or provided by a class they took. This is a good thing given that the book/class teaches at least some kind of reasonable coding conventions... which most do. These conventions then tend to be adopted by the programmer and follows them ...

Welcome to the Lexicon!

The Coders Lexicon is a website dedicated to the discussion and exploration of computer programming. If you are a bit curious as to how this site started out, try reading up on the About the Lexicon and learn more about this site's history and mission. Over the coming months and years, we plan on making this site the premier location for all your programming solutions offering tutorials, snippets, coding discussion, ...

Linear Search for Sorted Lists: My Take

Today I give my take on a blog article I stumbled across today called "Computer Algorithms: Linear Search in Sorted Lists" which gives a look at applying the linear search model to something sorted. I will offer a suggestion to perhaps make this a bit better for implementation and perhaps performance reasons. So buckle up and we will take another spin around the Programming Underground! Ok, so if you are a ...

Inserting Images Into MySQL and Retrieving Them Using PHP

Welcome to another exciting episode! Today we will be discussing a topic that seems to be a bit of a confusing one for everyone... storing BLOB images in MySQL and then showing them again using PHP. While it is always advised against, we will show you a little demo code for how this can be done and discuss why/why not do this. We will then talk a little about the ...