Today I released v1.0.0 of a Go package called jsonassert. It is my first self-motivated open source contribution that I think has a chance of being useful to someone other than just myself. Okay, that’s not quite true but it’s the first one I’ve written in Go.
I realised the need for this package when attempting to increase the test confidence of a relatively untested package that sends JSON to a server.
In Java we have 4 access modifiers that can be applied to methods and fields of a class. In descending order of visibility, they are:
public String publicModifier = "Anyone can access me"; protected String protectedModifier = "Only accessible to classes in the same package as me, and my subclasses"; String defaultModifier = "Only accessible to classes in the same package as me"; private String privateModifier = "Only accessible within this class"; This article is a love letter to the third in this list of modifiers, the one-who-shall-not-be-named.
Spring developers will be familiar with its powerful Dependency Injection API. It allows you to declare @Beans that Spring then instantiates and manages. Any dependencies between these beans is then resolved by Spring and injected automagically.
Three Annotation-based Injection Patterns There are three ways Spring lets you declare the dependencies of your class using annotations:
Field injection (The bad)
import org.springframework.beans.factory.annotation.Autowired; public class MyBean { @Autowired private AnotherBean anotherBean; //Business logic.
If you aspire to be a developer, sys-admin, or some other profession that relies on computers outside of word documents and excel spreadsheets then you ought to be comfortable with a command line.
Software and IT professionals love their command-lines as it is much more powerful than any GUI could ever be. This article aims to get you started from no prior knowledge.
If this is completely new material for you, I recommend that you keep a Finder/Windows Explorer/etc.
Vim is highly customisable, and I recommend everyone tailor their config according to their own preferences. That being said, here are some bits I think people may want to steal from my .vimrc. I tried to avoid the more common options you’d find in similar articles written by others, such as enabling line numbers, tpope’s surround plugin, or sane backspacing, and focus on the lesser-known tricks and settings.
General settings Highlight the current column Immediately find exactly where your cursor is, using set cursorcolumn.
I wrote an article on how to manage your legacy systems using modern tools and techniques on my work blog. Please check it out.