Sunday, October 17, 2021

Software development conventions

No comments

We use proper variable names instead of comments. The only exceptions for comments are "//TODO" temporary labels.

Order of class members in within the class definition

Internet suggests multiple ways for ordering and sorting members, and I follow neither of them. It is up to everybody to choose his/her own way of sorting members. It is not important how we sort members; rather it is important how consistently we follow our chosen methodology. So my way to sort members is as follows:

  1. Inherited (overridden) members from the parent class.
  2. Everything else.

In within of each of these, items are sorted as follows:

  1. Variables
  2. Init{} block
  3. Constructors(){}
  4. Functions(){}
  5. Everything else

In within of each of these, items are sorted as follows:

  1. Abstract
  2. Public
  3. Private
  4. Everything else

Friday, October 15, 2021

How to reuse trash at home

This post is an extension for the main philosophy for the Reuse section of Reduce, Reuse and Recycle post.

Garbage types for reuse

0 Unsorted (Ungrouped) types of garbage

0 Any type of garbage

Art objects. Creativity provides great space for producing art objects out of trash,
Repair. Instead of getting rid of old broken stuff, we can just repair it. YouTube provides plenty of tutorials about how to repair almost anything. The only limits are time and motivation.

Toothpaste. Ash is known as healthy, free and natural mean to clean teeth. 

Chewing gum

Fill in holes on the road and on the wall. When dried, chewing gum becomes hard enough.


Fill potholes on the road.

Used motor oil

Boots and shoes. For shoes made of leather, we can treat this leather with used motor oil. Though caution is to be made: official manufacturer discourage us from doing this, because used motor oil is toxic.
Fuel. Oil can be burn in fire to cook food etc.
Oil for the chain of the chainsaw. Chainsaw uses two different oil types in it's two separate tanks. First tank is for gas mixed with good oil (not used motor oil). Second tank is for chain oil, which does not require high quality of the liquid. So we can add used motor oil for the chain.
Paint the wooden fence. To prevent wood from being rotten as a result of water.


0 Any fabric

Pockets enforcement. We can sew up old piece of fabric to the pockets. This can be done from the interior side of the pants. Such sewing would make pockets stronger. This is useful when something valuable is stored in the pocket e. g. keys. So otherwise keys could cut the pocket and fall out, we don't want this to happen.
Bags. Sew up fabric bags (for groceries).
Car seat cover. Fabric can be sewn together to make a cover for the car seat.
Door mat. To keep the house clean.
Filler for the toilet. See infra.
Floor cloth. To clean up the floor.
Handkerchief. Fabric can be cut into small pieces for handkerchiefs. Unlike paper soft tissue, handkerchiefs can be washed and used multiple times.
Packaging material. Like any flexible substance.
Sew on to other clothes. To make them warmer and stronger.
Threads. Fabric is made of threads. Thus, thread can be extracted from the fabric, and then later used to sew something up 


Sew on to the backpack. In the area of seams. To make it stronger.


Bed base. If we sleep on the floor, carpet can make it warmer and softer.
Picnic and camping. E. g. instead of yoga mat.

Packing and amortization. Carpet serves as a great protection or cargo during transportation. E. g. furniture and appliances could be covered with carpets to protect them while in the truck trunk.


Donate or even sell. Via the Craigslist, Facebook Marketplace or any other local advertising board.
Make lighter clothes. E.g. cut shorts out of pants. Or sleeveless shirt out of a shirt. Often we can adjust size when cutting. E. g. if pants are too big for us, we can cut them to shorts and shorts would look good.
Cut and convert:
Good thing is we can adjust size after cutting clothes.
Pants could be cut and converted to shorts.
T-shirt could be cut and converted into sleeveless T-shirt.
Warm up existing clothes. Old puffer jacket could be not so warm because its cotton wool is crumpled up as a result of wear and tear. Then, we can sew up old jacket inside of the existing puffer jacket, to warm it up.



We can make a bit of money by bringing metal to the recycling center. Just need to collect enough metal because otherwise our earnings would be less than a gas cost.


Heat insulation. Aluminum foil is well known heat insulation material. Aluminum is lightweight and flexible - thus we can sew it up to the interior side of the clothes.


Table. Instead of buying new furniture, we can convert existing barrel into a chair or a table.

Garbage bin

Car, van, truck

