Howth Cliff Walk, Dublin

Today I did went to Howth and did the cliff walk with an Italian friend. Didn’t do the full cliff but did quite a long walk nevertheless. 🙂 Here are some photos from the walk…

January 15, 2017 Â· Sinaru Gunawardena

Test Automation in Selenium Using Page Object Model and Page Factory

Writing automated tests is more than just a luxury for any agile software development team. It is a need, and is an essential tool to find bugs quickly during early phases of software development cycles. When there is a new feature that is still in development phase, developers can run automated tests and see how other parts of the system are affected by those changes. Through test automation, it is possible to lower the cost of bug fixing and bring overall improvement to quality assurance (QA) process....

January 10, 2017 Â· Irene Papuc

Trailing whitespaces: what you gonna do about it?

What is a trailing whitespace? Trailing whitespace is any spaces or tabs after the last non-whitespace character on the line until the newline. Background Few months ago, it was raised that PR submitted code tend to have trailing whitespace changes in code diff along with other “real” code changes. This whitespace change is a diff where the change was removing one or more trailing whitespaces from the existing code. We then noticed that the editors we were using were automatically removing trailing whitespaces that were already existed in the code when the file get saved....

January 9, 2017 Â· Sinaru Gunawardena

Having a newline character at end of file

Background/problem/question: When you create a newfile, and push it to Github, in code diff view, it will say no newline at end of file. Sometimes text editors would also add an EOF newline, if they noticed that the file being edited does not end in a newline, when they are saved (usually it is configured that way by default). Reasoning: In POSIX, a line is a sequence of zero or more non-newline characters plus a terminating character....

January 9, 2017 Â· Sinaru Gunawardena

Cliff of Moher, Galway

Today I visited Cliff of Moher in Galway, Ireland. It was truly breathtaking…..

December 27, 2016 Â· Sinaru Gunawardena

Glendalough, Wicklow

I visited Glendalough in Wicklow county today with the housemates. It was a lucky day as we had Sunshine most of the time. Here are some pics from Glendalough

October 17, 2016 Â· Sinaru Gunawardena

Use different conditions to test methods

Let’s say that you have a function that takes an HTML structure and check items. For simplicity, our method would check if each item in the list has a link pointing to type of resource (A). So here can write a test that takes a list with items containing resource A links. Here we expect the function to return true. But this does not guarantee that the function is working as there is another outcome from the function which false....

October 15, 2016 Â· Sinaru Gunawardena

Dublin Zoo, Phoenix Park

Today I visited Dublin zoo with a friend. Not a zoo fan but thought to visit anyway as this place is one of the recommended places in Dublin to see. Have to tell it is quite a large area. <p style="margin: 8px 0 0 0; padding: 0 4px;"> <a style="color: #000; font-family: Arial,sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 17px; text-decoration: none; word-wrap: break-word;" href="https://www.instagram.com/p/BLmVdDpgJEf/" target="_blank">It was a nice day</a> </p> <p style="color: #c9c8cd; font-family: Arial,sans-serif; font-size: 14px; line-height: 17px; margin-bottom: 0; margin-top: 8px; overflow: hidden; padding: 8px 0 7px; text-align: center; text-overflow: ellipsis; white-space: nowrap;"> A photo posted by Sinaru Gunawardena (@sinaru....

October 15, 2016 Â· Sinaru Gunawardena

My first mechanical keyboard

After reading reviewing about mechanical keyboards, I wanted to try them as I have never used one before. So I thought to buy Das Keyboard 4 Professional for Mac with Cherry MX Blue keys. The color codes represent different attributes of the keys. As per my understanding Cherry MX blue and brown are the most popular. The major different between blue and brown is that blue has a clicky responsive noise and browse does not....

October 10, 2016 Â· Sinaru Gunawardena

Don’t commit the first thing that works

I was working on a bug fix on our application with another fellow programmer. First we understood the root cause of the bug and what makes it to happen. All that was good. Then we thought of a solution and applied the first fix that I thought. Code works and bug is fixed, happy days. But wait. Then I thought about the fix and it’s complexity. The bug was causing due to a list that is not getting updated and it was referring to an old memorized list that we lose track once the list is created....

October 9, 2016 Â· Sinaru Gunawardena