Category Archives: Code Smells

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

Posted on by | 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 only use PHPMD from time to time only I always need to lookup the default ruleset names from the filesystem. As google is faster than a search on the harddrive, here they are: codesize design naming unusedcode I … Continue reading

Posted in PHP Code Smells, PHP Development, PHP Development, Pressed, Tools, Uncategorized | Tagged , , | 1 Comment

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