Monkey on a Keyboard

my online scrapbook of scrambled thoughts

The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type any given text, such as the complete works of William Shakespeare. In fact, the monkey would almost surely type every possible finite text an infinite number of times. However, the probability that monkeys filling the observable universe would type a complete work such as Shakespeare's Hamlet is so tiny that the chance of it occurring during a period of time hundreds of thousands of orders of magnitude longer than the age of the universe is extremely low (but technically not zero).

Source: https://en.wikipedia.org/wiki/Infinite_monkey_theorem

Basically I was just looking for a name for this blog that isn't tied to the domain name. Why? Because of this: https://yohanes.dev. That is a *.dev domain name which has HSTS preloading on the TLD level. I'll still keep the old domain name. I just want to experiment with this one for a bit. For now, it's just another way to load my blog.

   Posted in Blog        Yohanes Mario Chandra        0 Comments

After giving it some thought, I declare that from now on, I will be using the old blog again, since I actually want to be able to fully control every aspect of it.

   Posted in Blog        Yohanes Mario Chandra        0 Comments

When I'm learning about the application of OOP in web programming, I come across something called MVC (Model-View-Controller). It's an architecture for an application which allows the application to be easily configurable for different UI. Basically, it allows the same application to be viewed across different type of devices.

The controller is basically a layer which receives all of the input from the user, validates it, and execute the requested action. It has some type of input sanitization, and it knows all of the other element in the application in order to tell them what to do.

The model is a layer which handle all of the business logic, data abstraction and data processing. In conjunction to input-processing-output mechanism, the model layer is comparable to the processing part, while the controller is comparable to the input part.

The view layer, as its name tells, is a layer that allows the user to view the requested content/action. It knows nothing about database or any data sources, it only knows that it needs to render the content provided by the model.

However, when I dug deeper into the MVC architecture, I also come across PAC (Presentation-Abstraction-Control). It basically is an altered version of MVC, where the Model (in this case the "abstraction" part) can't directly access the view ("presentation"). The abstraction layer needs to transmit the data stream to the controller, and when the controller done validating the data stream, it tells the presentation layer to render the data accordingly.

Why do I write about this? It has something to do with the main concept of the blog engine. It will use PAC as the base architecture. It's secure, because all of the data transmission is controlled in one layer (try to beat that, hackers!). OOP will sure be used as the basic paradigm of programming the blog engine.

That's it for today, and, Happy Blogging!

update (2011/10/12 13:15 GMT+7): I will temporarily use MVC for the beginning, and move to PAC as I understand it better.

   Posted in Blog        Yohanes Mario Chandra        0 Comments