Fun with Numbers #2

Remember back to grade school geometry when your teachers forced you to memorize the Pythagorean theorem? wonder why it works?

Imagine triangle with the legs being lengths a andpythagorean b and the hypotenuse (the longest side) c. Now we get four of those triangles for form a square.

We know the area of the outer square is (a+b)^2 but what about the interior square? What is the interior square compared to the outer one?

To find the area of the internal square we subtract the area of the four triangles. Each triangle has an area of \frac{1}{2}ab, as a result we have :

(a+b)^2 - 4( \frac{1}{2}(ab)) = c^2

a^2 + 2ab + b^2 - 2ab = a^2 + b^2 = c^2

Groups of three numbers such as \{3,4,5\} and \{5,12,13 \} are called Pythagorean triples because they satisfy the Pythagorean theorem. It is possible to generate Pythagorean triples using a set of equations called Euclid’s formula.

Software Development Life Cycle

Software development life cycle (SDLC) is a procedure used in the creation of software. It is the schedule and blueprint of a program. This model of SDLC will consist of five parts: Analysis, Design, Implementation, Testing and Maintenance.


Analyze the problem. Sit down and look at what the problem is and what the system can handle.

Design the solution.  Once the problem and resources are sufficiently analyzed, effort is now on designing a solution. At this point the programmer should consider all the possible errors and complications that come up and design against it.

Implement the solution. There is no way to create a program without actually writing it.

Test the program. This part is very important. Having good tests allow programmers to know what could potentially go wrong. Once errors and bugs are found, the programmer moves onto maintenance.

Maintain the code. Go back and fix any errors or bugs found during the testing phase. Sometimes to do proper maintenance, the programmer must go all the way back and reanalyze the problem. Sometimes it is as simple as a semicolon.


Even though this model has its flaws, it mitigates many of the issues facing beginning programmers. One of the largest is planning. Having a plan allows the programmer to spend their time more efficiently. It allows faster coding and it alleviates a good deal of stress.

The Light Bulb, advice from Thomas Edison

Thomas Alva Edison (February 11, 1847 – October 18, 1931) is considered one of the greatest inventors of all time. Innovative and daring, he secured over one thousand patents. His most memorable innovation the commercial light bulb. This is what made electric lighting a possible. Electric-Light-BulbWhen asked what it took him to accomplished this feat he responded, “I didn’t fail ten thousand times, I found ten thousand ways that it didn’t work.”

The commercial light bulb, his iconic achievement, was marked with countless hardships and challenges. A popular misconception is that Edison invented the light bulb; light bulbs already existed, but Edison made them practical. Before Edison, light bulbs were prone to overheating and burning out in mere seconds. Incandescent light bulbs work by heating a thin filament via an electric current which then emits light. Because of the heat required, filaments would quickly burn up in the presence of oxygen and some materials used couldn’t handle the heat. To top it off, Edison had competitors who worked tirelessly to make a practical light bulb.

Racing against better trained men, Edison attempts what they didn’t. He moved away from metallic filaments and experimented with practically anything, from horse hair to cotton thread to bamboo. Crazy? It worked. A cotton thread coated in carbon could last for over 13 hoThomasEdisonurs. His next innovation, the bamboo filament, lasts 1200 hours making the light bulb practical.

Edison faced many challenges. Not only did the light bulb have high requirements, he also faced competitors who, on face value, could easily outstrip him. What gave him the edge?

He didn’t give up. Even though he failed ten thousand times, he didn’t give up. His determination and perseverance made it happen.

He didn’t let failures be failures, each of his failures was a learning experience. A failed test gave insight on what needed improvement. Hence he didn’t fail ten thousand times, he found ten thousand ways it didn’t work.

The creation of the practical light bulb lead to a new industry that Edison pioneered: electricity. With increasing demand for safer electric light and robust electric power, Edison founded the Edison Electric Light company which became General Electric.

Sources used

Fun with Numbers #1

Did you know that if you took all the digits of a number and added them together and the resulting number can be evenly divided by 3, the the original number can be even divided by 3?

Confused? Lets take the number 441 : 4+4+1 = 9, and 9/3 = 3. Now 441/3 = 147. We can also try 414 : 4+1+4 = 9; 414/3 = 138. What about 312? 3+1+2 = 6, 6/3 = 2.

Does this work for bigger numbers? Well lets try 4321272 : 4+3+2+1+2+7+2 = 21 and 4321272/3 = 1440424. Wonder why? For a formal proof of why this happens go here.

If you want a quick introduction into mathematical proofs go here.

Sharing the Wonder