The @author
Javadoc tag is unnecessary and can even be harmful.
Uncategorized
Generic Constructors: What are They Good For?
Generics can be declared on types (classes and interfaces), methods, and constructors. Wait, constructors? That one threw me a little. I’ve never actually seen or used this feature. It makes logical sense to be able to declare a generic type on a constructor; after all, it’s just a special case of a method.
I could explain how to declare and use generic constructors in a rigorous and academic way, but that doesn’t give us a sense of if or whether it’s actually a useful feature. Instead, let’s see how and how often they’re used in the real world. That’s why we have open source! Let’s look for examples of generic constructors in some of the most popular Java projects and see if we can find any patterns.
File I/O in Ceylon
The Ceylon language takes a different approach to reading and writing files than Java. Consider the following methods in Java:
The “Super Intelligence of Things”
On our way to building the “Internet of things”, we’ll end up creating the “Super Intelligence of things”. But what does that look like?
The (Hypothetical) Dot Equals Assignment Operator
What if languages had a .=
operator? What would it do?
Jawbone knows what you’re watching on Netflix
My wife has the Jawbone Up2 fitness tracker. It tracks things like steps, hours slept, etc. The mobile app has a Smart Coach feature which gives daily suggestions. Most of the time, the suggestions relate to information that only the tracker knows about, like “try to get more steps today”, or “try to go to bed 20 minutes earlier”. But yesterday, it made a suggestion about things I didn’t think it should have known about.
Using Git and Subversion Together
Many organizations use Subversion (or SVN) as their version control system (VCS) of choice. Often, SVN is so thoroughly baked into the organization’s processes—with build scripts, commit hooks, custom tooling, etc.—that it would be prohibitively expensive to change to a different VCS.
There’s nothing wrong with Subversion, but sometimes you want the power of Git. I personally prefer Git’s ability to commit locally and its branching model over SVN. Git can bidirectionally interact with Subversion repositories with the git svn
command.