Archive for March, 2008

Rails #5: Security

In my previous articles, I have showed you how to create a simple blog application with articles, comments, rss feeds and formatting. However, as it is currently written, the application allows for anyone to create or edit an article. This is a serious security issue, and we better fix it.

In this tutorial, I will show you how to make sure that only logged in users can create articles, and that nobody else can edit an article that you created.

Read the rest of this entry »

Comments

Some FitNesse tricks: Classpath and debugging

On my project, we use Maven to build our software and FitNesse to write functional specifications. However, it was obvious that FitNesse wasn’t designed by Maven-fans. When I use Maven, I already have control over my classpath, and specifying it in every FitNesse test gets to be old really fast. Why can’t I just inherit the project class path, and start FitNesse using maven-antrun-plugin or just from my IDE?

I found a neat way to implement this by overriding FitNesse. Using the same technique, I’m also able to debug FitNesse tests.

Read the rest of this entry »

Comments (5)

Post-It Fetish

Anders Nordås wrote a blog post where he talks a little about how he uses his beautiful moleskin notebook. I will pick up his challenge and write about my favorite tool, Post It notes.

As many who know me are aware, I always have a pad of Post-It notes and a pen in my left pants pocket. I use the sticky notes for todo-lists, note taking in meetings, planning talks and doing brain dumps. After the jump, I post a few examples of Post-It notes from my pocket.

Read the rest of this entry »

Comments (1)

Use Cycle Time to Measure Maintainability

A number of great sins have been committed under the guise of making software more maintainable. And 60% of software cost is during maintainance, according to Robert Glass. So what goal could be more laudable to pursue?

The only problem is that we call things maintainable which are not. Putting remote interfaces in your application is done to “make it more maintainable”, creating frameworks is done to “make it more maintainable”, using EJBs is done to “make it more maintainable”. Yet all of these moves will make your system less maintainable. How do I know? Because I measure my maintainability. We push out a new snapshot version of our system in 10 minutes, a release in an hour. We push out new version to a simulated production environment every two weeks. And when I threw out frameworks, remote interfaces, application servers and EJBs, my cycle time went down.

Comments

Agile and happy?

Tal Ben-Shahar writes the following in “Happier”, his introductory book into the field of positive psychology: “The proper role of goals is to liberate us, so we can focus on the here and now.” In order to help us have a fulfilling life, our activities should both be meaningful and pleasurable. In this sense, meaning means to have a long term goal, pleasurable means to have a short term goal.

When I was involved in sequential, waterfall-like projects, people always lost sight of the short term goal. Are sequential projects at odds with human happiness?

Read the rest of this entry »

Comments

Quality code starts with the details of the language

The code I write in Ruby is higher quality than the code I write in Java. Why? Because the language supports better abstractions. It lets me express a problem once, and reuse it many places. The strength of an environment comes from the quality of the libraries, and the qualities of the libraries comes from the features of the language. In this post, I will review a proposal to make Java a better language: First-Class Methods. See how much better the code looks with it.

Read the rest of this entry »

Comments

Creative Commons Attribution 3.0 Unported
Creative Commons Attribution 3.0 Unported