• Skip to main content
  • Skip to primary sidebar
BMA

BeMyAficionado

Inspire Affection

Do You Have To Be Good At Mathematics to Become a Great Programmer?

October 6, 2018 by varunshrivastava Leave a Comment

Someone at work asked me this question- “Are Good Programmers also Good Mathematicians?”. This question got me into thinking about all the stuff that people are doing in most of the IT companies. They call themselves programmers, but are they, good mathematicians?

In this article, I’m going to get into deeper level and talk about the software craftmanship and clean coding standards. So hopefully at the end you will get the answer to the question- “Are Good Programmers Good Mathematicians?”.

Let’s take a walk down the history lane to gain some insights.

Table of Contents

  • Invention Of Computer Age
    • How Does Turing Machine Works?
  • The Beginning Of Programming
    • Memory was the Biggest Concern
  • Is it Necessary To Be Good In Mathematics To Become a Great Programmer?
    • Do you know Linus Torvalds?
  • Programming is hard if you take out the abstraction
    • Coming Back to the Point
      • Binary Coded Decimals
  • Why am I telling you all this?
  • Conclusion

Invention Of Computer Age

In the year 1936, Alan Turing published a paper where he talked about a machine that would be capable of solving any problem. This machine could be instructed by means of code and will perform any task based on the instructions written by programmers.

Sounds like modern day computing, Isn’t it?

Well, this was the start of the era for computer programmers.

Alan Turing was a great mathematician of his time who invented the universal turing machine.

How Does Turing Machine Works?

This was an abstract machine with limitless memory that will hold both data and instructions.

It consists of a scanner that will go back and forth to read each symbol from the memory and alter the symbols based on some program/algorithm. And when the machine halts, what remains in the memory is the end result of the computation based on the given algorithm.

Nobody that time knew that the idea of Turing machine will grow to become the basis of modern computing. But it Did.

Everything that could be solved by our modern day computers could also be solved by turing machine.

If you want to experience programming in Turing language then click on the link below:

  • Turing Machine Simulator

The Beginning Of Programming

Automatic Computing Machine (ACE) was the very first electronic machine that behaved differently on different instructions. Much like our modern day computing.

The difference was – ACE was built with Vaccumm Tubes.

You can say that Vaccumm Tubes are the predecessors of our modern transistors.

ACE was built with 1450 Vaccumm Tubes. That made ACE huge monstrous machine that covered the entire hall.

You can look at the ACE in the image below:

Automatic Computing Machine (ACE)

Memory was the Biggest Concern

ACE used 12 Memory Delay Lines as its main memory. Each memory line could store upto 32 bits of data or 32 instructions and words.

Quick question: How many bits you have in your mobile phone’s memory?

I got 3.2e+10bits in my mobile (only RAM) i.e. 4 GB. And still I feel I need more memory.

Just imagine, how quickly did we grew up to this level.

There was a time when 32 bits memory was enough for the developers to write code and perform complex operation and get the result.

Developers in the past knew the value of memory, thus they would keep the memory usage to the minimal by devicing new algorithms that we still use today.

You should learn from experienced programmers, they are the reason for our existence. You and I use languages that was created by them. Those languages are so successful because it was created by people who understood and valued the technology they were dealing.

They did not have the Computer Science degree, they were engineers who became programmers. They all were great mathematicians.

Is it Necessary To Be Good In Mathematics To Become a Great Programmer?

Coming straight to the point – YES.

You need to have good mathematics skills in order to become a great programmer.

The so-called programmers today are no-where close to being called as programmers because they get everything out of the box and they just learn how to use it.

They are simply the users.

A programmer is an inventor. A creator. Who makes the thing. Who creates software that others can use. And to create such software, you require a good knowledge of mathematics.

Because mathematics allows you to formulate algorithms and algorithms is the backbone of every great program ever written.

Will you be able to create a software that will take training phrases from people and on the basis of training phrases decide which piece of code to execute?

