I'm here not to teach you - see me as a guiding friend, a facilitator. We'll go together through a journey of getting better at some particular, non-hype, well understood yet sometimes problematic, still modern technology for developing web- and service-oriented applications. Hopefully it will give you a new perspective on how such things could be built.
It's up to you to choose what it'll be for you - an epic or a walk in the park. Most of the value will be to stay till the end, though.
To do the homework I expect about 5 hours of commitment per week -- similar to Coursera. Some colleagues already demonstrated that it could be done. But, compared to consuming nicely prepared material, we're on raw side this time -- you'll be setting your own tactical learning plan and digging for materials instead.
Last but not least, my opinion and judgments are always subjective.
The foundation to understand Grails lays on Groovy.
You can write Groovy as you write Java -- almost any Java is valid Groovy, but Groovy-lads will choke on your code and you won't get an invite to team's dinner. Even quite uncommon-looking code can be deconstructed using not-so-many simple rules. In this respect, Groovy is much safer place -- language limitations prevents madness occurred to some Scala folks, who took great idea too far into the realm of disconnected gibberish.
Understanding the basics saves time in retrospective and prevents, for example, constant milking of StackOverflow for yet-another-piece-of-code to workaround another-piece-of-code your great colleague stole for the project year ago from the aforementioned site.
I believe, we should touch following topics:
- Groovy
- Grails core: classic Web layer, Validation, REST, Testing
- GORM
- Grails Async programming
- GPars -- Groovy foundation for concurrent programming
- Gradle
- Scripting and Grape
- JRebel
- Twitter Bootstrap and/or Skeleton
- Glisten on AWS deployed via CloudBees
Not necessary in that order.
We won't cover (ill-inspired) Spring Roo. Spring Boot is from different world fighting theirs own battle. While Vert.x is cool project by itself; also being a better (polyglot) alternative to much overrated Node.js -- it is still a niche product. Trending JavaScript web frameworks are the universe on their own. Plain jQuery will be enough to grasp the basics. Let UI developers deal with boilerplate. They love to polish modern html foundation for IE8.
In case you are here to learn hype-thingie -- just stop reading. Still there? Redirecting you to the Immutant primer.
-
Allocate time budget.
-
Download and install Groovy.
-
You may find GVM -- the Groovy enVironment Manager helpful, but there are rumors it's not that good on Windows. Skip it for simplicity.
-
Get familiar with the Groovy by jumping through Getting Started Guide.
-
Start playing with language by means of writing one-liners in Groovy Shell.
groovy:000> [1, [2, 3, 4, 1, [], [3, 6]], 2, 1, 5].flatten().unique().sort() ===> [1, 2, 3, 4, 5, 6]
-
Spy on User Guide a little bit. In particular, most helpful topics in writing idiomatic Groovy are Statements, Closures, Truth, GString, Collections / more, and Regular Expressions.
-
This Groovy cheat-sheet compresses most essentials into 2-page document. (inject() is missing!). I used DZone Groovy cheat-sheet to make it.
-
Groovy API and extension methods reference complements JDK API.
-
mrhaki blog is an excellent source of Groovy and Grails Goodness.
-
There are books on Groovy and Grails, but it might be too much reading for the task and Grails is a moving target. YMMV.
-
I recommend IntelliJ IDEA CE together with IntelliJ IDEA cheat-sheet for writing code. Eclipse GGTS is also a good choice. Advanced text editor like Sublime Text are fine too, but IDE provides immediate feedback to experiment with language syntax.
A field of N x M squares is represented by N lines of exactly M characters each. The character '*' represents a mine and the character '.' represents no-mine. Example input (a 3 x 4 mine-field of 12 squares, 2 of which are mines):
*...
..*.
....
Your task is to write a program to accept this input and produce as output a hint-field of identical dimensions where each square is a * for a mine or the number of adjacent mine-squares if the square does not contain a mine. Example output (for the above input):
*211
12*1
0111
Recommended setup:
In a 11-Feb meeting, everyone will show the demo of the assignment. We'll discuss whats great and problematic with your code and why. Most essential attributes of good code are:
- completeness of the solution
- clarity
- reduced boilerplate without clarity sacrifice
- testability
- performance