Posts

"Honeywords" plan to snare theives

Cryptographic researchers Ari Juels and Ronald Rivest (the "R" in RSA) have come up with an interesting idea aimed at helping to detect attacks on web application databases. It is based on storing fake passwords as bait and sounding the alarm when an attempt is subsequently made to use one of these fake passwords. The idea involves storing what they have dubbed "honeywords" for each user in the password database alongside their actual password. An attacker who gained access to the database would be unable to distinguish the honeywords, which would also be stored in the form of salted hashes, from the real password. If attackers were then able to crack the stolen hashes, they might well use them to try to log into the associated web application. If such an attempt were made using one of the honeywords, the web application would know that the access was unauthorised – since the account's legitimate owner has no access to the honeywords, any honeyword used must ...

Setting up PHP DBUnit with a YAML Dataset

This proved quite an interesting job, and took a bit of time to get this down  to a tee.  I do have a working version of some database tests which I will post at a later day with a complete working PHPUnit example of using a YAML dataset for tests. keep watching.

Ecommerce Search Marketing Evolves

Image
A few years ago, small ecommerce business owners invested a good part of their marketing budgets on search engine optimization. Their goal was typically to obtain the highest possible search rankings, to capture as much organic traffic as possible. Many businesses used that as their core tactic for search engines. Organic traffic was considered free. If they did a good job, they had a shot at the first page of Google's search results, where the majority of clicks occur. They could even break into the coveted top five positions, above the fold. A strategy might have been to drive 70 percent of search traffic from organic listings. Organic Traffic Risky But seasoned merchants know they can quickly be dumped off the first page of Google with an algorithm change. If you’ve ever changed platforms or the navigational structure of your store, it’s likely your rankings suffered. Things like personalized search results, local results, and suggested keywords have also altered the search ...

Slow and steady wins the race

Are you looking to refactor your existing codebase and don't have a clue where to start? Start with a block of code, a big function, a class, anything that you just look at and think WTF, where do I start!. Make it simpler, better, more modular. Apply today's best practices to the code, even if you don't think it will make much of a difference. Rename variables to be more meaningful, extract some of the methods or if statements into separate functions. And do the same thing the next day. And the day after that. Pretty soon, you'll begin to realize major rewards from minor efforts. And, you'll also reach a point where major structural changes will both be possible and reasonable - and, if you've done your job right, not all that hard. Slow and steady wins the software race.

Just Enough Production Functionality

The premise of TDD is to write tests that satisfy that a piece of functionality is working as expected. Be this a unit of code (unit test) or a higher level feature (acceptance test). A test should be written to fail. (Red) Simply enough code should be written to make this test pass (Green) Code should then be tidied up and optimised (Refactor). This is inline with the Kent Beck model of Red, Green, Refactor for Test Driven Development.

ATDD is also called Behavior Driven Development

ATDD or Acceptance Test Driven Development is often referred to as BDD or Behaviour Driven Development. This is the practice of writing high level acceptance tests, understandable by business and customer level, in satisfying that a piece of work does what it is supposed too. Focusing on the behaviour of the system from the customer or users perspective, allows the project to progress from a functionality and behaviour perspective, so that once the system does what it's meant to do its complete. Acceptance tests will usually be ran at the project level, where it is possible to get an overview of the state of a project by running these, and see what percentage pass, determines what percentage of the project is complete.  Inline with these, developers may use separate Unit Tests inline with each acceptance test focusing on the units of code that make up an acceptance milestone.

Developer TDD is often Simply..

Do you often wonder where to start with TDD?  Is it more hassle than its worth?  Well yes and no, and I guess its down to how passionate you are about your code. Check out http://www.phpunit.de  the industry standard for writing Unit Tests on your PHP code.