The 8 Nights of Java – Night 2

Continuing The 8 Nights of Java series, tonight we focus on Java 1.2. While Java 1.0 and 1.1 were about establishing a strong base and creating a set of classes that directly interfaced with operating system components, such as threads, Java 1.2 was focused on building on top of that base with convenient and reusable classes. For example, you could create your own dynamic array using the built-in primitive arrays, but do you really want to? Java 1.2 answered this by showing that Java was more than just a language, it was a useful set of reusable tools written by software developers, for software developers.

Jump to: [Night 1 | Night 2 | Night 3 | Night 4 | Night 5 | Night 6 | Night 7 | Night 8]

Java 1.2 Notable Features
Sun released Java 1.2 (codename Playground) on December 8, 1998. This version included:

  • Collections framework
  • Swing
  • Java Applet browser plug-in

From Jeanne:

Hard to believe the Collections framework has been with us for so long. It works. There’s lots of collections and opportunities for extension. And I’m thankful we don’t have a Collections2 or Collections3 framework. Something this core is useful to last unchanged. There have been Collection implementations added over time, but that makes sense because it is a framework. Even in Java 8, Oracle added static and default methods so they could leave the interfaces backward compatible.

As for the others. Well. I’ve written exactly one Swing program professionally. And I only did it because Console.readPassword() wasn’t available yet at that time. Unfortunately it is still with us. The wonders of “legacy code.” The Java browser plugin served its use. More recently, its contributed to feelings of Java being insecure though. It also contributed to some confusion between Java and JavaScript. I’ll never forget the day the help desk told me to reinstall Java to “solve” a JavaScript browser problem. Needless to say, I declined. And the problem was not related to Java after all. Gasp!

Fun fact: my very first Java program for school used Java 1.2.

From Scott:

I have to agree with Jeanne on this one. Although the Collections framework was a little difficult to use until generics were added in Java 5.0, they were from the start very powerful. I remember studying linked lists, hash maps, tree sets, and sorting in school. While all software developers should know these concepts and be able to implement them… in production software engineering it’s far better to go with a feature-rich implementation that has been written and tested by hundreds of developers than your own piecemeal solution (aka a “square wheel”).

As for Swing, I’ll be honest and say there was never a time I enjoyed programming in Swing. Even “back in the day” the Swing UI already looked quite dated. It was very difficult to write Swing code that looked good without relying on a number of often proprietary plugins, which required licenses to use. I remember registering for courses online (pilot program at the time, previous students had to do so in person) and a Swing app popped up within the browser, then promptly crashed 4-5 times in a row. I don’t know if the Swing apps I had the misfortune to use were just poorly written, poorly designed, or the underlying technology was just flawed. The one thing I do know is that I have never looked at a Swing app (either one that I’ve written or used) and thought it looked “beautiful” or was “easy to use”.

The limitation of Swing, as well as other Java UI languages, still holds true today in professional software development. While many people use Java for back-end systems, most use some flavor of Javascript (Angular, Node.js, Ajax) or mobile design tool (xib, storyboard, view, layout) for the majority of their front-end work. Even JavaFX, which was later billed as the “greatest Java UI language since Swing” was never able to gain much ground, in part because so many developers carried over a dislike of Swing. I do wonder how Java would be different today, if Swing had been easier to use and looked nicer.

The 8 Nights of Java – Night 1

Given the holiday season, we thought it would be fun to share our favorite (or least favorite) features from all 8 versions of Java that have been released to date. Some features, like generics and autoboxing/unboxing, were met with a lot of fanfare and have since changed the way we as developers write code. Others, like NIO.1 and RMI, are not nearly as popular today as originally envisioned. With that in mind, we’ll be posting one entry each night on a different version of Java, starting tonight with Java 1.

Oh, we want to wish all of our readers a Happy and Healthy Holiday, as well as a Wonderful New Year!

Jump to: [Night 1 | Night 2 | Night 3 | Night 4 | Night 5 | Night 6 | Night 7 | Night 8]

Java 1.0/1.1 Notable Features
Sun introduced Java 1.0 (codename Oak) on January 23, 1996, with a more stable Java 1.1 released in February of the following year. These versions included:

  • Compiler and JVM runtime environment
  • JDBC
  • The beginnings of reflection
  • Inner classes
  • Thread class

From Scott:

Java 1.0 released.. well, Java! We all take for granted the ability to execute Java code on nearly every platform but back when Java was first released the idea of compiling source code into byte code and running inside a virtual machine was absolutely revolutionary. It was one of the first languages to allow developers to work freely in any environment and deploy to any other environment. Before Java, programmers tended to use the same operating system, same IDE software, and same compiler to write software that often could only run on a handful of environments. Java helped foster the open source movement allowing developers to work in Linux, Windows, MacOS, etc and deploy to any system. At a time when hardware and software systems were much more heterogeneous than they are today, Java helped improve productivity and sharing across a wide variety of landscapes.

Of course, early on there were some problems. Microsoft released Visual J++ alongside Sun’s implementation which contained only a subset of Sun’s features, as well as additional features Microsoft wrote themselves. These differences almost splintered the Java landscape within the first few years, since Visual J++ was so different from Sun’s implementation. Luckily for us, Sun intervened, successfully suing Microsoft on the basis that it violated Sun’s license agreement by releasing a version of Java not compatible with other versions of Java, helping to solidify Java as a standards-based language. In hindsight, articles like “Microsoft’s J/Direct called death of Java” written in 1997 (and comical now) would be the first of many (including a famous interview with Steve Jobs) to incorrectly predict Java’s demise. Today, Java is used in over 3 billion devices worldwide.

