My Lamentation of Plastic Waste

Plastic waste has been on my mind for quite some time now. Actually, I remember a time that whenever I used to go to a shop, I used to make it a point to explain to the shopkeeper how bad it was to be having lots of plastic on our society. Shopkeepers give us plastic for almost everything we buy. Yu get your stuff wrapped in plastic bags no matter if you are buying a small pack of cigarettes. People get the stuff in plastic and then simply throw the bags in their trash cans. This plastic, then, either comes out in the fields or ends up in an ocean. The really bad thing about plastic is that it does not decay in the soil or the environment. You have to burn it to completely get rid of it. And when you burn it, it releases a toxic sulfur dioxide.

In our country, we lament mal-practices of many institutions and people. Much of this lamentation happens in public places like shops or cafes. We don’t care much about ourselves while throwing and disposing of so much plastic in our soil. Plastic literally ruins our soil. When I try to explain these things to the shopkeeper, it naturally takes some stamina. I have also felt that I came across as a nutty professor. So the intensity of emphasizing this point kind of reduced over time. But now I see that Avaaz has taken an initiative about this. They have created a petition and are asking everyone across the globe to sign it. Perhaps you should also sign it even if you don’t mean it. Sometimes you take action first and latter start meaning it.

Our oceans can’t breathe

By 2050 the ocean will have more plastic than fish! But in days, governments are meeting to address this emergency. If one million of us join the campaign to stop the flood of plastics, it’ll be announced to all the delegates from the podium. Click to sign!

Moreover, read the following articles and try to appreciate the problem of plastic.

The Oceans Are Drowning In Plastic — And No One’s Paying Attention

Imagine an area 34 times the size of Manhattan. Now imagine it covered ankle-deep in plastic waste – piles of soda bottles and plastic bags, takeout containers by the mile, drinking straws as far as the eye can see.

The Arctic Ocean Is Clogging With Billions of Plastic Bits

Pollution is now as dense in the northernmost ocean as it is in the Atlantic and Pacific. In other words, the Arctic Ocean has become the Northern Hemisphere’s “dead end” for floating plastic. “Our data demonstrate that the marine plastic pollution has reached a global scale after only a few decades using plastic materials,” said Andrés Cózar Cabañas, a biologist at the University of Cádiz.

Even your sea salt is almost certainly contaminated with plastic

What goes around, comes around, eventually. The latest karmic zinger is how likely you now are to find plastic particles, from packaging you might have once used, in your sea salt. Each year, humans dump 13 million metric tons of plastic into the ocean.

Full scale of plastic in the world’s oceans revealed for first time

More than five trillion pieces of plastic, collectively weighing nearly 269,000 tonnes, are floating in the world’s oceans, causing damage throughout the food chain, new research has found. Data collected by scientists from the US, France, Chile, Australia and New Zealand suggests a minimum of 5.25tn plastic particles in the oceans, most of them “micro plastics” measuring less than 5mm.

Photo by Rob de Vries,

If you found an error, highlight it and press Shift + Enter or click here to inform us.

PHPUnit Resources

Following are really good resources for learning about PHPUnit.

Manual :: A short tutorial about PHPUnit

PHPUnit provides a simple framework for creating a test suite to automate testing of functions and classes. PHPUnit is inspired by JUnit which was created by Kent Beck and Erich Gamma as a tool for eXtreme Programming.


Getting Started with PHPUnit – The PHP Testing Framework

We distribute a PHP Archive (PHAR) that contains everything you need in order to use PHPUnit. Simply download it from here, make it executable, and put it into your $PATH, for instance:

PHPUnit Tutorial For Beginners – CodeSamplez

I am using PHPUnit for quite sometime now. Though was thinking few times to write about it, but it didn’t happen till now. In fact, this is my first tutorial on testing as well. The official documentation/getting started guide is already quite good for starting.


Photo by oneiric wanderings

If you found an error, highlight it and press Shift + Enter or click here to inform us.

Software Engineering Journey: On The Heap

Conceiving ideas has never been a big deal. Especially in our times, with the advent of computers and the things that have been made possible with them, thinking about novel ideas has become commonplace. Moreover, we have valuable tools for thinking about ideas and their materialization.  Nowadays we can develop for any idea

Think about a problem that you have conceived an idea about and you want to develop a real product out of it. Object oriented paradigm provides us with a great set of thinking tools about how to implement ideas. According to this, you have to figure out the objects which make up your desired product or artifact to make your problem modular. You then get ways and techniques to develop an object-oriented design. Once you have done that, you have to implement that design into working software. The thing I am chanting the most these days is to highlight a roadmap from the conception of ideas to their object-oriented design and finally to working software. In this vein, the thing the idea I really like to shout about is to divide your implementation phase into two parts. The first is to derive skeleton code from the design. Once that’s done, the only thing remains is to implement the methods of objects. If that is done right, what you get is working software for the project you dreamed, provided that you also designed it well. The design is important than anything else, as everything depends on that.

There are other important things too. You have to gather requirements well. You have to conduct all sorts of tests. You have to prepare documentation. And implementing methods nicely and accurately is also required.

