Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Google Java Annotations Gallery (code.google.com)
163 points by javinpaul on May 27, 2013 | hide | past | favorite | 29 comments


How about @CopiedThisFromStackOverflowButStillNotEntirelySureHowItWorks


Unfortunately, this seems to hold for any number of languages. To make matters worse, the code is rarely documented as a grab from SO


@BossMadeMeDoIt would have been the standard annotation for 90% all of methods in a company that I know.


This was an April Fools from 2010.


That's fun. Here is another awesome one: 7xx-RFC codes https://github.com/joho/7XX-rfc


Laughed hard at 759 - Unexpected T_PAAMAYIM_NEKUDOTAYIM. Poor us, PHP developers...


794 - Someone let PG near a REPL

Is it talking about that PG?


Since it's a REPL, probably so.


Probably


    @Metaphor
    public interface Life extends Box<Chocolate> {
    }
Shouldn't this be @simile?


I think it's valid since Life, in this case, extends Box of Chocolates and therefore "is a" Box of Chocolates. If Life had implemented the same interfaces or extended the same parent class as Box of Chocolates, then it would be a @simile as Life, in that case, would be "like a" Box of Chocolates.


The use of metaphor here is correct.

"SIMILE: a figure of speech comparing two unlike things that is often introduced by like or as (as in cheeks like roses).

“She's as fierce as a tiger” is a simile, but “She's a tiger when she's angry” is a metaphor."


"Life is like a box of chocolates"


Similes are a subset of metaphors, anyways.


The best part is that you could actually do stuff using these annotations. The joke is functional.


Is it wrong that I really want to use some of these in my current project?


Looks fun. I assume it's still up to the application devs as to how they handle those annotations then (say on a build server or when the docs are generated)? Unless I'm missing something, there doesn't appear to be any direct effect of using them other than the meta-data that they add.

Edit: looks like "gag-agent" is there to react to the annotations, but it's not clear to me where/how that would work


They have a couple examples down the page on it - a few of the annotations have runtime effects. eg:

  @Roulette(
    probability = 0.005,
    exception = PayYourContractorException,
    message = "Courtesy reminder")
  public Service getRockSolidService() {


It's mostly there to send messages to your fellow programmers, it seems. The instrumentation jar will enforce the behaviors of the annotations under the Enforceable category.


I'm just waiting for the Ruby guys to contribute with their generally sarcastic comments against Java. :-)


They are just being polite, waiting for the Java developers to finish trying get Eclipse or IDea to autocomplete their new annotations.


They probably have lots of testing to do while they wait. So no hurry.


Well done, very well done indeed.


The most annoying is: "I'm gonna save your changes, but let me recompile the entire project first."


That's really funny .. good work


That's strangely intriguing.


Strangely compelling, even.

Something that almost seems as though it wouldn't be completely out of place in a production codebase (though you'd probably want to ensure that they were elided or at least renamed before shipping :P).


Good fun. I'm waiting for someone to put in the LOLCODE.


le brogrammer memes XDD #yolo




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: