An introduction to Prolog

1 minute read

Prolog is a programming language which let’s our describe the rules of a problem without expliticly telling it what to do. An example of a typical problem is tic tac toe, sudoku or chess. The rules are easy to explain and you could build a program which followed these rules. But that program wouldn’t be as easy to write as it would be to explain to a friend who the rules work.

Prolog is a programming language which lets us describe the rules that we need to follow instead of explicitly telling it how to do everything. This is the beauty of a declartive programming language.

Definition of declartive

here’s a fun fact: a large portion of IBM’s Watson is written in Prolog.

Achievements from my first year of university:

  • First class degree
  • 7 internship offers
  • Created and grew a blog organically from 5 readers per month to 60,000 readers
    • Featured in top 5 articles on Hacker News
  • Reguarly went to hackathons and won some prizes
  • Worked 3 part time jobs:
    1. Helped local year 13 students get into a university
    2. Tutored year 12 and 13’s in computer science a level
    3. Worked with the university to encourage more care leavers and people from disadvantaged backgrounds into university
  • Did some Karate and reguarly went to competitions, as well as taking up running
  • Read 1 book a week, listened to 127 hours of podcasts
  • Finished the first draft of my book, ready to be published this year !!!
  • Created 2 websites, my personal website (skerritt.tech) and the blog on my personal website

Goals for next year:

  • Continue to change the world
  • Learn how to be happy

Prolog is a really awesome language that allows you to do things that many other languages such as C, JavaScript, Python, C#, Ruby, etc. just can’t do. That’s because Prolog isn’t like these other languages; it’s a declarative language, whereas those others (and countless more) are imperative. We’ll come back to what those terms mean here in a bit.

Prolog isn’t a new language, either; it’s actually been around for over 45 years at this point – so is there a point to even learning it today? You bet there is – because even if you don’t end up using it in your career, it really makes you think differently about how you can solve problems when programming, and that’s always a good thing. That’s not to say that you won’t use it in your career, however; Prolog is heavily used in the natural language processing field, and here’s a fun fact: a large portion of IBM’s Watson is written in Prolog.

Categories:

Updated: