Software Engineering

Software Engineering

1635 bookmarks
Newest
What is Dependency Injection? - Fabien Potencier
What is Dependency Injection? - Fabien Potencier

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.

What is Dependency Injection? - Fabien Potencier
Understanding Git Conceptually
Understanding Git Conceptually
This tutorial, then, will take a conceptual approach to Git. My goal will be, first and foremost, to explain the Git universe and its objectives, and secondarily to illustrate how to use Git commands to manipulate that universe.
Understanding Git Conceptually
PECL :: Package :: xhprof
PECL :: Package :: xhprof

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.

PECL :: Package :: xhprof
Nagios MySQL Plug-Ins | Pablowe
Nagios MySQL Plug-Ins | Pablowe
There currently exist many plugins for MySQL to use with Nagios. Many of them, however, are not version-independent, leaving organizations that use multiple versions of MySQL to either install multiple plugins or not monitor specific versions of MySQL. As such, I’ve compiled what I consider to be the most useful checks into a single plugin: check_mysql
Nagios MySQL Plug-Ins | Pablowe
Common Optimization Mistakes Slides - iBlog - Ilia Alshanetsky
Common Optimization Mistakes Slides - iBlog - Ilia Alshanetsky

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 ;-)

Common Optimization Mistakes Slides - iBlog - Ilia Alshanetsky
cjohansen's juicer at master - GitHub
cjohansen's juicer at master - GitHub

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)
cjohansen's juicer at master - GitHub
jQuery Sparklines
jQuery Sparklines

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.

jQuery Sparklines
InfoQ: How to Ensure Early Death of a Distributed Agile Project?
InfoQ: How to Ensure Early Death of a Distributed Agile Project?

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.

InfoQ: How to Ensure Early Death of a Distributed Agile Project?
Open source utilities | openark forge
Open source utilities | openark forge

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.
Open source utilities | openark forge
Setting up phpUnderControl at felixdv blog
Setting up phpUnderControl at felixdv blog
On a regular basis, I get contacted by people who want to install phpUnderControl but don’t really know how to set up their projects and use the features provided by phpUnderControl completely. So, aside from providing a quick-and-easy setup guide for cruisecontrol and phpUnderControl, I’ll share the setup scripts I have here and hope it’s useful for someone. This guide is mostly focussed on getting phpUnderControl to work on a Debian system, but there’s not that much OS specific to it.
Setting up phpUnderControl at felixdv blog
Google Testing Blog: Constructor Injection vs. Setter Injection
Google Testing Blog: Constructor Injection vs. Setter Injection
With setter-injection it is not clear in which order things need to be instantiated and when the wiring is done. In a typical application there may be hundreds of collaborators with at least as many setter calls to wire them together. It is easy to miss a few setter calls when wiring the application together. On the other hand constructor-injection automatically enforces the order and completeness of the instantiated. Furthermore, when the last object is instantiated the wiring phase of your application is completed.
Google Testing Blog: Constructor Injection vs. Setter Injection
Zend_Acl part 3: creating and storing dynamic ACLs | CodeUtopia
Zend_Acl part 3: creating and storing dynamic ACLs | CodeUtopia
In this third post of the series, I’ll talk about using dynamic ACLs: How to store an ACL in a database, and construct it from there when needed. We will first look at a simple example with users and pages, and then we’ll have a more complex example, involving building a much more complex ACL with inheritance, role types and other stuff.
Zend_Acl part 3: creating and storing dynamic ACLs | CodeUtopia