Recently I started reading Andy Hunt's fine book "Pragmatic Thinking And Learning." Hunt is notorious for writing books which offer
practical, insightful advice in which developers can apply to their work
on a daily basis. His most famous book is "The Pragmatic Programmer",
widely considered one of the top agile programmer books of all time.
Even after reading the book 7 years ago, I still refer to it a few times
a month. My colleagues and I bring up the "broken window" theory, or
often throw out the phrase "Don't Assume, Prove it," sometimes to the chagrin of the unfamiliar. :)
Articles and thoughts on Java technologies, software engineering practices, and agile methods.
Analytics
Saturday, November 12, 2011
Wednesday, September 21, 2011
4 Groovy Tips You May Not Know
I have been programming in Groovy full time for almost two years now, and I feel quite comfortable with it. In fact, the language's idioms, shortcuts, and syntax has become part of my daily programming thinking. This is fantastic as it has opened my mind to unique programming elegance and artistry, but unfortunately on the flip-side it has cause me to cringe when looking at traditional Java code. This speaks to the efficiency and conciseness of Groovy.
Recently I decided that even though I am adequetely familiar with the language, I wanted to read Programming In Groovy by Venkat Subramanium. I was pleasantly surprised that I learned some useful tips. Below are some tips that I learned:
1. Variant Looping Mechanisms
In addition to the traditional looping constructs, such as "for (i in iterm)" or range (0..5), Groovy provides alternate ways to loop.
Use the upto function to operate on a range of values:
Use the step function to skip values:
Recently I decided that even though I am adequetely familiar with the language, I wanted to read Programming In Groovy by Venkat Subramanium. I was pleasantly surprised that I learned some useful tips. Below are some tips that I learned:
1. Variant Looping Mechanisms
In addition to the traditional looping constructs, such as "for (i in iterm)" or range (0..5), Groovy provides alternate ways to loop.
Use the upto function to operate on a range of values:
def sum = 0
10.upto(15) {
sum += it
}
println sum
result:
75
Use the step function to skip values:
3.step(20, 3) {
print "$it "
}
result:
3 6 9 12 15 18
Sunday, August 28, 2011
Database Migration in Grails
This blog covers the Grails Database Migration Plugin, the official plugin created by Spring Source and based on the popular Liquibase framework. Examples will demonstrate how database migrations can be controlled, managed, and executed.
Database migrations are an important facet of web development. Preserving existing data while seamlessly adding new functionality and tables is critical when making incremental database changes to production applications. Without a tool to manage database migrations, teams rely on manual sql, error prone communication processes, and costly risk management to implement solutions.
What is a Database Migration
First let's define database migration. Simply put, database migrations are changes to a database that is already running in production, and the customer wants to retain the data for future releases. If this is not the case, then it is sufficient to not really consider it a database migration, and thus, you can rely on GORMs dbCreate configuration.
Database migrations are an important facet of web development. Preserving existing data while seamlessly adding new functionality and tables is critical when making incremental database changes to production applications. Without a tool to manage database migrations, teams rely on manual sql, error prone communication processes, and costly risk management to implement solutions.
What is a Database Migration
First let's define database migration. Simply put, database migrations are changes to a database that is already running in production, and the customer wants to retain the data for future releases. If this is not the case, then it is sufficient to not really consider it a database migration, and thus, you can rely on GORMs dbCreate configuration.
Subscribe to:
Posts (Atom)