Wednesday, October 26, 2011

Something Else I Need to Remember About Groovy

This is something else I need to remember when writing a Groovy script.
def c = "closure"
m = "method"

def myClosure = {
    println c
}

def myMethod() {
    println m
}

myClosure()
myMethod()

The above works as I expect it to. As soon as I change line 2 to this...
def m = "method"

...I get an error. Just something that I need to keep in my head on the Groovy Console.

Tuesday, October 25, 2011

A Quick Reminder About Using a Language

Let's say I decided to do all this work...
def boolean isNumber(String s) {
    try {
        int i = Integer.parseInt(s)
        return true
    } catch (Exception e) {
        return false
    }
}
In order to do this...
println isNumber("4")
println isNumber("-4")
println isNumber("t")

To get this result...
true
true
false

When all I needed to do is use the language features...
println "4".isNumber()
println "-4".isNumber()
println "t".isNumber()​​​​​​​​​​​​​​

To get the same result with a lot less coding...
true
true
false

Monday, October 17, 2011

Focusing on Business Continuity, Scalability and High Availability

Business is 24/7 and customers want access to your product at their convenience. As a developer and designer of many public facing applications, I find this is one of the most overlooked concepts when businesses are looking to improve their existing applications.

We are in a world where free, social networking applications perform above and beyond most "enterprise" level applications. Our business customers are experiencing this availability and performance and they are looking to internal IT staff and infrastructure teams to step things up. If you are part of a company's internal IT staff, you should understand how some of the top social sites are managing PetaBytes of data and millions of concurrent online users. The actual capacity numbers may not match up to your work environment but an important quality of scalability is being able to scale up as well as scale down.

Just some thoughts of what is on the horizon for professional IT staffers who are considering on being relevant as "enterprises" embrace the lessons learned by many of the top technology companies.