Wednesday, July 28, 2010

Wikileaks To Leak 5000 Open Source Java Projects With All That Private/Final Bullshit Removed

EYJAFJÖLL, ICELAND — Java programmers around the globe are in a panic today over a Wikileaks press release issued at 8:15am GMT. Wikileaks announced that they will re-release the source code for thousands of Open Source Java projects, making all access modifiers 'public' and all classes and members non-'final'.

Agile Java Developer Johnnie Garza of Irvine, CA condemns the move. "They have no right to do this. Open Source does not mean the source is somehow 'open'. That's my code, not theirs. If I make something private, it means that no matter how desperately you need to call it, I should be able to prevent you from doing so, even long after I've gone to the grave."

According to the Wikileaks press release, millions of Java source files have been run through a Perl script that removes all 'final' keywords except those required for hacking around the 15-year-old Java language's "fucking embarrassing lack of closures."

Moreover, the Perl script gives every Java class at least one public constructor, and turns all fields without getters/setters into public fields. "The script yanks out all that @deprecated shit, too," claims the controversial announcement.

Longtime Java programmer Ronnie Lloyd of Austin, TX is offended by the thought of people instantiating his private classes. "It's just common sense," said Lloyd, who is 37. "If I buy you a house and put the title in your name, but I mark some of the doors 'Employees Only', then you're not allowed to open those doors, even though it's your house. Because it's really my house, even though I gave it to you to live in."

Pacing and frowning thoughtfully, Lloyd continued: "Even if I go away forever and you live there for 20 years and you know exactly what's behind the doors — heck, even if it's a matter of life and death — plain old common sense still dictates that you're never, ever allowed to open them for any reason."

"It's for your own protection," Lloyd added.

Wesley Doyle, a Java web developer in Toronto, Canada is merely puzzled by the news. "Why do they think they need to do this? Why can't users of my Open Source Java library simply shake their fists and curse my family name with their dying breaths? That approach has been working well for all the rest of us. Who cares if I have a private helper function they need? What, is their copy/paste function broken?"

Wikileaks founder Julian Assange, who coined the term "Opened Source" to describe the jailbroken open-source Java code, fears he may be arrested by campus security at Oracle or possibly IBM. The Wikileaks founder said: "Today the Eclipse Foundation put out a private briefing calling me a 'non-thread-safe AbstractKeywordRemovalInitiatorFactory'. What the fuck does that even mean? I fear for my safety around these nutjobs."

The removal of '@deprecated' annotations is an especially sore issue for many hardworking Java developers. "I worked hard to deprecate that code that I worked hard to create so I could deprecate some other code that I also worked hard on," said Kelly Bolton, the spokesperson for the League Of Java Programmers For Deprecating The Living Shit Out Of Everything.

"If people could keep using the older, more convenient APIs I made for them, then why the fuck would they use my newer, ridiculously complicated ones? It boggles the imagination," Bolton added.

The Eclipse CDT team was especially hard-hit by the removal of deprecation tags. Morris Baldwin, a part-time developer for the CDT's C++ parsing libraries says: "We have a policy of releasing entire Java packages in which every single class, interface and method is deprecated right out of the box, starting at version 1.0."

"We also take careful steps to ensure that it's impossible to use our pre-deprecated code without running our gigantic fugly framework," the 22-year-old Baldwin added. "Adding public constructors and making stuff non-final would be a serious blow to both non-usability and non-reusability."

The Agile Java community has denounced the Wikileaks move as a form of terrorism. "It was probably instigated by those Aspect-Oriented Programming extremists," speculates Agile Java designer Claudia Hewitt, age 29. "I always knew they wanted to use my code in ways I couldn't predict in advance," she added.

Many Java developers have vowed to fight back against the unwelcome opening of their open source. League of Agile Methodology Experts (LAME) spokesperson Billy Blackburn says that work has begun on a new, even more complicated Java build system that will refuse to link in Opened Source Java code. The new build system will be released as soon as several third-party Java library vendors can refactor their code to make certain classes more reusable. Blackburn declined to describe these refactorings, claiming it was "none of y'all's business."

Guy Faulkner, a 51-year-old Python developer in Seattle, was amused by the Wikileaks announcement. "When Python developers release Open Source code, they are saying: Here, I worked hard on this. I hope you like it. Use it however you think best. Some stuff is documented as being subject to change in the future, but we're all adults here so use your best judgment."

