it's not a bug, it's a feature

it's not a bug it's a feature

After enjoying this reaction once again, i remembered this picture. And i wanted to share my fright with you …

Ähnliche Artikel:

object oriented design principles

A short summary of object oriented design principles to increase maintainability, reusability, flexibility, less complexity

Single Responsibility Principle

Each module should take just one responsibility/functionallity and all responsibilities/functionallities should be assigned to exactly one module. As a consequence, there is only a single reason why a module needs to be adjusted: the requirements for which it is responsible, have changed. If you have to reasons  to change a module, it should be splitted into 2 modules.

Separation of Concerns

Each concern should be represented by only one module. Don’t distribute the concern over more modules. (But the module certainly can use others to fulfill its responsibility)

Don’t repeat yourself

Eeach single functionality of a softwre should be implemented within the system only once.


A module should be open for extensions. To change the functionallity, the module itself should be able to be combined with additionally modules, containing only the deviations to the original functinality.

A module should be closed for modifications. No changes of the module should be necessary in order to expand it but it should offer extension points for additionally modules, changing the functionallity.

Liskov’s Substitution Principle

A new derived module  has to extend the base modules without changing their behavior.

Program to interfaces

Any dependency between two modules should be explicitly stated and documented. A module should always be depended from a well defined interface of another module, independet from the implementation.

Interface Segregation Principle

Clients should not be forced to implement interfaces they don’t use. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.

Dependency Inversion Principle

Our design should be based on abstractions and not on spezific variants. Designing under this principle should start at the high level module: High Level Module–> Abstraction Layer –> Low Level Module

Make it testable

Reduce the complexity of a design to increase testability. If a functionallity is hard to test, maybe it should be changed by adding some abstraction, clearly define interfaces or adding extension points. So a higher testability leads to a better design.

Read more: english german english german

Ähnliche Artikel:

Shortcuts in Eclipse

This time I write in English, I was probably influenced too much by the last book, I have worked with.

In Eclipse there are many useful shortcut which can help you to speed up your coding. In this article I want to show you a small selection of the shortcuts I use in practice (especially coding java). Do not worry if you memorize them all. At least you should remember the shortcut that shows you a list of all shortcuts, so you can pick the one you wanted to use by yourself.

Root Shortcut ;)
STRG + SHIFT + L … shows a list of all shortcuts, press twice to open the preferences where to define them

Handling Eclipse
STRG + S … saves the actual file (don’t forget about it, saves the file and the time of restoring lost changes)

STRG + Z … undo last change
STRG + Y … redo last change

STRG + F … opens find popup (open file)
STRG + H … opens search popup (workspace or projects)

STRG + Q … mark last edit location
STRG + SHIFT + I … inspect where the var is used in the file
STRG + SHIFT + Q … show quickdiff at the left of the editor (red marked linenumbers where changed since the last save)

STRG + O … shows an outline to navigate quick within the class

STRG + M … maximize active view

STRG + 3 … quickly access a view or a file, you have to spezify the name of it after pressing the shortcut

Start Application
ALT + SHIFT + X, J … run Java Application
ALT + SHIFT + X, T … run JUnit Test
ALT + SHIFT + X, Q … run Ant Build

ALT + SHIFT + D, J … debug Java Application
ALT + SHIFT + D, T … debug JUnit Test
ALT + SHIFT + D, Q … debug Ant Build

Code manipulation
STRG + SPACE … code completion

STRG + 1 … shows the quick fix dialog, where you can choose a solution for the given situation (errorhandling, renameing of a variable, …)

STRG + 2, L … assign to local variable, e.g. if you call a method you don’t need to create the var for the returning by your own, let eclipse do that for you (but be aware, the var name will be choosen automaticly, charAt() -> char charAt, getVariableName -> Object variableName)
STRG + 2, F … assign to field
STRG + 2, R … rename in file

ALT + SHIFT + R … rename – refactoring
ALT + SHIFT + M … Extract Method
ALT + SHIFT + L … Extract Local Variable

STRG + SHIFT + Y … to lowercase
STRG + SHIFT + X … to uppercase

STRG + SHIFT + O … organize imports (will remove unused imports and add needed imports)

STRG + SHIFT + F … format code
STRG + D … delete selected lines
STRG + DEL … delete next word
STRG + SHIFT + DEL … deletes all chars to the end of the line

STRG + SHIFT + ENTER … insert empty line before current line
SHIFT + ENTER … insert empty line after current line

STRG + SHIFT + C or STRG + SHIFT + / … make a comment

… move lines up
ALT + DOWNARROW … move lines down

STRG + ALT + UPARROW … copy the marked lines and insert them before the selection
STRG + ALT + DOWNARROW … copy the marked lines and insert them after the selection

Have fun!

Ähnliche Artikel:

Linux und Umlaute in Dateinamen

Zu oft ist es schon vorgekommen, ein Kollege schickt mir ein auf WinXP erstelltes Zip Archiv per E-Mail, und die Dateinnamen der komprimierten Dateien enthalten Umlaute.

Mein Archlinux läuft bestens unter UTF-8. Doch hierbei gibt es Probleme mit ISO-8859-1 kodierten Dateinamen. Im Terminal oder im Dolphin sind diese Datein nicht ansprechbar, ein invertiertes Fragezeichen ersetzt den Umlaut, die Datei ist so nicht ansprechbar.

Hier kommt convmv zum Einsatz, zu finden in gut sortierten Repositories.

Nachdem das Archiv extrahiert wurde, können mittels
convmv -f iso-8859-1 -t utf-8 -r /Verzeichnis
werden alle zu konvertierenden Datein rekursiv nochmals angezeigt werden. Hierbei verrät die Ausgabe auch den zukünftigen Dateinamen.
Fügt man dann den Parameter –notest hinzu führt convmv die Änderungen auch direkt durch und die Datei ist wieder ansprechbar.

Ein paar nützliche Links dazu:

Ähnliche Artikel: