BEFORE THE NATIONAL GREEN TRIBUNAL, CENTRAL ZONAL BENCH, BHOPAL Original Application No. 04/2013 (CZ) In the matter of Sandeep Lahariya S/o Shri Ram Prakash Sharma, R/o Mahaveer Colony, Residency Road, Gole Ka Mandir, Gwalior (M.P.) .....Applicant Versus 1. State of Madhya Pradesh, through the Secretary, Department of Housing and Environment, Vallabh Bhawan, Bhopal (M.P.) 2. The Madhya Pradesh Pollution Control Board Paryawas Bhawan, Bhopal (M.P.) 3. The Collector District- Gwalior (M.P.) 4. The Commissioner Municipal Corporation of Gwalior 5. The Ministry of Environment & Forests CGO Complex, Lodhi Road, New Delhi - 3 6. i. Mr. Lalit Jain S/o Shri Raj Kumar Jain, Indore. ii. Mr. Piyush Azad S/o Shri Chandra Shekhar Azad, Indore 7. The Principal Secretary Department of Urban Administration and Development, Vallabh Bhawan, Mantralay, Bhopal (M.P.) 8. The Commissioner Urban Administration and Development, Bhopal (M.P.) 9. The Commissioner Municipal Corporation, Bhopal (M.P.) 10. Mr. Shyam Narayan Chouksey S/o Late Shri N. L. Chouksey, A-255, Shahpura, Bhopal (M.P.) .....Respondents
Counsel for Applicant :
None appeared Counsel for Respondents :
Shri Sachin K. Verma, Advocate - Respondent No.1, 3 ,7 & 8 & Shri Ayush Dev Bajpai, Advocate Shri Shivendu Joshi, Advocate - Respondent No.2 Shri R.K.Gupta, OIC Shri Vijay Shahani, Advocate - Respondent No.4 Shri Mohd. Alauddin, Advocate - Respondent No. 9 Shri Shyam Narayan Chouksey - Respondent No.10 ORDER/JUDGMENT CORAM: Hon'ble Mr. Justice Dalip Singh (Judicial Member) Hon'ble Mr. P.S.Rao (Expert Member) Dated : November 11, 2013
Delivered by Hon'ble Mr. Justice Dalip Singh, Judicial Member
1. This is a case filed as PIL in Writ Petition No.1042/2012 in the High Court of Madhya Pradesh Bench at Gwalior by one, Mr. Sandeep Lahariya with a prayer to direct the respondents to ensure compliance of the Plastic Waste (Management and Handling) Rules, 2011 in letter and spirit and to stop use, sale and storage of plastic carry bags and packaging alleging that the standards of manufacture and disposal of polythene are not being followed leading to littering on the roads, clogging of drains and health hazard to human beings and cattle.
2. As per the directions of the Hon'ble Supreme Court in the case of Bhopal Gas Peedith Mahila Udyog Sangathan and Others Vs. Union of India & Others (2012) 8 SCC 326, the Writ Petition was transferred to the Principal Bench of the National Green Tribunal (NGT) at New Delhi to deal with the case under the National Green Tribunal Act, 2010 and registered as Original Application No. 97/2013. Subsequently on constitution of Central Zone Bench of National Green Page 2 of 29 Tribunal at Bhopal the case was transferred to Central Zone Bench and re- numbered as Original Application No. 04/2013 (CZ).
3. The petitioner claiming to be a spirited citizen of Gwalior city, averred that he is aggrieved by the indifferent attitude of the respondents who are not taking any action to ensure compliance of Plastic Waste (Management and Handling) Rules, 2011 (for short, 'Rules of 2011' framed by the Government of India, Ministry of Environment and Forests under Environment (Protection) Act, 1986. Under these 'Rules' the use of coloured plastics has been banned in food items, and the use of plastic carry bags made of virgin, recycled or compostable plastic less than 40 microns in thickness is absolutely banned. Even manufacture, distribution, storing, selling etc. of polythene less than 40 microns is banned throughout the country. He further contended that plastic carry bags less than 40 microns in thickness are being used indiscriminately creating severe environmental hazard. The petitioner also highlighted the menace of huge quantity of plastic waste being generated because of the indiscriminate use and littering of plastic carry bags not only in the city of Gwalior but all other parts of the State of Madhya Pradesh causing havoc to the environment and creating health hazard to the human beings and cattle. It is the case of the petitioner that the authorities concerned who are vested with the powers to implement the 'Rules of 2011' in the interest of protection of environment, utterly failed in performance of their duties. He further contended that as per Rule 4 of the aforesaid 'Rules' the Municipal bodies and the Madhya Pradesh Pollution Control Board are the competent authorities to implement the rules in the interest of the environment but they are not paying heed to the important aspect of the protection of environment, health of the human beings and cattle from the plastic menace.
Page 3 of 29
4. On transfer of the case from the Hon'ble High Court of Madhya Pradesh Bench at Gwalior, notices were issued to the respondents to file their replies before this Tribunal duly listing out the action taken by the competent authorities in enforcing the 'Rules of 2011'. All the respondents who were made as party in the Writ Petition and who appeared before the Tribunal, have agreed that indiscriminate use of plastic carry bags is a serious environmental hazard and manufacture and sale of plastic carry bags less than 40 microns is non-permissible. Therefore, this Tribunal in its order dated 08.02.2013 felt is appropriate to pass injunction restraining any person / industry / company from manufacturing, selling or providing it for use any plastic bags less than 40 microns. Subsequently in order dated 08.04.2013 the earlier order dated 08.02.2013 was reiterated and specific order was passed that there shall be no manufacture, sale, storage or use of any plastic bags with thickness less than 40 microns by the shopkeepers, manufacturers, industrialists and any other person dealing in such trade in any part of the State of Madhya Pradesh. Directions were issued to the Secretary, Housing and Environment Department, Government of Madhya Pradesh, the Member Secretary, Madhya Pollution Control Board (MPPCB), authorities of all the Municipal Corporations, Municipal Councils, Nagar Panchayats, Director General of Police, District Collectors of all the Districts to ensure compliance of the orders of the Tribunal. It was also directed that municipal authorities and MPPCB to conduct regular inspections and submit status report before the Tribunal.
5. Certain traders who claimed that they are in the business of production of plastic carry bags have filed a Miscellaneous Application seeking certain clarifications on the interim orders of the Tribunal and the same was admitted and the applicants in the Misc. Application have been permitted to intervene and were impleaded as respondent no. 6. Later on, considering the gravity of the case, the Page 4 of 29 highest authorities in the State vested with administrative powers to supervise the implementation of the 'Rules of 2011' have also been impleaded as respondents making Principal Secretary, Urban Administration & Development Department as respondent no. 7, the Commissioner, Urban Development as respondent no. 8, the Commissioner, Bhopal Municipal Corporation (BMC) as respondent no.9. Later on one, Mr. Shyam Narayan Chouksey filed Misc. Application No. 05/2013 claiming that he belongs to a NGO organization and interested in pollution free environment and requested to permit him to be impleaded as intervener. Accordingly his request was considered and he was impleaded as respondent no.
10.
6. It is a fact that considering the indiscriminate use of plastic carry bags and their devastating effect on the environment the Government of India, Ministry of Environment and Forests in their notification no. S.O. 249 (E) dated 04.02.2011 amended vide S.O. 1527 (E) dated 02.07.2011, notified the 'Rules of 2011' to regulate the manufacturing, stocking, distribution, sale and use of plastic carry bags. As per rule 3 of the aforesaid 'Rules' carry bags have been defined as follows :
"Carry bags" means bags made from any plastic material, used for the purpose of carrying or dispensing commodities but do not include bags that constitute or form an integral part of the packaging in which goods are sealed prior to use.
"Manufacturer" means any person who manufactures plastic carry bags or multilayered plastic pouches or sachets or like. "Plastic" means material which contains as an essential ingredient a high polymer and which at some stage in its processing into finished products can be shaped by flow;
Page 5 of 29
Under Rule 4 of the aforesaid rules the Pollution Control Boards have been vested with the responsibility of enforcing the provisions of the 'Rules of 2011' related to registration, manufacture and recycling and for the enforcement of the provisions relating to the use, collection, segregation, transportation and disposal of plastic waste the prescribed authority shall be the Municipal Authority concerned.
Rule 5 stipulates that no person shall manufacture, stock, distribute or sell any carry bag made of virgin or recycled or compostable plastic, which is less than 40 microns in thickness Rule 8 makes it mandatory that each plastic carry bag shall have the name, registration number of the manufacturer and thickness of the bag printed in English or in local language and each recycled carry bag shall bear a label or a mark "recycled" and shall conform to the Indian Standard: IS 14534: 1998.
Rule 8 also stipulates that retailers shall ensure that plastic carry bags sold by them are properly labelled, as per the stipulations made under these Rules.
As per rule 9 no person shall manufacture plastic carry bags without obtaining registration certificate from the Pollution Control Boards.
Rule 10 explicitly states that no carry bags shall be made available free of cost by retailers to consumers. The concerned municipal authority may by notification determine the minimum price for carry bags depending upon their quality and size which covers their material and waste management costs in order to encourage their re-use and to minimize plastic waste generation.
Under rule 11 of the 'Rules of 2011' a provision has been made to constitute State Level Advisory Body to monitor the implementation of the 'Rules of 2011' under the Chairmanship of the Secretary, Department of Urban Development and under rule 12 the Pollution Control Boards shall prepare and submit annual reports Page 6 of 29 to the Central Pollution Control Board (CPCB) on the implementation of these 'Rules' by 30th day of September of each year.
7. The respondent no. 2 MPPCB in their reply filed in March 2013 before the Principal Bench of NGT has agreed that Board has been entrusted with the responsibilities related to authorisation, manufacturing, recycling and disposal of the plastic carry bags and they are taking all the necessary steps in performance of their statutory duty. The respondent further stated that regular checking of plastic manufacturing units is being carried out and the officers of the Board were made as part of the teams along with the officers of Municipal bodies responsible for raiding the polythene carry bags manufacturing units and in seizing the material not conforming to the prescribed standards. It was further contended by the respondent no. 2 that they are taking all the necessary steps to ensure compliance of the 'Rules of 2011' and hence the petition deserves to be dismissed.
8. The respondent no. 1 & 3 in their counter affidavit stated that they adopt the reply filed by the respondent no. 2 as the issues raised by the applicant pertaining to the respondent no. 1 & 3 are answered therein.
9. The respondent no. 5 Ministry of Environment & Forests (MoEF) has not filed any reply.
10. In response to the order of this Tribunal dated 05.08.2013 the respondent no. 4 Municipal Corporation, Gwalior has listed various steps that have been taken by them including initiating prosecution against the persons who are involved in production and distribution of polythene carry bags of less than 40 microns thickness. It was averred that time and again the Municipal Corporation is conducting raids, seizing the sub standard polythene carry bags and sending them for scientific analysis and wherever it was found that the material is below the prescribed limits prosecution is launched against the offenders and the Municipal Page 7 of 29 Corporation is serious and taking positive steps in eradicating the use and distribution of polythene carry bags which are of below standards.
11. In tune with the orders of the Tribunal dated 04.09.2013, the respondent no. 4 Municipal Corporation, Gwalior has placed on record showing the efforts made by the Corporation in creating awareness among the general public against the indiscriminate use of polythene carry bags particularly by involving the school children. It was also contended that a series of raids were conducted and the material found below the prescribed standards has been seized. It was also stated that various NGOs are roped in for creating awareness among the masses against the distribution and use of polythene carry bags below the prescribed standards besides displaying hoardings & banners at the public places. People were also advised not to use polythene carry bags for distributing Prashad at religious places.
12. The respondent no. 4 in their further compliance report dated 09.11.2013 has submitted that the Municipal Corporation, Gwalior has undertaken awareness programme whereby shopkeepers have been informed not to handle polythene carry bags below 40 microns thickness and wherever such material is found it was seized and action taken. Besides directing not to supply polythene carry bags free of cost to the customers the marketers and retailers were also informed to buy the polythene carry bags only from the registered manufacturers who are manufacturing the material of prescribed standards.
13. Respondent no. 2 MPPCB in their further reply dated 22.04.2013 has stated that the Member Secretary, Pollution Control Board directed all the 12 Regional Officers of the Board in the State of Madhya Pradesh vide letter no. 919 dated 12.04.2013 to comply with the directions of this Tribunal dated 08.04.2013 and that no manufacture, sale, storage or use of any plastic carry bags with thickness less than 40 microns is allowed by the shopkeepers, manufacturers or any other Page 8 of 29 person dealing in such trade in any part of the State of Madhya Pradesh. It was also stated in the affidavit that the Member Secretary of the Board wrote to the Commissioner, Urban Administration and Development Department vide letter no. 920 dated 12.04.2013 for compliance of the orders of this Tribunal dated 08.04.2013. It was also stated that the Member Secretary of the Board has written a letter to all the 318 local bodies in the State to perform their statutory duty as prescribed under rule 4(b) of the 'Rules of 2011' along with the District Collectors of all the Districts to strictly enforce the orders of the Tribunal and submit compliance report. It was also stated that the Member Secretary has written letters to the Principal Secretary, Housing and Environment on the issue with a request to bring it to the notice of the Urban Administration & Development Department, Commissioner, Urban Administration & Development Department, Director General of Police and Chief Secretary of Madhya Pradesh. It was submitted that the Regional Officers of the Board have conducted a number of raids on the polythene carry bags manufacturing industries and during the raids numbering 204 conducted from 08.04.2013 to 18.04.2013 in various Districts in the State, about 4 tons of non standard polythene carry bags were seized. Further, in compliance of the orders of this Tribunal dated 22.04.2013 respondent no. 2 MPPCB has furnished a list indicating the industries involved in manufacturing of the plastic carry bags and registrations granted by the MPPCB in the State of Madhya Pradesh. It was stated that in all, there are 32 industries which are involved in the manufacturing of the plastic carry bags in the State of Madhya Pradesh and out of 32, one unit located in Sagar District was found running without obtaining the registration from the Board and therefore a case was filed in the concerned Court of Law against the manufacturer under Section 15 of the Environment (Protection) Act,1986. The respondent no. 2 MPPCB has also placed on record that the State Page 9 of 29 Level Advisory Board as per the Rule 11 of the 'Rules of 2011', has been constituted by the Government of Madhya Pradesh and meetings were held on 04.10.2011 and 23.10.2012 to monitor the implementation of the 'Rules of 2011'.
14. Further, in compliance of the orders of this Tribunal dated 04.09.2013 the respondent no. 2 MPPCB in their affidavit dated 07.10.2013, stated that twenty nine (29) raids were conducted after 01.09.2013 on the polythene carry bags manufacturing industries in different parts of the State and found no material below the prescribed standards. It was also stated in the affidavit that all the twelve (12) Regional Officers of the Board conducted public awareness programmes to educate the people about the indiscriminate use of polythene carry bags thereby causing damage to the environment. Statement showing such programmes conducted after 01.09.2013 has been furnished by the respondent along with the press clippings and photographs.
15. Subsequently, in compliance to the orders of this Tribunal dated 09.10.2013 the respondent no. 2 in continuation to it's earlier affidavit has submitted details of 25 raids conducted on the manufacturing units from 05.10.2013 onwards. Respondent no. 2 also furnished list of sixty nine (69) awareness programmes conducted between 08.10.2013 to 18.10.2013 on the environmental hazard caused by the polythene carry bags. It was also stated in the affidavit that so far four (04) State Level Advisory Body meetings were conducted as prescribed under Rule 11 of the 'Rules of 2011' on 04.10.2011, 23.10.2012, 30.09.2013 and 30.10.2013 to review the implementation of the 'Rules' in the State. Copies of the Annual Reports submitted to Central Pollution Control Board on the implementation of the 'Rules of 2011' for the years 2011 to 2013 were also furnished along with the affidavit.
Page 10 of 29
16. The Commissioner, Urban Administration & Development Department, Govt. of MP who has been impleaded as respondent no. 8 in his affidavit dated 09.10.2013 in compliance of the directions issued by this Tribunal dated 04.09.2013, stated that specific directions have been issued to all the District Collectors, Commissioners, Municipal Corporation, Municipal Council, City Council to rigorously advertise through electronic and print media and display posters and banners at prominent public places to create awareness among the people on the ill effects of indiscriminate use of polythene carry bags and to make eco-friendly biodegradable carry bags available to the vendors in the local / regular / weekly markets, besides giving directions to the Urban Local Bodies for enforcing the provisions laid down in the 'Rules of 2011' against the manufacturers, stockists, wholesalers and small vendors of polythene carry bags to follow the prescribed norms and not to indulge in business involving below standard polythene carry bags. Subsequently in their affidavit dated 11.11.2013 the respondent no. 8 Commissioner, Urban Administration & Development Department in compliance of the order of this Tribunal dated 09.10.2013, stated that 45 Urban Local Bodies have furnished Action Taken Report to the Nodal Agency i.e. Directorate of Administration and Development Department informing that Urban Local Bodies have organized various awareness programmes and have taken various steps for the effective implementation of the 'Rules of 2011' and the matter is pursued with the local bodies for their compliance report and continuous efforts are being made in this regard to implement the 'Rules of 2011' in letter and spirit.
17. The Bhopal Municipal Corporation (BMC) who has been impleaded as respondent no. 9 has filed their affidavit dated 02.09.2013 and 09.10.2013 in compliance of the orders of this Tribunal dated 14.05.2013 and dated 04.09.2013 Page 11 of 29 respectively, duly listing out the efforts made by the Corporation on effective implementation of the 'Rules of 2011' and action taken against the persons indulging in the business of manufacturing or selling of polythene carry bags which are less than 40 microns in thickness. Further, it was stated that awareness programme has been launched in all the Wards of Bhopal Municipal Corporation on the negative effect of manufacturing, storage, distribution, sale and use of polythene carry bags less than 40 microns thickness and also for bringing awareness among the people to take their own biodegradable carry bags when they go to market to fetch goods / items from the market. It has also been submitted by the respondent that efforts are made for conducting large scale publicity through print and electronic media against the use of plastic carry bags in general and carry bags of less than 40 microns in thickness in particular. It was also stated that the Corporation has specified the area for disposal of the plastic waste and continuous efforts are made in this regard.
Discussion
18. Having looked into the magnitude of the problem and having gone through the averments made by the petitioner in the petition and the replies submitted by the respondents we observe the following.
There can be no denying the fact that as a result of indiscriminate use of plastic / polythene carry bags and its un-regulated discarding has resulted in pollution of the environment and is affecting not only human beings but other living beings for which stringent steps for enforcement of the laws and regulations in force are required to be implemented. Not only that, in many countries and some of states in India it is being considered that there must be now a total ban on the manufacture, sale, distribution and use of poly / plastic carry bags. It was recently reported in the press that the Judges of the Hon'ble Supreme Court while hearing Page 12 of 29 the matter relating to the problem created as a result of unrestricted discarding and throwing away of the plastics and carry bags commented that the problem is "a more serious threat to the future generations than is posed by nuclear weapons". This has to be understood not only by all stakeholders but also by all duty holders as they are all governed by Articles 48 A and 51 A(g) of the Constitution. The ill effects of the pollution as a result there of not only affect human beings but animals, birds, plants and other living beings so also the lakes, rivers and water bodies, the air we breath and the soil as well.
19. Pollution of the environment is something by which every living being gets affected. While under article 48(A) of the Constitution a duty has been cast upon the State to make an endeavour to protect and improve the environment and to safeguard the forests and wild animals, under Article 51 (A) (g) it is the fundamental duty of every citizen to protect and improve the natural environment including forests, lakes, rivers and wild life and to have compassion for all living creatures. Considering the above provisions in the Constitution, while it is the duty of the State to make an endeavour for protecting the environment, at the same time there is a duty cast upon the citizens of this country also to protect and improve environment not only for the benefit of the human beings and citizens of this country but having regard to all living creatures and that also needs to be highlighted. It hardly needs to be emphasised that the environment affects each living being whether plants, animals or birds and therefore, while each one of us wishes to live in a pollution free environment we ourselves consciously or unconsciously tend to pollute the environment by our acts of omissions and commissions. Improving the environment and keeping it pollution free is something which requires the participation and positive action on the part of each and every citizen along with the State and local bodies.
Page 13 of 29
20. The need is for all citizens to understand that waste is generated primarily at home which ultimately if not managed, leads to pollution. If the waste so generated domestically can be managed properly much of the problem relating to polluting the environment as a result of such waste including plastic and polythene can be curbed. We all have heard about the 3 R's. These relate to 'Reduce' 'Reuse' and 'Recycle' but unfortunately when it comes to practise there are very few who actually adhere to applying the principle of the 3 R's, particularly 'Reduce'. On the contrary the use of plastic carry bags has increased many fold over the years. While the 'Rules of 2011' emphasise on the need and method for recycle no emphasis is found on the first of the R's namely 'Reduce' which in our opinion is more important.
21. As per some of the statistics which are available on the internet, as a result of the use of plastic bags "environmental activists estimate that approximately 500 billion to one trillion plastic bags are used each year world vide". Putting it differently as stated by Sharon Jacobsen "Every man, woman and child in our planet uses 83 plastic bags every year" which may be a very conservative estimate. That is one bag per person every 4½ days. Therefore, if a family of four is looked at, on an average, it comes to 332 bags per family per year i.e. roughly one polythene / plastic bag per day per family. With that kind of waste being generated, without proper management of segregation and disposal, we have come to a point where, something which was considered to be useful when invented has now become an uncontrollable monster and threatening the environment world over. We therefore consider it appropriate while dealing with the above issue in particular reference to Gwalior and Bhopal cities in Madhya Pradesh to apply our directions to not only the entire State of Madhya Pradesh but even to the other two states of Chhattisgarh and Rajasthan falling within the jurisdiction of this Bench as Page 14 of 29 our directions are primarily for ensuring proper implementation of the Plastic Waste (Management and Handling) Rules 2011 issued by the MoEF, Government of India and applicable throughout the country.
22. What Makes Plastic Bags harmful to the Environment?
Plastic bags are made of various chemicals such as xylene, ethylene oxide and benzene which are mainly toxic. Traditional plastic bags are usually made from polyethylene, which consists of long chains of ethylene monomers. Ethylene is derived from natural gas and petroleum. The polyethylene used in most plastic carry bags is either low-density or more often, high-density. Color concentrates and other additives are often used to add tint to the plastic. Plastic carry bags are commonly manufactured by blown film extrusion.
The process of manufacturing the plastic involves various chemical processes and utilization of variety of chemical compounds and additives including phenols, amines and esters, antioxidants, UV and light stability improvers, antistatic agents, and heat stabilizers, which impart the finished product specific characteristics for its intended use. Consequently, these additives along with the polymeric material have potential to be released into the environment as a result of chemical reactions in the process of its degradation and the degraded products on release cause significant health and environmental hazards.
The toxic chemicals that are most frequently released during the production of plastics include dichloromethane, acetone, ethylene chloride, methyl ethyl ketone, styrene, toluene and benzene. Other major emissions include sulphur oxides, nitrous oxides, methanol, ethylene oxide and volatile organic compounds. The use of chemicals such as plasticisers, antioxidants, colorants, flame-retardants, heat stabilizers and barrier resins during plastic production cause toxicity of lead, cadmium, mercury and other carcinogens.
Page 15 of 29
Plastic/polythene carry bags result in blockage of drains, pipelines and is even life threatening to the animals that eat the plastic material along with the leftover food stuff and other waste.
'Website Material on Plastic Waste Management' prepared by the Central Pollution Control Board in June 2013 lists the following environmental issues on indiscriminate littering of unskilled recycling/reprocessing and non- biodegradability of plastic waste:
i. During polymerization process fugitive emissions are released.
ii. During product manufacturing various types of gases are released.
iii. Indiscriminate dumping of plastic waste on land makes the land infertile due to its barrier properties.
iv. Burning of plastics generates toxic emissions such as Carbon Monoxide, Chlorine, Hydrochloric Acid,
Dioxin, Furans, Amines, Nitrides, Styrene, Benzene, 1, 3-butadiene, CCl4, and Acetaldehyde.
v. Lead and Cadmium pigments, commonly used in LDPE
(Low Density Poly / Ethylene, HDPE (High Density
Poly / Ethylene) and PP (Poly Prophylene) as additives
are toxic and are known to leach out.
vi. Non-recyclable plastic wastes such as multilayer,
metalized pouches and other thermo set plastic poses
disposal problems.
vii. Sub-standard plastic carry bags, packaging films
(<40μ) etc. pose problem in collection and recycling.
Page 16 of 29
viii. Littered plastics give un-aesthetic look in the city, choke the drain that may cause floods during monsoon.
ix. Garbage mixed with plastics interferes in waste processing facilities and also cause problems in landfill operations.
x. Recycling industries operating in non-conforming areas are posing threat to environment to unsound recycling practices.
These apart it is reported that they end up the solid waste disposal sites and burnt. In many cities it is reported that these fires never die down. The emissions as a result of this unlawful activity are polluting the air by releasing toxic fumes in the atmosphere, as opposed to following the incineration norms in accordance with the Municipal Solid Wastes (Management and Handling) Rules of 2000.
23. Use of biodegradable and eco-friendly substitutes to Plastic carry bags Besides creating awareness among the general public on the ill effects of indiscriminate use of plastic carry bags, the authorities should strictly implement the 'Rules of 2011' and encourage manufacture and use of qualified substitutes to plastic carry bags by way of granting subsidy to the manufacturers at least to begin with. The loss of revenue on this account may only be a fraction of the expenses incurred by the State and individual citizens on curbing the pollution of the environment and on maintaining sanitation, hygiene and health and curing the diseases caused as a result there of. Qualified substitutes include biodegradable plastic bags, cotton bags with carrying function and paper bags made of recyclable paper.
Page 17 of 29
Evolving a tax preferential policy to manufacturer of biodegradable plastic bags and substitutes to plastic carry bags may also be explored. The totally biodegradable plastic bag is less competitive than the non-biodegradable or partially biodegradable ones for its high-tech, high production cost and small scale. Therefore the government may consider to evolve a policy to encourage production of totally biodegradable plastic bags.
24. Creating more awareness among the general public on the ill effects of indiscriminate use of plastic carry bags and encourage them to go for alternatives The efforts made by the respondents by making a good beginning in creating awareness among the general public in the state of Madhya Pradesh on the harmful effects of plastic carry bags, are appreciated. Nevertheless, there still leaves much to be desired. Public awareness on environmental protection by using alternatives to plastic carry bags has to be enhanced and efforts have to be sustained. Apprising children in schools and colleges, general people by way of documentary on television & radio, talks in Gram Sabhas of Panchayats and through banners and hoardings in towns among others.
Strict implementation of rule 10 of the 'Rules of 2011' by the local bodies to make the general public pay the cost of the plastic carry bags will definitely help in reducing the consumption of the material consequently reducing the pollution. It may also be considered to impose a kind of tax on the use of plastic bags to create value for the plastic bags. It makes the public value the product more. So it can be reused and recycled. Even a sticker on the vehicle to remind people to carry a bag / basket before leaving home can prove useful.
Further, the challenge facing before the authorities is to improve the solid waste management system and address littering habits of masses by educating Page 18 of 29 them and creating awareness on the ill effects of pollution caused as a result there of. The solution also lies in segregation of waste at source i.e. at home and arrangement for recycling of all recyclable waste.
25. Imposition of ban on the manufacture and use of plastic carry bags Some of the countries in the world and some States and Union Territories in India have completely banned the manufacture and use of plastic carry bags. Governments around the world are dealing with the plastic bag menace in different ways. Bangladesh imposed an outright ban on all polyethylene bags in the capital, Dhaka. Bangladesh was the first country to ban plastic bags in 2002 amid worries that they were blocking drains during the monsoon.
The ban in Bangladesh has led to a revival of the jute bag industry and other sustainable and biodegradable alternatives in the country. Other countries have since moved to ban, discourage or promote the reuse of plastic bags, hundreds of billions of which are consumed each year. Denmark and Ireland have both experimented with taxing plastic bags. Imposition of tax, imposed in Ireland, had reduced usage by more than 95%.
The term "white pollution" has been coined in China for the tumbleweed of polythene blowing on the streets. In China about 2 billion plastic bags are used each day. To combat the growing problem of plastic bags in China, the government is planning to introduce a "bag tax" in a bid to help cut the demand for plastic bags and raise more money to tackle the pollution caused by the bags.
Denmark employs a general waste tax that has proven to be very successful. The waste tax is differentiated so that it is most expensive to landfill waste, cheaper to incinerate it and tax-exempt to recycle it. It has been called a "green" tax on packaging and plastic bags.
Page 19 of 29
Taiwan has introduced a ban on the distribution of free single-use plastic bags by government agencies, schools and the military. The ban was expanded to include supermarkets and department stores, and to be applied later to street vendors.
Some of the States and Union Territories in India such as Tripura, Chandigarh, NCT of Delhi have imposed total ban on manufacture, store, import, sale or transport of polythene/plastic carry bags by invoking the powers vested with them under the Environment (Protection) Act, 1986. When such ban imposed by the Union Territory of Chandigarh was challenged, in it's combined judgment dated 08.08.2013 in O.A. No. 26 of 2013 (THC) in the matter of Goodwill Plastic Industries Vs. Union Territory of Chandigarh and Others and in O.A. No. 53 of 2013 (THC) in the matter of Jarnail Singh & Anr. Vs. Union Territory of Chandigarh and Others, the Principal Bench of this Tribunal dismissed the Original Applications by upholding the notification dated 30th July 2008 issued by the Administrator, Union Territory of Chandigarh.
The Tribunal observed that environmental consequences of such plastic waste in solid waste are well known as it takes hundreds of years to degrade and fill up landfill sites. Plastic litter can also lead to clogged drains, which result in sanitation, flooding and sewage problems. Many countries have largely replaced the use of plastic bags by either switching over to re-usable bags, bio-degradable or compostable bags, but in India share of plastic waste in total municipal solid waste has risen from around half per cent in 1996 to over nine per cent in 2005. Almost half of this waste comprises used plastic bags and packaging material. The Tribunal further observed as follows.
"Further in view of our above discussion, we also consider it appropriate to direct the authorities concerned in all the States to explore the possibility of introducing use of biodegradable or compostable plastic bags as opposed to polythene/plastic bags of any thickness".
Page 20 of 29
The respondent authorities in this case also shall take cognizance of the above observations of this Tribunal and prepare and implement a time bound action plan to completely dispense with the use of non bio-degradable carry bags in the States of Madhya Pradesh, Chhattisgarh and Rajasthan.
26. Looking to the magnitude of the problem there is a necessity now for the authorities and more particularly, the Pollution Control Boards and the State Governments in all the three States of Madhya Pradesh, Chhattisgarh and Rajasthan to even consider the need for imposing a ban on the manufacture, sale and distribution of poly carry bags and making certain areas which are highly polluted to be declared as 'plastic and polythene free zones'. The Union Territory of Chandigarh and the State of Tripura have already issued notifications to this effect. Some of the Cantonments in the country are successfully observing the plastic and polythene free zones. Such examples can be followed even in the civilian areas.
27. As we have stated earlier herein above, what we have stated here and discussed shall apply not only to the city of Gwalior or other cities in the State of MP but also to the cities and towns situated in the States Rajasthan & Chhattisgarh over which this Bench exercises its jurisdiction. We would therefore direct the Registry to send copies of our judgment to all the three State Governments and Pollution Control Boards in these three States for compliance and putting the same before the State level Advisory Body constituted under Rule 11 of the 'Rules 2011'.
28. As already stated under paras 4 to 17 supra, we perused the replies and compliance report submitted by the respondents. From the compliance report of the respondent no. 8, we find that steps for implementation of the provision of the Plastic Waste (Management & Handling) Rules, 2011 have been indicated and Page 21 of 29 directions also issued but we cannot lose site of the fact that in the city like Bhopal where there is a population of about 20 (twenty) lakh who regularly on a daily basis generate waste, there are hardly about 2000 (Two thousand) workers involved in waste removal and sanitation. This is generally so with respect to most of the municipalities where the population to municipal employee ratio has increased vastly over the years. It is, therefore, to be considered by the Municipal Authorities whether with such a meagre work force and limited infrastructure facility, is it possible to effectively implement the 'Rules of 2011' with regard to Plastic Waste (Management and Handling). The local authorities must consider whether there is a need for increase in the infrastructure and resources for the aforesaid purpose and take action accordingly. The excuse of financial constraints must be weighed in the light of the expenses to be incurred both by the State as well as individual citizens on problems of health and disease as a result of pollution and unhygienic sanitary conditions created as a result of mishandling of waste and consequent pollution of air, water and soil. It hardly needs to be stated that the scales shall weigh heavily in favour of protecting the health of the citizens, as life is more precious and Article 21 of the Constitution mandates that.
29. Another point that came up during the hearing was the difficulty in carrying out searches and raids by the municipal authorities who were entrusted with the aforesaid task of regulating the distribution and sale of prohibited category of poly / plastic carry bags under the rules.
We also find that in some cases conducting of searches and seizure of sub- standard poly carry bags from retailers / wholesalers is taken up after a long gap and probably only when there is intervention by the Courts. This has to be done on regular basis. These searches we have found are very few and far in between. The municipal authorities who are in the saddle with the aforesaid responsibility under Page 22 of 29 the 'Rules of 2011' must carry out the aforesaid task on a regular basis and even on surprise basis. As a matter of fact such petitions need not even be filed before us or the courts if the authorities under the rule i.e. the Municipal Authorities, the State Pollution Control Boards and the State Level Advisory Bodies were effectively performing their duty. Also of there was any shortcomings, the Central Pollution Control Board to whom annual reports are sent under rule 12 of the 'Rules of 2011', could have given its suggestions to the Central Government if something more was required to be done by way of inclusion in the rules or their amendment.
30. While we have emphasised the need for implementation of the 'Rules of 2011' it is also necessary that awareness drive must be carried on regular basis for making the public aware about the hazard as a result of indiscriminate use of plastic and polythene carry bags and not discarding them in a proper manner. This is also a statutory duty under rule 6(c) (v) of the 'Rules of 2011'. While we find from the letters circulated by the Government of M.P., Urban Administration and Development Department on 17.10.2013 after this matter was taken up by us on our suggestion for creating awareness amongst the school children, the Government may consider incorporating a chapter in the subject of 'Environment' in the syllabus at School / Board level on the hazards of pollution as a result of indiscriminate use of plastic carry bags and other pollutants as also what is the substitute and alternative for the same which is biodegradable and cost effective and environment friendly. We have noted that during the recent festival season of Diwali on our suggestion some of the Municipal Boards had made available environment friendly carry bags made out of recycled paper and biodegradable material and stalls for the same had been put up in some of the markets in the city of Bhopal. This was a good step and needs to be followed and pursued on a Page 23 of 29 regular basis in all towns. The Municipal Authorities along with Local Administration and Handicraft Boards as well as Department for Small Scale Industries may take up incorporation of such work in MGNERGS schemes which may be more useful and constructive by providing raw material for manufacture of environment friendly biodegradable carry bags and bags made out of recycled material. This would not only generate employment but also curb the menace created as a result of the use of polythene carry bags and plastic and ensure marketing of such environment friendly bags and make them easily available through such stalls in each market place, as there is a need for the customer to carry the material purchased from the shop to his home.
31. In issues relating to Environmental Pollution apart from other consideration recognised in India and internationally such as Absolute Liability of Polluter, Polluter Pay principle, Precautionary principle, Public Trust Doctrine, the concept and principle of the "Extended Producer's Responsibility" has come to be well recognized.
Even under the Plastic Waste (Management and Handling) Rules, 2011 framed in exercise of the powers conferred by the Environment (Protection) Act, 1986 this principle of "Extended Producer's Responsibility" (EPR) has been given a statutory Recognition.
Rule 2(g) of the 'Rules of 2011' defines EPR as follows:
"means the responsibility of a manufacturer of plastic carry bags and multilayered plastic pouches and sachets and the brands owners using such carry bags and multilayered plastic pouches and sachets for the environmentally sound management of the product until end of its life" Under Rule 4(b) of the Rules of 2011, the Prescribed Authority has been defined. For the purpose of "enforcement of the provisions of these rules relating Page 24 of 29 to the use, collection, segregation, transportation and disposal of plastic waste the prescribed authority shall be the Municipal authority concerned."
After having defined the Prescribed Authority as the Municipal Authority for collection, segregation and disposal of plastic waste under Rule 6 of the 'Rules of 2011', it is interalia provided under clause (c) to ensure safe collection, segregation and disposal of the plastic waste and to ensure that no damage is caused to the environment in the process. What seems not to have been noticed so far by the authorities is that under Rule 6(c) (iii) the Municipal Authority is empowered for the purpose of the above to involve the manufacturers for ensuring setting up of collection system of plastic waste.
This is further emphasised under Rule (6) (c) (iii), which provides : "The Municipal Authority shall be responsible for setting up, operationalisation and coordination of waste management system and for performing the associated functions namely ;
(iii) "to ensure setting up of collection centres for plastic waste involving manufacturers".
Under rule 6 (d) the Municipal Authority can involve the EPR principle against the manufacturers individually or collectively for the purposes of these rules including providing finance.
Looking to the above provisions in the rules, the Municipal Authorities are empowered to involve the Manufacturers of plastic/poly carry bags in the above task of collection and disposal of Plastic waste if in its considered opinion and sound discretion the problems caused by use of poly carry bags has assumed uncontrollable and gigantic proportions.
32. Given the present scenario and the volume of plastic waste and pollution generated as a result of its manufacture, sale and distribution as well as use the Municipal Authorities have to ask themselves whether they (Municipal Page 25 of 29 Authorities) have been able to satisfactorily carry out their task of segregation, collection and disposal of the plastic waste in accordance with the 'Rules of 2011'. Given the data available and conditions prevailing on ground reality the answer is in the negative. In such circumstances, it is surprising that the Municipal Authorities have failed to discharge their statutory obligations and duties by not invoking their power and jurisdiction conferred by the 'Rules of 2011' more particularly with respect to involving the manufacturers in the process.
33. The time has come when the concerned Principal authorities and the respective State Governments and more particularly in the Local self and Urban Development department as well as the Pollution Control Boards of the States to apprise the Municipal Authorities to invoke their powers under Rule 4 read with Rule 6 of the 'Rules of 2011' and direct the Manufacturers to set up a collection mechanism for the plastic and poly carry bag waste and provide finances as well under EPR. We would therefore direct the respective State Governments of Madhya Pradesh, Rajasthan and Chattisgarh by sending a copy of this order to them and the Pollution Control Boards of these three States to ensure compliance of the Plastic Waste (Management and Handling) Rules, 2011 more particularly Rules 4 and 6 thereof. The modalities for the same shall be brought into force within a period of three months from the date of issue of this order. This is apart from other regular measures to be carried out by the respective authorities as provided under the 'Rules of 2011'.
34. We would also like to emphasise that under the 'Rules of 2011', under Rule 6, the provisions of various rules mentioned therein as well as procedures to be adopted by the Municipal Authorities are required to be incorporated in the Bye Laws of the Municipalities. However, we have not been apprised whether the compliance of the rule 6(g) has been made so far in any of the three States. It shall Page 26 of 29 be the responsibility of the respective Sate Governments to ensure the compliance of the above provisions and apprise the Municipal Authorities in their respective States to incorporate the above procedures by either amending the existing bye laws or frame new ones and bring into force the bye laws to this effect so as to comply the requirement of the 'Rules of 2011' within a period of three months.
35. Under rule 9 of the 'Rules of 2011', every manufacturer of plastic carry bags, multilayer plastic pouches, sachets needs to be registered with the Pollution Control Board by submitting the information as per Form-I.
Under clause (c) of rule 9 no manufacturer can carry out the activity without prior registration and that requires compliance of the Air and Water Acts of 1981 (Act 14 of 1981) and 1974 (Act 6 of 1974) and the rules made thereunder Rule 10 of the rules mandates that no carry bags shall be made available free of cost by retailers to consumers. It is the duty of the Municipal Authority to determine and notify the minimum price of the carry bags depending on their size and quality which also inter alia covers the taking into consideration of the "waste management costs".
We do not find that sufficient compliance of these provisions has been made. In case the cost or price of the carry bag is fixed also taking into account the cost of waste management and particularly collection by the authorities and is made prohibitive it may discourage the consumers from asking for the supply of carry bags which are in practice given free of cost. The amount which would include the cost of waste management and collection in particular should necessarily reach the Municipal Authorities for being utilized for this purpose.
Thus the State Government, the Pollution Control Boards and the Local Municipal Authorities should work out a mechanism for recovering this cost for Page 27 of 29 waste management and is included in the price at the initial stage of the manufacture itself. This would be simpler as after leaving the place of manufacturer the plastic carry bags would have changed several hands.
36. Considering all the above and the directions already issued by the concerned authorities of the state of Madhya Pradesh and the initiatives which have been taken by the MP Pollution Control Board have been conveyed to all the concerned parties and the District Administration of all the districts in the state and as they require some time for full implementation of the 'Rules of 2011', we dispose this petition at this stage.
37. However, we consider it to be appropriate to direct the Secretaries, Urban Development and Administration Department and Pollution Control Boards of all the three States i.e. Madhya Pradesh, Chhattisgarh and Rajasthan to closely monitor the implementation of 'Rules of 2011' in their respective states and shall file affidavit separately on the progress made in this regard on strict implementation by way of quarterly reports beginning with quarter ending with 31st March, 2014 and ending with 31st December, 2015 for the next two (2) years hereinafter, in the Registry of National Green Tribunal, Central Zone Bench at Bhopal along with copy of report sent to the Central Pollution Control Board under rule 12.
38. The applicant as well as the intervener Respondent no. 10 are at liberty to approach this Tribunal as and when they have sufficient evidence to prove that the respondent authorities have shown indifference in implementing the 'Rules of 2011' and breached the orders of this Tribunal. Liberty is also given to the State Governments and Pollution Control Boards of Rajasthan and Chhattisgarh States to approach this Tribunal in case they deem it necessary to seek any clarification or intervention.
Page 28 of 29
39. The parties to bear their own costs. Application No. 04/2013 stands disposed of.
40. The Registrar, Central Zone Bench, National Green Tribunal, Bhopal is directed to send copy of this judgment to the Chief Secretaries of Madhya Pradesh, Chhattisgarh and Rajasthan as well as Member Secretaries of Pollution Control Board of all the three states for compliance.
List for compliance report only on 31.05.2014.
(Mr. Justice Dalip Singh) Judicial Member (Mr. P.S.Rao) Expert Member Bhopal;
November 11, 2013 Page 29 of 29


Raonic withdraws from Canada’s Davis Cup team
LONDON, Nov 12 — Canada’s Davis Cup Finals hopes suffered a blow when Milos Raonic withdrew from the team yesterday with a back injury.
The 28-year-old former world number three will be replaced by 94th-ranked Brayden Schnur for the week-long event in Madrid.
“It is very hard and disappointing for me that I will not be able to represent my country at Davis Cup,” he said in a statement issued by Tennis Canada.
“My health has continued to let me down through this entire year and now once again. I will take the appropriate time to get healthy and I look forward to being back on court next season.”
Even without Raonic, Canada have a strong squad with world number 15 Denis Shapovalov and fellow youngster Felix Auger-Aliassime, ranked 21st, both making the trip.
Canada are one of 18 nations contesting the first edition of the Davis Cup since its radical revamp.
They will be in Group F with the US and Italy.
“I believe in my team mates, and I know they’ll give everything to secure Canada’s first Davis Cup title.
“I’ll be following them very closely and I wish them the best,” former Wimbledon runner-up Raonic said.
Ties will consist of two singles and a doubles with the top team from each group and two best runners-up progressing to the quarter-finals. Round-robin matches begin on Monday with the final on Sunday Nov. 24. — Reuters


--- layout: home search_exclude: true profile: align: right image: prof_pic.jpg address: >
555 your office number
123 your address street
Your City, State 12345


A bit about me
- 12 years of commercial exp in IT
- 10 years mostly with Ruby
- Interested in quality-assurance automation and software architecture
- KRUG organizer
- Conference speaker
- Former PK student :-)
I <3 Open source
- Karafka
- Trailblazer
- Ruby-Kafka
- Dry ecosystem
- ... and few other
Please notify me if...
- I speak 2 fast
- I should repeat something
- I should explain something better
- You have any questions
I will be talking mostly in the Ruby context but the same applies to any other OOP language
In the end, all of it is just (more or less) OOP
Basics
OOP comes from software that runs simulations
programs = objects + messages
or
programs = objects + messages
Basics
- Inheritance - a way to reuse code of existing objects, or to establish a subtype from an existing object
- Encapsulation - the art of hiding of data implementation by restricting access to accessors and mutators.
- Polymorphism - Fruit can be eaten, as a general rule, but different types of fruit is eaten in different ways.
- Abstraction - Data abstraction is nothing more than the implementation of an object that contains the same essential properties and actions we can find in the original object we are representing.
A bit of history and stuff
- Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects"
- They may contain data (attributes) and code (methods)
- Objects have a notion of "this" or "self"
- In OOP, computer programs are designed by making them out of objects that interact with one another.
A bit of history and stuff
- It's been with us from early 1970
- "Object Oriented" by Alan Kay
- 1980s - Smalltalk
- 1980s - Hype Driven Development for OOP
- 1990s - Boom on Java, PHP, C++, Ruby and so on...
A bit of history and stuff
- Gang of Four design patterns
- ORMs (Object-Relational Mapping)
SOLID base
- Single responsibility principle - every module or class should have responsibility over a single part of the functionality
- Open/closed principle - open for extension, but closed for modification
- Liskov substitution principle - if S is a subtype of T, then objects of type T may be replaced with objects of type S
SOLID base
- Interface segregation principle - no client should be forced to depend on methods it does not use.
- Dependency inversion principle - High-level modules should not depend on low-level modules. Both should depend on abstractions.
But do people undestand and use this?
It all sounds great!
So, what's wrong with Object Oriented Programming?
"I made up the term 'object-oriented', and I can tell you I didn't have C++ in mind"
Alan Kay
OOP promises graceful transition from domain models to implementation
Instead we have tons of unrelated technologies and patterns in a single project
(xml, json, ruby, css, js, typescript, sql, nosql, ..)
One of the key features of OOP (in 1980s) was the possibility to use it from domain modelling through analysis and design down to the implementation
Code often does not represent a current state but a whole history of transformations of the business behind it
Developers spend more time reading than writing
OOP code often does not reflect runtime behaviours so you have to play with it
Software changes but there aren't many mechanisms that enable changes for OOP ecosystems
Not always possible to map reality 1 to 1 with the code (software languages limitations, etc)
Everything is overused...
Inheritance is overused
The Fragile Base Class Problem
Encapsulation is overused
The Reference Problem
Objects are passed to functions NOT by their value but by reference.
ORMs play nicely with OOP, right?
As long as you're a system God
Try to use ORM to integrate with a preexisting 500 tables SQL based DB
ORMs play nicely with OOP, right?
Instead of modelling data you just match it with objects
And this happens for SQL databases that aren't object oriented
OOP data type definitions are spread out all over the place
Objects have private states
State is the root of all evil. In particular when combined with functions with side effects
Everything has to be an object
In an OO language “time” has to be an object. But in a non OO language a “time” is a instance of a data type.
Data structures and functions should not be bound together
Since functions and data structures are completely different types of animals it is fundamentally incorrect to lock them up in the same cage.
What's wrong with MVC the way it is?
The way almost all MVC frameworks are being taught
- The framework "way" is the best way
- Fat models
- Slim controllers
- Models to rule it all
- It's supposed to be object oriented programming - so let's make models validate themselfs
- States, everywhere states
- It can happen even if you don't know about it (callbacks)
You need a framework to program in a given language
# Gemfile
source 'https://rubygems.org'
gem 'rails', '5.0.1'
%w(
rails
active_model/railtie
active_job/railtie
active_record/railtie
action_controller/railtie
action_mailer/railtie
action_view/railtie
sprockets/railtie
).each { |lib| require lib }
# Yeah now I can program...
@some_object.try :test
The MVC framework way is the best way
- It's blazing fast at the beginning
- Easy to add new features
- Just test prototypes and it's production ready
The MVC framework way is NOT the best way
- Business loves not only features
- But also predictability
- Monolith by design
- A lot of magic
- Model level associations and relations
- Non-trivial business logic in models, controlers, views and (horrible!) callbacks
Fat models
Fat models
- "Great" for everything
- Validations
- Presentation
- Relations
- Persistance
- Scopes
- Translations
- Callbacks
- Triggers
SRP?
Fat controllers
Fat controllers
- "Great" for everything
- Validations
- Presentation
- Relations
- Persistance
- Scopes
- Translations
- Callbacks
- Triggers
- Data filtering
- Authentication
- Permissions and policies
SRP?
Models don't care about context (unless explicitly given)
- Hard to build multi non-related model forms
- Magic behind ORMs triggers weird things
- "Let's build in a way that will remove everything with a user" automatically
States, everywhere states
if @model.valid?
else
if @model.errors[:xyz].present?
else
end
end
if @model.status == 'available'
else
end
Callbacks
Most of these problems aren't Object Oriented Programming Language specific
Most of these problems aren't Object Oriented Programming Language specific
They are Object Oriented Programmers specific
Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations
Melvin Conway
It's always been like that, why should I care?
Code is the reflection of programmers that make it
God objects from god people
Everybody wants to be in a process and make decisions
What we can do about it all?
- Stop using OOP?
- Stop using frameworks?
What we think we can do about it?
- Introduce some other layers (policies, services, presenters, validators, uploaders, jobs, etc)
- and... NOT bind most of them to any particular context
What we can REALLY do about it?
Domain experience is super important for problem solving
What we can REALLY do about it?
Domain specific languages and ubiquitous language
What we can REALLY do about it?
Rather than modeling code we need the code to be the model
What we can REALLY do about it?
Bubbles and arrows don't crash - thats why modeling tools are so popular
What we can REALLY do about it?
Architecture is one of the most important artifacts of a system and yet it is not easily recoverable from the code
What we can REALLY do about it?
CQRS (Command Query Responsibility Segregation)
What we can REALLY do about it?
Event sourcing
What we can REALLY do about it?
Railway-oriented programming
Stop worrying so much about the objects. Concentrate on satisfying the principles of object orientation rather than object-izing everything. And most of all, consider the poor sap who will have to read and support this code after you're done with it
True "object" oriented programming is about modeling computers and software in terms of HUMAN/USER mental models, rather than being just a tool for PROGRAMMERS.
Never stop learning - new languages/libraries bring new concepts
Be agnostic
Building complex systems around agnostic solutions is much easier
What is Kafka?
A distributed streaming platform
A high-throughput distributed messaging system
What is Kafka?
-
Kafka is designed to allow a single cluster to serve as the central data backbone for a large organization
-
It can be elastically and transparently expanded without downtime
-
It provides broadcasting to many applications
-
Allows to build systems that are event based
Who uses Kafka?
- Linkedin
- Yahoo
- Twitter
- Netflix
- Square
- Spotify
- Pinterest
- Uber
- Tumblr
- Cisco
- Foursquare
- Shopify
- Oracle
- Urban Airship
- OVH
- And many more...
How Kafka works?
How Kafka works?
How Kafka works?
- Batch processing
- Multi batch transactions
- In memory DDD sagas
- Piping data between clusters
Batch processing
Batch processing
It gives you possibility to work with and to transform data in many new ways.
Multi batch transactions
Imagine a transaction that lasts across thousands of requests
Transaction for which you need no new persistence layer until you get all the data you've needed
Multi batch transactions
def perform
buffer << params_batch.map { |param| param[:event] }
if buffer.size >= FLUSH_SIZE
data = buffer.shift(FLUSH_SIZE)
Event.import(data)
end
end
def buffer
@buffer ||= []
end
Multi batch transactions
buffer = []
customer_id = 1
params_batch.each do |params|
next unless params[:customer_id] == 1
case params.fetch(:type)
when 'add_to_cart'
buffer << params
when 'complete_purchase'
Events.import(buffer)
consumer.mark_message_as_processed(params)
buffer = []
end
end
Params lazy evaluation
This is super useful when filtering data based on Kafka metadata
How does it work?
Railway-oriented programming
The flow pipetree is a mix of the Either monad and Railway-oriented programming
Railway-programming - how does it work?


number
(represents both Integer as well as Floating-Point numbers)
1028
boolean
(Represents true and false)
true
string
(It is used to represent a sequence of characters)
"Hello, world!"
any
(variable is declared
with any data-type then any type of value can be assigned to that
variable)
any
void
(Generally used onfunction return-types)
void
null
(It is used when an object
does not have any value)
null
undefined
(Denotes value given to
uninitialized variable) undefined
console.log("Hello, world!");