Category Archives: cs-wsu

Google Testing Blog: Hackable Projects – Pillar 1: Code Health

Hackable Projects – Pillar 1: Code Health

In this blog post, author Patrik Höglund talks about how over the years, software development can become stressful to deal with and fix constant issues. The way he suggests to resolve this issue is by making the software more “hackable”; not in the sense of making the software more vulnerable to attacks, but making it easier to modify from a developers stand point. Höglund goes on to say that a hackable project is one that includes easy development, fast builds, good and fast tests, clean code, easy running and debugging, and “one-click” rollbacks. Höglund then goes on to describe the three main pillars of hackability, which are code health, debuggability, and infrastructure.

This post focuses solely on the first pillar of hackability: Code Health.
The first thing Höglund covers are tests that you should use. He says that “unit and small integration tests are probably the best things you can do for hackability” rather than using end-to-end testing. The other thing to testing is that if you have poorly tested legacy code, the best thing to do is refactor it and add tests along the way. Even though this can become time consuming, it’s work it in the end because it leads to a more hackable system in the long run.
The next thing that should be done is to make sure that your code is readable and goes through code review. This means that there should be a reviewer who looks over the code changes to make sure that the new code is consistant with the rest of the code. The changes should also be small and coded cleanly so as to make it easy if a rollback is necessary. Another thing that will help with hackability is making sure that all of your code is submitted in a constistant format.
To reduce risks even more, you should try to consistantly have a single branch for your project. This not only decreases the possible risks, but also reduces the expense of having to run tests on multiple branches. This could possibly back fire though if, as Höglund writes, “Team A depends on a library from Team B and gets broken by Team B a lot.” Höglund suggests that “Team B might have to stabalize thier software for them to use this method and have hackable software.
The last things that Höglund focuses on for Code Heath is making sure that your code has loose coupling, testability, and ways that you can aggressively reduce technical debt.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

What Classes Should Be Tested

Testing on the Toilet: Prefer Testing Public APIs Over Implementation-Detail Classes

In this blog post by Andrew Trenk, Trenk goes over what code needs to be tested, and what doesn’t, when making a Public API. Trenk goes on to explain that if a simple piece of code has only one user or is used once in another class, you should create tests for the other class or not bother testing the simple code at all. He says that anything that is an implementation detail should not get it’s own test.
In fact if you do create tests for this implementation, it might make the code and tests harder to maintain over time, it could cause issues when trying to refactor, and it could also hide issues in your code that only show when using the API. Overall Trenk suggests testing your implementation details indirectly through your API classes. This way you see that they work with your API and you have fewer tests that will need to be updated.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

How Google Deals with “Flaky Tests”

Read the Full Article

This post, by John Micco, talks about how the Software Developers at Google deal with and minimize the damage of “Flaky Tests”. Micco defines a flaky test “as a test that exhibits both a passing and a failing result with the same code.” He goes on to state that this causes major problems because how difficult it is to find the cause of the flaky tests and the frequency of which these kinds of tests appear. There is also the issues of a flaky tests being dismissed only to find out later that it was a real failure which sometimes results in passing through broken code.

There are several strategies that the developers at Google use to minimize the damage and confusion that is caused by these flaky tests. One way is to only report a true failure if the test fails three times in a row. This, however, can be costly if the test that is being run takes a large amount of time to complete. Another way is that they implement a tool that monitors the flakiness of a test. If the tool determines that the flakiness for a test is too high, it removes the test from the critical path. The last strategy they have is to use another tool that monitors flakiness levels. When the levels change, the tool tries to find the reason for the test’s change in flakiness.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

The Pros of Platform-led Testing

Platform-led Testing by Lakshminarasimhan Rajabather

In this article, Rajabather goes over the positives of using platform-led testing to help with automation across all the stages of the software development life cycle. The first advantage that he lists for using this approach is that it cuts down on the cost and time to use assurance across the development’s life cycle. This is also positive to businesses since their goal is to minimize cost and time, and maximize quality.

Rajabather points out is that platform-led testing makes sure that the software is constantly being checked and validated at every stage of development. This is able to be done because, as previously stated, it is now possible to have software assurance constantly being implemented through the entire life cycle. Platform-led testing also works well with Agile development because it “promises quick sprints, rapid sign-offs and a measurable transfer of value from one sprint to the next.”

The last two advantages of platforms that Rajabather lists show that they are beneficial to businesses. He states that platforms allow businesses to build upon both industry and third party analytical tools which makes it so that the tools can be customized to fit a certain need. The last benefit is that platforms are not “restricted only to the requirements, design or execution stage of the lifecycle.”

Please read the full article for more information on this subject.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

Blog Introduction Post

