ExpressionEngine can be a bit, annoying, at times. Especially when you are doing team based EE development, and have deployments locally, on staging servers, and on production servers. All it takes is one person to make one small change to a template from the control panel to get everything out of sync quickly. In an effort to enforce development standards you can use this extension to remove (and block access to) the template editing, creation, and management functions. Ideally, all template changes would happen to flat files so they can be easily version controlled and deployed.
I wrote a color processing library that will get the HEX, RGB, hue, saturation, and luminosity values of each unique color. Once the color data is obtained it is sorted by hue, and then, if necessary, down sampled to 128 colors. You can upload an image that has already been reduced to improve performance. Without the down sampling, or quantizing, of the color data, the information returned is just too great and generally not useful. I wanted to just get the average colors from the image to create a color palette.
The only information currently returned back to the user is the HEX and RGB values.
I was inspired to write this after seeing a very similar tool that Joshua Davis wrote and used for his artwork. He very briefly showed it off at the W3Conf in February, during the QA portion of his presentation, and I loved it! I wanted one, and I figured the best thing to do would be to write one myself (why not?!). It has been a very long time since I did anything with Adobe AIR, and thought it would be a fun exercise. Glad I did it as I do like Adobe AIR and would like to do more with it when I can.
The app does not seem to work well in Windows. It is not reading the image drop properly.
I am unable to resolve an issue with using getImageData on canvas with a local file (file://). Windows will not recognize a dropped file as a bitmap either. In an effort to make this tool more useful I will just make it a 100% html5 app and host it on a webserver.
I use this script to quickly create virtual hosts on our internal staging servers. It allows me to enable, disable virtualhosts, create new virtualhosts, list all available virtual hosts, and get info on a specific host. Nothing fancy, just helpful.
I wrote this profiler last night(!) before I went to bed to help me understand when the different hooks are fired in WordPress. It ended up exposing more than I expected. When activated, the profiler will show all hooks fired on that page, as well as each callback and the arguments passed to them. Quite handy when doing plugin development!
I have been struggling to understand the inner workings of WordPress and it has been slowing my progress on a few projects. This plugin will really help speed things up since I can see exactly where my callbacks are fired.
I have recently come back to a company (Noble Studios) that I worked for years before. The very first task I had was to migrate an older web application (that I had written previously at the company) to a new host, and estimate the time it would take to introduce some new features and fix some major bugs. The migration and bug fixes only took around an hour.
More recently a freelance client came to me with a project. It was something I had helped develop around 4 years ago. This task was to introduce some new features, and fix a few bugs that were plaguing the application. I am still working through the bugs.
I know this is not an apples to apples comparison, and both projects have their own set of difficulties and coding styles, but at the core the issues are the same. The code you write needs to be maintainable. The first project was a breeze because it was so easy to read the code. I hadn’t seen the source code in over 6 years, but was able to read it, understand it, and identify the issues very quickly. The reason being is that the source was well commented, each method and library was described and its purpose explained, the business logic was clear and easy to follow, and the file structure was easy to parse. The second project, not so much. It’s issues started with the poorly named controllers and methods, missing or poor comments, and business logic that was a tangled mess. I had a much more difficult time in absorbing the code base from the second project. It was not written to be maintained 3 months down the road, let alone 4 years.
Writing maintainable code is not hard. It just takes some effort. Comment the “why” and not the “how”. Your code already describes the how. Logic should be clear. Separate view code from business logic. Above all, keep it simple, smaller code is easier to read and maintain than massive blocks. It is also easier to test!
I just finished reading Instant InnoDB.
This is a solid reference guide for any one, from someone learning database design, to a seasoned senior DBA. The books starts off with a good introduction to what InnoDB is and why it is one of the most commonly used database engines in use. It’s not hard to see why! This book goes beyond being a simple reference guide for me by including topics on ongoing maintenance, monitoring and load testing. This book will stay on my desk for that reason alone.
Sometimes the MySQL online documentation can be very dry and difficult to parse, especially when it comes to how changing a configuration parameter will affect the rest of the system, but this book does explain in a very clear manner what the parameter is doing. I appreciate the care that has gone into explaining what I consider one of the sometimes confusing aspects of MySQL administration, memory allocation. The books provides detail equations on how memory allocation is calculated, and which configuration parameters are involved, and what exactly those parameters are.
I would absolutely recommend this book to any new or experienced database designers and administrators.
If you a regularly ssh’ing into many servers and tire of tracking down hostnames, ip addresses, and logins, this bash script should help.