:::: MENU ::::
Posts tagged with: java

Inversion of Control

In my last post about the Clean Architecture (link) we talked about dependencies, and how we’d ideally like them all pointing “inwards”. That is, we want all the dependencies pointing away from code that might change, and towards code that is less likely to change. The reason we should be intentional about dependencies, is to limit how often we need to change our code. Changes will ripple along those dependencies. Additionally, we need to handle the behavior of dependencies when unit testing.
Continue Reading

Simple Plug-in Example

The long-term vision for a project I’m working on now is using the word ‘platform’. “We want to be a platform.” But what does that mean? Windows is a platform, Android is a platform, heck Firefox is a platform. All of these platforms provide a way to run 3rd party code, in the form of apps, programs or plug-ins. When exploring some options for pulling in and running 3rd party code within a rest-service, I realized I’ve never had to write a plug-in. Here’s a simple walk through of a simple plug-in example in Java.
Continue Reading

I See Dead Code

dead code. What is dead code? Dead code is both useless code and unreachable code. A class or method that is never used, is dead code. Code which is run, but the results of which are never used, is dead code. Dead code is expensive. We compile it, deploy it, maintain it, run unit tests against it, and we spend time and effort trying to not break it while maintaining other parts of the system. Continue Reading