Category Archives: Code Smells

The Sky. The Universe. The Missing Unit Tests

Out there in the Universe. Now comparisons get Epic Pictures when it comes to WordPress and Unit Tests: Beta Sagittae. via The Loop. Reminded me of Development By The Numbers – Slides (May 2013; by ircmaxell) having also nice comparisons … Continue reading

Posted in Code Smells, Hacking The Core, Linked, PHP Code Smells, Pressed | Tagged , , , , , | Leave a comment

The Daily Mistake: Not to Proxy Remote Services

“Just gimme a min, I glue that HTTP based remote service in.” – Whether the standard file_get_contents + Json *bam* or complete SOAP, a developer should have the time to wrap each (remote) data-source inside it’s own interface that is … Continue reading

Posted in Code Smells, PHP Code Smells, PHP Development, Pressed, Surviving the Internet | Tagged , , , , , , , , , , , | 3 Comments

Resign Patterns – Ailments of Unsuitable Project-Disoriented Software; by Michael Duell

Posted on by hakre | Leave a comment

Why getter and setter methods are evil

Some classic read: Why getter and setter methods are evil via GetterEradicator.

Posted in Code Smells | Tagged , , | 1 Comment

List of PHPMD Rulesets

As I use PHPMD from time to time only (but more and more often) I needed to lookup the default ruleset names from the filesystem. As google is faster than a search on the harddrive, here they are for future … Continue reading

Posted in PHP Code Smells, PHP Development, PHP Development, Pressed, Tools, Uncategorized | Tagged , , | 4 Comments

HTTP/HTML: Missing HTTP-Body/HTML on Redirect

This bothers me often: unfriendly redirects.

Posted in Code Smells, Hacking The Core, Surviving the Internet | Tagged , , , , , , , | Leave a comment

PHP: Curly Brackets Substring Access

I just have another lighter PHP specific Code Smell: Curly Brackets Substring Access. If you’re coding PHP since a longer time you might not only know but also have used curly brackets for index-/char-based substring access.

Posted in Code Smells, Hacking The Core, PHP Code Smells | Tagged , , , , , , | 2 Comments

Prevent Code Injection in PHP include files

While discussing Coding Standards it was not long ago I argued against adding ?> at the end of php files. But miqrogroove pointed to me an interesting aspect why it actually can make sense to have it and an additional … Continue reading

Posted in Code Smells, Hakre's Tips, PHP Code Smells, Pressed | Tagged , , , , , | Leave a comment

Relative URL (#2) HTML/ XHTML Code Smell

Just yesterday I had a post about the dot in the beginning of relative URLs. Today I have a small addition to that: Two dot path segments in an URL/URI. It’s some more detailed thing related to the history and … Continue reading

Posted in Code Smells, HTML/CSS Code Smells | Tagged , , , , , , , , | Leave a comment

Relative URL HTML/ XHTML Code Smell

Another one for the HTML/ XHTML Code Smells: If you’re using realtive URLs inside your documents (which is pretty valid and can save you some bandwidth as well as it can save some hassles for mirroring a website) you should … Continue reading

Posted in Code Smells, Hakre's Tips, HTML/CSS Code Smells, Patched, Pressed | Tagged , , , , , , , , | 1 Comment

Script and Style HTML/ XHTML Code Smells

Remember the time? Grabbing the copy of the HTML 2 RFC, reading through within the afternoon and you started to understand where this all might lead to after some time.  Seeing 3.2, 4.1 and XHTML 1.0 passing this finally ended up … Continue reading

Posted in Code Smells, Hacking The Core, Hakre's Tips, HTML/CSS Code Smells | Tagged , , , , , , , , , , | 2 Comments