Skip to content
7 Apr 11

Why you will NOT become a programmer/software developer within a month

von Joachim

This article is in German available here / Der Artikel ist auch in deutsch verfügbar

Every once in a while I’m faced with the question how long it will take until you become a reasonably good programmer. Even from my circle of friends and acquaintances I was already asked if they cannot help me out with a project. Here a brief try of an explanation why this is NOT incidentally possible.

My answer to this question, how long it will take to become a reasonably good programmer, is usually:

It depends. But I would roughly estimate 5 years.

With this statement the asker is usually not very content:

Come on, it can’t be that hard!

Due to the fact that I’m mainly into web development with Java, I’m going to address a few frameworks and technologies, that you are going to need on a daily basis with a brief explanation why you are needing them. For almost every item in this list there are alternatives out there but my goal was not to assemble a comprehensive list, rather I want to point out that programming is *more* than knowing a programming language.

1. The operating system. Everybody who uses a computer is using (knowingly or unknowingly) an operating system. In my case I’m using Windows as well as Linux. In general my web applications will run on a Linux system as a productive system. That means: I must know for both systems how to work with and administer them. That includes e.g. the use of the console (yes, even under Windows you are from to time to time faced with the console) or setting environment variables. Both are things where user John Doe is already overcharged. Also small differences between those systems like case-sensitivity can cause confusion in the beginning.

2. The concepts of a programming language. I’m using an object-oriented language which means that you have to understand the general concepts behind OOP. What are classes, inheritance, polymorphism? The abstract concepts behind those words are quite easy to grasp. Using them in practice in the right situation can be so cumbersome that some programmers are (sadly) never able to do in there whole life.

3. The programming language. In my case Java. The syntax of Java is not very complicated. Until you gain an oversight over the provided functionality it may take a few months. And if you never programmed with Java you need to pick up some basics first. What is source-code, what is a compiler, what are packages, classes, exceptions, data types, methods? How do I compile my source? How do I execute my generated *.class-files? How can I bundle several classes in a JAR? What the heck are JAR-files anyway? How do I include third-party-libraries?

4. The IDE. After you’ve learned the basics and you compiled and ran your first programs from the console, you definitely want to use a more sophisticated tool. You will need an IDE. It’s completely irrelevant if you are choosing IntelliJ, Eclipse or Netbeans. Personally I’m using Netbeans since over six years and I’m still discovering sometimes Features that are new to me. An IDE IS a very powerful tool, build for professional developers. Until you learned how to use this tool properly a lot of time will pass.
As an alternative an editor with syntax-highlighting could be already a progress. But the integration with all the developer-tools that you need on a daily basis is really something very charming.

5. The build tool. At the latest when you start working with other people on a project you want to use a build tool which can create your project independently from your IDE / your computer. In the Java world the most common tools for this are Ant and Maven. Maven comes along with a dependency-management which is indispensable (even if you wish sometimes) and for Ant you could use the Ivy project for this. And an own repository-manager like Nexus is in some situations also mandatory.

6. XML. Not every project will use XML. But for most configurations you are not getting around XML (e.g. using Maven or Ant and most other third-party-libraries).

7. A debugger. No program is bug-free from the beginning. And sometimes starring at the code is not sufficient. You will need to learn what a debugger is and how it works. Where and when do you have to set breakpoints, how to display variable values, how to step through a program and/or when/how to skip methods. Conditional breakpoints are also a nice thing. And even if you don’t need all of that from the beginning, it’s nice to know that you have the right tool for it, when you encountering a problem where one of those points comes in handy.

8. The database. Almost every program saves some data in some kind of form. Sometimes a normal text file is sufficient, sometimes a XML-document would be the more appropriate solution. But if the amount of data increases you won’t get around a database. Quite often you choose a RDBMS. But maybe for your case a database from the NoSQL-movement is more appropriate. And other times (e.g. for testing) you only need an in-memory-database. MySQL was for my scenarios usually sufficient.
Ah, and by the way: if you are using a database you should also have a bit knowledge about database design.

