Everything is just files and programs

Last year, two years into my CS studies at college, I was reading Computer Networking: A Top Down Approach, at the end of chapter 2 it contained a list of project ideas to do. I was hooked.

I still remember the thrill I had, disabling the firewall (in the settings) on my laptop (later I realized the client doesn't need to disable the firewall :D) Creating a python script that sends "hello" via TCP, and running the "server" (which is just a python program) on my friend's laptop, the server makes it uppercase, and sends "HELLO" back. a week later I had finished building a simple multithreaded http server. I changed the router setting to do port forwarding to my laptop, so that anyone can use my (insecure) HTTP server anywhere, successfully putting all the files on my laptop in risk :D

At that moment everything started to click, everything is bunch of files and programs. I thought, "I love computer science", and I literally had tears in my eyes.

In high school I studied some introductory computer science classes, in one of them we were taught some very basic PHP and MySQL, we installed MySQL just by pressing "next" in the setup, and suddenly, our PHP code is storing data in the "database". I was puzzled... like "professor, where is the database", he didn't understand my question, "I mean where is this stuff stored?" It was kind of tough question indeed, but he answered me "it's just some files". I didn't buy it, but it set my heart at ease at least... at least it's on the hard disk!

After studying operating systems, databases and computer networking, I finally understood where is the database. in some sense, it's just bunch of files and some TCP socket on the top. he was correct.

I'm not sure why accepting that everything is just a bunch of files and processes takes so much time to internalize.

2 points | by ghassenfaidi 2 hours ago

2 comments

  • ghassenfaidi 2 hours ago
    The plot twist was that programs are just files too -- what I meant earlier is processes and not programs.
  • absynth 1 hour ago
    Now explain this to all the people writing their own curl | bash installers.

    Just use a package manager! Its really not THAT hard. Pick one. Use it. Automate it.