CJ Virtucio

Software Solutions

Polyglot, DevOps


The internet is a system of components that are independent and interact only through messages. This is the RESTful web architecture. Clients and servers send each other representations of state, and do not share state. Hence the name Representational State Transfer (REST).

In law, we have this concept of ‘fortuitous events’. Things can go wrong, and many times they’re beyond anyone’s control. Maybe your internet goes down. Maybe a flash flood inundates the server room. Generally, events like these relieve both parties of a contract of their obligations to each other. Sounds a lot like REST, doesn’t it? Stateless system, independent components; they’re not bound to each other beyond the messages they actually send.

But because ‘the contract is the law between the parties’, you can ‘override’ this rule. Sometimes it’s helpful when you need to incentivize another …

read more

Dynamic Programming is a powerful tool in solving algorithms. You basically take a problem, and attack it by saying that it’s the outcome of solving its sub-problems. In a way, it’s no different than the Divide and Conquer approach for recursive calls, except that you remember the results of solving those sub-problems as you go along so that you won’t end up having to solve them again. Let’s take a look at an example.

// Problem: You are given two arrays of equal length, each representing an assembly line. Each index represents 
// a station in the line. The value at each index represents the cost of transferring the machine from
// the previous station. Of course, putting the machine into the line in the first place carries a cost
// in itself. Write a function that returns an array representing the transfer costs per station of the
// path that involves …
read more
Page 2 / 2