Sunday, 27 November 2016

Friday, 25 November 2016

How to live a happy life ?


Happiness is the art of never holding in your mind the memory of any unpleasant thing that has passed.To be happy, we must not be too concerned with others.
  • If you want happiness for an hour — read something.
  • If you want happiness for a day — learn something.
  • If you want happiness for a year — teach something.
  • If you want happiness for a lifetime — help someone else.

Wednesday, 23 November 2016

Real power of C++



I love C++ and I prefer C++ over any other programming languages when it comes to creating desktop applications. Many people are unfamiliar with the real power of C ++  and thus to make them familiar with robustness of C++, I have compiled a list of famous systems, software packages or applications and libraries written in C++ programming languages. After going through the list you will notice that most of the apps and programs you daily interact with are written in C++ code and C++ will emerge as a distinguished programming language in your eyes.

Note: This is a list of software written in C++ but also mentions some software written in C Language due to the fact that most of the programs are written by combining C and C++. In fact, it is difficult to separate C language and C++. C++ is a superset of C and it can be said as new version of C language having object-oriented features. Thus, a C language program also becomes a C++ program inevitably. Though software which is completely written in C are excluded from the list. Moreover, some of the software mentioned here may be using some other languages for some modules. For example, many operating systems mentioned below also use assembly language. Though I have tried to make the list as accurate as possible, suggestions for additions and corrections are welcome.

List based on kind of software


Operating Systems


Most of the operating systems are written in C and C++ language. These include Windows 95, 98, 2000, XP, Vista, Windows 7, Windows 8, Apple Mac OS X, Symbian OS and Be-OS, Google Chrome OS, RIM BlackBerry OS 4.x, Apple iPhone iPod Touch and iPad OS etc.

Web Browsers


  1. Microsoft Internet Explorer
  2. Google Chrome (based on chromium web browser)
  3. Mozilla Firefox
  4. Safari
  5. Netscape Navigator
  6. Opera and Opera Mini

Office Products


  1. Microsoft Office (Word, Excel, Access, PowerPoint, Outlook, FrontPage)
  2. Apache OpenOffice
  3. Corel Office/WordPerfect Office

E-Mail Clients


  1. Microsoft Outlook
  2. IBM Lotus Notes
  3. Mozilla Thunderbird

Web Sites


  1. Facebook - Several high-performance and high-reliability components are developed in C++.
  2. YouTube
  3. Amazon
  4. Paypal

Multimedia Players


  1. Winamp
  2. Microsoft Windows Media Player
  3. Apple iPod software
  4. VLC media player

Database systems


All the major RDBMS are developed in c++.
  1. Oracle database
  2. MySQL
  3. IBM DB2
  4. Microsoft SQL Server
  5. IBM Informix
  6. SAP DB/MaxDB
  7. MongoDB: An open-source database, widely used as the back-end store for web applications, as well as in large enterprises like Viacom and Disney.

Graphical Layers


Graphical layers are nothing but the Graphical User Interface provided by various operating systems in order to make the human-computer interaction user-friendly.
  1. Microsoft Windows UI
  2. Apple MacOS UI (Aqua)
  3. KDE

Compilers and Virtual Machines for programming languages


It is amazing to notice that various compilers and run-time environments for other programming languages are written in C++. This means without C++, it would not be possible to execute .Net and Java applications.
  1. Microsoft Visual C++ Compiler
  2. Microsoft Visual Basic Compiler
  3. Microsoft Visual C# Compiler
  4. Microsoft .Net CLR
  5. Java Virtual Machine (JVM)

Games


Majority of computer games and game engines are developed in C++. It is difficult to provide list of all games here but some of them are Doom III engine, Counter-Strike, Sierra On-line: Birthright, Hellfire, Football Pro, Bullrider I & II, Trophy Bear, Kings Quest, Antara, Hoyle Card games suite, SWAT, Blizzard: StarCraft, StarCraft: Brood War, Diablo I, Diablo II: Lord of Destruction, Warcraft III, World of Warcraft, Starfleet Command, Invictus, PBS's Heritage: Civilization and the Jews, Master of Orion III, CS-XII, MapleStory etc.

Electronic Art's video game engine is coded in c++. All Microsoft's games are written in c++.


Implementation of C++ by various companies and organizations


Note: The software already mentioned above are not repeated.


Adobe


All major Adobe's applications are developed in C++:
  1. Photoshop
  2. ImageReady
  3. Illustrator
  4. Acrobat Reader/Distiller
  5. InDesign
  6. GoLive
  7. Frame

Google


Many Google applications are written in C++, including Google file system, Google Chromium projects, Google Earth, Picasa, Google Desktop Search and MapReduce large cluster data processing.
Note: It is not officially revealed by Google that Google Earth and Picasa are developed using C++ but looking at the libraries these software use, it can be easily assumed that they are built using C++. Also, many reverse engineers have supported this.


