Category Archives: software development

Windows application memory leak in practice

Reading Time: 1 minute
Image credit:

In my current project that involves Microsoft technology, 3rd party application has a memory leak. In this post I will explain how I detected memory leak and how I tried to override memory leak by enlarging memory space for that application.

You all probably know for Windows task manager, but to get all information about Windows process, much better and enhanced option is Process Explorer. It provides all details that you need when yo are investigating all resources that process consumes.

Application with memory leak is 32 bit application. 32 bit denotes size of address space for that application, and that is 2GB (2^31), In Process Explorer right click on process that you want to monitor, choose properties and select Performance tab. Virtual memory is memory available for that process. When it hits 2GB value, your application will throw out of memory exception. Application has memory leak if virtual memory consumption raises over time. Application was running in Windows Server 2012 64 bit edition, but as was 32 bit application, that did not helped.

My heuristic was: is it possible that 32 bit application address more than 2GB on 64 bit OS?
I found this simple utility, 4GB patch. I patched executable that manifested memory leak in process explorer, and now 32 bit application was able to address 4GB!

Process Explorer in action. Image credit:

That actually helped just for one scenario, when test run was shorter than time needed for application to hit 4GB limit.

In this problem I had 3rd party application, which means that I could not remove cause of actual memory leak. Using process explorer, I had information what could be the problem, because process explorer shows which DLLs are loaded during the application operation.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Software tester experience of CRAFT2014

Reading Time: 4 minutes

This week I attended CRAFT 2014 software craftsmanship conference that was held in Budapest. In this blog post, I will describe conference experience and takeaways from the software tester perspective.

Conference preparation

I went on this conference with RubyOnRails guru developer, Vlado. He recommended Airbnb for accommodation reservation, and within 20 minutes I reserved an apartment in walking distance from conference venue. We arrived by car. Vlado notified me about conference “stars”: Chad Fowler,  Douglas Crockford and Michael Feathers.

Day 1

During breakfast I greeted Gojko Adzic and, as usual, my brain was in “fifth gear” during the conversation. I always find out about new valuable books, this time it was “What customers want?“. I pinged Gojko about latest development in his startup Mindmup, and it is always a pleasure to see his “live coding session” about his latest git push. As always, there is new Gojko short wisdom clause: “Programming is magic, you create something from nothing.”.

I also acquainted Nebojsa, Rails developer that works for Semafore, startup from Serbia.
As we were waiting keynote, I looked stuff in my bag and I found out that we got pencil but no notebook, and we got mysterious blue object (in picture above). We all thought that must be some test of our craftsmanship but in the end it were just sponsored earphones. My testing method was observation. I noticed some strange movable elements in the object (something similar just before moment when Alien was going to pop up from John Hurts chest), I flipped object in my hands and I drop it on the floor several times. Nothing happened. Than I noticed that object has two parts, soild white plastic and rubber blue one. I removed blue rubber and I found out that white part is compartment for earphones and the wire. I had to test them and there was no any damage.

I took keynote session “Programming, only better”notes on Google sheet for Nexus 7 game. Talk provided guidelines how to program better. Famous Dijkstra was mentioned, in context of formal reasoning during the programming. Dijkstra was against debugging and testing (with test, you can not prove absence of bug, only its existence) and claimed that every program must be proved using formal reasoning. Other concepts (e.g. mutable objects are bad) could be found in archive of Google testing blog.

Quick browsing preview of O’Reilly boot (40% discount!) and Vlado solved my notebook problem with free O’Reilly notebook.

First talk was “Lessons from Facebook’s codebase”. Facebook codebase enhancement is going into direction to help developers not to make obvious mistakes in code (e.g. xss security issues), to get data only relevant for the query context, to help them to check their new feature or code refactor,… If you have very enlightenment question: “Why not just switch to Ruby or other super language” ask your self: “Could you do it with your simple (compared to Facebook) code base?” What is bothering me as a tester is a hunch that Facebook is probably not using services of context driven software testers. After the talk, I approached to Ben (please notice that this is NOT twitter link), and he happily answered all my questions (big like because I thought that this is against first Facebook rule).

