Input, mutate, output…pretty much explains everything.

As a person with many hobbies I often find myself trying to take a situation I am not familiar with and compare it to something I do know. Analogizing the unknown to something that is known seems to make the unknown more palattable.

This came into practice heavily over the weekend as I spent 6 hours with friends deconstructing the front end of my track car. I have indeed done work to it before; but, this is the most major thing I have ever done. Anyway, as we worked along removing part and pieces, and disconnected, and removed, tagged and bagged pieces after piece I realized automotive is not dissimilar to software systems. Then a couple days later having a conversation with the same friend (while somewhat intoxicated) the topic that everything, when boiled down, is input, mutate, output.

 

Software:

input: data of W format w/ X points

mulate: application code changes date

output: data of Y format w/ Z points

Automotive

input: fuel, oxygen, spark

mutate: atomization of the mixture

output linear force upon the piston head creating motion

 

I endeavour to find situations / activities / systems that do not conform to the input/mutate/output process w/o ~really~ stretching the concept or loose the spirit of the application.

 

Bonus: Picture time

 

 

PHPStorm 2017.3 EAP New feature: In editor REST client.

If you happen to be anything like me, you spend a lot of time with APIs. JSON is a on your resume as a second language and you know the nerd-storm that PUT vs POST can cause. If you happen to also use PHPStorm you will find this new feature right up your alley.

An IN EDITOR REST client. I do not remember being this excited about a feature since EVE Online added missile turrets (circa June 2012).

Head over to JetBrains and check it out: https://blog.jetbrains.com/phpstorm/2017/09/editor-based-rest-client/

An example of when being to clever can come back to bite you…

As part of a test I had to ensure only two alphabetical characters would allowed. So I used `chr(rand(97,122))`; which on a OSX machine is letters a->z. However, this character code sequence (to the best of knowledge NOW) does not translate to other architectures. 4 Hours latter and I replace the above `char()` usage with:
$letterArray = ['a', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 's', 't', 'u', 'v', 'w', 'x', 'z',];
$key = \array_rand($letterArray);
...
$letterArray[$key]

After three runs through the applications CI process not once has it failed…yet.

…Here’s hoping it continues to go as planned.

Docker nginx-proxy round robin…

nginx + docker
docker + nginx

So we use docker for container services at work. One container that is part of our ‘dev’ tools is an nginx reverse proxy tied to port 80. IT allows us to run many projects at once using hostnames and port 80; just like in production.

So we are chugging along and I start an applications http service. Hit the service in the browser, all good, reload: broken, reload: good, reload: broken. I am all like wait a minute, thats not cool. After about 5 minutes of debugged we make a realization: I have two instances of the http service running.

Turns out the nginx reverse proxy round robins requests when more than one service is running.

*Note: This was all done w/o docker swarm enabled. Just plain docker-compose and docker run where used.

Economy of Scale: when big is a waste.

Some short musings. I was thinking about why larger organizations tend to be less ‘agile’ or ‘nimble’ than smaller organizations. Even though larger organizations are typically broken into smaller and smaller groups. After thinking about it the phrase administrative abstraction came to mind. Here’s a quick break down of what it means to me:

Larges orgs: Typically high in price expensive but a low wait time once work starts. Getting authority can take time due to authorization, setup, or negotiations.

Med orgs: Reasonably effective, not to many levels of authority and red tape to work through when changes are requesteed. However, you may have to wait in line behind other client projects before your desire is worked on.

Small orgs: Usually very dedicated and willing but not enough resources internally to complete task to level of expertise req. to complete task.

What do you think, am I missing anything here?