Friday, August 3, 2012

Episode 17: Java


Download

News
Tool of the Biweek

Java

History
  • 1995 “Write Once, Run Anywhere”
  • Applets
  • 2006 Open Sourced*
  • Third Party Virtual Machines


Features
  • Generics
  • Garbage Collection
  • Interfaces (sort of like multiple inheritance)
  • Checked Exceptions (except for RuntimeException)

Strengths
  • Platform Agnostic
  • Large community support
  • Many Libraries

Weaknesses
  • Speed
  • Hardware Abstraction
  • Forced object-oriented architecture (not functional)

Tools
  • Eclipse
  • Netbeans

Uses
  • Web
    • Server (Tomcat, JSP)
    • Client (GWT)
  • Android

1 comment:

  1. Just a few comments.

    """they kinda made sure [Java] was sort-of pure"""
    Very much sort-of, as in not much at all. In some ways its more pure than C++, in other ways less so. OOP purity means everything is an object, but it took them nearly 10 years to tack on autoboxing. Bodiless mixins (interfaces) lead to more copy/paste/boilerplate which is anathema to the code reuse that object composition should grant. One might expect some consistency about things like operator overloading, which they decided was bad except when they do it (+ for strings). Member function pointers don't even exist in Java, like decapitation as a solution to beating your head against a wall. The closest you'll get is a reference to an instance of an anonymous class implementing an interface, which is like surviving the guillotine because the blade was so rusty; beating your head against the wall doesn't feel so bad after that.

    As to whether a professor should teach Java or Python to new students, I'd say Python because what Java teaches you is impoverished OO, senseless boilerplate code is somehow needed, IDEs are a requirement (see boilerplate), keeping track of types is the best use of a programmer's time, generic programming is only good for collections and more broadly "metaprogramming - what's that?"

    If you need to compile everything before it will run and obsess about types when you don't have pointers and can't work with memory directly anyway, that's just more turn-offs for those starting out. Its telling that MIT doesn't teach Java, at least initially.

    Though its fair enough to use reference counting to explain the concept of garbage collection, its important to note that Java doesn't do reference counting. If it did, then it could have deterministic finalizers.

    """you'll always make a mess if you write in Perl"""
    My experience differs, its possible to make a mess in any language, and a language that is succinct opens up whole vistas of tidy. Try searching for "modern perl".

    Despite the rantish nature these comments are intended to be constructive with respect to the fine effort put in by the presenters :)

    ReplyDelete