November 29, 2011

Refactoring, Redesign and Architectural Overwork.

Actually, software should always apply to business demands with local refactoring. Refactoring can be seen as daily work where requirements and demands will be directly implemented by realigning code. It´s the programmers handcraft. You won´t need anything else for a long life software.

  • If you are in need in a major redesign then you actually fucked up! This must never happen, learn some refactoring!
  • If you are in need of an architectural overwork then you have already lost! Why didn´t you learn refactoring?

Nice article what happens if you don´t comply: Link. See? That happens if you have to rely on redesigning "experts".

Why Maintenance Matters!

Most developers focus on the software creation process. Software lacks documentation, design, tools and measures for later introspection. This will be a pain in the ass for later maintenance.

Why does maintenance matter? Because it´s fucking expensive! It´s 80% of the overall costs.

Read this excerp from Clean Code: Link.


The F.I.R.S.T. Rule For Writing Tests

There are the F.I.R.S.T. rules for writing tests. Clean tests follow five other rules that form the above acronym:
  • Fast: Tests should be fast.
  • Independent: Tests should not depend on each other.
  • Repeatable: Tests should be repeatable in any environment.
  • Self-Validating: Tests should have a boolean output.
  • Timely: Tests need to be written in a timely fashion.
Original text from Clean Code: Reference.

October 20, 2011

Tests vs. Source Code

Tests are crucial for development. In that most agree. Tests must be maintained. In that most agree.

Do you really know how crucial test maintenance is?

https://kindle.amazon.com/post/3M2WEWSIVX2VL

What happens when you ignore this?

https://kindle.amazon.com/post/18NLTC6OJZD8M

October 10, 2011

Feature Envy

Feature Envy creates hybrid objects which are in need of refactoring.

"Feature Envy occurs when a code fragment references another object more often than it references itself, or when several clients do the same series of manipulations on a particular type of object." - found here.

Originally from the book - Refactoring.


October 06, 2011

YAGNI - You Arent Gonna Need It

It is an Extreme Programming practice which states:

"Always implement things when you actually need them, never when you just foresee that you need them."

The whole article can be found here: YAGNI

Clean Code - LeBlank's Law

Do you fix issues in your source code? Do you review your own code? Are you your codes biggest critic?

Or do you find excuses to do it later?

LeBlank's Law in software engineering: Later equals never.

From the book - Clean Code.

A nice article about this issue: Why You Won't Fix It Later

October 05, 2011

Programming Principles

Important object-oriented programming principles. Understand, remember and use them.

Substitutability is a principle in object-oriented programming. It states that, in a computer program if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e., objects of type S may be substitutes for objects of type T), without altering any of the desirable properties of that program (correctness, task performed, etc.).
The Law of Demeter (LoD) or Principle of Least Knowledge is a design guideline for developing software, particularly object-oriented programs. In its general form, the LoD is a specific case of loose coupling.

September 21, 2011

Clean Code Developer in Brownfield-Projekten | heise Developer

Clean Code Developer in Brownfield-Projekten | heise Developer:

German article on handling dirty code and envrionment. Reengineering, refactoring as well as organisational changes.

March 12, 2011

Google Apps Hassle

Google apps engine sometimes remind me of the Java 2 Micro Edition. Even if you implement it properly there are glitches which can make your day go worse. Running on your system and running on the real server are two different things.

Seems that I have solved my "mixed-up-session" problem at the cost of platform independence. Now, my service uses google memcache in order to store my session object manually. Afterwards, I synchronize my data inside the database. Cleanups and periodical tasks will be written using google task queues.

This is a critical limitation I did not anticipate. I thought the app will be able to run everywhere. It is a small program though and still fun using the apps engine. At least I can concentrate on functional implementation and have no hassle anymore with session management.

March 06, 2011

Google Apps Development

I have now invested some days implementing something for the apps engine. My goal is a JSON standalone-service for serving as a backend for a browser-based chat. Well, I am now at the point where I not only have success but also have some drawbacks:
  • When polling the server every second and with three browsers then the server seems to start to mix up sessions. This only happens on the real server and not on the local testenvironment.
  • It's hard to write tests, because the app engine not only supports JPA persistence but also JDO. The provided toolset for testcases implements JDO tests and my JPA tests do not run.
  • I encountered further datastore exceptions when I try to invoke database cleanups with spring tasks.
  • The provided CPU-time quota of 6.5 CPU-hours is too restricting. Each web request that is calculated with around 50 milliseconds is sometimes measured as cost of 150 CPU-milliseconds.
Google Apps provides all kinds of work arounds, e.g. task queues, mem-caches and other services. It is forseeable though that even with those services my service will never run cost efficiently. Also I am not interested in their services because I want my service to be platform independent.

All in all it is really nice to tweak and try out the google apps engine. In case of business applications your still cheaper renting your on server and manage it yourself.

February 14, 2011

Google Apps Engine

If you have ever been interested in service development. Now is the perfect time. Google Apps Engine is here. It is free! It gives you:
  • 500MB storage
  • 5 million page views a month
  • Java 1.5 or 1.6 Sandbox
  • Easy eclipse plugin integration
Start now, start here.

February 10, 2011

Web Service Challenge 2010 Success

The year 2011 is already here. I hope to be able to report more often. Currently, I would like to report the results of the WSC 2010. The finals presentation of my collegue Thomas can be found here:

WSC 2010 Results