Jul 18

One Proxy Setting to Rule Them All

Tech 6 Comments »

I am currently jumping around from environments that don’t use proxy servers, to those that do.

This is kinda painful, in that I need to make a bunch of changes to change modes:

  • Change Browser Config
  • Change IM Config
  • Setup /etc/hosts alias to point mail servers to localhost, and run ssh port forwarding to get through the proxy
  • maven.proxy.host / maven.proxy.port
  • … insert any other app that needs to get out …

Why isn’t there a setting in the OS that just lets you configure the proxy GLOBALLY!

Jul 18

IRA != Irish. Recent Terrorists != Muslims.

British 5 Comments »

When I learned about the tradgedy in London, after I felt for the friends and family touched, I worried about any backlash. I worried about the BNP smelling opportunity.

I have said before that I was impressed with Tony Blair’s speach, and how he acknowledged the need to solve the problems at their root causes (e.g. fixing poverty) as we can’t kill our “enemies” as fast as we are creating them right now.

One of my worries comes from the comparison of the IRA a few decades ago. Throughout the IRA bombings, I think the people really understood that the IRA terrorists were not indicative of the Irish people. Why did we think that? Chances are a lot of us had a lot of contact with an irishman. They were married into our families. They were friends on the rugby field and at work. We were all integrated.

The problem we have now, is that IN GENERAL the muslim community isn’t as integrated. You always fear what you don’t know. So, this is why I worried that people would be hearing “islamic terrorists” and putting 2 + 2 together to make 5 (all muslims == belive in the cause).

We need to all get talking. I was so glad to see a church and a mosque get their congregations to meet up north. Once we meet and understand eachother we will realise that we are all just humans, who want the best for our families and lives.

When the IRA was in action, you didn’t hear people calling it them “christian fundamentalist terrorists” did you?

Jul 17

Native XML support in Dolphin

Groovy, Java, JavaScript, Tech 311 Comments »

Kirill Grouchnikov’s discusses thoughts on native XML support in Dolphin. There are definitely some interesting items, but I really hope that Sun takes a LONG look at what comes from C# 3.0 (send someone to PDC guys!), and look at the current E4X. It was BEA after all that came up with E4X!

Even look at Groovy’s XML builders and parsing w/ GPath.

I just want to be able to work with XML in a trivial way, instead of with the ugly mess of DOM/SAX/X APIs.

I like having a smart for() loop for XML, that is good….. but some of the “extends” stuff just looks more complicated than it needs to be.

Jul 15

Purgatorius July-Sept 2005

Personal 2 Comments »

My friend, Luc Nadau, has released a new verion of his online magazine Purgatorius.

As a Wisconsin resident, it was interesting to read:

The Case for Feingold: Luc Nadeau outlines a possible presidential platform for Senator Russ Feingold (D-Wis) for 2008.

Russ is a true constitutional scholar, and he voted no on both the USA Patriot Act and the Iraq War Resolution. It is far too early to know if he will be a good candidate, but I know I would vote for him.

Elsewhere in the magazine are the following articles:

A Sportswriter: Siamak Vossoughi describes the short-lived career of an unorthodox sportswriter.

A Winter in Fairbanks: Kraig Hays accepted a teaching position at the University of Alaska – Fairbanks last year. In these comedic notes from his first Alaskan winter, he discusses some of the things (cool and uncool) that separate Alaska from the lower 48.

Political Cartoons: Three political cartoons from Luc Nadeau: African Tsunami, Bush and the Environment, Rise of the Ivory-Billed Woodpecker.

Jul 15

More Rails / Java Talk

Groovy, Java, JavaScript, Ruby, Tech, Web Frameworks 3 Comments »

Wow it keeps on coming (and ironically I am adding to it). This last slew of postings on Rails vs. Java came after Patrick Peak Rails: Where are the Implications for “No Deploying”?.

As soon as that came out we saw:

  • Dave Thomas: Rails and FUD
  • DHH: Letting cooler minds prevail
  • Jamis Buck: Application Deployment with Rails
  • James Duncan Davidson: Rails: Sandbox, Develop, and Deploy
  • Patrick Lightbody: It’s the tools, stupid!
    • The funny thing is that it is hard to know what we are really arguing about :)

      Scalability

      Can Rails scale? Sure. As Brian McCallister just said, scalability isn’t about a particular language.

      Do the different languages/platforms give you different implementation choices for scaling? Sure. Scaling with FCGI clusters is different to using Tangosol Coherence in a J2EE cluster.

      In some ways it is much simpler to scale a web app with shared nothing. However, on really huge enterprise systems (not web apps), tools *like* Coherence really help you out. It is nice to have the many levels and buttons available in your architecture.

      Again, Slashdot? Scales like a champ with Perl. There are a lot of huge enterprise Java systems that take in billions of transactions.

      So, conclusion? You can make both scale. You can make both run like a dog :)

      Tools

      Patrick has some good points in his post. I am not sure if he has checked out Textmate for doing Ruby development. It is quite nice indeed, although I do miss IDEA for some things (can’t beat its refactoring etc).

      With Ruby you really don’t need as MUCH tooling though. It is a nice concise language which doesn’t need as much scaffolding in the tools area. You can be very productive with Ruby – IDEA.

      However, IDEA really does do a good job of getting you closer to the productivity. I notice this a lot in Groovy world, and I am excited about GroovyJ.

      Tool support is only one leg on the chair though. There are many other components that matter as much, more-so, and maybe not as much.

      Refresh, Reload

      Tools can help get around the dev cycle that we have in Java, but we aren’t there yet. Patrick is correct in spotting the potential with dynamic languages on the JVM, where we could get the best of both. But we aren’t quite there yet.

      It is painful to jump to the Java world once you are used to hitting SAVE and refresh for every type of change (we can get far w/ JSP, etc etc).

      Both are beautiful, both can be ugly

      I love both platforms in many ways. I don’t like both platforms in others.

      • Java Dion: I wish we had the Ruby language on the JVM.
      • Ruby Dion: I wish Ruby had a nice VM to run on (the JVM would be really nice).

      Or maybe I will just do everything in JavaScript 2.0? ;)

      Oh, and David Geary had too much caffeine at the Rails Cafe? :)