9. SQL. SQL is the language that you use for database. If you want to select / alter data in your database you need at least a basic knowledge of SQL.

10. An ORM. An object-relational-mapper handles most interaction with your database and reduces the amount of ‘direct’ work with the database. You will still need a basic knowledge of SQL and ORMs will bring there own pitfalls. Hibernate has become the de-facto standard in the Java-world. In Hibernate you can use for your database queries HQL, a language similar to SQL. But nowadays you should consider using JPA which uses JPQL, where Hibernate is an implementation of JPA. Confused? Good, else I would be out of work ;-)

11. The server. For an web-application you will need a server. For my applications I just needed up till now only a servlet container like Tomcat or Jetty. A complete application server like Glassfish, JBoss or Geronimo was not needed by me, yet. Also the integration of a servlet container with a webserver like Apache HTTPD was not needed yet (or was usually done by someone else).

12. The web-framework. You don’t want to reinvent the wheel every time that’s why you are using a framework which provides establish solutions to known repeating problems. I tried and used several frameworks for several projects (Struts 1, Struts 2, Spring MVC, GWT, Stripes, Wicket) and favor at the moment Wicket. If you prefer a component-oriented framework (like Wicket, GWT or JSF) or a page-oriented framework (like Stripes, Struts, Spring MVC) is a question of taste.
But for all of the mentioned frameworks you will need a basic understanding of the technology that drives the web. What is HTTP, what’s a POST-request, what’s a GET-request, what are parameters, what is a port and how is a session working? What is a server roundtrip? And why is AJAX a nice gimmick for the end-user but for developers sometimes just hell?
And before I forget it: of course you will need a bit of HTML and CSS. And for the AJAX-stuff you want to have a bit knowledge about JavaScript. And while we are at it: the first time you are seeing strange characters on your page (while using Umlauts or special characters) you will have the joy to learn about encodings. (Why the heck is there not only UTF-8 out there?!?)

13. Securing a web-application. Most websites are having a secured area where a login is needed. You don’t want to implement this on your own. Choose rather something like Spring Security.

14. Logging. As soon as a customer reports an error you will be glad when you were protocoling when, what, how something happened in you code. So you are gonna need a logging framework like Log4J.

15. Dependency Injection. To couple all those technologies in a loose way you want to use a dependency framework like the de-facto standard Spring. Latest if you need to mock objects during testing you are gonna love Spring.

16. Unit testing. You don’t want to test your complete application manually after every change just to see if your changes broke something. Rather you will write unit-test which will test your code programmatically. If you are using TestNG or JUnit is a matter of taste. I prefer TestNG even though JUnit is more widely spread.

17. A version control system (=VCS). Due to the fact that you usually never really finish a software project, instead you just stop working on it, it might happen that you will end up with several versions. And as soon as more than one developer is working on the project you want to have the possibility to track changes in the source code. That’s what version control systems are for. Here you also have the agony of choice: CVS, Subversion, GIT, Mercurial, etc. If you should choose Subversion as your first version control system you can’t do much wrong, especially because it’s integrated in most IDEs.

18. Continuous Integration (=CI). Unit-tests are taking time and need to be executed on a regular basis and sometimes you just don’t trust the changes your co-workers committed. Here a CI-server, like Hudson can be very handy. The CI-Server checks your project out of the VCS in a regular interval, compiles and test it and do whatever else you tell him to do. What else can be done we will see in our next item.

19. Static code analyzers. Some potential bugs can be found by tools, so called static code analyzers. Those tools can be integrated in your CI-process. Findbugs, PMD, CPD, Checkstyle or JavaNCSS are just a few which I use on a regular basis. But keep in mind that you need some experience to interpret the results, especially to identify false positives.

