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

  • Being A Child

    My eldest daughter was teaching her younger sister to read and was explaining it phoenitically. If you don’t know what phonics is, it is pronouncing the letters the way it sounds, not the way it is pronounced. Yeah my explanation sucks. For example you pronounce the letter ‘s’ not ‘ass’, but instead ‘ssss..’ as in…

  • |

    Thank You, MRTC

    MRTC stands for Mass Rapid Transit Corporation, a government linked company in Malaysia which I used to work since 2013 until 2021. Today marks the day that I started working there (and a decade of working there, if I had stayed). I spent 8 years working there, and although I have left the place for…

  • Passive and Active: Learning and Level Crossings

    In railway signalling, one of the most problematic or challenging part is, subjectively, the level crossings. It is the part where the road meets the rail, where normal railway operation which is rigid and structured, meets the road operation that in some ways, very loose and has many variables. It’s an interface and interface always…

  • |

    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…

  • |

    Time and Money: Budgeting

    I’m currently or have been listening a lot to Ramit Sethi regarding money management, and he has a few sources for them. I mostly listened to his podcasts coz it’s more dynamic since he invites people that slightly different backgrounds and problems so it makes it more interesting and relatable. I have his book but…

Leave a Reply

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