Tuesday, September 15, 2009

Update on my Speaking Engagement

The Utah Open Source Conference
Things have settled down now and I'll be speaking on Friday the 9th at 6:15 PM on Lucene. Right after that I'm holding a BOF on how Hibernate Search solves Lucene's scalability problems along with several other shortcomings. Hope to see you there.

Friday, September 4, 2009

Hey, I was just notified that my proposal to speak on Apache Lucene at the Utah Open Source Conference was accepted. The conference is October 8 - 10. I will also give a short discussion on Hibernate Search as it applies to the Lucene engine and how it fixes some of Lucene's shortcomings.
If you get a chance attend the conference. The admission change is minimal and if you volunteer to help it's free admission!!
Hope to see you there.

Saturday, July 11, 2009

Viral Patel gave a short discussion on his blog entitled Convert ArrayList to Arrays in Java. This is a good thing to know how to do but he did not cover the reverse operation, converting arrays to lists. It holds a few surprises for you. So here is a short snippet that demonstrates this opposite operation.

import java.util.ArrayList;
import java.util.List;
import java.util.Arrays;

public class ArraysAsList {
public statis void main(String[] args) {
new ArraysAsList().start();

private void start() {
String[] countries = {"India", "Switzerland", "Italy", "France"};
List list = Arrays.asList(countries);

If we run this small program we get.....
WHAT!!!! an exception?!?!?!What going on here? All we wanted to do was add an element to the generated array. Here's the exception:

java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:131)

Whaddaya mean unsupported operation? Let's look at the javadoc and see what it says:

"Returns a fixed-size list backed by the specified array."
Aha! there's the problem. That means that I can't remove anything either. Try it.
Don't forget this in your coding, it can bite you. Not a big deal but just what you need to deal with when you're under the pressure of a deadline.

Thanks to Damien for reminding me to show you the correct way to do this:
List list = Arrays.asList(countries);
should be:
List list = new ArrayList(Arrays.asList(countries));
This fixes the problem. Now you can add, delete, whatever.

Saturday, July 4, 2009

Get more kids into Computing, Alice.

Ok, I digress from technical topics again. This time though I think it's an important digression. Let's get more kids interested in computing!!
As of 2004 only 4.1% of all Bachelors degrees awarded were in Computer Science (that's the latest data the CRA had). In 2008, only 11.8 percent of U.S. bachelor's degrees in computer science went to women. This is another sore point but I'll make that a topic for another blog post someday. The point is we need to get more kids interested in computing!!
Many kids think that computing isn't fun (some programmers think the same thing) so we need to make it fun. Thus enters Alice. With support from the National Science Foundation, professor Susan Rodger of Duke University is hoping that Alice will get kids interested in computer science.
A ScienceDaily site gives an overview of the problem and discusses Alice at a high level. Basically, Alice is a 3D programming environment that makes creating animation for story telling easy. It is designed to be a first exposure to object-oriented programming and is available for Windows and Mac. According to the site, kids that have been introduced to Alice have a hard time stopping once they get started.
Yes, I know, maybe you consider this a rant and not a blog post but as I said earlier this is important if we are going to maintain a technological edge in computing. I can't believe I'm saying this but I'm thinking of trying to start a computing summer camp for younger children. I just have to fine the financial backing
(I don't believe I just said that?!?!) How about some other ideas?

Sunday, June 7, 2009


Alright alright, I apologize in advance about this digression from my technical postings but this was just toooo good to be true.

Ok Mabel, it's not an urban legend anymore!! I done seen it with my own eyes.

JavaOne 2009
Session - Cloud Computing, Show Me The Money.

Amazon, Google, Intuit, Microsoft and some other unlucky SOB are giving their cloud computing demo for the session. Each speaker was alloted 5 minutes max to demo their app and I have to admit some of these were really cool.
The first one was the capturing of San Francisco traffic maps, analyzing the data obtained from these and putting it into the cloud for everyone to use. Cool if you live in San Francisco but useless in New York.
The next demo consisted of a very simple 'hello world' servlet app written, compiled and uploaded to the cloud right in front of us. Quite easy and cool. Could we have had a litle more than 5 minutes please!!
Intuit was next with a similar easily deployable application. Sorry, but for the life of me I can't remember what the app did (that was impressive).
Then it was Microsoft's turn.

The presenter hyped Azure and how easy it made deployment to the cloud. He had a pre-built application to upload and (you probably by now have guessed it) CRAAAAAASSSSSHHHH!!! The session attendees around me just started laughing (hence the title of this post) and since the URI was on the overhead several of them immediately went there (what?? are they masochists?) and captured a stack trace. Here it is and my apologies for unreadables but I OCRed this from an image:

HTTP Status 500 - Exception report description The.server encountered an internal error Q that prevented, it from fulfilling, this request. javax.servlet.ServletException: /index.jsp(45,16) '#{AzureResultBean.top5Results)' Error reading 'top5Results' on type com._____.javaone javax.faces.webapp.FacesServlet.service(FacesServlet.Java: root cause org.apache.jasper.el.JspELException: /index.jsp(45,16) '#{AzureResultBean.topSResults}' Error reading 1top5Results' on type com._____.je org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.Java:107) javax.faces.component.UIData.getValue(UIData.Java:582) javax.faces.component.UIData.getDataModel(UIData.Java:1063) javax.faces.component.UIData.setRowIndex(UIData.Java:417 J com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.Java:85) javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.Java:788) javax.faces.component.UIData.encodeBegin(UIData.Java:879) javax.faces.component.UlComponent.encodeAll(UlComponent.Java:884) javax.faces.render.Renderer.encodeChildren(Renderer.Java:137 J javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.Java:812) javax.faces.component.UlComponent.encodeAll(UlComponent.Java:886) javax.faces.component.UlComponent.encodeAll(UlComponent.Java:892) com.sun.faces.application.ViewHandlerlmpl.doRenderViewfViewHandlerlmpl.Java:245) com.sun.faces.application.ViewHandlerlmpl.renderView(ViewHandlerlmpl.Java:176) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.Java:106) com.sun.faces.lifecycle.Lifecyclelmpl.phase(Lifecyclelmpl.Java:251) com.sun.faces.lifecycle.Lifecyclelmpl.render(Lifecyclelmpl.Java:144) javax.faces.webapp.FacesServlet.service(FacesServlet.Java:245) ... javax.xml.ws.WebServiceException: Java.net.SocketException: Connection reset com.sun.xml.ws.transport.http.client.HttpClientTransport.readResponseCodeAndMessagef HttpClientTransport.Java:210) com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.Java:160) com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.Java:93) com.sun.xml.ws.api.pipe.Fiber. doRun(Fiber.Java:598) com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.Java:557) com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.Java:542) ...

I kinda felt sorry for the presenter when he clicked go... you could audibly hear him say 'pleeeease, don't do this to me!' Well, on second thought, maybe I didn't, he makes a lot more money than I do and, yes, sometimes my code doesn't work either but it does when it HAS to.

I hope the girl sitting next to me enjoys this post because she said she would definitely check it out. Sorry it took until Sunday but ya gotta admit it was worth the gloat... I mean wait (I really liked your EEEPC).

Next time back to the technical stuff (gloat, guffaw and I'll be damned, it's not just an urban legend).

Saturday, June 6, 2009

JavaOne 2009 Best Sellers

Just back from JavaOne 2009 and finally have the gumption to write about something. Here are the best sellers from the bookstore. Some surprises, some not, some wtfs. Would you expect anything less?

1. JavaFX: Building Rich Internet Applications - Addison Wesley ISBN: 013701287X
2. Essential JavaFX - PTR (out June 11, 2009) ISBN: 0137042795
3. Effective Java 2nd ed. - PTR ISBN: 0321356683
4. Java Puzzlers - Addison Wesley ISBN: 032133678X
5. Programming in Scala - Artima ISBN: 0981531601
6. Java Concurrency in Practice - Addison Wesley ISBN:0321349601
7. Beginning Java EE 6 Platform with Glassfish 3: From Novice to Professional - Apress ISBN: 1430219548
8. The Definitive Guide to Lift - Apress ISBN: 1430224215
9. Beginning Scala - Apress ISBN: 1430219890
10. OpenSolaris Bible - Wiley ISBN: 0470385480

At the end of the first day Programming in Scala was #1.
After Josh Bloch and Neal Gafter's Java Puzzlers session it moved to #1.
The JavaFX books moved to the top two positions towards the end of the show. Is Sun/Oracle too late with this language (shrug)? Only time will tell (and a short time at that).
The classics 'Effective Java' and 'Java Concurrency in Practice' were there as expected.
The ever growing Scala interest (including Lift) is very intriguing. Is it the next one? That's for the community to decide. Comeon people make a decision!!

I've got another post for tomorrow again from JavaOne. This is about Microsoft at JavaOne (what?!?!?!). It ain't no urban legend anymore Joyce!!