Clean code: Error-proof and testable code

30 03 2013

Continuing the previous post, here is another video. This one is lot more packed with concepts and best practices, so it is impossible to catch everything after first watch – one would have to consecutively come back to it and analyze particular clues. Slides are not very good in my opinion, however concepts and talk is worth watching and remembering.

There is a lot of concepts here, all worth attention. It is about Dependency injection, SRP, OCP, Manager / Processor classes, Law of Demeter, Null checking etc.

Do you like my blog?
I manage this blog and share my knowledge for free sacrificing my time. If you appreciate it and find this information helpful, please consider making a donation in order to keep this page alive and improve quality

Donate Button with Credit Cards

Thank You!

Advertisements




Why TDD is hard?

7 04 2012

Test Driven Development is not about testing – it’s about the design. It is worth to remember that the idea of preparing tests first is difficult if You are preapring… tests. It is much easier when You see it as a design requirements. After that, You test if design requirements are met by software. Not only test the if the software works correctly itself.

Tests are prepared first, then the software is written. The goal is to design software in detail so that test cases check if software meets requirements.

This is new way of thinking about software that is in common with Agile methodology. Software is created from the users’ point of view. First You define (in tests) how software has to look like and work, then just implement it so that all the test cases are fulfilled. There is no doubt that this is the right approach.

The problem is that writing the tests, developer does not write software itself, but give his time to other tasks. The clue is to believe that this will save time and resources in future – simply by limiting the amount of bugs that would consume developer’s time if not discovered in early phase with TDD.

It is not easy to write tests that will reveal all bugs, but spending more time on particular part of software code increases its quality itself.  I still did not managed skill of writing test ahead of software, but I am doing my best!

Do you like my blog?
I manage this blog and share my knowledge for free sacrificing my time. If you appreciate it and find this information helpful, please consider making a donation in order to keep this page alive and improve quality

Donate Button with Credit Cards

Thank You!





Best Android TDD tutorials

17 03 2012

There is not very much help on android Test Driven Development on the Internet. However I can recommend some tutorials listed below and desribed with details further in text. Most of examples covers the temperature converter which is surely very poor example of Android application… And definitely not the real life case of the killer app…

1. YouTube podcast just to relax and listen at the very beginning

2. Diego Torres lecture (the best so far)

3. Android Application Testing from Packt – worth giving a try if the two above are not enough

Reasons for my recommendations:

1. In order jus to listen as an introduction it is worth to spend 5 minutes on this YouTube podcast. There is no technical details mentioned, just basics and assumptions on TDD. Really good to listen to have some high – level information about what You are going to learn and use.

2. All the necessary basics are covered by Diego Torres lectures. Some theoretical introduction and practical examples of UI and logic testing. This is of course not everything that is needed to do TDD in Android, but it’s the best starting point. There is no details about ActivityUnitTestCase, which is also important to use in Android App testing.

3. Book requires much more time and concentration to read so it is recommended only if two above sorces are not enough (they aren’t in my case). Is it worth reading? As I heven’t found nothing better – it seems to be. It is not the best one. Still searching…

If there are more tutorials hidden on the Internet – please let me know! :)

Did I help you?
I manage this blog and share my knowledge for free sacrificing my time. If you appreciate it and find this information helpful, please consider making a donation in order to keep this page alive and improve quality

Donate Button with Credit Cards

Thank You!








%d bloggers like this: