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. Constructor.
  3. Nested classes.
  4. Everything else.

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

  1. Variables
  2. Functions
  3. Everything else

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

  1. Abstract
  2. Public
  3. Private

Friday, October 15, 2021

Options 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.
Ash

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

Stone

Fill potholes on the road.

Used motor oil

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.

Fabric

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.
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.

Carpet

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.

Clothes

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.

Metal

0_Any_Metal

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.

Barrel

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.

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.

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.
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.

Leafs from trees

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

Sand

Filler for the toilet. See infra.

Soil

Filler for the toilet. See infra.

Urine

It should be used somehow, nope?

Paper

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

Cardboard

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.

Filler for the toilet. See infra.

Heat insulation. Cardboard is officially recognized as agood 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.

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.

Envelopes

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.

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.

Plastic

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.

Floss

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.

Polyethylene 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.

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.

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

Crush it and fill puffer jacket or house walls with it. Styrofoam is known as a great heat insulation material.

Sheets

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.

Tape

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 - wf 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.

Toothbrush

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.

Rubber

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.

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.

Water

Rain

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

River

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.

Wood

Branches

Broom

Wood sheets

Putty board.

Wood sticks

Fire fuel.

Pallets

Chairs

Bed.

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.

Gloves

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

Handkerchief

As a handkerchief (one time use or multiple times), the following can be used:
Fabric.
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

Cardboard.

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.

Toilet

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.

Film.

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.