
Software Engineering
This article is the first of a series on Dependency Injection in general and the implementation of a Dependency Injection Container in PHP.
Today, I won't talk about the container yet as I first want to introduce the concept of Dependency Injection with some concrete examples that will hopefully demonstrate the problems it tries to solve and the benefits it gives to the developer. If you already knows the concept of Dependency Injection, you can safely skip this article and instead wait for the next one.
XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface. The raw data collection component is implemented in C (as a PHP extension). The reporting/UI layer is all in PHP. It is capable of reporting function-level call counts and inclusive and exclusive wall time, CPU time and memory usage. Additionally, it supports ability to compare two runs (hierarchical DIFF reports), or aggregate results from multiple runs.
Originally developed at Facebook, XHProf was open sourced in Mar, 2009.
The slides from my PHP Quebec talk on "Common Optimization Mistakes" are now up and can be downloaded from here: http://ilia.ws/files/phpquebec_2009.pdf
I am pretty happy with the talk, which was a bit strange for me, since I get to talk about some of the downside of optimizations, rather then talking about the various specific optimizations. It looked like the audience liked the talk (I hope), so the results seems positive ;-)
Juicer is a command line tool that helps you ship frontend code for production.
High level overview; Juicer can
* figure out which files depend on each other and merge them together, reducing the number of http requests per page view, thus improving performance
* use YUI Compressor to compress code, thus improving performance
* verify that your JavaScript is safe to minify/compress by running JsLint on it
* cycle asset hosts in CSS files
* add "cache busters" to URLs in CSS files
* recalculate relative URLs in CSS files, as well as convert them to absolute (or convert absolute URLs to relative URLs)
This jQuery plugin generates sparklines (small inline charts) directly in the browser using data supplied either inline in the HTML, or via javascript.
The plugin is compatible with most modern browsers and has been tested with Firefox 2+, Safari 3+, Opera 9 and Internet Explorer 6 & 7.
Involve the offshore team in the project after couple of sprints, once onsite team has understood the project vision, road map and made key technical choices.
Keep making all important design decisions with the small onsite team.
Keep offshore team very small i.e. 2 persons or less. Keep onsite team at least 3 times bigger.
Blame every problem in a project on the offshore team.
Never give honest feedback in the project retrospectives.
Avoid collocation with offshore team at any cost.
If collocation does take place then make sure that no onsite team member pair programs with offshore team member.
Ask offshore team to handle simple tasks that nobody onsite would like to do.
Keep refactoring the code during the weekends and in the evenings with very little communication about it with the offshore team.
Re-write a significant part of code delivered by the offshore team with out any communication.
Communicate frequently about the coding problems created by offshore team with onsite stakeholders.
The openark kit is a set of utilities for MySQL. They solve everyday maintenance tasks, which may be complicated or time consuming to work by hand.
The available tools are:
* oak-apply-ri: apply referential integrity on two columns with parent-child relationship.
* oak-block-account: block or release MySQL users accounts, disabling them or enabling them to login.
* oak-kill-slow-queries: terminate long running queries.
* oak-modify-charset: change the character set (and collation) of a textual column.
* oak-purge-master-logs: purge master logs, depending on the state of replicating slaves.
* oak-security-audit: audit accounts, passwords, privileges and other security settings.
* oak-show-limits: show AUTO_INCREMENT “free space”.
* oak-show-replication-status: show how far behind are replicating slaves on a given master.