I am not a researcher so I don’t have the statistics to back up my assertions for the post, but I have mostly written programs for a living for over 25 years — in my opinion — there is one hugely important aspect of coding standards rarely discussed and that is: reproducability. “Reproducability” defined What …
A better alternative to “return early” – PHP / WordPress edition
Yes, complex conditionals are worse. But there is a third, better way. And no, it does not involve GOTOs. Me This post is about a coding pattern I have never seen used by anyone else for writing guard clauses, especially when those guard clauses are complex. This pattern results in code that is significantly more …
Continue reading “A better alternative to “return early” – PHP / WordPress edition”
The drawbacks of D.R.Y.
D.R.Y., or “Don’t Repeat Yourself” has become a mantra for developers in recent years to the level of becoming dogma. Unfortunately, as with most dogma, it is often viewed more of an absolute rule and less of a general guideline that often should be ignored. The opposite of D.R.Y. Since we have this nice cheesy …
How to explicitly declare that a struct implements an interface in Go
One of the things I love about Go and find to be a strong supporter of serendipitous interface standardization is Go’s implicitly declared interfaces. However, there are times you really, really want to explicitly declare an interface, such as when you have a larger interface and you want your IDE and/or the compiler to tell …
Continue reading “How to explicitly declare that a struct implements an interface in Go”
What is Software Engineering?
“Software engineering is what happens to programming when you add time, and other programmers.” — @_rsc Tweeted by @davecheney