Blog Archives

Problem 24 in Scala

So, it’s more than two years since I started to use Groovy. At the beginning I solved couple Project Euler problems and moved to scripting. I still love Groovy, but couple months ago I started to look at Scala. What

Tagged with: , ,
Posted in project euler

Gradle snippets: Modularize your scripts

Build files tend to grow in time. New tasks are added, some customizations are made and you end up with several pages of groovy code. Gradle is based on Groovy, so many constructs can be really simplified, but often it’s

Tagged with: , ,
Posted in gradle snippets

Gradle snippets: extract your dependencies

I believe you’ll find this in every gradle project you can download from the net. Since it’s groovy it’s best to just declare a map with your external dependencies in root project. You can then use it in your subprojects

Tagged with: , , ,
Posted in gradle snippets

Gradle snippets: Rename your subprojects’ build files

It’s good to have project separated into modules. It encourages separation of functionalities and simplifies code. Fortunately gradle supports multiple projects very well. Having a project with 2 modules like this: – awesome-project-root — build.gradle — settings.gradle -+ persistence —-

Tagged with: , , ,
Posted in gradle snippets

It’s all about dynamic

In previous post I mentioned about the visitor pattern and how to use it in Java. I also use groovy in my projects and there’s a much better way to solve the problem with processing collections. I have found a

Tagged with: ,
Posted in Uncategorized

Speed up development in groovy

To take full advantage of groovy it’s good to know additional methods extending standard java objects. I often visit groovy jdk, to see what actually is new in groovy. Operations on collections really speed up the work. In jdk you

Tagged with:
Posted in Uncategorized

Problem 24

I’ll start with Project Euler. I like to learn new things by practice and some problems seem simple enough to learn groovy. Let me just start with Problem 24. What is the millionth lexicographic permutation of the digits 0, 1,

Tagged with: ,
Posted in project euler