Mojo's blog banner

Tag: Java

  • “Sexier Software with Java and Flex” James Ward

    Notes from TheServerSide Java Symposium March 2009

    I was interested in this talk because we use a lot of Flex in MyAds for MySpace. Ward is an Adobe guy.

    He began with some flashy demos, an interesting way to enter car accident information for an insurance form on a web site, and a desktop application called SalesBuilder.

    Flex components: Client runtimes (Adobe AIR, Flash, PDF), Frameworks (Ajax, Adobe Flex 3), Servers/Services (LiveCycle, ColdFusion, FlashMedia Server, etc.), Developer tools (Creative Suite 3, FlexBuilder).

    The core VM for Flex is the Mozilla Tamarin open source virtual machine. I didn’t know that!

    Two primary languages for writing Flex: ActionScript, and MXML. He says “It’s a real language, not just a scripting language.” Okay. 🙂 The FlexBuilder IDE compiles MXML and ActionScript, binds to the Flex Class Library, and creates a .swf file (“swif”).

    Nice, live coding of a simple app to update Flickr tags in Flex using Flickr’s RESTful API. Starts with MXML to instantiate variables and objects. (But it’s still XML. Ew. He did say you can do it all in ActionScript if you prefer.)

    Ah, the XML appears to provide a scaffolding that makes a configuration environment for ActionScript classes, which look more like a “real” language. Clearly much of the power of the language is going to be found in the class library.

    The example made for a great live demo of the whole Flex development process, end to end, complete with debugging and examining data in vitro. That makes for a powerful talk. Oh wait! He’s using Eclipse for the live coding. Interesting.

    http://flex.org/tour for an interesting “Tour de Flex” showing fun available Flex components.

    Very good performance demo of the ActionScript Message Format (AMF), a proprietary data format  optimzied for Flex. In his demo he’s showing a Tomcat server running on his local machine, and walking through the back end code that communicates with the Flex front-end.

    Spring has built integration for Java webapps with BlazeDS for web messaging with Flex front-ends.

    With two minutes left, he decided to build a Flex chat client, and showed two clients exchanging chat messages. Impressive.

    Presentation slides here.

  • “Intro to JRuby” Neal Ford

    Notes from TheServerSide Java Symposium, March 2009

    Why Ruby? He talks about the known good language features, but the biggest reason is Rails. Ruby is actually an older language than Java.

    JRuby 1.1 incorporates a just-in-time (JIT) compiler, and in many tests is faster than the Matz Reference Implementation.

    In answer to a question, JRuby would exclude some gems that incorporate native extensions, but many gems are beginning to include Java native extensions.

    JRuby can incorporate and use Java classes in four different ways, and the implementation lets you use Ruby-native syntax for accessors.

    Java Ruby
    emp.getName(); emp.name
    emp.setName(“Homer”); emp.name = “Homer”
    emp.isManager() emp.manager?

    Camel case Java names can be called with underscores, i.e. url.to_external_form vs. url.toExternalForm().

    He then gave examples of language features, including closures, open classes, shadow meta-class, modules a.k.a. mixins.

    Because of the dynamic nature, tests are not optional in Ruby projects. Being interpreted, tests need to find runtime errrors.

    You can do Swing in Ruby, but it’s a little weird. Fun to be able to reopen classes and modify behavior. There’s an open-source framework, swiby = jruby + swing.

    Very interesting use case: using JRuby to run Java tests. Making mock objects in Ruby is right in the language’s sweet spot, whereas mocks in Java require all kinds of perverted twists to make Java do what it doesn’t want to do, and create types.

    I guess Ruby is beautiful if you’re deep into meta-programming, partly because it makes it easy. It doesn’t take a lot of code to do what you want to do.

    He states that while JRuby is at least as fast as native Ruby, JRuby is profoundly slower than Java, in exchange for faster development time.

    Link to the presentation here.

  • “On the lam from the furniture police” Neal Ford

    These are random notes from Neal Ford’s keynote talk at TheServerSide Java Symposium.

    The “furniture police” he mentions are the management folks that unintentionally take productive people and squeeze them into environments such as cubicle farms that make productivity difficult. It’s also a metaphor for every distracting thing in the workplace.

    The reference comes the book Peopleware: Productive Projects and Teams by DeMarco and Lister.

    One of our major assets as programmers is our ability to stay focused and concentrate for long periods of time.

    Another book reference: Pragmatic Thinking & Learning by Andy Hunt.

    Brain functions and hemisphere roles are significant. Our right brain is a major source of insights, and is non-verbal. Hard to pass communication directly from the right brain.

    An effective technique is to “silence the chatter” from the left brain with with repetitive tasks that are not too difficult, such as mowing the lawn, playing tetris, showering.

    He NEVER gets any deep insights while watching TV. I concur.

    Insights are fleeting.

    He brought up mind maps, showed a free Eclipse plugin, and mentioned a tool called Personal Brain.

    Book references: The Humane Interface by Jef Raskin. “locus of attention” as a key to UI design.

    FLOW — The Psychology of Optimal Experience by Miahly Csikszentmihalyi — “in the zone”

    Good analogy for being interrupted when “in the flow” is being waked when sleeping. A five-minute interruption really takes 30 minutes.

    Mentioned a TweakUI power tool for Windows that will silence balloon tips that are constantly popping up.

    Screen dimmers black out the rest of the screen, leaving you focused on one area: “jedi concentrate” and “doodim”

    “Don’t shave a yak.”

    Advocates “war rooms” rather than cubicles. Best is offices with doors.

    email = efail. Instant messaging bends flow but doesn’t tend to break it. Preferred.

    Todo list for you and your company:

    For company:

    • Create brain-friendly workspaces, offices, war rooms
    • Try pair programming, at least on the hard parts
    • Create collaborative spaces
      Software development is more about communication than technology

    For you:

    • Software development is not purely left brain, engage entire brain
    • Quiet chattering left brain
      Find ways to leverage background processing (like showering or cooking)
      Create an exocortex
    • Find and preserve “flow” within your environment
    • Wrest control of our environments away from the furniture police — gently
    • build insanely great software