Faulkner shook his head sadly. "Whereas Java developers who release Open Source are code are saying: Here, I worked hard on this. I hope you like it. But use it exactly how I tell you to use it, because fuck you, it's my code. I'll decide who's the goddamn grown-up around here."

Previous article: San Francisco Airport Announces That All Restrooms Near You Are Now DeprecatedThe SFO port authority announced today that all airport restrooms located anywhere near you are now deprecated due to "inelegance". The newer, more elegantly designed restrooms are located a short 0.8 mile (1.29 km) walk from the International Terminal. Read more

Next article: Eclipse Sits On Man's Couch, Breaks ItNew Hampshire programmer Freddie Cardenas, 17, describes the incident: "We invited Eclipse over for dinner and drinks. Eclipse sat down on our new couch and there was this loud crack and it broke in half. Those timbers had snapped like fuckin' matchsticks. Then my mom started crying, and Eclipse started crying, and I ran and hid in my bedroom." Read more

77 Comments:

Java's not even *fun* enough to laugh at. I expect after your sabbatical you would be trolling at Scala or Haskell or Go !

What's next ? Jokes about making GUIs in VB ? Pshh.

Seriously though, I can get the attack on privateness and finality. From someone with a strong dynamic tropism, that makes sense. But that good old @deprecated tag ? The ability to publically acknowledge your disgust at something *you* wrote, so that people get a chance to stop using it because, well, you know, it doesn't work (or the method is called getFoo, but what it actually does is setting bar and blowing up the nuclear plant, but we don't want to break your precious client code) ?

Sure, we would all like to write perfect code now and then (well, we might even like writing decent, or hell, somehow working code from times to times), but can you really blame those people with an imposter syndrom that just want to apologize to the face of the world ?

Anyway, this post doesn't have the necessary amount of parentheses to qualify as a programming post on this blog. I'll wait till the real fn begins.

One thing though, final is a really good hint to help the compiler optimize. Static finals that will never change can be optimized out at run time, which is really awesome. I've seen it in action, it really works!

I loved this sarcastic take on the joys of using other people's Java code. I just wished that C++ had managed to cop some of the flak because it deserves a lot more of it. Many days I see C++ as write-only.

As you may suspect, I have moved from a mostly Java environment to a mostly C++ one and that C++ feesl fugly.

if you look at the hadoop codebase, you can see that it has custom attributes to indicate stable/unstable and internal/external. these are hints for people downstream, markers to say "don't complain" if you worked with something that was internal and unstable and then it broke. but people can use them if they want to, they just need to know the risks -and get on the dev mailing lists if they want to help stabilise things.Social rules, not runtime ones.

removes all 'final' keywords except those required for hacking around the 15-year-old Java language's "fucking embarrassing lack of closures."

That's what I was afraid of when I first saw the news, but I'm glad they covered this part, because that makes the script actually useful for our project at work. Good thing I can manually change the modifiers when needed.

I once wrote a class called Hack with a method get(Object o, String fieldName) which allowed me to get (via reflection) the value of a private field.

I wrote as I trying to make BCEL (Bytecode Engineering Library) do some things it was not intended to do. It practically had all these capabilities in the first place, but in order to get to them I had to reach out and touch some private fields.

So, I had two choices: (a) modify the source code; (b) creatively use reselection;

I chose option (b). True, my code will not run in some environments where security policy is set to "panic" but at least I don't have to manually edit the BCEL source code every time a new bug-fix release is coming out.code

I'll say that I agree with changing private to public (Because, frankly speaking, it's all bullshit in the end), however not about final/static - Remove that and Java becomes much slower (and suddenly might not be as fast as C because every call will have to do argument type assertions :/)

My favorite trick in the old days of character mode devices was to remap the letter "e" to and the letter "o" to null. It then became impossible to edit the script to remove the line, and it was impossible to logoff!

Oh and for those who wonder it was 1974 and the interactive system was IBM's TSO (Time Sharing Option). Of course that isn't possible any more!

@ryan this is a common myth, but in fact final fields are not final at all. You can change them at runtime. And ininling of final static fields in the bytecode is generally considered a design flaw these days. It introduces dependencies between class files whereas the JIT could get that inlining job done even better at runtime. All of Java's speed comes from runtime optimizing in the VM, the compiler does zero optimization.