20. Bugtracking. Sometimes you can’t keep up with bug fixing so that you should set up and use a bugtracker. I’m using Redmine because it offers also an integrated wiki, forum and a SVN-integration. Other famous bugtrackers are Mantis, Bugzilla and JIRA. Oh yeah, of course you have to have the right infrastructure to use those tools. Redmine uses Ruby, Mantis uses PHP and Bugzilla need Perl. Your choice :-)
Another criteria you should keep in mind before choosing, is, if you need an integration in your IDE.

21. Profiling. If your code is not fast enough and everything in your program takes an eternity to finish, you will use a profiler to spot the bottlenecks. To interpret the results and/or resolve issues that you found, you will need to some extent knowledge about the technical internals.

22. Memory Management. In Java you don’t have to handle memory management on your own anymore. Nevertheless you should know that there is something called garbage collector and you should also know more or less how it works. When you are developing web applications you will run sooner or later into an OutOfMemoryException which is caused by a small application, even though you have X gigabyte RAM. To understand the root of this error and how you can solve it, you need to know what is going on under the hood.

23. Algorithms. There are more ways of killing a dog than by hanging. A lot of problems can be solved in a several different ways. With different advantages and disadvantages. Just have a look at the variety of search algorithms. Sometimes you will have a working solution but need to rewrite that part because of changing parameters which makes your first solution not optimal anymore. Changing working code is also called refactoring.

24. Refactoring. Nowadays with modern IDEs refactoring is almost like shooting fish in a barrel. The goal is to make the code more maintainable or in general “better”. You just need to know what “better” is. For the most common problems there are common solutions which are called design patterns.

25. Design Patterns. Those are solutions for common problems. To make use of them you need to know respectively realize that you are encountering a certain problem.

26. Programming Style. Even though formatting your source code has no influence on the flow of your program (at least not in Java), a good programming style is vital for maintainable code. Your style will get (hopefully) better the more experience you gain.

27. Documentation. Creating a good documentation is *much* harder then it seems at the first glance. It will take some years until you will have a feeling for what is important enough to be documented and what not and how to structure a good documentation.

28. The English language. You won’t get around the English language as a programmer. If you just need to read an English text you can maybe conceal your ignorance. But if you need to write in English – and you will as a programmer – you should make sure that your writings don’t get too adventurous.

29. Other matters. A few buzzwords which pops into my mind when I think about what else you might need: Lucene for searching, Hibernate Search to integrate Lucene with Hibernate, SSH to work on a remote machine, Firebug for finding bugs while developing websites, Google Page Speed to optimize speed, Java Mail for sending mails (this implies again that you need to know what’s working under the hood (e.g. what is a SMTP-server?)). Quartz for cron jobs, regular expressions, webservices (if SOAP or REST doesn’t matter), a general understanding of computer security (nobody wants that his application is e.g. vulnerable for SQL-injections). Multithreading needs to be mentioned nowadays and also deadlocks and heisenbugs. Oh, and I almost forgot about all the different licences that you will encounter if you want to make use of third-party libraries.

30. Last but not least: an unlimited frustration tolerance, an eye for details and the patience of a saint. Everybody who stared for a whole week at only three single lines which caused a deadlock and couldn’t come up with a solution knows exactly what I’m talking about.

Summary
Do you need all this stuff? It depends! If you just want to create a little guestbook then definitely not. But I just presented a set of tools here. If you want to beautify your house and you want to hang up a picture in it, it’s sufficient to know how a hammer works. But if you want to build your house from scratch you will need a lot more tools. And a lot of them in different designs.

Software development is a bit like driving a car. It’s quite simple to get your driver’s licence. But no new driver will dare to start his first 500 miles trip in a rainy winter night all alone. It’s possible. But I guess no one would do it or would even have the confidence to do so. Programming beginners are a bit different. They read the first half of “Learning XYZ in 21 days” and think they are capable to start the next Microsoft.
I also met students that took for one semester a programming course and they really believed that they would know everything now.

