The point is missed

Museum of public mistakes and unfinished projects

Archive for the ‘Uncategorized’ Category

Do you dampen or amplify?

leave a comment »

Today I rediscovered a thought I had months ago and forgot about. I was talking to a team-member about software development in general and frameworks  and processes in particular. What I’m about to write is just a theory and a thought model that seems useful to me. If you are looking for hard facts then this post is not for you (sorry).

I have this idea that all practices we apply are somewhere on a scale from dampening to amplifying. Did I hear a WTF? I’ll try to explain…

Read the rest of this entry »

Advertisements

Written by johlrogge

March 30, 2009 at 9:45 pm

Posted in Uncategorized

Drying up widget creation

with 6 comments

I continue to be amazed how Scala lets me keep my code DRY (if I care to do it the tools are there, I just need to look for them). One of the reasons that Scala allows this more than Java is that Scala supports functional programming. One thing that makes Scala interesting is that Scala blends Functional Programming and Object Oriented programming. This is often overwhelming but it really keeps the tools you need close at hand.

To start with I had to be torn kicking and screaming from my beloved object orientation. I was told I suffer from the Stockholm syndrome which was quite a hilarious way to put it. Especially since I live in Stockholm and was immediately comforted by the same person with the words “I suffer from it too, I still love C++”. So I thought maybe leaving my comfort zone is not so bad?

Yesterday it payed off and I experienced a kind of flow that was new to me in Scala. I thought I’d share that experience here step by step. Don’t expect to be blown away by my Scala-skills, If you want to be impressed in that way there are other blogs :) What follows is a real world example of  things coming together into a moment of productiveness. I guess another real world example of applying Scala to a problem could not harm? Read the rest of this entry »

Written by johlrogge

January 14, 2009 at 1:12 am

Posted in learning, scala, Uncategorized

Tagged with ,

Phasing over from java to scala pt. 4 – Writing specs with specs

with 7 comments

In the last part I figured out how to make Buildr run specs that are also runnable from Eclipse via JUnit. I started writing my first spec and we are now in the position to make it fail. What we are trying to acomplish is to make directories behave as nodes in a graph, at the moment, only the files show up as nodes.

The spec I wrote currently looks like this:

class PublishSiteGraphSpecTest extends JUnit4(PublishSiteGraphSpec)
object PublishSiteGraphSpec extends Specification {
  "directories are nodes" in {
  }
}

Let us fill in the details about what we actually mean when we say that directories should be nodes:

Read the rest of this entry »

Written by johlrogge

September 14, 2008 at 10:05 pm

Posted in Uncategorized

Tagged with , , ,

Buildr – Keeping up with the latest and greatest

with one comment

In a previous post I ran into some problems with Buildr’s support for Specs in combination with JUnit. I googled a bit and came up with nothing so I did what all newbies do. Ask the pros on the mailinglist :) (I stayed away from “plz help” and “could you plz send me a patch”). I was (of course) suggested to try the latest from head and I felt an unpleasant resistance towards downloading archives, figuring out how to point gems to the latest version etc. All of those things are probably simple but I just want to develop some Scala code and did not look forward to it.

Well, boy was I worrying in vain!

Read the rest of this entry »

Written by johlrogge

September 13, 2008 at 1:49 pm

Posted in Uncategorized

Tagged with , , ,

Phasing over from java to scala pt. 3 – What about the tests?

with 2 comments

I’ve now spent some time every now and then converting Java-classes into Scala classes. I’m one of those Agile loudmouths so some of you may wonder what I’m doing about the tests. I mentioned that all tests pass in pt. 2 but I have not written about how I test. Well, it probably comes as no surprise that the current code is tested in JUnit and I have simply kept my old test-suite intact when phasing over. This strategy works well since what I’m really doing is refactoring. I move class by class in baby steps, running my tests after each change to make sure that everything is still working as it should. But I’m starting to be done with the move now and a strategy for writing new scala-code seems more and more relevant.

Read the rest of this entry »

Written by johlrogge

September 10, 2008 at 9:44 pm

Posted in Uncategorized

Tagged with , , , ,

Bad farming and recession

with 2 comments

Ok bad times are coming they say, recession is on it’s way. Well that’s the laws of economics, not much we can do about them. Or is it? Before I continue I want to be clear about that most of the fields I touch on here are generally not fields I posses any special expertise in (not that it shouldn’t be totally clear to those of you who do but…). I used to think of economic recession as mass-psychosis: media starts writing about bad times ahead, stupid people like me write blogs and talk over lunch about whether it will or will not happen. As a consequence of that people become wary and start buying less and less “you never know”, “the experts say…”. There you go, self-fulfilling prophecy.

I still believe that there is truth in that but I would not mind being corrected by anyone who actually knows. From what I understand the cause for recession is a bit of a mystery even for the pros :) Anyway, as a software guy in the consultant business I found myself in the center of the last recession and now that the word is out I started pondering what we as a business may be doing to cause them.

Read the rest of this entry »

Written by johlrogge

September 5, 2008 at 7:50 pm