Backus-Naur Form – layman explanation

I came upon this term at work, or its abbreviation BNF, that sent me on a search of trying to understand it. So here’s a post to solidify my understanding.

Here’s a youtube post that summarizes it quite nicely. https://www.youtube.com/watch?v=8cEhCx8pwio

What is BNF?

It is a way to describe how software language can be written, similar to how human language can be spoken. It is liken to the grammar, and I think it is easiest to think as so too. The difference between BNF and normal grammar is that normal grammar has a lot of exclusions. The interesting and main similarity is that BNF uses a definition to be used in another definition. I think the video above explains succintly.

To relate to my experience, I was telling my son that computers uses ones and zeros while humans counts differently. I asked him to subtract 9 million from 10 million, and he answered one million. I repeated without the millions and he dully answered. I then asked him to count his fingers and he got the understanding that we use only ten numbers only actually, being one to ten (which I corrected to 0 to 9).

He then went even further and said that actually we learn the same way, where we use what we understand then to discover even more things. Or we use things that we have to make more things (that we have). Kinda like Lego.

So yeah, BNF is like a catalogue describing the lego blocks in programming. I’ll settle for that now.

Thank you for reading.

Similar Posts

  • |

    It’s Been A While

    A friend and an ex-colleague of mine invited to his house for some pizza yesterday. We talked and he asked how’s life, considering we haven’t met for more than a year after he resigned. It was a simple question, and was responded with simple answers. Basically updates of my life (and also work details) and…

  • |

    Cybersecurity and Aikido

    Disclaimer: I am neither a cybersecurity expert nor an Aikido practitioner so apologies in advance for any faux pas or false facts. I was watching this video recently where it interviews an Aikido masters and he talked about Iai (Iaido), where one is always prepared to draw their sword due to sudden attack, which relates…

  • |

    Life is an Exam

    Life is an exam, or not. All my life, or at least my early years of life, I have been prepping for exams very year. In Malaysia there is the primary school exams (UPSR) that determines whether you can go to a boarding school with better facilities and reputed more experienced teachers. There you prepare…

  • | |

    Ponderous

    I’ve been doing work recently and felt that the time allocated to me has been too short. It felt like there was not enough time to read all the background material and produce a result from it. But since the work was required soon, I changed my mindset and just set on producing a document,…

  • |

    Retirement and Romanticism

    My wife and I visited a group of friends recently and we inadvertently talked about future and retirement. One point of interest was that in Malaysia, people are normally forced out of work and into retirement, while in the UK, quite a lot of people, especially knowledge workers, continue to work past their 60s. This…

Leave a Reply

Your email address will not be published. Required fields are marked *