This list is neither complete nor is it exaggerated. Who believes that I’ve exaggerated should give it a try to build a piece of software over a few months. All mentioned tools are free of charge except for Windows and JIRA.

And to all readers who made it till here and know a bit about programming: feedback is welcome!

24 Mrz 11

Neues Phishing-Opfer: Olaf Kaltbrenner

von Kay

Tja… Trittbrettfahrer oder 2. Versuch? Diesmal hat es Rechtsanwalt Olaf Kaltbrenner erwischt – wobei… gibt’s den eigentlich?! Gerade trudelte auf jeden Fall folgende Mail ein, die einen sehr stark an die Phishing-Mails erinnert, die – den real existierenden – Rechtsanwalt Florian Giese in Verruf brachten:

Guten Tag,

in obiger Angelegenheit zeigen wir die anwaltliche Vertretung und Interessenwahrung der Firma Sony Music Entertainment Deutschland GmbH an.

Gegenstand unserer Beauftragung ist eine von Ihrem Internetanschluss aus im sogenannten Peer-to-Peer-Netzwerk begangene Urheberrechtsverletzung an Werken unseres Mandanten. Unser Mandant ist Inhaber der ausschliesslichen Nutzungs- und Verwertungsrechte im Sinne der §§ 15ff UrhG bzw. § 31 UrhG an diesen Werken, bei denen es sich um geschutzte Werke nach § 2 Abs 1 Nr. 1 UrhG handelt.

Durch das Herunterladen urherberrechtlich geschutzer Werke haben sie sich laut § 106 Abs 1 UrhG i.V. mit §§ 15,17,19 Abs. 2 pp UrhG nachweislich strafbar gemacht. Bei ihrem Internetanschluss sind mehrere Downloads von musikalischen Werken dokumentiert worden.

Aufgrund dieser Daten wurde bei der zustandigen Staatsanwaltschaft am Firmensitz unseres Mandanten Strafanzeige gegen Sie erstellt.

Aktenzeichen: 240 Js 419/04 Sta Stuttgart

Ihre IP Adresse zum Tatzeitpunkt: 178.200.132.102

Illegal heruntergeladene musikalische Stucke (mp3): 11

Illegal hochgeladene musikalische Stucke (mp3): 37

Wie Sie vielleicht schon aus den Medien mitbekommen haben, werden heutzutage Urheberrechtverletzungen erfolgreich vor Gerichten verteidigt, was in der Regel zu einer hohen Geldstrafe sowie Gerichtskosten fuhrt. Genau aus diesem Grund unterbreitet unsere Kanzlei ihnen nun folgendes Angebot: Um weiteren Ermittlungen der Staatsanwaltschaft und anderen offiziellen Unannehmlichkeiten wie Hausdurchsuchungen und Gerichtsterminen aus dem Weg zu gehen, gestatten wir ihnen den Schadensersatzanspruch unseres Mandanten aussergerichtlich zu lösen. Wir bitten Sie deshalb den Schadensersatzanspruch von 100 Euro bis zum 29.03.2011 sicher und unkompliziert mit einer UKASH-Karte zu bezahlen. Eine Ukash ist die sicherste Bezahlmethode im Internet und fur Jedermann anonym an Tankstellen, Kiosken etc. zu erwerben. Weitere Informationen zum Ukash-Verfahren erhalten Sie unter: http://www.ukash.com/de

Nachdem Sie den Ukash oder Paysafecard* Voucher gekauft haben, geben sie den auf unserer Homepage ein.

* alternativ konnen Sie auch mit Paysafecard zahlen Link: http://www.paysafecard.com/de

Geben Sie bei Ihrer Zahlung bitte ihr Aktenzeichen an!

Sollten sie diesen Bezahlvorgang ablehnen bzw. wir bis zur angesetzten Frist keinen 19- stelligen Ukash PIN-Code im Wert von 100 Euro erhalten haben(oder gleichwertiges Paysafecard Coupon), wird der Schadensersatzanspruch offiziell aufrecht erhalten und das Ermittlungsverfahren mit allen Konsequenzen wird eingeleitet. Sie erhalten dieses Schreiben daraufhin nochmals auf dem normalen Postweg.