Dwelling. Though the car might not run, its body can still be waterproof. Especially if it is a big car like a van or a truck. 
Shed. The logic is the same as for the dwelling supra.
Sell for scrap. Scrap yard pays money and sometimes picks up old cars.

Container (shipping container)

Usage is the same as for old cars supra.

Organic waste

Organic waste includes food leftovers and our toilet sewage.

0 Any Organic Waste

Dig into the ground. There is nothing bad to dig the organic waste into the ground. It was part of nature, it is part of nature, it will come back to nature. Then nature will take care of that. Nature better knows what to do with our organic waste. Nature better knows what to create out of our organic waste. Advantage of digging organic waste into the ground is cost savings for garbage trucks and sewer utility bills. In turn, garbage truck will not pollute nature with its gas exhaust.

Compost and Fertilizer. For those who have a yard, organic waste is a perfect fertilizer. Even without a yard, edible mushrooms can be grown in the apartment, fertilized with organic waste. Compost can be sold also.

Filler for the toilet. See infra.

Fodder. Food for farm animals. Grass, watermelon and banana peels can be cut into small pieces. So chicken can eat it. So do pigs.

Spices. Many types of the grass are bitter. Others are spicy. It can be dried also to preserve for future use.

Avocado seed

Fill potholes on the road.

Banana peels

Filler for the toilet. See infra.
Cleaning foam. We can clean some dirt by rubbing it with a banana peels. We can clean most flat surfaces with them: toilet, bath, kitchen sink etc. We can clean dishes also.
Toilet paper. Use internal side of the peel, not the external one. Unlike tree leaves, banana peels are not dried fast and can be saved for a longer time. Their internal side presents natural organic foam that absorbs all the leftovers from the skin better than the regular toilet paper. At the same time, banana is soft like baby wipes because it is naturally wet, again unlike the regular toilet paper. Though to prevent mold and rot, it is better to store them in the fridge.

Coffee grounds

Abrasive cleaner. Credits to this video.
Odor remover.
Against mosquitoes. Rumors are, mosquitoes do not like coffee smell.
Add to baking. Coffee adds some taste to cookies. 

Leafs from trees

Toilet paper. Especially if soaked with water.
Fuel for fire.


Filler for the toilet. See infra.


Filler for the toilet. See infra.

Tea leftovers

Odor remover.


It should be used somehow, nope?


Under the paper category I put everything made of paper: packages, used paper after writing and painting, envelopes (see also infra).

Any paper

Cellulose for planting mushrooms.

Envelopes. With glue or tape, we can stick envelopes out of the paper or cardboard. We can do paper folders also.

Fuel for fire. Especially to start fire - paper burns perfectly.

Napkins and Handkerchiefs. If crumpled.

Compost. Most types of paper are compostable (except for colored paper and glossy paper).


Bed base. If we sleep on the floor, cardboard can make it warmer (though not softer).

Bottom of the backpack. I can cut the cardboard and put it inside the backpack, to its bottom. So all the stuff in the backpack is now protected against falling and dropping. Especially if I have some valuable stuff in the backpack such as the laptop etc.

Car seat cover. Cardboard is usually big enough to cover the major part of the car seat. 

Enforce paper envelopes, cardboard envelopes (folders).

Filler for the toilet. See infra.

Heat insulation. Cardboard is officially recognized as a good heat insulation material thanks to its structure. It contains empty spaces of air in between paper lawyers. So I can stick cardboard sheets to the wall to make my room warmer. I place it on the floor if I sleep on the floor to make my "bed" warmer. In extreme cases, I can cover myself with cardboard while sleeping, or sleep in the big cardboard box (like the one for the fridge). Homeless people do it that way to stay warm at the street.

Mouse pad

Packaging material. Cardboard also can be used as a packaging material.

Protection for anything. Basically cardboard is perfect material for protecting literally anything. I can cover my laptop with cardboard or any other type of appliances. So I am not afraid that my staff would be damaged as a result of falling down to the floor.

Putty board.

Tablecloth. Especially when camping. Tablecloth or one time dish place. Useful for fatty and oily food, to protect the main table surface.

Clean paper 

Clean paper means paper where at least one side is clean.

Dirty paper. Clean paper firstly can be used as a dirty paper if there is lack of dirty paper.

Envelopes. If there is lack of envelopes, we can make an envelope out of the clean paper. With a tape or glue.

Filler for the toilet. See infra.

Print and paint. So we can use it again to print something, make a label for the section of the dresser, make a note, paint etc.

Dirty paper

