Category Archives: programming

Do not name your method dup

Reading Time: 1 minute
Credit: Amazon.com

In order to improve my testing skills, I read great book, “Clean Code“, by Robert C. Martin. This book will teach you how to write readable and maintainable code. Either if you do test automation or if you need to read someone else code, this book is for you.

One rule that book teaches you is to name your functions descriptively. They should have name by their function. Book also provides a lot of good reasons why is this important. I will provide one reason from testers perspective.

While I was testing one feature related with date calculation, I received following error:

I got error in method dup. So, instead of spending time to find out issue in my testing code or data, I had to first spend time to find out what is dup method doing. Exception was descriptive and that helped. The issue was with test data, I got null value from database. I found out on StackOverflow what does dup do. It is not easy to describe with simple name what does that method do. So I guess they agreed on some internal mnemonic. In Ruby code based that is used by millions.

Problem here is that Ruby codebase programers, by putting that simple name for method dup, put technical debt to Ruby codebase. Which could provide many different issues. When you hit hard problem, think how to solve it in proper way.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

One tester and 30+ developers at Code At Six

Reading Time: 1 minute

Yesterday I attended Code At Six meetup. As it is written at their site, this is developers meetup where developers socialize and give short hand on lectures. They discuss hipe technologies for web and mobile development. Code At Six grown from legendary Ruby At Six meetup where Ruby language (and related technologies) was main topic. Goal of Code At Six is to gather all web developers. There were 30 developers and me, one tester. I gave hands on lecture on Grinder, load testing framework based on Java and Jython technologies. Merlin Rebrovic hands on was about hacking Git history.





Using Grinder TCPProxy, I recorded http data while loading Code At Six home page (github grinderShowCase project). Audience reaction was pretty good, and of course main request was to try to crash Code At Six homepage. Of course we only created a load of two concurrent users, and presented grinder test reports.
After the hands on lectures, we formed smaller groups to discuss various topics about web development.
I am very proud that I was given a privilege to talk in front a such smart audience.



Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather