News for hackers. Stuff that matters.
Re:Google Java Annotations Gallery by peterkelly on Monday May 27, 2013 @12:00PM (#5775093)
How about @CopiedThisFromStackOverflowButStillNotEntirelySureHowItWorks
Re:Google Java Annotations Gallery by skyebook on Monday May 27, 2013 @09:09PM (#5777453)
Unfortunately, this seems to hold for any number of languages. To make matters worse, the code is rarely documented as a grab from SO
Re:Google Java Annotations Gallery by terhechte on Monday May 27, 2013 @09:12AM (#5774522)
@BossMadeMeDoIt would have been the standard annotation for 90% all of methods in a company that I know.
Re:Google Java Annotations Gallery by moondowner on Monday May 27, 2013 @11:11AM (#5774897)
This was an April Fools from 2010.
Re:Google Java Annotations Gallery by jdkanani on Monday May 27, 2013 @11:19AM (#5774927)
That's fun. Here is another awesome one: 7xx-RFC codes https://github.com/joho/7XX-rfc
Re:Google Java Annotations Gallery by adlpz on Monday May 27, 2013 @11:23AM (#5774944)
Laughed hard at 759 - Unexpected T_PAAMAYIM_NEKUDOTAYIM. Poor us, PHP developers...
Re:Google Java Annotations Gallery by SeoxyS on Monday May 27, 2013 @11:15PM (#5777818)
794 - Someone let PG near a REPL

Is it talking about that PG?

Re:Google Java Annotations Gallery by Todd on Tuesday May 28, 2013 @12:49AM (#5778143)
Since it's a REPL, probably so.
Re:Google Java Annotations Gallery by rbanffy on Monday May 27, 2013 @11:57PM (#5777955)
Probably
Re:Google Java Annotations Gallery by alsocasey on Monday May 27, 2013 @01:16PM (#5775483)

    @Metaphor
    public interface Life extends Box<Chocolate> {
    }
Shouldn't this be @simile?
Re:Google Java Annotations Gallery by kinofcain on Monday May 27, 2013 @05:11PM (#5776608)
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.
Re:Google Java Annotations Gallery by sah2ed on Monday May 27, 2013 @05:06PM (#5776583)
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."

Re:Google Java Annotations Gallery by eip on Tuesday May 28, 2013 @04:31AM (#5778885)
"Life is like a box of chocolates"
Re:Google Java Annotations Gallery by yohui on Monday May 27, 2013 @07:34PM (#5777160)
Similes are a subset of metaphors, anyways.
Re:Google Java Annotations Gallery by smrtinsert on Monday May 27, 2013 @12:51PM (#5775323)
The best part is that you could actually do stuff using these annotations. The joke is functional.
Re:Google Java Annotations Gallery by andrewaylett on Monday May 27, 2013 @12:49PM (#5775311)
Is it wrong that I really want to use some of these in my current project?
Re:Google Java Annotations Gallery by galaktor on Monday May 27, 2013 @08:49AM (#5774457)
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

Re:Google Java Annotations Gallery by RyanZAG on Monday May 27, 2013 @09:00AM (#5774488)
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() {
Re:Google Java Annotations Gallery by tokenizerrr on Monday May 27, 2013 @09:18AM (#5774537)
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.
Re:Google Java Annotations Gallery by sgt on Monday May 27, 2013 @11:01AM (#5774849)
I'm just waiting for the Ruby guys to contribute with their generally sarcastic comments against Java. :-)
Re:Google Java Annotations Gallery by garysweaver on Monday May 27, 2013 @11:19AM (#5774929)
They are just being polite, waiting for the Java developers to finish trying get Eclipse or IDea to autocomplete their new annotations.
Re:Google Java Annotations Gallery by eip on Tuesday May 28, 2013 @04:34AM (#5778897)
They probably have lots of testing to do while they wait. So no hurry.
Re:Google Java Annotations Gallery by penland on Monday May 27, 2013 @02:22PM (#5775844)
Well done, very well done indeed.
Re:Google Java Annotations Gallery by dunham on Monday May 27, 2013 @12:42PM (#5775279)
The most annoying is: "I'm gonna save your changes, but let me recompile the entire project first."
Re:Google Java Annotations Gallery by nkchandra on Monday May 27, 2013 @11:28AM (#5774966)
That's really funny .. good work
Re:Google Java Annotations Gallery by _pmf_ on Monday May 27, 2013 @10:03AM (#5774669)
That's strangely intriguing.
Re:Google Java Annotations Gallery by tekacs on Monday May 27, 2013 @10:34AM (#5774753)
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).

Re:Google Java Annotations Gallery by ww520 on Monday May 27, 2013 @11:59AM (#5775086)
Good fun. I'm waiting for someone to put in the LOLCODE.
Re:Google Java Annotations Gallery by fmrzt on Monday May 27, 2013 @12:18PM (#5775162)
le brogrammer memes XDD #yolo