Dirty paper includes any paper where something is printed on the both sides. So I cannot use it to print something again, make a note, paint so etc.

Filler for the toilet. See infra.

Packaging filler. It is also the option for use of paper if it is crumped.

Toilet paper. The most obvious use of the paper is toilet paper. Nope, we don't use it dry. To make a regular paper soft, we just make it wet. Add water and it becomes as soft as baby wipes. Even cardboard can become very soft if we put it in the water for half a day.

Egg carton

Coins box. We can sort out and organize coins in the egg box.


As a paper. First of all, envelopes are made of paper. Despite that I put them in the separate category (thanks to their form), they can be used as a regular paper supra.

Envelopes. Another obvious use of the envelope is the envelope per se. We can place a new postal stamp and send the mail without buying new envelope.

Filler for the toilet. See infra.

Folders for sorting. Multiple envelopes can be used as folders to sort our stuff out. Apply the mathematical statistics law here. Every envelope has flexibility. If the envelope contains a lot of stuff then its size becomes bigger  If the envelope is empty then it is very small and thin. So if we have a box consisting of 10 envelopes, each envelope could be different in its size. However according to mathematical statistics law, the sum of sizes of envelopes (which is the size of the box) will remain relatively constant. That is very convenient for organizing and storage of our stuff. See my set of labels and envelopes here.

Trash bag. If the envelope is big enough, it can be used as a garbage bag also.

Used napkins and handkerchiefs

Toilet paper.


0 Any plastic

Compact storagePlastic can take much space when stored and not used. So we can cut it in flat sheets by simple scissors. Flat sheets joined together do not take much space. Another form can be achieved via heat gun - melt it but do not burn it. Preferably hold the breath while melting because of harmful exhaust.
Donate to recycle trash can
Repair other plastic things. With a heat gun, we can melt (weld) plastic to plastic.
Repair shoes. With a heat gun.
Melting into... clothes buttons

Bottles (plastic bottles)

Bird feeder
Broom. We can cut a bottle into stripes. Then tie them into a broom.

Cans. Any plastic bottle can be easily cut into a can for storage of something. Like bolts and nuts e. g.
Funnel. If the bottle neck is thin enough, it can be used as a funnel.
Garbage bin
Ropes. We can cut a tape from plastic bottles and use it as a rope.


Reuse as a floss again. Soak in some disinfecting liquid and reuse again. I personally do it by washing it with water after every use. My teeth are still alive.
Thread. To sew up something.

Net or screen (like mosquito screen)

Laundry bag. Bag for dirty clothes washing: the net can be sewed up into a bag. In turn, we can put our dirty clothes in the bag. Then bind one side of the rope to the bag. Bind another side of the rope to the tree at the river coast. Put the bag into the river at night. In the morning, dirty clothes will be washed. No powder is needed.

Grocery bag. Save nature by avoiding using plastic bags. Instead, use reusable bag made of screen. We can sew it up.

Plastic bags

Filler for the toilet. See infra.
Same as plastic film. Plastic bags are made of plastic film. Hence they can be used the same as plastic film.
Trash bags. Usually store plastic bags are smaller than the regular garbage bin. So we just need to find smaller bin for them.

Plastic film (polyethylene film)

Source: Plastic film can come from various types of the garbage: plastic bags, plastic (polyethylene) package etc. 

Cover for car seats. If plastic film is big enough it can be used to cover the car seats. And like cardboard the film also protects against liquids.

Heat insulation. Polyethylene  film is good heat insulation material. Film is lightweight and flexible - thus we can sew it up to the interior side of the clothes. Or crumple it. 

Plastic envelopes. With heat gun or tape, we can stick envelopes out of the plastic film. We can do plastic folders also.

Ropes. We can weave a strong rope out of plastic film.

Trash bags. We can place big piece of plastic film onto the metal ring effectively making it a trash bag.

Filler for the toilet. See infra.

Handkerchiefs. One time or many time uses.

Packaging filler. If folded(crumpled) and packed up into a plastic bag, film can be used as a packaging filler.

Staples from food

0 Source. Usually they come with food packaging.
Clothespins for clothes drying. I personally use them this way.
Staples for cable. To fix a cable on a wall using staples and pins.
Filler for the toilet. See infra.

Styrofoam (polystyrene)

