My Review Of Developer-Day in Durham

23 03 2009

This Saturday, I attended Developer-Day in Durham, NC. Overall, the conference was outstanding. Priced at $50, it was definitely worth the 4-hour trip from Washington DC. Below you will find a quick review of each of the talks.

Refactoring Your Wetware by Andy Hunt

Andy Hunt of the Pragmatic Programmers gave us a brief overview of his latest book: Pragmatic Thinking And Learing. He described the way our brains are wired and offered advice to take advantage of what we know about our brain’s architecture.

Andy started by explaining the concepts of Systems Thinking, as described in The Fifth Discipline. Systems Thinking is when you get out of the habit of thinking of things as discrete objects, but as systems instead. Once you start looking at objects as belonging in a system, you began to see how they are interconnected. Having graduated from the UVA Engineering School where Systems Engineering is the most popular department and working with Ahson Wardak, a Systems Engineering PHD candidate, I’ve had some exposure to the discipline and concept.

Andy followed by describing neuroplasticity, the fact that your brain can grow new neurons if you exercise it. He then moved to a discussion on The Dreyfus Model of skills acquisition. In summary, the best way to become an expert is through deliberate practice: 10 years of practice! Imitate the experts, then assimilate, then innovate.

Andy explained that the brain has two sides: the left and right brain, which he would rather call the Linear Mode and Rich Mode, respectively. Think of the Linear Mode as the mode that is prevalent with geeks and the rich mode as the one that is non-verbal, non-rational, synthetic, non-linear, asynchronous like a search engine, analogical, spatial, intuitive, holistic… The Rich Mode of your brain sometimes has trouble putting into words what it is processing but this is where the innovation/ideas comes from. A lot of inventors report that they discovered things in their dreams. Therefore, Andy suggested to try out Free-Form Journaling: wake up every morning and write down 3 pages of stuff (by hand, no typing) before you do anything else. Don’t censor yourself. Write about anything.

Then, Andy explained how our memory is not very good or, I quote, ‘is a piece of shit’ so it is important to write down things. When you think of a new idea, write it down. If you don’t keep track of your ideas, then you stop having great ideas. Once you have an idea, the best way to explore it is with a mind map (on paper, no computers). Once you are done with the mind map, putting that information in a personal wiki can be helpful.

Finally, he challenged the audience to try meditation and warned us against multi-tasking. The benefits of meditation far outlasts the actual practice itself. Multi-tasking is really bad for your brain so avoid context switching.

I enjoyed Andy’s talk and I will definitely pick up his book in the near future.

Evolving Your Git Workflow by Jason Rudolph

In this talk, Jason Rudolph showed us a few special git commands and how we can take advantage of them to improve our workflow.

He started showing us the power of git bisect by walking us through a debug session using the command. He used git bisect to find out when a bug was introduced in his codebase using the following commands:

git bisect start head %%commitid%%
git bisect log
git bisect good
git bisect bad

He then showed how you can automate the whole process with:

git bisect run %%command%%

I thought that was one of the coolest things I’ve ever seen!

After having used git to do some ‘Biology’, he proceeded to show how git can help us with ‘Archaeology’. The latter is the ability to be able to clearly tell what happened in the past by looking at the history of a code base (through a version control system log). It is important for your projects to have a clear, well-defined archaeology, so that new programmers can look back and figure out why things were done in a certain way. Jason shows us how git makes that easier. For example, with git, you can amend commit messages or your can commit changes from one file in two different commits. Pretty slick!

In the third section of his talk, Jason showed that branching in git is easy, cheap (41 bytes), fast, and have low ceremony. Therefore, there is no excuse not to branch and we should Branch All The F***** Time (BATFT).

Optimizing Perceived Performance by David Eisinger

In this talk, David showed us how improving the perceived performance of a web page can greatly improve the user experience. David used a sample application called DBDB (DoucheBag DataBase) to illustrate his idea which got the crowd laughing a lot.

David showed us a few client side techniques that we can use to make our application appear like it is loading faster. He advocates the use of Unobstrusive Javascript with jQuery (with jRails).

Lightning Talks

After lunch, we had the lightning talks. Here is a set of links from the talks:

Getting Girls With Musical Magic and Ruby by Jess Martin and Chad Humphries

Jess and Chad showed us how they are using Ruby to make mashups. Check out Girl Talk for a good demonstration of this style of music.

Jess wrote some ruby code that wraps Sox to create mashups. He built a really slick frontend for it (CHOP40) which lets you select some tracks and automatically mashes them up for you. I’ve been a big fan of the style (especially diplo’s stuff) so it was cool to see the techniques behind this art form.

From Paralysis to Static Analysis by Aaron Breda

At every conference I go, I always have a moment where I kinda zone out (thinking about cool stuff I could do with the stuff I just learned about). It usually lasts only for one/two talks before I get my focus back. Unfortunately for Aaron, it happened during his talk this time :-/ ( I’m curious to know if it happens to every one so let me know in the comments. )

