Home » Software Development

Software Development

Don’t comment bad code—rewrite it

In this post i will share my experience of “comments in code” that i have got by reading code , writing code and reading books. Lets start with famous quote 1 2 “Don’t comment bad code—rewrite it.”   —Brian W. Kernighan and P. J. Plaugher Lots of comment in code looks just like above image and it is distraction. Comments are lie Most ...

Read More »

Hidden Meaning

Good tests should: Run quicklyFail meaningfullyDocument the system under testExplain themselves when they go wrong Consider the following test: 1 2 3 4 5 6 7 8 9 @Test public void restApi() {     int response = client.get("/endpoint");       // the status code returned from the get     // should be OK, indicating     // the endpoint is healthy     assertEquals(200, response); } You ...

Read More »

5 Software Testing Strategies to Uplift Business Growth

The immense popularity of SaaS products in the market has been an important factor in the surge of start-ups delving into the software industry. However, when it comes to developing and putting a software product on the market, just a simple idea is not enough. There are just as many failed software products in the market as similar offerings are ...

Read More »

Name Parameters In Tests?

As discussed in What are We Testing Again? from the Test Smells, making the test code explain its test case and test data is a vital responsibility. When writing test code, the best advice is focus on creating understanding, rather than focus on DRY code. This is largely because refactoring tests, requiring us to hide things behind methods or named ...

Read More »

OfficeFloor IntelliJ Plugin

OfficeFloor is now available to develop within IntelliJ. While the plugin was originally developed for Eclipse, we have now isolated the functionality into IDE agnostic bundle.   This means with a bridging implementation, it is possible to port the OfficeFloor plugin to other IDEs. However, for now we are content with Eclipse and IntelliJ for OfficeFloor development. Though if you would ...

Read More »

Load balancing: Round robin may not be the right choice

Based on our experience, we believe Round robin may not be an effective load balancing algorithm, because it doesn’t equally distribute traffic among all nodes. You might wonder how this is possible? Yes, it is possible How Round robin algorithm works? Round robin algorithm sends requests among nodes in the order that requests are received. Here is a simple example. ...

Read More »

[MEGA DEAL] The Machine Learning & Artificial Intelligence Certification Bundle (98% Off)

Take a 44-Hour Deep Dive Into the Algorithms & Statistical Models That Make Machine Learning & Artificial Intelligence Wor Hey fellow geeks, This week, on our JCG Deals store, we have another extreme offer.We are offering a massive 98% off on The Machine Learning & Artificial Intelligence Certification Bundle. Get it now with only $29, instead of the original price ...

Read More »

The First and Last Rites

Let’s look at another test smell. Consider the following tests: @Test public void connectionWorks() { database = openDatabase(); database.healthCheck(); database.close(); } @Test public void countRows() { database = openDatabase(); assertThat(database.countAll()) .isEqualTo(0); database.close(); } In the above code we’ve written two tests for some fictional database. It looks like both those tests start and end with the same code. On top ...

Read More »

It’s Too Noisy

I want to look at a general case of noise in code. To do so, let’s look at how to instantiate a list in Java: 1 2 3 4 5 List<String> someList = new ArrayList<>(); someList.add("Snow White"); someList.add("Red Riding Hood"); someList.add("Evil Queen"); someList.add("Finbar Saunders"); It would be hard to argue that there’s an innate bug or flaw in the above… ...

Read More »