I checked what is new for testers in Vagrant world, and because I like mathematics, I listened about browser encryption (I like Keybase concept and I hope that someone did risk analysis for that product).

“Agility and the essence of software architecture” is aligned with my experience with creating software architectures (also with Architecture war stories).  Talk takeaway, do your architecture in your code. Do not use any intermediate tool. Simple as that.

  “The journey to mastery” explained how to become a master and how to create another master. “Testing the hard stuff and staying sane” provided an example how concurrency testing should also be done: as early as possible, as simple as possible using some tool. Talk was about in house developed tool and I recommend open source Grinder (Java world).

Between Douglas and Michael, we choose Michael, because Douglas is coming to The Geek Gathering. Michael opening was “Do you know who is Gerald Weinberg?”. That question and question for organizations “Could you please show me your code?” confirmed his credibility. G. Weinberg is famous for his definition of quality: “Quality is value to some persons.”

Day 2

Chad Fowler keynote also tried to answer question “What is software quality?”.
In “The art of building tools” I found about JetBrains MPS tool. As a software tester I was very suspicious about “Find the abstractions level for your tests”, but I have no any objections on that talk. It clearly talked only about level of test abstractions and there was no impression at any point that this method is the only testing method.

“Building on solid foundations” was the strangest one for me. Here are the reasons: it is development talk, two UK speakers for which I have problems understanding because of the accent, I did not get any concept described in the talk (except previously known SOLID).

“Delivering continuos delivery continuously” provided live deploy of Australian Guardian site.
In next talk I learned about WebRTC protocol. Talk about RAFT was interesting for me because I am familiar with concept how clusters work. It presents consensus algorithm that is much simpler than PAXOS protocol.

Final talk was about Twitter distribution system problems and their practical solutions. I learned about Zoo Keeper.

In between first and second day we acquainted Sofia, software developer from Israel who works on product that provides features of remote monitoring for Java Virtual Machine (JVM). I am aware of JVM challenges, so it was very interesting to discuss with her info provided by JVM heap and thread dump.

Conference satisfactory survey

I am very satisfied with conference organization and my takeaways. Proof is this blog post. My grade is 4/5. Only minus is real time schedule change that happened on first day.

Post conference

I was hit with lot of information. I did my notes and this blog post, without them my takeaways would be slim (by my fault). I bought three books:

  • Shipping greatness (I do not agree with proposed testing method)
  • The passionate programmer (signed)
  • A theory of fun for game design (there is still a child in me)

We had a problem with paying our parking. Money was not problem, picture depicts the problem (true, I am very bad at taking photos with my IPhone). As tester Ben Simo says: “Testers are sometimes bug magnets.”
Little testing lessons. We executed two scenario tests that failed:

  • User is not able to dismiss windows OS error message and put back machine in state “Ready for payment”
  • User is not able to put paper money in machine.
Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

My git workflow

Reading Time: 1 minute

git workflow

Note: please use git manual to get to know what each git command is actually doing. Divide feature on which you are working in short working deliverables. That means when you are done with your implementation and unit testing, you can merge to master branch and delete your small feature branch.

Clone repository (repository will be called repo furthermore in this wiki.)

mkdir ~/repos
cd repos
git clone
cd repo_name

Get latest code from remote

git status
git checkout master
git pull --rebase

Start working on feature_name. Be sure that feature scope is small as possible. We want your contribution to master as soon as possible!

git branch -a List of all repo branches, remote and local
git checkout -b feature_name Creates feature branch with name feature_name from master branch
git status
git push -u origin feature_name put feature branch to remote repo

Do your work in feature branch. Commit as much as possible.

git checkout feature_name To be sure that you are in appropriate feature branch.
git add .
git commit -m 'something useful and funny'

Send commits to remote repo branch

git rebase -i @{u}
git push -u origin feature_name

Code is ready for master after a lot of testing!

git checkout master
git merge --no-ff feature_name
grep -H -r '<<<<<<< HEAD' * | less -check for conflicts. Resolve them using your favourite editor
git commit -m 'merge from to'
git rebase -i @{u}
git push -u origin master
More on that topic could be found here.

Thank, you feature_name branch, we are done! Your life must be shorter than butterflies!

git push origin :feature_name
git branch -d feature_name
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