If yes then do send me a piece of your code , I would love to go through it.

But in doing so, you will understand the need of mathematics and optimized algorithms. Because achieving such a thing that feels natural to us in everyday lives is not that natural after all.

Do you know Linus Torvalds?

Linus Benedict Torvalds is a Finnish–American software engineer who is the creator, and historically, the principal developer of the Linux kernel, which became the kernel for operating systems such as the Linux operating system, Android, and Chrome OS.

Not only that, Linus Torvalds is also a creator behind Github. He created Github while developing the Linux kernel. But the Github he created was not very beautiful and user-friendly. You needed to be a Linux Kernal hacker to use it back then :/

But then a community of developers came forward and gave Github a nice web appearance and access to users for storing and maintaining their code.

No doubt he is a genius. But all this genius didn’t come from the open sky. He is great at mathematics.

In the computer world, no matter how creative you are at problem solving, until and unless you figure out a way to transform your creativity into hard code mathematical discrete approach, you cannot teach computer anything.

Creating the world’s most popular and widely used operating system is not a piece of cake if you do not know how to feed your code into a machine in the best and most optimized way possible. And Linus Torvalds is a genius who made it possible.

Programming is hard if you take out the abstraction

Computer works in instructions. And instructions are well-defined set of computations ordered in a certain way (called algorithm) to achieve the end result.

What will happen if you say to a computer add a and b where a is 5? and b is 5.

You will have to feed it the entire thing.

Let me give you a high-level understanding of what goes behind.

At the basic level a computer is just a one big complicated electronic device that works on the basis of electrical signals.

More preciously it works on the basis of electrical switching.

This switching takes place at a very high speed.

The i7 processor is 3.7 GHz and is capable of running at 4.7 GHz speed. It means it can perform 3,700,000,000operations in a second.

Can you imagine?

That’s how fast a computer is… And we use this speed to perform useful calculations, more preciously logical calculation.

Coming Back to the Point

So coming back, to perform a simple addition, the below logic is used.

Half Adder

Here, A and B are input bits. So, the truth table for the above would be like:

Truth Table
Input Output
ABSumCarry
0000
0110
1010
1101

This is a simple one-bit adder. To add a bigger number you need more bits. Let’s assume you have 4 bits to perform the operation. So, if you want to increment a given number by one, you will need a combination of these Half Adders and an extra increment bit.

Let me quickly draw all the schematics required to demonstrate its working.

Below is the table of all the digits that can come with 4 bits. You will take any digit from the below table and add one to it.

I will implement this logic with Logic Gates and will see if everything works as per the plan or not.

Binary Coded Decimals

00000
10001
20010
30011
40100
50101
60110
70111
81000
91001
101010
A1011
B1100
C1101
D1110
E1111

I have designed a very basic incrementer with the help of 4 Half Adders in series to work with 4-bit number. Take a look at the diagram:

I have 4 bits for my input names as A0, A1, A2 and A3. Each bit could be in either of the two states e.g. Switch ON or Switch OFF. Either 1 or 0. So, the combination of these 1s and 0s I will represent a number from the above table.

Also, there is one increment bit at the top left. When that bit is switched on, the output of the circuit would be 1 plus the inputs.

Let’s see it in action, let’s take a number 3 and increment it by one.

To create number from 4 bits, we will have to set our input bits as0011

A0=1, A1=1, A2=0, A3=0

And switch on the increment bit.

So our expected output is: 0011 + 0001 = 0100;// 4

Let’s see what we get:

Increment 3 by 1

Now, you know what logic is required to add one at the machine level. And you can also see that all this is pure mathematics. It is called Boolean Algebra. So, programmer owe to be good mathematicians.

But, we have evolved from those days and created a verb for every such logics. So today, with programming languages, you can do a similar thing by writing this:

a=3;
a++; //  increments 3 by 1

