It would be useful to have a tool that can traverse the maven transitive dependency tree, find anything that the project depends on directly and include it as a direct dependency.
Monthly Archives: March 2012
Refactoring Ideas: Replace static method with same named static method
Want to produce the same kind of import in the affected classes (static, normal or fully qualified):
public static String repeat(final int count, final char character) { return org.apache.commons.lang3.StringUtils.repeat(character, count); } |
Refactoring Ideas: inline method with flag parameter
Check all calls to see if the value of the flag can be analysed, if so inline everywhere (otherwise tell the developer where it is ambiguous):
public static String pad(final String string, final int length, final char character, final boolean before) { if(before) { return leftPad(string, length, character); } else { return rightPad(string, length, character); } } |
Refactoring Ideas: Remove unused
Starting at some given point, like an API entry point, remove that entry point as well as all code that is now unused! This would be very useful when removing parts of an API to ensure that all code which is only present as a way to implement that API is also removed.
Refactoring Ideas: Replace static method
Replace all calls to one static method with calls to another static method (can be done by replacing the implementation then doing an “inline”, but it could be one command). For example, this would be useful when replacing one utility library (bespoke) with another (commons-lang).
Refactoring Ideas: Move static methods with only one use to the using class
If a static method has only one use, then it can be moved the class where it is being used and made private.
Webhooks – event driven REST
From the site:
The concept of a Webhook is simple. A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST.
A web application implementing WebHooks will POST a message to a URL when certain things happen. When a web application enables users to register their own URLs, the users can then extend, customize, and integrate that application with their own custom extensions or even with other applications around the web. For the user, WebHooks are a way to receive valuable information when it happens, rather than continually polling for that data and receiving nothing valuable most of the time.