In related news, some monkeys were sighted at a Seattle airport, carrying Starbucks and some carefully folded patches. When interviewed about their purpose in Seattle, they responded, "We're bringing our well-known patching abilities to Java programming"

Re "enfranchisedmind.com": As I said in http://danweinreb.org/blog/advice-about-sending-email, whenever you use sarcasm, at least one person will actually take you literally. In this case, there appears to be a severe lack of a sense of humor. Anyway, I totally cracked up! Excellent!

I like the topic which has been discuss by you,i want to say thanks to you for sharing with me such a nice info.hpoe you'll soon give me more info regarding this topic,I'll waiting for that.==============================top bpo companies in india

read this few days ago. was wondering why there's no reference link to the original annoucement, the oddity of this piece, and was about to lookup. Then, i realized. Scrolling thru the comments confirmed. lol. Nice one.

Stop all that nonsense. Wikileaks decided to publish modifications of open source code. Go on with it. The ability to take somone elses code, modify it and re-publish it is the nature of open source. This is why open source exists.If you don't want your code being modified like that, then don't make it closed source!

Besides that, if I could decide it I would throw the "protected" and "private" out of the java language. I'm a Java programmer and it bothers me all the time that I have to write dozens of boilerplate code for doing simple stuff. E.g. Getters and setters. Who needs them? Totally senseless. And making things private so no one could use them?If you flag something as "mayChangeInFuture" or "isNotPartOfTheOfficialAPI". Everyone could still use the methods and variables, but if things break on an update it is his own problem ("You have been warned!").

Your posts are, as always, deeply awesome and thought-provoking. I'm still learning the developer game -- still an intern, with a long way to go -- but your writing always feels like a stimulating conversation with an old friend. They're much appreciated.

Come on, Stevey - it's been three and a half months since you wrote "Wikileaks..."

In "Blogger Finger" you already speculated "that everyone's completely forgotten who I am", but that's not true! I'm sure there are hundreds, if not thousands of people like me out there eagerly checking your blog for updates every hour! (through their feed readers anyway) Because we all read the last paragraph of that post with a sparkle in our eyes where you wrote: "I believe I'm ready to start tech blogging again... in moderation, anyway."

Feed us (and our readers), Stevey! Please! Come on, man, I know you can do it! Oh, oh... unless you can't, of course, because old claw hand came back to you? Ouch, I really hope not.

But I do hope that you'll read this little comment and that maybe it'll fall on fertile grounds.

> Mitch said...> Haskell (or something haskell-ish) is definitely the future, > though--cheap abstraction (which in haskell is enabled by the > type system, and by purity) is just too big of a win.

Most probably it is not a future nor will be future. It is the same story as it was with a lot "theoretically" perfect languages we've seen over the years that had carisma of becoming future badass languages but except few smaller projects, nobody ever really did anything production-usefull with them. The list is long - Smalltalk, OCaml, ML, LISP, Haskell... They were always in state of waiting for something to happen and that would be the trigger to give them high visibility out there. Just take a look in forums about rants of LISP community - it's always waiting for some new "version" or implementation of LISP that would make it everyones choice.

Don't get me wrong - I even like Scheme (well, I don't LIKE it, but I respect it). Scheme was a breaktrough for me to really get a grasp on recursion. (endless LittleSchemer practices).

Use of "educational" languages is to introduce new paradigms - and then the best parts of them are usually integrated in everyday languages we all use like C++,Java or or JavaScript or even Perl. The only exception I can think of (at least from languages I personally programmed in) is Erlang but Erlang has a bit different background. It was never a language that was buitlt for research - it was built because Ericsson needed such language to build complex telecom systems like their famous ATM switch. But except few Erlang popular projects (CouchDB, some Amazon cloud services, Facebook chat, Yahoo flicker parts, Ericsson stuff) this language lacks productive quality toolchain. If you ever tried to use a profiler in Erlang you would be instantly aware what I'm talking about. Somebody used to Visual Studio or even Eclipse will just run away from Erlang not looking back because of toolchain itself - I won't even mentioned weird (for someone used to C-like) syntax.

In 5-10 years we will still use Java and C++ but most likely they will adopt some of the good features from functional programming which is already happening in both mentioned mainstream languages. New languages and paradigms will appear on horizon - but mainstream will stay the same.

This is my first comment in my life & it is for you Steve... I miss your blogs.Mainly work in C,C++(strictly code in C way. Only additions are "is a,has a and friend") and LUA. Did Java long back..It is an insanely great blog