Software craftsmanship Tag

Hi, as this is my first post on the EclipseSource Blog, I thought I would introduce myself. I’m Shai Alon - new employee at EclipseSource and the mobile developer evangelist for the Tabris.js technology. I am a full stack JavaScript expert and my previous job was a team leader of a full stack JavaScript team - building complex web applications with an Ember.js frontend and...

Read More

[caption id="attachment_19508" align="alignright" width="160"] Copyright (c) Pivotal Labs[/caption]I recently started using Jasmine to write my JavaScript tests. I really like it - it made writing tests actually kind of fun. I especially love that you can write tests with mocks in a similar manner as you would using Mockito in the Java world. A mock is basically a lightweight object that imitates the API and (to...

Read More

As I started in the programming industry almost a decade ago, writing tests at all was still a fairly new thing for many developers. Having been one of the early TDD advocates in my social environment, I had to recommend many best practices and books to students and colleagues. Kent Beck, Robert Martin and many other more or less public figures provided invaluable advice and...

Read More

The Java compiler requires local variables of enclosing contexts referenced in anonymous classes (so-called captured variables) to be final. What if the anonymous class wants to alter the value of the variable, i.e. requires the variable to be mutable? This post shows different ways how to achieve that. The problem Let's assume we have a UI containing a button and a message to be displayed. The message...

Read More

You have read the books. You are a clean coder. You know your language, your tools and libraries  and you know exactly what matters: Well crafted software, steadily adding value, and of course you are part of a community of professionals. There was something about productive partnerships, too, but that was a bit hard do understand. Anyway, the Agile Manifesto made quite an impact by...

Read More

In the RAP project, reading and writing JSON are critical operations, since the server processes and creates JSON messages for a large number of clients at a high rate. For this reason, we need something fast for this job. When we switched to JSON, we included the org.json parser, which is reasonably small but not famous for its performance. There are many better JSON libraries out...

Read More

Lately a colleague showed me how to improve JUnit tests written for a distance calculator. Speaking with other developers I found out that the majority wasn't aware of the undocumented @Theories Runner which can be found in an experimental package in JUnit, so I decided to share this valuable "experiment". In contrast to the parameterized JUnit test, the Theories-runner will try out all possible combinations of...

Read More

The Broken Window Theory was introduced to software development by Andy Hunt and Dave Thomas in The Pragmatic Programmer. In the programming world, the story goes, if you accept one broken window (aka bad code) in your software project, soon everything will be smashed and fall apart. Many articles have been written about that. And here we have yet another real-world example. The advent calendar was...

Read More