Hochachtungsvoll,
Rechtsanwalt Olaf Kaltbrenner

Wie gehabt: Kaffee trinken, E-Mail löschen und Lebbe geht weida!

15 Feb 11

Softwareentwicklung im Team – Teil 10 – Abschlussbemerkungen

von Joachim

Zum Abschluß noch ein paar weitere Probleme, die ich stichwortartig in meinem Pamphlet angesprochen habe.

x. Weitere Probleme
Sicherlich gibt es noch weitere Möglichkeiten, den Entwicklungsprozess zu verbessern. Regelmäßige Code-Reviews, Refactoring, Lasttests sind dabei nur einige wenige. Allerdings würde eine Etablierung der genannten Vorschläge bereits entschieden zur Verbesserung des Entwicklungsprozesses beitragen.
Darüber hinaus bin ich nur auf die Probleme eingegangen, die von allen Entwicklern gleichermaßen umgesetzt werden können. Nicht eingeplante Testphasen, o.ä. fanden daher keine Berücksichtigung.
Daher sollte noch einmal gesondert folgende Punkte besprochen werden: Lasten-/Pflichtenheft, Analyse-/Testphasen, Dokumentation (Architektur, Deployment, etc.)

Rückblickend gesehen
Von den genannten Schlagwörtern wurde nichts mehr diskutiert, geschweige denn umgesetzt. Sicherlich, vereinzelt wurde hier oder da mal ein Refactoring durchgeführt oder man saß zusammen vor einem Rechner um ein Stück Code zu begutachten, aber nichts, was sich fest in unseren Entwicklungsprozess etabliert hatte. Daher gibt’s hier auch keinen weiteren Rückblick.

Zusammenfassung
Wer sämtliche Artikel dieser Serie gelesen hat, wird ggf. den Schmerz zwischen den Zeilen gespürt haben, den man als Entwickler durchgemacht hat. Die Ideen, die umgesetzt wurden, haben einen Großteil dieses Schmerzes nehmen können, aber von einem Idealzustand waren wir weit entfernt.
Auch wenn es logisch erscheint (und mit etwas gesundem Menschverstand auch leicht zu erfassen sein sollte): DIE Silver Bullet gibt es nicht. Dennoch wurde ich mal gefragt, ob ich nicht ein Tool kennen würde, womit wir unsere Entwicklungsprozesse verbessern und beschleunigen könnten. “Was ist denn mit UML. Da gibt’s doch so was von Rationale”, war doch tatsächlich mal eine Aussage. Ähm… ja! Man erwartete irgendwo das Wundertool, welches mit einem Knopfdruck all unsere Probleme lösen würde. Zumindest habe ich es damals teilweise so wahrgenommen. Dass die Tools aber eine untergeordnete Rolle spielen und das die Prozesse und deren Ideen dahinter, bei den Leuten erst einmal in die Köpfe müssen, wurde nicht verstanden. Oder man wollte keine Zeit dafür aufbringen. Ich weiß es nicht.
Rückblickend gesehen muss ich sagen, dass ich mit reichlich viel Naivität an die Sache gegangen bin. Ich dachte damals, man zeigt die Vorteile auf, wiegt sie gegen die Nachteile ab und schon wird ein revolutionäres Umdenken statt finden. Dass ich bei den nicht-Programmieren ggf. ein wenig Probleme bekommen könnte, hatte ich erwartet. Bei einigen Entwicklern aber eine gewisse Beratungs- ja Lernresistenz vorzufinden, hat mich hingegen doch desillusioniert. Dabei war es nicht so, dass diese Entwickler die Vorteile nicht erkannt hätten. Sie stimmten ihnen sogar zu und fanden die Ideen dahinter durchaus ansprechend. Nur getreu dem Motto “Das haben wir schon immer so gemacht”, sah man anscheinend nicht die Notwendigkeit, eigenes Verhalten zu hinterfragen oder gar zu ändern.

