I’ve started going through the book: Scala for the Impatient by Cay Horstmann. I’m posting the solution to chapter 2 exercises below.
I’ve started going through the book: Scala for the Impatient by Cay Horstmann. I’m posting the solution to chapter 1 exercises below.
(1 to 999).filter(x => (x % 3 == 0 || x % 5 == 0)). foldLeft(0)((b, a) => b + a)
I looked online for an ant library that could accomplish this and came across one that was almost exactly what I was looking for. It could minify JS files using YUI Compressor but lacked a couple of features I required. So, I went through the library’s source code and added the following features
- Minification option for CSS files
- Option to delete original source files after minification
Since other people might want to use these additional features, I’ve made the modified library open source on GitHub:
The README file describes the available options and how to use them. There’s also an example folder with a working ant project for JS/CSS minification. My code is based on the yui-compressor-ant-task hosted on google code.
I’ve started going through the book: 7 Languages in 7 Weeks by Bruce A. Tate. I’m posting the solution to the Day 1 Homework for the Ruby chapter in the book below.
A pretty good introductory video for the Scala programming language, especially if you are currently programming in Java.
Many of us spend a lot of time in the office developing on Eclipse (or Springsource Tool Suite/STS). I wrote up a brief article with some tips to speed up it’s performance (and thereby our productivity):