Tag Archives: java

How to deal with length-encoded records?

When we deal with length-encoded records, we write a heap of substring calls. Is there a better way? Continue reading

Advertisements
Posted in java | Tagged , , | Leave a comment

Poor man’s template engine

Sometimes the riches are really poor. They just won’t download JSUnit. They won’t use XSL, they won’t download any template engine either – they roll their own. Sometimes they don’t even roll their own – they just keep replacing their … Continue reading

Posted in java, programming | Tagged , , , , | Leave a comment

Metu Jump – for aspiring programmers

Programming is the art of compromises. Programming is the art of good decisions. Programming is the art of breaking down a task into smaller tasks. They say that programming is craftsmanship. This sounds better, because you don’t need to be … Continue reading

Posted in programming | Tagged , , , , , | 3 Comments

But we do – breaking the coding guidelines

A colleague asked me to help him learn java and object-oriented programming. He has solid background in VisualBasic and SQL. This is cool because I don’t need to explain things like the while loop or recursion. We can focus on … Continue reading

Posted in java, programming, Uncategorized | Tagged , , , | Leave a comment

The ultimate java Tuple

The idea came to me via this SO question. The is a question about generics. Probably it’s too much foreshadowing in a technical blog, but this post is about generics too. Tuples First thing first: what’s a tuple? It’s a mathematical buzzword … Continue reading

Posted in java, programming | Tagged , , , | Leave a comment

Can anyone write clear specification?

I’m a skeptical engineer who thinks, specification / documentation is never ever obvious. I believe the unambiguous and comprehensive stuff is code, not documentation. When I say unambiguous, I mean the computer can interpret it in only one way, yet people can easily misunderstand it. We … Continue reading

Posted in java, programming | Tagged , , | Leave a comment

Testing a subclass-as-wrapper

The problem I’m working with an oldie-but-goodie framework. This framework has some interesting naming conventions. Say for instance, they call subclasses wrappers. We can use subclasses and wrappers for the same thing. However, one of them is more testable than the other. Let’s see the similarities first. … Continue reading

Posted in java, programming | Tagged , , , , , , , | Leave a comment

Lessons learned from the IoC framework comparison.

In the previous posts I compared a few IoC frameworks. one for tapestry-di one for DI vs template method one for guice, spring and tapestry-di one for a slideshow It was an interesting journey to write the prototypes, then the posts … Continue reading

Posted in programming | Tagged , , , | 2 Comments

Dependency Injection frameworks

If you want to deeply understand a concept, then you need to see several implementations. This is why I created the following slides. Based on the feedback, I’m kinda alone with this mindset. Anyway, I hope you find them useful.

Posted in java, programming | Tagged , , , , , , | 1 Comment

Template Method or Dependency Injection?

Mystical Dependency Injection used was always something very mystical to me. Until I learned what it’s really about. I’d like to share this revelation with you. So let’s take an easy problem and solve it in couple of different ways.

Posted in java, programming | Tagged , , , | 1 Comment