Hiermit schließe ich meine kleine Artikelserie “Softwareentwicklung im Team”. Wie immer: Feedback ist durchaus erwünscht ;-)

15 Feb 11

Softwareentwicklung im Team – Teil 9 – Retrospektiven

von Joachim

Den letzten Artikel hatte ich geendet mit dem Hinweis, dass Software auch manchmal fertig gestellt wird. Besser hätte es heißen sollen: “Software wird nie fertig gestellt, man hört nur auf daran zu arbeiten”. Wie dem auch sei, wenn ein Projekt vom Projektplan verschwindet und man sich Neuem zuwendet, ist eigentlich der richtige Zeitpunkt, um Geschehenes noch einmal Revue passieren zu lassen und über Gewesenes zu reflektieren: eine sogenannte Retrospektive.

8. Problem / Beispiel
Retrospektiven

Nach einem abgeschlossenen Projekt findet in der Regel kein Meeting statt, was gut gelaufen ist respektive was falsch gelaufen ist, um daraus entsprechend Konsequenzen ziehen zu können.

Lösungsvorschlag
Nach Projekten eine Retrospektive durchführen.

Vorteile
- Verbesserung des Projektablaufs

Nachteile / Probleme
- Keine

Aufwand
- vielleicht ein Tag

Rückblickend gesehen
Wer die bisherigen Artikel dieser kleinen Artikelserie gelesen hat, wird wissen, wie es kam: es passierte nichts. Die meisten Entwickler, die in dem abzuschließenden Projekt involviert waren, saßen schon im nächsten Projekt, so dass es keinen spürbaren “Bruch” im Tagesgeschehen gab. Somit hatte man auch keine Zeit für einen Tag “Auszeit”. Und so kam es, wie es kommen musste. Geschichte wiederholte sich.

Zusammenfassung
In Zeiten der Agilität könnte man fragen, ob Retrospektiven überhaupt noch zeitgemäß sind. Schließlich sollte man seinen Prozess in einem agilen Entwicklungsprozess ständig reflektieren. Allerdings glaube ich schon, dass man am Ende eines Projektes eine komplett andere Sichtweise annehmen kann (und sollte) und das Projekt mit ein wenig Abstand beurteilen sollte. Wenn man nicht mehr im Tagesgeschehen steckt, wird man das eine oder andere sicherlich anders betrachten.
Dies ist aber nur eine Vermutung, denn ich muss (leider Gottes) eingestehen, dass ich bei keinem Projekt, in welchem ich involviert war, eine Retrospektive durchgeführt habe.

Ausblick
Als letzten Artikel dieser Serie gibt’s noch ein buntes Allerlei: “Sonstige Probleme“.

15 Feb 11

Softwareentwicklung im Team – Teil 8 – Unit Tests

von Joachim

Im Artikel über Nightly Builds hatte ich mich in der Einleitung bereits einmal über Unit-Tests ausgelassen:

Im hektischen Alltag werden eh meist zu wenige geschrieben und die die existieren werden von den Entwicklern auch eher nur sporadisch ausgeführt. Das hat unter anderem zur Folge, dass Unit-Test mit der Zeit veralten, weil sie beim refactorn gerne vergessen werden. Anstatt sie dann anzupassen, werden dann auf Grund mangelnder Zeit die fehlgeschlagenen Tests einfach gelöscht oder auskommentiert.

Das trifft ziemlich exakt die Situation, die wir bei uns vorfanden.

7. Problem / Beispiel
Unit-Test

Zwar werden vereinzelt Unit-Test geschrieben, da diese aber nicht regelmäßig (sprich automatisiert) ausgeführt werden, ist deren Nutzen stark begrenzt. Sobald ein Continious Integration Server aufgesetzt wurde, stellt das aber kein Problem mehr da.

