Today I had to add an Amazon Payments button for a web shop. When testing it Amazon always threw “Signature does not match” errors at me, however all the settings were correct. After hours of troubleshooting I found out that the hashing algorithms don’t like ISO-8859-1-encoded data for the cart items.
The solution is to encode everything as UTF-8 (can be done in PHP using utf8_encode()).
1-2 years ago I read the book The Clean Coder by Robert C. Martin which highly influenced my way of programming, for example by adapting a lot of techniques from the agile development workflow (test-driven development, scrum etc.)
Mr. Martin also mentions a technique called tomatos, which is about time management. Today I researched on time management again to improve my own workflows and found the website The Pomodoro technique (as far as I remember, Robert C. Martin put a link to the website in his book too). Continue reading
As you all know, FlexWorld has been in development for more than 10 months. And I finally decided to give it a big overhaul. I recently read a book called “The Clean Coder” which is about good habits and techniques that every serious programmer should know of.
One thing that got my attention was “test-driven development”. In the past I didn’t really do serious software tests, i.e. regression and integration tests. Why? Because programmers are mostly lazy, and unit tests are somewhat boring to write.
But I realized I was completely wrong. When I began writing the first tests for FlexWorld (I removed everything before!) it actually felt quite good. The reason is the workflow: At first you write the tests for the interface you want to get (this implies thinking about it, which is very important). This also gives you practical use-cases. After that you implement the production code itself.
That happens step-by-step. For example for every single function you write a test, then the implementation. Thereafter you build and run the tests. If they pass and you’re somewhat sure your tests are complete and make sense, you KNOW your code is sane!
Before I’ve started with unit tests it always felt like: “Uh, this should work.. I will throw in some debug output messages and see if the result is something I expected.” But I was never sure if my code was sane completely. And when a bug happened, it felt normal to check the code, eventually run the debugger and see what was wrong.
I highly encourage everybody to TEST software and adapt the test-driven development workflow. It just feels better when you add a feature and know it doesn’t break anything.