Source: Packaging materials, one time dishes etc.
Heat insulation. Crush it and fill puffer jacket or house walls with it. Styrofoam is known as a great heat insulation material.
Glue. There is a way of how to make a glue out of styrofoam (polystyrene). Google it to find out more. The algorithm is as follows:
1. Prepare requisites:
- Make sure the room is well ventilated. Toxic and harmful gas will exhaust during the process.
- Get some gasoline (petrol) - a bit, half a cup.
- Get some polystyrene
- Get a small glass bowl
- Get wooden stick or plastic spoon
2. Mix gasoline and styrofoam in the glass boil. The styrofoam should dissolve as a result of interaction with gasoline. Use wooden stick to mix the styrofoam in the bowl.
This glue can be used for sticking wood to wood, glass to metal, glass to glass, plastic to plastic.


Filler for the toilet. See infra.
Putty knife. Plastic sheets are flexible enough to be used as a putty knife. They can be joined with a lid from metal can, to make the putty harder.
Protection. Small plastic sheets can be sticked together via tape, duck tape or even needle and thread. Than we can use it to enforce anything- clothes, electronics cover etc.


Bottle handlers. Apply multiple lawyers of tape around the bottle to make it stronger.

Enforcement. Both regular tape and duck tape can be used. Last one is even better and stronger.Both new (in case of surplus) and used tape can be used and reused. Used tape is still sticky and can be applied thus. Even if it is cut in small pieces or it has a glue gaps in within, we still can make a strong and reliable surface out of it. Just apply numerous lawyers one above each other. One twig is not reliable however numerous twigs build up strong broom. One thread is weak, however numerous threads build strong rope.

When multiple lawyers of tape are applied, it acts as a strong and at the same time flexible material. Flexibility results in amortization and protection from accidentally falling down or hitting. 

Strength of multiple lawyers is a known principle in manufacturing process. It is used when making plywood and fiberglass. Plywood is nothing but multiple thin lawyers of wood. Fiberglass is also made of thin fiber pieces.

It is preferred if the item to be enforced allows tape to make a full circle. E. g. a bottle or a box. Bad example is a big wall of the room - we can stick used tape there, it will be flat without a full circle, so it will not be reliable and can fall out this. 

It is better to apply tape immediately after we take it out from the previous surface. Otherwise later it becomes crumpled and difficult to unfold.

E. g. the following items could be protected:

- Glass. E. g. glass bottles etc.

- Plastic. E. g. plastic bottles, boxes etc.

- Backpack, especially it's bottom.


Painting. Used tooth brush that is not good for brushing teeth anymore can be used at home yet. We can apply  some liquids with a toothbrush such as rust converter, paint etc.


0 Any Rubber

Rubber trash could include used tires from bikes and cars. Tire protector could be destroyed or the tire could have a hole. Damaged children balls are also made of rubber.
Filler for the toilet. See infra.
Packaging filler. As any compressible stuff, rubber also can be perfectly used as a packaging filler.
Shoes sole

Tires (bike)

Band. Medical and Yoga bands are made of rubber. They are not expensive though. Anyway, the bike tire can be easily converted to a fitness exercise band.

Tires (car)

Amortization and protection for garage walls. If we put tires long the back wall of the garage, it will prevent cars from hitting and possibly breaking the garage walls when parking.
Flower bed.
Fence. Though it is not tall, it is still a fence. We can dig tires into the ground by half of it's height and the remaining half would serve as a fence.

Gloves (rubber gloves)

If we have just one cut in the rubber gloves, they still can be used with another pair of damaged rubber gloves. E. g. one pair has damaged left big finger and the second pair has damaged right middle finger. So we can just put on both pairs of gloves and finally nothing is leaking to our hands, we have double protection.

We can also cut a piece of rubber from the broken rubber gloves. Than, we use it to stick onto another broken gloves to repair it.



Washing machine. Put clothes outside and let the rain wash them.
Water collection. Will the rain barrel. For future use.


Washing machine. Put clothes in the laundry bag then bind laundry bag to the rope. Bind another side of the rope to the tree. Put laundry bag in the river. 
If there is no tree, we we can use heavy piece of metal or the rock instead. Just bind the rope to the rock or the metal so it is binded reliable. Put the rock or the metal to the bottom of the river. Need to know the exact place of the river bottom where we will take it from on the next day.
Water collection. With bottles, buckets etc, for future use.


Any wood

Cellulose for planting mushrooms.



Wood sheets

Putty board.

Wood sticks

Fire fuel.




Usage types

Cover for car seats