From what I picked up though, Aaron and Chad should be awarded some kind of heroes award for the work they are putting into upgrading rcov to Ruby 1.9. Thank you guys!

Scala: A Modern Programming Language by Clinton Nixon

Clinton gave us a great introduction to the Scala programming language. Scala was created in 2001 by Martin Odersky. It runs on the JVM, compiles beforehand or JIT. It is a functional language where everything is an object (like in Ruby) and it supports actor-based concurrency (so it is future-proof with the trend to have more cores on CPUs).

Pros: interoperability, scalability, beauty (of course that is subjective)

Cons: JVM (if you do not like that, though I think this is a pro rather than a con), hard to navigate libraries if you do not know Java, small user base, no killer frameworks/libraries.

Clinton posted his slides at http://crnixon.org/talks and they are the kinda of slides that you can read and learn from without seeing the presentation so go check them out.

I really enjoyed this talk since I’ve been meaning to learn more about Scala and this served as a great introduction.

Page Caching Resurrected: A Fairy Tale by Ben Scofield

Ben’s talk was great. He showed us a creative use of Rails Metal with page caching. The idea can be summarized as follow:

  • Cache your page with only the content that will be seen by all users.
  • Have your page make a javascript call to get user specific content in the background.
  • To make that javascript call be fast, use Rails metal in the back end to return the needed data fast.

I’ve been using this technique at ShareMeme and messagepub with the exception of the use of Rails Metal. For example, at messagepub, most pages are cached and we fetch the menu bar and navigation links with JavaScript after they are displayed. Therefore it turns out our Rails action with the most hit is the action that fetches the menu bar (since everything else ends up being served by the web server) therefore it would make sense to use Metal for that action to reduce the delay before the user sees the menu.

Summary

I can’t decide which was my favorite moment of the conference: whether it was seeing git bisect in action, learning about Scala, listening to a mashup that was created with Ruby, or seeing a cool use of Rails Metal.

This was a great conference with really good talks both in content and delivery. Thanks to Viget, Relevance, and Ben Scofield for putting it together. I look forward to the next one in Washington DC.

If you want to get other opinions on the talks from Developer Day, see how the rest of the audience rated the speakers at speakerrate.com





Install Java On Ubuntu

21 09 2007

It is so easy to install Java on Ubuntu now. On Ubuntu 7.04 (Feisty Fawn), follow these steps:

1) Make sure you have the right repositories on your sources.list file.

Edit your sources.list file the following way:

sudo gedit /etc/apt/sources.list

or if you are not using gnome (e.g. you are logged in through ssh):

sudo nano /etc/apt/sources.list

If the following lines are not already there, add them:

deb http://us.archive.ubuntu.com/ubuntu feisty main restricted
deb http://us.archive.ubuntu.com/ubuntu feisty universe multiverse

Save the file (in nano use Control-O to save and then Control-X to exit).
Now you need to tell the package manager to update it’s database:

sudo apt-get update

2) Install Java using apt-get

I currently have both Java 5 and Java 6 installed on my machine and it’s very easy to switch between the two. Java 6 has some nice goodies such as JSR-223 and better jconsole that I like to use.

For Java 5:

sudo apt-get install sun-java5-jre sun-java5-jdk sun-java5-plugin

For Java 6:

sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-plugin

There are other packages that you might be interested in:

  • sun-java6-demo
  • sun-java6-doc
  • sun-java6-source

3) Verify installation

Verify that you have the correct version of java running:

java -version

For example, on my machine (yes, I call it tiwouj):

Ubuntu Java Version

To see a list of the java versions that you have installed, you can use the following command (it’s a letter L at the end of the command):

update-java-alternatives -l

Here is my list:

Ubuntu Java List

This should show you a list of all the java alternatives you have installed. java-gcj is the free version of Java from the GNU project and comes installed by default with Ubuntu so you should see it. To switch to a different version, use the following command:

sudo update-java-alternatives -s <version-desired>

e.g:

sudo update-java-alternatives -s java-1.5.0-sun

Make sure it worked:

java -version

That’s it! How easy was that? You have to love apt-get.





Follow-up on Ruby On Java Presentation

25 08 2007

Earlier this month, at Barcamp DC, I talked about using Ruby with Java using JRuby, JSR-223, and the Bean Scripting Framework.

Today, I found this great blog post that describes using the BSF to call Ruby’s ActiveRecord from Java.





Book Review: Beyond Java

22 08 2007

I just finished reading Beyond Java – A glimpse at the future of programming languages by Bruce Tate and I really enjoyed the book. I can’t wait to pass it on to friends and co-workers that are Java developers. I think every Java developer should read it.

Unfortunately, it is the kind of book that will be affected by time as the content will not be relevant anymore a few years from now. As a matter of fact, some of the content is already somewhat outdated but the main ideas are still relevant. So if you haven’t read it yet, go get it now and read it. It’s a small book and a quick read.

