Tag Archives: Hanselminutes

Tail recursion in Scala and Annotations for Software Defect Detection

The Java Posse interview with Brian Goetz and Bill Pugh cleared up how Scala supports tail recursion in spite of the JVM's lack of support.  Brian Goetz did a great job of explaining that currently compiler writers have to build in the support (which Scala does) because the language doesn't support it directly.  He went on to explain that while there is support in the CLR for tail recursion, the F# compiler writers chose not to use it in some cases because they found that they could write a more optimal version by converting to iteration.  

The conversation was about changes that can be expected in Java 7, including JSR 292 ("Enhancements for Other Languages", aka "Invoke Dynamic"), JSR 305 (Annotations for Software Defect Detection), and JSR 308 (Annotations on Java Types).  

The discussion of JSR 305 (and @NonNull) reminded me of the discussion of contracts in a podcast on Microsoft Spec# that I listened to a few weeks ago. Scott Hanselman did an accompanying blog post as well. The FindBugs (static analysis) tool that Bill Pugh did is definitely a "must-have", and can already support annotions such as described above.  The JSR would simply provide a naming convention so that all tool makers and programmers could agree.  I had to look up Bill's annotation to see if it was "NotNull" or "NonNull", for example!

Note: JSRs (Java Specification Requests) are formal requests through the JCP (Java Community Process) for changes or enhancements to Java and the Java Virtual Machine.  This is an open process and participation is encouraged. 

  

What I learned on my (Memorial Day) “vacation”

Last weekend, an unexpected turn of events (that involve our dog and a box of Bisquick) left me at home, while my family headed off for a planned weekend away with our friends.  The time alone gave me a lot of time to catch up on things, including shopping (which I usually detest), home improvement projects, and podcasts.  I thought I would share a little of what I learned over the weekend, things that might be relevant to people who would read this blog.

Podcasts

I caught up on a lot of podcasts while I was sanding and staining our windows. The irony of listening to Java Posse podcasts while doing "windows" even amused me.  But anyhow, I caught up on a bunch of those podcasts, including the recordings they did while at Java One.  The BOF and CommunityOne recordings were fun to listen to.  It always seems to catch Dick by surprise that people actually show up. I don't think that he realizes the impact that the Java Posse has on its listeners.  I've said this before, but it's worth repeating.  The podcast really does a great job of giving people an idea of the breadth of things that go on in the community.  I also listened to their Java SE 7 interview with Danny Coward. That was interesting and relevant for anyone who wants to know where Java is headed.  Between JavaFX and the proposals for Java SE 7, there are a lot of things to keep in mind.

After I had my Posse fix, I listened to Scott Hanselman's Hanselminutes,  on Microsoft Research's new language Spec #.  Spec# started as a fork of the C# compiler and added language extensions that support contracts.  I really like Scott Hanselman's podcast.  He covers a wide variety of topics, and in spite of his new job at Microsoft, he doesn't strike me as a Microsoft Fanboy.  Rather, he has a grounded view of things.  I appreciate that.  In anyone.

I then listened to "The Evolution of Yahoo" on Stanford's Entrepreneurial Thought Leaders podcast.  This was recorded in the same week as the Microsoft/Yahoo buyout talks collapsed, and was an interesting perspective on where Yahoo is going.  If you think that Yahoo turning down Microsoft's offer was a mistake, this may give some insight into why the Yahoo people thought that their stock was undervalued, and where the company is going.   

Somewhere around this time, during last weekend, Jay Wren twittered about Software Showtunes, and so I popped over to listen to that.  TOTALLY amusing.  Well worth the time. Microsoft takes a bit of a beating, but Apple doesn't come away completely unscathed either.

I think that I wrapped up the podcast/staining windows fest with IT Conversations "High Performance Computing Considered Harmful", which really provoked a lot of thought. The fact is that scientists and engineers write a lot of code.  Computer scientists often turn their noses up at the tools that they use, like Matlab, when in fact that tool serves them very well.  In fact, my husband uses Matlab for a lot of simulations, and one of our employees (Anne) has been working on the ProjectEuler problems using Matlab.  One of our consultants (Alex) thinks highly of it as well.  The truth is that this tool lets them get their jobs done.  What do we snooty computer scientists promote?  Parallel simulations?   Seriously?  Most CS grads can't write a decent multithreaded or parallelized app and we ask scientists and engineers to do this?  I loved it when the guest on the podcast said that if a scientist comes to him and says that he's run into a timing issue, then we should all realize that we're failing as computer scientists.  In fact, he estimates that only about 10% of scientists and engineers even use version control, yet so much time, effort, and research dollars go into speeding up simulations that will only be run a few times.  There are a lot of interesting things to consider about this.  I'm still thinking … I'm sure that many more blog posts will be generated from the ideas bubbling around in my head.

Buying Services

On the non-technical side, a learned a lot too.  More than just the fact that a dog needs to go to the vet if he eats a box of Bisquick and that much more gets done on home improvement projects when the kids are NOT home. 

What I learned was to take advantage of services that people provide.  As I tell my kids, we choose our professions based what WE do best in life.  For example,  I don't want the woman who cuts my hair writing software (and she doesn't want me cutting hair), which is why I pay her to cut it.  But more relevant to the software developer community (I'll affectionately brand us all as geeks for this rant), we need to recognize that there are services that we SHOULD be taking advantage of.  For me, that's shopping.  I HATE HATE HATE shopping. OK, I'm fine with buying software and hardware, but is that really shopping?  More explicitly, I hate clothes shopping.  I have discovered a service which I think that many of us in the geek community should embrace: the personal shopper.  It's free.  Some department stores (I used Lord & Taylor) pay them to help people like me, who are inept shoppers, choose items to buy.  Yes, they get a commission, but that's payment for their expertise (by their employer!).

Much like the scientists and engineers who don't use version control because they don't even know it exists, how do you discover that you could benefit from a service that you don't even really know about?  I had previously stumbled upon this service as I wandered aimlessly about, looking for a dress for an event that I had to attend.  I happened to run into the personal shopper who took me under her wing, escorted me to "her" dressing room, and brought armloads of dresses for me to try on.  She did a much better job of selecting a dress than I had done, and I returned the one that I had previously bought and purchased one that even COST LESS.

OK, there's a point here.  I'm trying to let you know the process so that you, friendly geek, are not intimidated by the process.

Here's a summary of my personal shopping experience from last weekend.

  1. Call department store and make appt with personal shopper for the next day. She asked a few questions, like what I was looking for. 
  2. Show up. 
  3. Clothes in my SIZE were hanging in the dressing room, for me to start trying on (ordered by color, type, etc).  I was a bit overwhelmed by where to start, but she walked me through it (start at the right and move left).  She brought me a bottle of water and retrieved other selections along the way (different sizes, etc.).
  4. Try on clothes.
  5. Personal shopper helps decide what does/doesn't look good.
  6. Fork over the credit card.  Personal shopper even applied a coupon (I didn't need to have one with me).
  7. I left with a nice selection of clothes that GO TOGETHER and are updated for 2008. 

That's my kind of shopping.  I wouldn't usually expose my personal weakness (my complete lack of shopping abilities), but I figured that this was a public service.  I've seen how people dress in our profession.  We need to consider this as a cost of doing business. 

I don't know when I'll get another "vacation" like this.  I promise not to poison the dog as an excuse to get one, but he's fine and I learned a lot (and my husband and kids had a great time with our friends too).  Doesn't get much better than that.