Tuesday, January 12, 2021

Storytime: What is programming?

 Hello World!


If you've been wondering why I haven't posted anything for December... well it's because I've been busy with student life 📚📚📚  I did however update my past posts to include PDF versions of the codes, so check them out!  


Programming can be a pretty alien concept.  You see it in some movies, and it looks cool, but I don't think many people know what codes actually are.  I didn't know anything about codes, or Python, or anything of the sort before I actually started learning it myself.  That's why I decided to write a chill story about coding.


Humans have a lot of diversity in thoughts, beliefs, and language.  The language doesn't have to be too rigid for humans to understand each other as long as they can get the "gist" of it.  In fact, a language can emerge, change, or even disappear to be replaced with a new language.  Humans have ideals and ideas to reach their goals.  Humans get bored easily so they hate repetitive and tedious tasks.  Humans make mistakes as well.  That's why computers are very useful.  

Computers exist to complete repetitive tasks and not complain about it.  Computers are also super SUPER fast in doing so.  But computers don't learn or adapt so they need to be told in a specific way to understand what their task is.  Humans envision the goal and computers execute the tasks to get there.  There still needs to be some mode of communication between the human and the computer, so that's when programming languages, like Python, come in.


Programming languages allow the computer to understand what the human wants done.  They have in-built phrases that act as commands or specifiers to grant the human their desires.  In Python, commands would be something like "print" while specifiers would be....  "while" or "True"

For example, if the human wants the computer to write out "Hello World":

  1. Human opens Python 
  2. Human types in print("Hello World")
  3. Human presses Enter
  4. Python "talks" to the computer
  5. The computer responds by printing out "Hello World"

Simple, right?  We learn the Python Language so that we can better communicate to the computer.

Now the hard part honestly is.... making mistakes.  As stated before, computers need the codes to be written in a specific way to understand them.  Humans are not perfect beings so we make mistakes or say things "incorrectly."  Sometimes it can feel like Python is being mean when they respond with an error after typing in hundreds of lines of code, but that's just Python saying "I'm sorry, I don't understand.  Can you please rephrase that?"  Remember, computers can't learn but humans can, so we just have to learn to work with Python and computers. 😅

I hope this post helps in understanding programming better.  I still have lots to learn myself, so if any of you can come up with good analogies to describe coding, feel free to comment!!  🐍🐍🐍


LLM Part 2: Encoding

Welcome to Part 2 of building your own large language model! Part 1 was about breaking down your input text into smaller subwords. (tokeniza...