Implementation can be mind boggling if we don’t get a few things right in our heads. And this series of articles, that I am presenting as a journey through the labyrinth of Software engineering issues, is in its essence a reflection on issues pertaining to implementation.

In my previous article, I reasoned about the fact that all dynamic memory allocation is done on the heap. It would also be nice to know that all user-defined objects are normally allocated memory dynamically. If you read my last post, there are two things about object instantiation that must be understood. One is to instantiate the object itself, which is given a place to reside on the heap. The other is to assign the address of that object to a variable of the same type, that resides on the stack.

But what about an object lies on the heap? This is an important question, the answer of which should be understood. And if understood properly, this will make you an astute programmer. You may as well become a speed-programmer and go out to win so many programming championships.

In order to understand the answer to this question, we need to understand a few things about classes and objects. Well, but we all know a few things about classes and objects, don’t we? A class has a few fields and a bunch of methods. The fields determine the state the class is in at any moment in time. The methods influence the behavior of the class. This is the basic common knowledge that we acquire in the first chapter of almost every well-written text on object-oriented programming.

However, we don’t learn a few simple things readily due to one reason or the other. And our programming acumen suffers badly due to this lack of understanding. One among them is the question about object instantiation. How are objects instantiated? If you understand the answer to this question, you will develop a lot of clarity as a programmer.

So when we do something like ‘Data data= new Data();’, what really happens? I reflected on a few issues in my last post. You must read that first and continue from here. So in a statement like above, the runtime environment of Java (remember I said that I am talking about everything from the vantage point of Java) creates a new object of type Data using the class Data. What do I mean by that?

What that really means is that when we run a program that is creating an object of type ‘Data’, the program loads the bytecode of the class into the memory. That bytecode is present in a Data.class file that you created while creating The region of memory where the program is exactly loaded is called method area. It has all the compiled code of all the classes.

The moment you create an object dynamically, it is created on the heap. For all of its fields’, their values are stored in the respective blocks on the heap. All of the field names, method names and their bodies are still located in the method area. I want to emphasize here that the heap only contains values for the fields. These values can be changed by changed or accessed by having a reference to this object and the field names, which are present in the method area. When you try to access a method of this object, it is loaded from the method area to an appropriate place on the stack. From there it starts executing.

You already know the rest of the stuff about execution. Especially, since you have been reading the previous article on how dynamic memory works, nothing should be a big deal for you.

Photo by Polyrus

If you found an error, highlight it and press Shift + Enter or click here to inform us.

Resources for Search Based Software Engineering

I have been writing and posting stuff about search-based software engineering. So far, my focus has been on search-based software testing. Three of my previous posts were:

  1. Search Based Software Testing Frameworks.
  2. Search Based Software testing Using JUnit.
  3. Search Based Software Engineering.

In this post, I am sharing more online resources about these feats.


Using evolutionary algorithms for the unit testing of object-oriented software

Genetic Improvement 2017

The workshop itself will take place on Saturday 15th and Sunday 16th July 2017, as part of the GECCO 2017 conference, which runs until Wednesday 19th July 2017. We’re delighted to announce that the 2017 keynote will be given by Professor Wolfgang Banzhaf, a leading researcher in the field of Genetic Programming and current holder of the John R.

Genetic programming for Reverse Engineering – IEEE Xplore Document

This paper overviews the application of Search Based Software Engineering (SBSE) to reverse engineering with a particular emphasis on the growing importanc

Photo by The Saylesman

If you found an error, highlight it and press Shift + Enter or click here to inform us.

Search Based Software Testing Frameworks

I wrote about search-based software testing (SBST) as a feat a few days back. I posted links about research work that extends frameworks such as JUnit for search based testing. Today I was wondering whether there existed any working SBST frameworks that could be integrated with popular IDEs. To my surprise, there are quite a few such frameworks that can be integrated with popular IDEs such as Netbeans, Eclipse, IntelliJ IDEA etc. Here are links to a few such popular frameworks.

EvoSuite | Automatic Test Suite Generation for Java

@inproceedings{icst17_mocking, AUTHOR=”A. Arcuri and G. Fraser and R. Just”, TITLE={Private API Access and Functional Mocking in Automated Unit Test Generation}, booktitle = {ICST’11: Proceedings of the 10th International Conference on Software Testing, Verification and Validation}, YEAR=”2017″, note={To appear} }

SBSTFrame: a framework to search-based software testing – IEEE Xplore Document

The software testing is an important component of software development life cycle, that directly affects quality of software products. Some problems in sof

Please read how Facebook employs evolutionary algorithms for automatic bug detection of their app using Sapienz.

Facebook’s evolutionary search for crashing software bugs

With 1.3 billion daily users, the Facebook site and its apps are the most-used pieces of software in the world. Only a handful of software companies have ascended to a similar echelon of ubiquity, including Microsoft, Google, and Apple.

Photo by Sarah Twitchell

If you found an error, highlight it and press Shift + Enter or click here to inform us.