Bruce Tate believes that Java development has become too complex and that Java lacks some of the features that are desirable in a modern programming language. In his opinion which I share, Java is too verbose: “Even with seasoned developers, it takes a surprising amount of code to get even simple applications off the ground.” (p. 4). With dynamic languages like Ruby or Python, you can see incredible power and productivity very quickly. In addition, Java does not support metaprogramming or continuations natively.

In Chapter 2, entitled ‘The Perfect Storm’, the author does a great job of describing the environment in which Java emerged to become the dominant programming language. For anyone in need of a quick recap of the recent history of programming languages, this chapter is a great read. The next Chapter is a eulogy of Java where the author describes what Java does right and the features and circumstances that makes Java so successful. Bruce Tate then exposes the limits of Java and offers a comprehensive list of rules that the next successful language will need to follow to become the next Java.

Chapter 6 is a quick overview of Ruby that demonstrates that Ruby possesses a lot of the qualities needed to cross the chasm and become the next big programming language, including having a killer application in Rails (which he reviews in Chapter 7). Finally, the next chapter takes a look at continuation servers and uses the Seaside framework written in Smalltalk as an example. To me, this chapter was probably the most interesting in the book. My only introduction to continuation servers before this was when Chad Fowler briefly mentioned them at the Advanced Ruby Studio that I attended last month. It is a fascinating topic and I will definitely do some digging to learn more about them. Maybe I’ll give Seaside a quick try.

The author also mentions a few major (Python, Groovy, .NET) and minor (PHP, Smalltalk, Lisp, Perl) contenders. He thinks that “Perl is too loose and too messy, PHP is too close to the HTML, Lisp is not accessible, and Smalltalk wasn’t Java” (p. 171).

In conclusion, the goal of the book is to warn Java developers that Java is moving away from its base (it’s getting too difficult to solve simple problems in Java) and showing signs of wear. In the meantime, interesting innovations are appearing in other languages so it is time for Java developers to start paying attention to the world outside of Java.





Barcamp DC – Ruby on Java

15 08 2007

Barcamp DC was great. It’s good to see the DC Tech community get together for events like these.

The first session I attended was an introduction to Ruby on Rails given by Kevin Lawver. I thought it was very cool that Kevin brought his son with him. He seemed to really enjoy the un-conference.

After that, I sat through a couple of good sessions on User Experience and Design Challenges. They were both very interesting discussions. The Design Challenges discussion was initiated and moderated by the folks at Viget. I really enjoyed this one from a non-designer perspective. It seems like a lot of the challenges they face are very similar to the ones a software developer faces such as communication with the customer.

Scott Mendenhall squeezed two talks into one session: Open Source CMS and Ajax Network Latency. The first one was a survey of Open Source Content Management Systems. There are a lot of them out there and a big consulting industry around them. Scott claims that some consultants charge as much as $50,000 to recommend a CMS. The Ajax Network Latency talk was of interest to me because I have been dealing with that issue at work with the Verizon FiOS project.

For the rest of the day I attended a session on the Mobile Web, a Ruby Crash Course, and a Rails open session.

When it was my time to talk, I presented on Ruby and Java cooperation. My slides are here or below:

Overall, I really enjoyed the day and I look forward to the next BarcampDC.





Did Bruce Tate give up on fighting the Java bloat?

8 03 2007

I was reading the first chapter of Better, Faster, Lighter Java from Bruce Tate. I haven’t read the whole book yet but I found the first chapter very interesting and I can’t wait to read the rest of the book. The basic idea behind the book is that programming languages cannot avoid the inevitable ‘bloat’ and Java has crossed that border:

Typical applications use too many design patterns, too much XML, and too many Enterprise JavaBeans.

Bruce proposes some alternatives for dealing with the bloat in Java:

  • Change nothing; hope that Java will change.
  • Buy a highly integrated family of tools, frameworks, or applications, and let a vendor shield you from the bloat.
  • Quit Java for another object-oriented language.
  • Quit object-oriented languages for another paradigm
  • Spend time and effort becoming a master craftsman.

After presenting these alternatives, Bruce declares that his “choice is to actively fight the bloat.” He proposes five basic principles to achieve this:

  • Keep it Simple
  • Do One Thing, and Do It Well
  • Strive for Transparency
  • Allow For Extension
  • You Are What You Eat

Since he wrote this book, Bruce has publicly ‘walked away’ from Java to adopt Ruby and Rails. In essence, it seems he followed the ‘Quit Java for another object-oriented alternatives’ even though his claim was to ‘fight the bloat.’ I found this very interesting. Did he realize that his attempt to fight the bloat is not the best solution?

I know he wrote Beyond Java and From Java to Ruby after writing Better Java so I wonder if he answers my question in these books. I guess I’ll have to read on. Mmm… I wonder if that was planned by Bruce… that would be great Buzz Marketing.