This blog is for Worcester State University CS-443 and will be about upcoming news regarding technology and developments in the Computer Science field.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

5/5/16 Finished & Final Thoughts…

So when we first were introduced to the Radiology Module for OpenMRS  I was all excited.  We initially narrowed it down to an issue which looked to require minimal coding.  We were told that this issue might be ‘too difficult’, and we chose another issue, a simple task of deleting unused lines from a couple of files.  Simple, right?  Bang this out, move on to another issue.  Oh no….first getting OpenMRS and the Radiology module up and running, even for one of us, was crazy.  What that really taught me/us is that clear instructions are paramount.  This again was an issue because exactly what was to be done was vague via the ticket’s description.  Even after Matt asked for clarification multiple times, we weren’t entirely sure what the ‘right’ answer was.  Eventually we got an answer we took as concise enough to complete and actually finish the issue.  Unfortunately we do not know whether or not our fixes were accepted/utilized.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.

3/18/16 Chapters 4 & 5

Chapter 4  was about having the right mental state to code well.  Distractions many of us utilize on a daily basis such as music, cell phones, t.v., or when it’s late-night and/or you’re just plain tired.  While I understand his point(s), I also understand a bit about people, and how we all function differently.  Personally I find certain sounds relaxing, or in terms of being able to produce some form of work, distracting to the peripheral portions of my thoughts and allows me to concentrate only on the task at hand.  I think even if it were possible to create a ‘perfect’ environment, that the silence itself would be a distraction to me.  I also am very much NOT a morning person, and daytime is nice, but optional, I am often up, and completely conscious at 3 AM, so I feel that again, sometimes it’s more about the fit to the person, and what achieves the mental state optimal for producing excellent code.

Chapter 5 was all about that favorite recurring theme….TDD…everything should be Test Driven Development!  I know that while this concept has been shown to my classmates and myself, that it still is not a favorite for us.  I wonder if this concept shouldn’t receive its own class earlier in our curriculum sometimes considering the seeming importance placed upon it in the later courses because a lot of us seem to, and I certainly do, feel lost with this in practice, or at least more challenged than would seem necessary.  I mean I understand the idea that you can build the code around the tests, but I feel this is not necessarily perfect.  This of course could just be my limited experience and a limitation on my current model of thinking about this concept.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.

3/3/16 The ICU and You!

So I  did the Skype for class the other day…from the ICU at UMass!  I mean, how many other people can make that kind of blog post?  “Yeah, I died the other day….and still participated in a class Skype conference!”.

Chapters 2 & 3

These chapters deal with knowing when to take on more work/responsibility, and understanding when you should not.  Luckily I have some real world experience on both sides of the fence in these regards.  Mr. Martin stresses the professionalism aspects, such as assuring you will have all of the work you’ve committed to done at the time you’ve said it would be completed by.  I am well acquainted with the fact that it is often difficult to try and tell someone, especially someone who is your supervisor/boss, “No.”, or “I can’t make that happen in that timeframe.”, etc.  I think everyone should be realistic; standards exist for good reason (usually), but people are imperfect.  Understanding our own limitations often comes from testing those limitations and reassessing based on our results, and we almost always learn more when we fail.  I understand the author’s ideas on professionalism having said that though.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.

2/24/16 Open MRS and Chapter 1

 

We’re going to work on some project, or projects, in OpenMRS.  This has proven to be somewhat frustrating so far.  I’m not so sure anyone has had an easy time of it thus far, so at least I’m not alone.  I thought having things that were required already on my laptop (MySQL, Maven, Eclipse, VirtualBox, etc) would make the process more streamlined, and somehow easier, and that has not been the case.  I have downloaded OpenMRS from GitHub , which has been the only part that has seemed to have gone right so far.  Not using Eclipse and using IntelliJ has proven to be more of a challenge than I would expect.  Nothing about using IntelliJ has seemed difficult, but I can’t get it to recognize the packages…

In Chapter 1 of “The Clean Coder” by Robert Martin I mainly got the idea that professionalism is of paramount importance in the software development industry.  He reinforced other ideas developed for us in other courses; such as frequent testing and ‘cleaner’ and more versatile code.  Mr. Martin also reinforced the idea that enhancing your skills and widening your skill set(s) during your ‘off’ time will lead to better career potentials and paths, the idea of self-motivation was not lost on me. The points about/regarding professionalism seemed to be what resonated the most though.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.

1/26/16 Starting out in Software Development Capstone

Hello. I’m John, and I’m finishing up my degree, and this blog is related to our progress in our Software Development Capstone.  Despite me being considerably older than my classmates I still have the same air of excitement and concern many of them have.  It’s amazing to think that four years have just about passed, and I’m actually about to graduate.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.