Trying to style an HTML table is one of the few things that gives me flashbacks to how annoying web development used to
be back in the day. There are 8 different display: table*
types which all have subtly inconsistent behaviour from
everything else. Want to add a border radius to a table row? Fuck you,
“the behavior on internal table elements is undefined”.
Continue readingThe most popular dependency injection frameworks in Java —
Spring and Guice — are built using reflection. There are some problems with this approach, and I believe that a
compile-time solution is better in most cases. There are already compile-time implementations (e.g.
Dagger), but I wanted to write
my own bare-bones implementation. It’s not designed to be used in real
projects, but as an illustrative example of how such an implementation can work.
Continue readingJava and its build tools aren’t designed to support using two different versions of the same library at runtime.
Generally, that’s a conflict that’s automatically resolved to one or the other, and that’s exactly what we want. But
what if it’s not? With a few tricks, it’s possible to circumvent that behaviour.
Continue readingImposter syndrome is the tendency for people to significantly underrate
their own ability and to feel like an imposter within their field. It can make people feel anxious that they’re
eventually going to be exposed. Over the past few years, this term’s seen a surge in popularity
within software development. If you express that you’re struggling at your programming job, there’s a good
chance that you’ll be met with comforting replies like “you just have imposter syndrome.” There’s an alternative
explanation: you might actually be bad.
Continue readingThis is the third and final post in a series in which I’m reviewing
software design patterns. This time out I’m taking a look at
behavioural patterns. These all “characterize the ways in which
classes or objects interact”. If that sounds indistinct from structural patterns, it’s because it is. Just go with it.
Continue readingJava gained traction because you could write code which could run anywhere, but it continues to be successful in a large
part due to its fantastic ecosystem. Libraries like Spring, Hibernate and Gson are comparable to, if not better than,
practically any equivalent tools available for other languages. However, they’ve helped popularise the idea that using
reflection is likely to be an intrinsic
part of writing a Java library or framework. As Java developers, we’re being short-changed with solutions that force us
to sacrifice strong typing and are impossible to debug.
Continue readingIn any non-trivial React project, one of the things you’ll eventually need to do is render something conditionally.
You can’t use if-else statements within JSX. You can use
the conditional (“ternary”) operator but I often find that it produces code that’s hard to read. I’ve developed a
transform which adds special meaning to certain JSX tags, allowing you to write <If>
and <Else>
blocks which behave
intuitively.
Continue readingThere seems to be a growing trend of software developers panhandling for donations. Whether it’s via GitHub Sponsors,
Patreon or Ko-fi, a culture of entitlement is on the rise. Some even expect to be rewarded for
their Stack Overflow answers. Good luck with that.
Continue readingThis is the second post in a series in which I’m reviewing
software design patterns. This time out I’m taking a look at
structural patterns. These are all strategies for defining and
managing relationships between classes and interfaces.
Continue readingThe company I work for uses GitLab to host our Git repositories. Along with
GitHub more recently, it provides a way to
build your projects directly within the service without relying on an external build server like Jenkins or Travis.
The general reaction here seems positive, and most people seem happy to rely on it for their only automated build now.
I can see the benefits but I’m hesitant to fully commit. Hybrid CI is an approach I came up with so I could have my
cake and eat it too.
Continue reading