Thank god our ancestors abstracted such complexity from us and gave us a simple language that sounds pretty much like plain english. But that doesn’t mean you forget the complex logics and calculation that goes beneath it.

Why am I telling you all this?

The main purpose of all this is to show you what actually goes in the making of all those programming languages and compilers that most of the poeple take as granted.

It is true you do not have to be a scholar in mathematics to program today, but to actually invent something that would be better at solving people’s day to day problem, I tell you, you will have to do a lot more than what you are doing now.

You will have to learn mathematics and how to materialize the creativity into computer in pure unambiguous logic.

Then you would call yourself a true programmer.

Conclusion

Programming in today’s world is easy. But to become a good programmer takes a lot of knowledge. Now this knowledge is not limited to programming languages but how programming languages are created.?

You must know what’s going on at the minute level. Because until and unless you know how things work that works, you would never be able to enjoy it at a level where an expert does.

That’s why I always recommend new programmers to get their hands dirty in C programming. Because that language forces you to understand every line of code that you do from a minute level and then grow from their.

If you can program in C, you can program in any other language in this world. Afterall, every language has come from C.

Exercise

Try to create a programming language of your own. You may choose any language to do this task.
Make sure you follow the best practices.

Let me know your thoughts, views, comments on this. I would love to hear from you.

Do share and comment.

Related

Filed Under: Blogging, Programming Tagged With: good mathematicians, programmer, programmers are good mathematicians, programming

Primary Sidebar

Subscribe to Blog via Email

Do you enjoy the content? Feel free to leave your email with me to receive new content straight to your inbox. I'm an engineer, you can trust me :)

Join 874 other subscribers

Latest Podcasts

Recent Posts

  • Is The Cosmos a Vast Computation?
  • Building Semantic Search for E-commerce Using Product Embeddings and OpenSearch
  • Leader Election with ZooKeeper: Simplifying Distributed Systems Management
  • AWS Serverless Event Driven Data Ingestion from Multiple and Diverse Sources
  • A Step-by-Step Guide to Deploy a Static Website with CloudFront and S3 Using CDK Behind A Custom Domain

Recent Comments

  • Varun Shrivastava on Deploy Lambda Function and API Gateway With Terraform
  • Vaibhav Shrivastava on Deploy Lambda Function and API Gateway With Terraform
  • Varun Shrivastava on Should Girls Wear Short Clothes?
  • D on Should Girls Wear Short Clothes?
  • disqus_X5PikVsRAg on Basic Calculator Leetcode Problem Using Object-Oriented Programming In Java

Categories

  • Blogging
  • Cooking
  • Fashion
  • Finance & Money
  • Programming
  • Reviews
  • Software Quality Assurance
  • Technology
  • Travelling
  • Tutorials
  • Web Hosting
  • Wordpress N SEO

Archives

  • November 2024
  • September 2024
  • July 2024
  • April 2024
  • February 2024
  • November 2023
  • June 2023
  • May 2023
  • April 2023
  • August 2022
  • May 2022
  • April 2022
  • February 2022
  • January 2022
  • November 2021
  • September 2021
  • August 2021
  • June 2021
  • May 2021
  • April 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • February 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016

Tags

Affordable Hosting (4) algorithms (4) amazon (3) aoc-2020 (7) believe in yourself (4) best (4) database (4) earn money blogging (5) education (4) elementary sorting algorithms (4) experience (3) fashion (4) finance (6) Financial Freedom (7) food (7) friends (3) goals (5) google (5) india (10) indian cuisine (5) indian education system (4) java (16) life (16) life changing (4) love (4) make money (3) microservices (9) motivation (4) oops (4) podcast (6) poor education system (4) principles of microservices (5) problem-solving (7) programmer (5) programming (28) python (5) reality (3) seo (6) spring (3) success (10) success factor (4) technology (4) top 5 (7) typescript (3) wordpress (7)

Copyright © 2025 · Be My Aficionado · WordPress · Log in

Go to mobile version