Archive | Java & Programming

26 April 2010 ~ 12 Comments

Automatic http/httpS switching with Grails

Automatic http/httpS switching with Grails

A common requirement in webapps nowadays is to switch users between a secure and insecure connection (called protocol switching). For example, maybe your user needs to enter a password, credit card number, or some other sensitive information. Of course, you (and the user) would like that information to be sent securely, which means [...]

Continue Reading

31 March 2010 ~ 5 Comments

Shell scripts that talk back (and make you millions)

I’ve got a bunch of shell scripts that I use to help me with development of Every Single Shot. Some of these scripts, like starting up a new server instance or redeploying an application, can take a while (10 to 15 minutes). I’ll typically launch a script and then start working on something [...]

Continue Reading

11 February 2010 ~ 0 Comments

ChangeLog #2: Storing photos and little else

Total earnings as of February 11th, 2010: $0
This week was a lot slower than I had hoped it would be. I don’t think I made enough progress to be able to launch a beta (remember to sign up) on February 15th (4 days from now!) – but I’m still shooting for it.
Safe, secure photo [...]

Continue Reading

20 October 2009 ~ 3 Comments

REVISITED: What is Right with Grails and Wrong with Maven

With regard to my previous post, it looks like I pulled the Maven command from an old set of documentation. I believe the preferred way to create a new Grails app with Maven is a command like the following:
mvn grails:create-app appName
I can’t say I don’t have anything against Maven, because I don’t like it. [...]

Continue Reading

15 October 2009 ~ 7 Comments

What is Right with Grails and Wrong with Maven

This just cracks me up.Here’s how to create a Grails app using the Grails command line:grails create-app demoAnd here’s how to create the app using the Maven command line:mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.grails -DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.1 -DgroupId=example -DartifactId=demo

Continue Reading

27 March 2008 ~ 0 Comments

Amazon EC2 now offers STATIC IPs

Amazon EC2 now offers STATIC IPs

This is great news for any Amazon EC2 (Elastic Compute Cloud) developer – up until this point, hosting web sites on EC2 has been a little tricky due to the fact that EC2 instances used dynamic IPs – making it tough to set up reliable load balancing and failover in the face of ever-changing IP [...]

Continue Reading

26 March 2008 ~ 0 Comments

Programming with Amazon’s Web Services? Buy this book.

Programming with Amazon’s Web Services?  Buy this book.

I know I’m going to, just for the cool fish on the cover and the unbelievably long title: Programming Amazon Web Services: S3, EC2, SQS, FPS, and SimpleDB.
Via Amazon Web Services Blog.

Continue Reading

12 March 2008 ~ 20 Comments

Groovy Micro Benchmark Revisited (Groovy is fast…)

Groovy Micro Benchmark Revisited (Groovy is fast…)

Alright, no more Groovy posts for a while after this one. In fact, I hadn’t planned on posting about this again, but I thought it was worth mention.
From the last post, we saw the following results for parsing an XML dataset with about 450 simple elements in it 1,000 times:

Java: ~9 seconds
Groovy: ~28 seconds [...]

Continue Reading

10 March 2008 ~ 5 Comments

Groovy Micro Benchmark

Groovy Micro Benchmark

Following on from the previous post (and here’s the last post), here’s a very quick and dirty, completely unscientific, prone to error, your mileage may vary micro benchmark I did using the code in the last post.
Date set: a String containing roughly 450 XML elements in the form <contact name=”some name” email=”some email” />
Methodology: I [...]

Continue Reading

09 March 2008 ~ 6 Comments

Groovy is Coming…

Groovy is Coming…

I’ve been trying to slowly integrate some Groovy into my normal Java coding. Here’s just one of the reasons why:

Java code:

Groovy code:

Note that this reduction in complexity happens almost everywhere I choose to use Groovy over Java. Of course there are myriad other ways I could have done this in Java (I even [...]

Continue Reading