Posts Tagged ‘confusing’

PHP:Dealing with Dependencies

Monday, June 30th, 2008

Compositional programming style
In the object oriented programming style, it’s preferable to split functionality out to multiple objects, that can work together to solve a single task. Taken to the extreme, this results in more, but smaller, classes and generally relies less on inheritance and more on composition. In lack of better words, I’ll call this compositional programming style. It’s a style which is usually more prevalent with experienced programmers.

For someone coming from an imperative style of programming, this style can appear abstract and confusing, but the benefits are in the flexibility of the code. If different objects are related through composition, parts can be replaced, without changing the code. This makes it easier to reuse components, and to hook into the code, by providing a wrapper here or there. This is especially useful during testing, since it becomes easier to mock out external dependencies (Such as a database or an smtp server).

There is, however, a dark side to composition — dependencies.

So what is a dependency?
For the sake of this post, I’ll use a rather naïve example. Assume, that we were building an addressbook application. This would feature an entity of type Person. In our code, we might have a class …

The VERY SHORT SEO Check List

Thursday, June 26th, 2008

There are many great SEO check lists out there but they are sometimes a little long and confusing. Here’s a concise SEO check list.

Research your market and understand what people are searching for.
Write content that matches your research.
Build your site using clean code and well tagged content.
Ask for and try to attract relevant links.

Search engines (on sites) don’t work

Wednesday, June 25th, 2008

If a user doesn’t click on the Search button, they are 50% more likely to find the information they are looking for than if they do. This is disconcerting until you think about how most search engines handle searches and results:

  • Many sites have several different search engines for the Web site.
    These may be intuitive to the Web designer, but often the user doesn’t know what the difference is (or even perceive that there is a difference).
  • Users don’t know what they are going to get when they search.
    They may be getting a list of pages on this site, the Web as a whole, a sub-set of this site, or something completely different.
  • Results were confusing and hard to understand
    Often the search results were something apparently unrelated to what the reader searched on. Or, there was no text to clarify the search results, simply the title or file name.