Category Programming

Magento 2 Test Automation – is it Helping? YES!

Magento 2 is more than a revamped platform – automating testing has also been a significant investment. But is it paying off? Is test automation worth the effort? YES! Here is the data to prove it. Disclaimer: opinions expressed here are my own and not necessarily that of my employer. Please also note the data […]

Performance Analysis with Z-ray in Zend Server 7

Zend Server 7 was released last week which includes Z-ray, a performance analysis tool. (Think X-ray vision.) I have done my fair share of performance analysis over the years in C/C++ and Java, so was curious to see how good the tools around are for PHP. So here are my experiences after a few days of […]

SOAP versus REST (opinion piece)

SOAP versus REST. Which is better? The politically correct answer of course, as always, “it depends”. But that is not what I think – REST is best. On the surface, SOAP has benefits such as it can have a lot more complex data structure submitted as a request compared to REST. REST normally has a […]

What is “Good” API Design

What makes a good API design? I don’t think there is a single answer to this – there are different approaches that work better in different circumstances. Here are a few examples. Which is better – a broad or narrow API? One approach is to have a broad API – one where there are lots […]

What is a Good Test Case?

I am a strong believer in automated tests. They can take longer to build the first time, but you can run them over and over again with no manual effort after that. In this modern age I don’t think I need to make the case for the importance of tests. But what makes a test […]

10 Commandments of Egoless Programming

I was looking for a reference to egoless programming and found the “The Ten Commandments of Egoless Programming”. This comes from Jerry Weinberg’s book The Psychology of Computer Programming, written in 1971. Understand and accept that you will make mistakes. The point is to find them early, before they make it into production. Fortunately, except […]

My Program is Running Slow and I Don’t Know Why! (Unix)

There are different reasons why a program under Unix/Linux could be running unexpectedly slowly when moved to new hardware (that is nothing to do with Halloween!), particularly for C or C++.  That is, the program normally runs well, but for some reason when in production it behaves badly.  Here is what I do personally to […]

Why is Encoding So Confusing?

To embed strings into HTML you have to escape or encode characters such as <, >, and &. To embed strings into URLs you have to encode characters like /, and ?.  JavaScript has different rules if you want to embed content in string literals.  And then if you want to embed JavaScript in HTML […]

HTML Escaping for Secure Web Pages

Cross Site Scripting (XSS) is a well known challenge for web sites to protect against.  The Open Web Application Security Project (OWASP) has great resources such as the XSS Prevention Cheat Sheet that is a worthwhile read for anyone wanting to understand the issues deeper.  I came across the issue again in a discussion of whether Magento […]