Jul 14

Why isn’t software just a bit easier?

Java, Tech 5 Comments »

You work all night and finish off your lovely application for the meeting the following day. You check and re-check your application and it works like a champ. You are feeling good about the demo.

Then you get to the office where you are giving the demo, and spend time configuring your browser so you can get through the lovely corporate proxy/firewall. Always a pleasure.

Then you bring your app up, and all of a sudden you get a stacktrace that could reach to the moon and back, and at the heart of it you see:

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from URL [jar:file:/C:/servers/tomcat/webapps/your-app/WEB-INF/lib/jsf-spring.jar!/META-INF/faces-config.xml]; nested exception is java.net.ConnectException: Connection timed out: connect
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:139)

Er. Huh?

The faces-config.xml looks good in there. Everything seems fine.

You then look deeper into the message of stacktraces from Tomcat, and you find a bunch of connection errors. Hmm, what kind of connection?

After awhile you realise that this is ALL due to Digester, using Xerces, and VALIDATING the damn XML.

So the errors are due to loading the faces-config which has the DTD:

<!DOCTYPE faces-config PUBLIC
“-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN”
“http://java.sun.com/dtd/web-facesconfig_1_1.dtd”>

You can try to turn off the validation, or just through in your proxy info to Tomcat:

-Dhttp.proxyHost=extproxy -Dhttp.proxyPort=80

Now, just 2 hours later, you are ready to give your demo :)

Jul 12

A 404 message that adds value

Tech, Web Browsing 3 Comments »

If you go to a page that doesn’t exist, you normally get a lame 404 error that will have in it:

  • 404. Error.
  • Sorry, couldn’t find X, so here is our interface, go find what you want

When I was looking at the Longhorn photos that just came out, and happened to hit a URL without an image.

It is cool that the 404 handler worked out other files that I maybe want to go to based on the URL itself.

good-404.jpg

Jul 12

Ruby on Rails and J2EE: Is there room for both?

Java, Ruby, Tech 378 Comments »

Ruby on Rails and J2EE: Is there room for both? is the title of a new article that tries to give a sober view of a Struts-based J2EE web stack, compared to Rails.

What is interesting about this article? It isn’t the content, it is the fact that this article is written.

Where was the “Seaside vs. Spring MVC” article? :)

I think there have really only been the following comparison articles done:

  • Various Java Frameworks (Struts vs. JSF vs. Tapestry vs. WebWork vs. …)
  • J2EE vs. .NET
  • and now Rails vs. J2EE

Having it on developerWorks shows that they think Java guys care too. I think the Java camp is polarised with extremes of “Rail looks great” and “Man can I NOT hear about Rails for a day and talk about Java?”.

Jul 12

When to use LinkedList? Never?

Java, Tech 4 Comments »

I liked reading the Java Specialists’ Newsletter from Heinz.

An interesting statement is this: “ArrayList is faster than LinkedList, except when you remove an element from the middle of the list.” I have heard this on more than one occasion, and a few months ago, decided to try out how true that statement really was.

How many Java developers actually test the affect that a particular collection type would have on the performance? I would be willing ~0.01%.

Heinz goes on to benchmark both lists working at the beginning, middle, and end of sample lists:

beginning ArrayList took 4346
beginning LinkedList took 0
middle ArrayList took 2104
middle LinkedList took 26728
end ArrayList took 731
end LinkedList took 1242

And the conclusion is hilarious:

So, when should you use LinkedList? For a long list that works as a FIFO queue, the LinkedList should be faster than the ArrayList. However, even faster is the ArrayBlockingQueue or the CircularArrayList that I wrote a few years ago. The answer is probably “never”.

A cool tool would be one that goes through and tests various Lists in your live code. AOP could wrap around the creation and inject different versions ;)

Of course, this would only be used AFTER we found that the Collection was a bottleneck. Who would optimize prematurely? :)

Jul 11

ActiveMapper: ActiveRecord comes over to Java

Java, Ruby, Tech No Comments »

There has been a big rush in non-Rails based communities to see what they can learn from that world, and if it makes sense to port any ideas over.

Thomas Risberg has started to port over ActiveRecord to a project called ActiveMapper which sits a-top of JdbcTemplate.

It has been interesting to see the two sides:

  • Lets tweak our frameworks to use smart defaults
  • Lets do code-gen to generate artifacts on our frameworks
  • Lets write a new framework / port something from Rails

We all knew it was coming :)