Lösungsvorschlag
Ziel sollte es für zukünftige Projekte sein, qualitativ hochwertigen Code auszuliefern. Und da gehört ein frühes Testen mittels Unit-Test dazu.

Vorteile
- Qualitativ hochwertigerer Code
- Probleme beim Refactoring werden frühzeitig erkannt

Nachteile / Probleme
- eine Etablierung ist langwierig, insbesondere wenn die Testcases ein nicht triviales Setting (Datenbankverbindung oder ähnliches) benötigen

Aufwand
- kurzfristig gesehen relativ hoch, langfristig aber wird sich das sicherlich auszahlen

Rückblickend gesehen
Tja, was soll ich sagen? Mit diesem Punkt sind wir auf der ganzen Linie gescheitert. Eins der größten Probleme war, dass die Zeitpläne immer so straff angesetzt waren, dass dafür gar keine Zeit blieb. Wie straff die Zeitpläne waren, soll kurzes anekdotisches Gespräch am Ende eines Kick-off-Meetings verdeutlichen:

Projektleiter: “… und an Tag X gehen wir produktiv. Ich weiß, dass ist ein ziemlich sportlicher Zeitplan.”
Ich: “Ähm… wo ist denn da die Testphase?”
Projektleiter: “Es gibt keine. Dafür haben wir einfach keine Zeit.”

Das traurige daran ist: dieses Gespräch HAT tatsächlich SO(!) stattgefunden! Wir hatten nie Zeit. Nicht zum testen. Nicht für’s Refactoring. Und für Unit-Test schon gar nicht. (Ein Arbeitskollege sagt(e) immer: wenn wir dafür keine Zeit haben, haben wir keine Zeit, unseren Job zu machen. Und recht hat er!) Mehrere Versuche, den Verantwortlichen näherzubringen, wie wertvoll Unit-Tests seien, wurden abgecancelt mit: “Das machen wir mal, wenn wir Zeit haben.” Das die von uns gebauten Kartenhäuser bei der kleinsten Änderung komplett zusammenzubrechen drohten, führte zwangsläufig dazu, dass wir noch weniger Zeit für’s Testen hatten, weil wir damit beschäftigt waren, unser Kartenhaus vor dem Einstürzen zu bewahren. Ein Teufelskreis.
Eins der größten Probleme dabei war, dass die Mitarbeiter, die am besten darin waren, auf die Schnelle was zu fixen, auch die waren, die am wenigsten von Unit-Tests hielten. Und diese zur Not auskommentierten. (Weil ja keine Zeit vorhanden war…) Das Problem lag also nicht ausschließlich an den Projektverantwortlichen, sondern teilweise auch in den eigenen Reihen.

Zusammenfassung
Ja, Unit-Tests SIND mit viel Aufwand verbunden. Und nein, diese Arbeit zahlt sich in der Regel nicht SOFORT aus. Ich bin auch kein Freund von TDD und schreibe auch nicht für jedes Projekt Unit-Tests (zumindest nicht, wenn ein kleines Programm lediglich aus zwei Klassen besteht). ABER: Unit-Tests sind ein Rettungsfallschirm, der sich im laufe eines Projektes irgendwann DEFINITIV auszahlen wird. Und mit einem CI-Server kann man sich auch sicher sein, dass die Tests ausgeführt werden.
Es braucht Zeit, bis man gute Unit-Tests schreiben kann. Und häufig wird man auch Design-Schwächen in seinem Projekt aufdecken, die vorher gar nicht aufgefallen sind, bis man versucht, entsprechenden Code zu testen.

Ausblick
Man mag es kaum glauben, aber Software wird auch manchmal fertig gestellt. Das mit der letzten Zeile Code aber das Projekt noch nicht zu Ende sein sollte, zeigt der nächste Artikel über Retrospektiven.

Switch to our mobile site