Hewlett-Packard (HP)


Some of the HP's C++ apps are:
  1. C, C++, Fortran90 compilers, and linker for the new HP IA64 platform
  2. SAM (HP's system management utility)
  3. Some of the networking libraries in HP-UX
  4. Java VM core
  5. Parts of Openview
  6. Non-stop XML parser (originally from Compaq)

IBM


  1. OS/400
  2. K42: a high-performance, open source, general-purpose operating system kernel for cache-coherent multiprocessors.
  3. ILOG: provides libraries written in C++ used for:
    1. Visualization. This set of libraries is used to build applications that need portable GUI's and advanced graphical features.
    2. Optimization. This set of libraries is used to build programs that need constraint programming or/and the simplex algorithm.
    3. Rules. This set of libraries is used to build applications that need a rule engine to fire actions according to events that may happen.
    Some IBM's ILOG customers include : Chrysler, CENA, Nortel, SAP, Renault, Barclays Global Investors (BGI), TLC (Transport, Informatik- und Logistik-Consulting GmbH) subsidiary of Deutsche Bahn, Telefonica, CISCO, NISSAN, POSCO, Sony Bank, isMobile, Southwest Airlines, Novient, Vodafone , Sabre Holdings Corporation, France Telecom, Ericsson, Deutsche Telekom, Lucent Technologies, Siemens, HP etc.

Intel


  1. Many chip design and manufacturing software.
  2. Vtune performance analysis software.
  3. Various compilers and optimizers.

Microsoft


Bill Gates seems to be big time C++ fan. In addition to all operating systems and office tools, most of the Microsoft's applications are built using C++. They include but are not limited to:
  1. Visual Studio
  2. Microsoft Exchange Server
  3. Picture It
  4. Microsoft Windows Desktop Search
  5. DirectX
  6. Microsoft IIS

Sun Microsystems


Sun's compilers have major components written in C++, in particular, the C++ front end, parts of the Fortran 95 front end, and the SPARC backend. Parts of Solaris are written in C++, though the external interface is usually crafted to look like C, for compatibility and stability reasons.

Other Software


  • 12D: powerful 3D CAD, civil engineering & surveying software, made for civil and surveying industry professionals.
  • Autodesk Maya - 3D graphics and animation software. Many other Autodesk's applications are also developed using C++.
  • Arium: Sourcepoint; Hardware debugging and emulation for Intel and ARM systems (inc. multi-processor systems).
  • AT&T 1-800 service and provisioning systems.
  • Bloomberg: Provides real-time financial information to investors.
  • Cabot Communications: Portable set-top box and digital TV software
  • Callas Software: software for analysis, optimization and correction of PDF files: pdfInspektor, Acrobat Preflight and other plug-ins.
  • The CDE desktop (the standard desktop on many UNIX systems) is written in C++.
  • CERN data analysis - especially for large high-energy physics experiments - using the ROOT toolset and libraries.
  • eMule: Peer-to-peer file sharing client.
  • FlightGear: an open source flight simulator, using JSBSim, one of the flight dynamics math models used in FlightGear and by other simulators.
  • Geant4: Toolkit for the simulation of the passage of particles through matter. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science. The Geant4 project is a world-wide collaboration of about 100 scientists participating in more than 10 physics experiments in Europe, Russia, Japan, Canada and USA .
  • Haiku OS: Major parts of the system (including most of the kernel) are written in C++.
  • hMailServer: Free email server for Microsoft Windows
  • Image Systems TrackEye and TEMA: World leading motion analysis programs (based on digital image processing). Used by most car manufacturers to analyze the effects of crash tests.
  • mIRC Chat: Chat client being used by over a million people
  • Nuance's Dragon Naturally Speaking: An award winning continuous speech dictation system.
  • Nullsoft: All Nullsoft products are C++ (Winamp, NSI, etc.) and many are open source.
  • OGRE 3D: a 3D graphics engine
  • SAP ERP: Business All-in-One software.
  • SGI's OpenGL Performer graphics library.
  • µtorrent: µTorrent is a lightweight and efficient BitTorrent client for Windows or Mac with many features.
  • Vodaphone: Mobile phone infrastructure, inc. provisioning and billing.
  • wxWidgets (formerly wxWindows): A cross-platform GUI and tools library for GTK, MS Windows, and MacOS.

This is not the end of the list, other powerful software's are developed in C++. If you are aware  any other famous software is written in C++ which is missing from the list, please mention it by commenting below.

Tuesday, 22 November 2016

Fibonacci in Nature



The Fibonacci numbers are Nature's numbering system. They appear everywhere in Nature, from the leaf arrangement in plants to the pattern of the florets of a flower, the bracts of a pinecone, or the scales of a pineapple. The Fibonacci numbers are therefore applicable to the growth of every living thing, including a single cell, a grain of wheat, a hive of bees, and even all of mankind.

Plants do not know about this sequence - they just grow in the most efficient ways. Many plants show the Fibonacci numbers in the arrangement of the leaves around the stem. Some pine cones and fir cones also show the numbers, as do daisies and sunflowers. Sunflowers can contain the number 89, or even 144. Many other plants, such as succulents, also show the numbers. Some coniferous trees show these numbers in the bumps on their trunks. And palm trees show the numbers in the rings on their trunks.

Why do these arrangements occur? In the case of leaf arrangement or phyllotaxis, some of the cases may be related to maximizing the space for each leaf, or the average amount of light falling on each one. Even a tiny advantage would come to dominate, over many generations. In the case of close-packed leaves in cabbages and succulents, the correct arrangement may be crucial for availability of space.

In the seeming randomness of the natural world, we can find many instances of mathematical order involving the Fibonacci numbers themselves and the closely related "Golden" elements.


Fibonacci in Animals



The shell of the chambered Nautilus has Golden proportions. It is a logarithmic spiral.


The eyes, fins and tail of the dolphin fall at Golden sections along the body.


A starfish has 5 arms.  (5 is the 5th Fibonacci number)


If a regular pentagon is drawn and diagonals are added, a five-sided star or pentagram is formed. Where the sides of the pentagon are one unit in length, the ratio between the diagonals and the sides is Phi, or the Golden Ratio. This five-point symmetry with Golden proportions is found in starfish.


Humans exhibit Fibonacci characteristics, too. The Golden Ratio is seen in the proportions in the sections of a finger.



It is also worthwhile to mention that we have 8 fingers in total, 5 digits on each hand, 3 bones in each finger, 2 bones in 1 thumb, and 1 thumb on each hand.
The ratio between the forearm and the hand is the Golden Ratio!


The cochlea of the inner ear forms a Golden Spiral.


Fibonacci in Plants

Phyllotaxis is the study of the ordered position of leaves on a stem. The leaves on this plant are staggered in a spiral pattern to permit optimum exposure to sunlight. If we apply the Golden Ratio to a circle we can see how it is that this plant exhibits Fibonacci qualities. See picture for more detailed illustration of leaf arrangements.






By dividing a circle into Golden proportions, where the ratio of the arc length is equal to the Golden Ratio, we find the angle of the arcs to be 137.5 degrees. In fact, this is the angle at which adjacent leaves are positioned around the stem. This phenomenon is observed in many types of plants.

In the case of tapered pinecones or pineapples, we see a double set of spirals – one going in a clockwise direction and one in the opposite direction. When these spirals are counted, the two sets are found to be adjacent Fibonacci numbers. 


Similarly, sunflowers have a Golden Spiral seed arrangement. This provides a biological advantage because it maximizes the number of seeds that can be packed into a seed head.


Inside the fruit of many plants, we can observe the presence of Fibonacci order.


                                                           The banana has 3 sections     The apple has 5 sections

As well, many flowers have a Fibonacci number of petals. Some, like this rose, also have Fibonacci, or Golden Spiral, petal arrangements.


Branching plants also exhibit Fibonacci numbers. Again, this design provides the best physical accommodation for the number of branches, while maximizing sun exposure.


Fibonacci Petals

3 petals                  lily, iris
5 petals                  buttercup, wild rose, larkspur, columbine
8 petals                 delphiniums
13 petals                ragwort, corn marigold, cineraria
21 petals                aster, black-eyed Susan, chicory
34 petals                plantain, pyrethrum
55, 89 petals          Michaelmas daisies, the Asteraceae family

The occurrence of Fibonacci Numbers in Nature is interesting but the ratio of consecutive Fibonacci Numbers is important.

The Golden Mean (Φ)

The Golden Mean (or Golden Section), represented by the Greek letter phi, is one of those mysterious natural numbers, like e or pi, that seem to arise out of the basic structure of our cosmos. Unlike those abstract numbers, however, phi appears clearly and regularly in the realm of things that grow and unfold in steps, and that includes living things.

The decimal representation of phi is 1.6180339887499... 
.


How to Construct a Golden Section?
A golden section may be constructed in several ways. The following method of construction is one of them:
Draw a line segment AB of length a on the straight line PQ.


Now construct a perpendicular BD of length a at B. Bisect AB at E with E as the centre and ED as the radius, describing an arc that intersects PQ at C.

Then by Pythagoras theorem, the radius


We have,


Here, AC is divided in the golden ratio by the point B.

The Golden Spiral

When a Golden Rectangle is progressively subdivided into smaller and smaller Golden Rectangles the pattern below is obtained. From this, a spiral can be drawn which grows logarithmically, where the radius of the spiral, at any given point, is the length of the corresponding square to a Golden Rectangle. This is called the Golden Spiral.
The spiral converges at the intersection of the two blue lines (P), and the ratio of the lengths of these two lines BP: PD is Φ, the Golden Ratio.