My favorite part of Java 1.0? The fact that the Thread class was included right away. Multi-threaded programming was still somewhat new, especially since multi-core processors were still in their infancy. Providing a new language in which developers could process tasks in parallel was pretty forward thinking, even if our thread-base implementations weren’t always perfect. Today, we tend to rely on the Concurrency API given its feature-rich convenience and stability, but never forget it’s is built entirely upon the Thread class.

From Jeanne:

Version 1.0 included Vector. While we no longer use Vector for new code, it paved the way for ArrayList and the Collections framework. JDBC is one of my favorite libraries. I use a mix of raw JDBC, ORM and Spring JDBC template these days, but JDBC started all of this. And then we have the parts of the language that stood the test of time. Plus since Sun/Oracle find it hard to actually get rid of anything from the language, we also have such fond deprecated memories such as Date’s getHours() methods. I was still in high school when Java 1 launched. I never actually worked with it directly as Java 1.2 was out before I started even reading about Java. When Java turned 10, it was cool to read Hello World(s) – From Code to Culture and see how Java got started. Or should I say how Oak got started?

emotional intelligence after 7 years

Yesterday I had an interesting discussion with a teammate who recently attended a course on Emotional Intelligence. He asked me if I had read about Emotional Intelligence. I said no, but this turned out to not be true. In 2009, I read Emotional Intelligence 2.0. I gave it 5 stars and called it a very accessible soft skills book. I even took the online rating test. At least my review says my self of 7 years ago found it interesting.

Changes in 7 years

Since I have no memory whatsoever of this, I took the test again today. Luckily, the book contains a passcode so I could see my old and new scores. I found my scores interesting. In particular, I think I rated myself lower BECAUSE I have more awareness of these things now than I did when I first read about the topic. Meaning I’m more aware of my weaknesses. In 2009, I wasn’t even particularly interested in the topic. I just got a free book at JavaRanch in exchange for writing a review. I’ve done a lot of things in this space since so I know I’m stronger now than in 2009! All that said, they recommend re-taking the test after 6-12 months, not after 7 years.

Category Change Comment
Self Awareness Exactly the same Weird! Wonder what are the odds of an exact same score.
Self Management Scored 10 points lower I definitely think knowing more affected my score. Because knowing what I’m feeling means I’m conscious of the small percent of the time where I let a reaction through that I didn’t want to even if it wouldn’t be observable to others.
Social Awareness Scored 10 points lower Knowing more definitely affected this category too. I immediately think of the Dunning–Kruger effect here. Seven years ago, I had so much less social awareness than I do know that I would have rated myself higher because of lack of awareness of what I missed.
Relationship Management Scored 6 points higher While I think I’ve always done things in this space, I’m more conscious of it right now because of the conversation I had yesterday that inspired this post. (more on this below)

Small Concrete Things

Flipping through the book, I should read it again. I really liked that it was lots of small concrete things to try. Rather than theory or vague statements like “try to understand people.” I should re-read it cover to cover again too.

Over time, I’ve mentioned some of the things I do without realizing they are related to emotional intelligence. A few examples:

  • Talk to at least three people I don’t know at a work reception (I do this because it is easier to stay with the people you know and this forces me to counter natural introversion and actually build my network. It also gets me away from my team to talk to the people I see less often.)
  • Introduce myself to anyone I don’t know on the floor. (Again counters feelings of being introverted)
  • Know in advance external forces will affect my emotions, so I can compensate in various ways. (Obviously you can’t always know in advance, but many things are known before work starts).

My mental model

“Dealing with people and feelings” stuff has never come naturally to me. So while I’ve tried to work on these compensating techniques, I’ve never felt good at it nor do I expect I’ll ever feel good at it. And that’s ok. I’m great at tech stuff and explaining things and mentoring people and many other things. And yes, I realize the oxymoron in there – mentoring people is part of “dealing with people.”

Also, continuous improvement is important. Time management is a soft skill I’m excellent at and do feel strong at. But I still spend time getting even better in that space. So I recognize that as long as my awareness of “dealing with people and feelings” grows at the same rate or faster than my mastery of the techniques I want to do, I’ll keep getting better without every actually feeling good at it.

Because “dealing with people and feelings” doesn’t come naturally I try to algorithim-ize it. If I can identify something I want to do that is concrete enough, I can consciously practice it until I can do it without thinking about it. The tricky part is identifying those things. (Which is one of the reasons the book is a good format for me – it is about specific things.)

The conversation that inspired this post

Anyway, finishing up, I IMd my teammate after we talked:

sharing: i can’t believe you had so many examples of me being effective in the space of communication/reflection/stuff from your class. i feel so weak at it. i think b/c none of it comes naturally

And he replied:

Understood. I think it’s the more remarkable because of that.
And you invest in it, because you value it. You could just be satisfied with “being bad at it.

His quote is great. I do value it. I also value continuous improvement in technical stills, soft skills and process. Whether it is something where I feel good, bad or medium, anything can get better. So I asked if I could use that IM quote in a public blog post and he said yes.