Especially expensive cars definitely need it. Not only natural wear and tear can cause damage to the car seat. It is easy to drop a drink on a seat. The child can be sick, nausea would my deceit dirty and damaged. I personally place a heavy cargo with my tools on the rear seat when it is free of passengers. The cargo can scratch the skin of the seat. It is especially painful if their seat is made of natural expensive skin. Following materials can be used to cover the car seat and protect it from damage:
Plastic film. Can be used for cover of cover seats if it is big enough.
Fabric. Multiple pieces can be sewn together to make the whole part of the fabric bigger.
Cardboard. Usually it is big enough to cover the major part of the car seat.


Plastic bags. As a rubber gloves for one time use.


As a handkerchief (one time use or multiple times), the following can be used:
Plastic film.
Plastic bags.
Dirty clothes.

Packaging filler

Any compressible trash can serve as a packaging filler. Just need to make sure it is dry and clean.

Putty knife

Plastic sheets.

Putty board


Wood sheet.

Sell to recycle center

The following types of garbage could be sold for money to recycle center. Getting money is the best way to use unused trash. Though amount of money is usually not so big, I could be bigger if weight of trash accumulated is big enough.

Metals. Iron is the cheay one. Aluminum and copper are much more expensive.

Cables. Because they contain valuable metal (copper).

Glass. Cheaper than metal. However glass weight is big because glass is very popular type of trash.

Plastic bottles.


Portable toilet for poop for a human can be created based on the home toilet for cats. That could be useful inside of any room/building without access to the restroom. E. g. warehouse or construction facility, house with broken sewage etc. In the forest, we can just poop on the ground and dig it into the ground. However inside of a building or facility we don't always have such an option. 

Portable toilet consists of 3 main components:

  1. Flat rectangular plastic box. It should be plastic to be water proof (because poop can contain liquid that can flow out and cause ecological and bio-chemical disaster in the room). We need a box because it has walls, and walls can protect surrounding areas of the room in case of accidental process when landing operation is not straight.
  2. Flat plastic (or made of any other water-proof and at the same time flexible material) one-time use surface. That surface is to be replaced every time. That could be plastic film, plastic bag etc. That surface lays down at the bottom of the plastic box supra. To use sheet surface as a toilet, unfold it and place to the bottom of the box. If possible, use 2 or even 3 lawyers of the sheet to provide additional protection for the floor against the poop.  Any water resistant flat surface (plane, sheet) can serve as a portable toilet for poop but not for pee. Don't use the sheet made of hard (not flexible) material like cardboard. Because it will not be easy to fold after we did our business. 
  3. Filler that is laying down on the flat surface. Filler can be any type of trash - paper, small plastic pieces, organic waste etc. Filler serves for additional absorption of the poop to prevent its spread. Filler is to be changed every time after every poop. For humans at least, not for cats lol.

Than poop in the position of an eagle. Than carefully fold the sheet and place it in the plastic bag together with the toilet filler. If possible use 2 or 3 plastic bags to provide additional protection against leaking. Than trash plastic bag in the nearest garbage container.

That type of the toilet is for poop but not for pee. For pee, males could use plastic bottles instead. For females, other means should be developed.

Sheets made of the following materials can be used as a portable one time toilet surface:

Cardboard. Though it is made of paper, it could be considered as a water resistant material just because it is fat enough.


Plastic. Could even serve multiple times if washed.

Plastic bags. They are of the same shape as plastic film.

Toilet paper

The more paper is soaked with water, the healthier and convenient it is for our skin. That's why mom's use baby wipes for babies instead of a regular toilet paper. Surprisingly, some kinds of trash are already naturally soaked and wet like banana peels. Following types of garbage can be used as a toilet paper:

Banana peels. Not needed to be soaked, they are already naturally wet (the internal side only).

Paper. No need to crumple it up. Instead, soak it with water. Don't add anything else to water to avoid possible skin allergy.

Washing machine

Rain. See supra.

River. See supra.

Sunday, October 10, 2021

How to connect an OBD device (car scanner) to an Android phone

Plug in the OBD and turn on the engine. Make sure you see the OBD device bright light is on under the car dashboard.

In the phone Bluetooth settings, connect to the "OBDII" device with the password "1234".

If the phone doesn't see " OBDII" device, try to plug the OBD device out of the car's socket and plug it in again. 

Download "Car scanner" app:

In the app, connect to the "OBD" device.

In the app, press "Engine codes"