Tuesday, February 6, 2024

My Reflections on Moral Letters to Seneca - Vol. 2

 [Previous]


Good day! February has come. This will be a bit lenghty. About my copy of the book, I bought it on January 21, 2024. Anyway, here are my reflections.



On Sharing Knowledge


It is in my nature to share knowledge. Seneca here shares the joy of sharing knowledge to friends especially to his dear Lucilius. I am quite a voracious reader. In my school, elementary, high school, and college, I usually gain a reputation of being a walking encyclopedia, even in the infancy of Web 1.0. I always frequented the library. I truly grateful to my father who bought a set of encyclopedias from a peddler around 2000s. I learned many things like how poisonous a biting a dumb cane is, colors of the flames burnt from different kind of chemical powders, what a parent must do when they find suspicious fluids on their children's underpants, how printers mix 4 kinds of ink to make an image colored, and the like. I also share my father and older brother's love of documentaries. Even now, some of the kids in my neighborhood call me "Kuyang Matalino" ([Tagalog] Knowledgeable Big Brother)

My profession is Information Technology, I do software development. Despite not getting a degree, I still manage to earn a livelihood that pays well... due to my endeavour of self-studying.  Along the way of being a software developer and "hacking", I met some friends along the way with similar profession. I belong several groups of IT professionals which includes Progatory, Pinoy IT Geeks/Pontus Cognito, PHackers. I met them online and now we share knowledge more than ever.

I also have some mentees, one is a nephew of a woman whom I had relation with, one is my childhood neighbor and her thesis groupmates, one is my cousin who also aspires to be an IT expert and his younger brother being into multimedia art. By teaching, I understand my skills and knowledge more.

I truly relate with Seneca's joy of pursuing knowledge and sharing it.

On Crowds


Seneca starts with his usual feelings when he is in a crowd, as if they are a thing to deal with. There will be times we are ought to blend in the crowd.
"Certainly, the greater the mob with which we mingle, the greater the danger."

This reminds me of Murphy's Law: "Anything that can go wrong will go wrong.". Think about the stampedes, some sudden terrorists, etc. But, Seneca talks about how he will become a "changed" man but in a wrong way. It's as if he's some sort of a stereotypical introvert despite being a politician. It's as if he's agoraphobic, I don't know.

He talks lengthily about the people of the arena, the audience. They enjoy watching fights, witnessing gore, being enthralled with action, cheering, occasionally seeing some wild beasts. Today, it is akin to an MMA match minus the beasts, the people's cruelty, and daily deaths... and the fighters are voluntarily in the arena. Similar enjoyment can also be seen in a NBA or FIFA World Cup. Hell, even in a cockfight arena. Even a huge bickering on social media by the celebrities create a similar atmosphere.

The arena usually has someone who committed a crime and now "entertains" the people on their high ground (if you know where they usually sit). Even now, some people are harboring morbid curiosity, it'll be evident when you show them a random gory motorcycle accident on an internet video.

The death arena people irks Seneca. He is horrified of these people that he would want to save the wayward guy who ended being an entertainer in the arena. He realises how cruel the people are. He also talks about the horror of human nature when it comes to riches or being slanderous... to the point that he feels that he should "imitate or loathe" the world, but he recommends to do neither.

The best course of action is to mingle with select people who brings out the best in you. Neither be a people pleaser nor try to win the heart of the crowd. It's better to cultivate oneself. It's better to improve own knowledge and wisdom and to share it with friends. One's best qualities shall always face inward, he tells Lucilius. Say, you want to hone your software development skills, do so and eventually you'll find friends of the same cloth like I did.


On Philosophy and Friendship


This is the most lengthy one I have read so far. He is talking about the debate on what a "self-sufficient" man is. Some say it is being immune to suffering; some say it is feeling suffering but being able to overcome suffering. He talks about equanimity. A self-sufficient man can be equanimous when he loses a limb or a friend, but the same man has a sense of self-preservation and a desire to keep and make friends.

He warns Lucilius about the "fair-weather friends", those are present only in time of convenience. Then are also "friends" that one may get when one is rich, powerful, or holds something of great value. When they make friends of someone, they are merely "bargaining". A self-sufficient man befriends someone for the sake of it. It's like seeing some beauty hardly can anyone behold.

A wise man isn't the one who isolates himself or anything. That man is sufficient for a happy existence rather than mere existence. This reminds me of Covey's book Seven Habits of Highly Effective People. He emphasises interdependence over independence. A wise man may be independent, but he can also be interdependent; he can still ask for help with anything no matter what.
"... for a happy existence, he needs only a sound and upright soul, one that despises Fortune."

I interpret this as living with people well.

The latter half of the letter talks about being self-sufficient to the point of overcoming misery, loneliness, emptiness, and the like. It's easier said than done. Corollary to this is contentment. This is quite similar to the Buddhist teachings. One may have cravings, but it does not necessarily mean that one will be too driven or devoured by it. One may feel a want to make friends, yet not being driven by loneliness. I had that kind of feeling where I wanted to make friends with someone due a deep emptiness within me that causes some sort of harsh loneliness. The keyword I set here is desperation. One must avoid being too desperate to make friends, in turn, it leads to a want of accolades and what not.

"Unblest is he who thinks himself is unblest"

Speaking from experience, I suffered a similar fate. I may be the "Bearer of the Curse", yet I still managed to go on and cultivate what I need to cultivate. I am blest to not have ended up myself and still manage to practice my profession. Now I am less pessimistic, less nihilistic, and less cynical.

Speaking of desperation. There's this movement called "incels", a support group who helps anyone with psychological challenges when it comes to finding a love partner. Sooner or later, some people who crave not only love, but also sex, has hijacked the term for themselves. These group of guys also called "incels" are too driven not only by loneliness but also severe frustration that it corrupted their souls. They formed an echo chamber where they hold misogynistic views, objectify women too much, being too entitled, forgot what "consent" really means, fantasies of sexual violation against... too many to mention. One of their well-known patron saint is Elliot Rogers who, due to his frustrations, ended up 3 men, 3 women from a house supposed to be full of women... I don't know his total body count. Despite having the looks, he still didn't get a girlfriend despite having the capacity to do so. Show someone, who doesn't know him, his face and I bet someone will find him attractive, but he gave into his vanity and the rest is history. This is what happens when one neglect one's soul. They have gone beyond desperation. In this case, these later "incels" found the wrong friends. One may pray for their redemption. This is one of the dangers this letter reminds me of.

"Please be kind to yourself" the thought resounds. Do not give in to any desperation. 


Thursday, February 1, 2024

Epistles to a Software Developer: Prerequisites

[Originally written on January 20, 2020]

Dear Eri, Good day! I hope you are doing fine. We have been exchanging messages these past days. I have taught you some things with regards to software development, yet they are random and unstructured. My mentee, a girl who just finished senior high, STEM strand, is now an IT student. You wanted to take a degree for an aspiring veterinarian, yet you chose IT. It is still fine, just think in systems and parts. I am by no means a master, yet, however, I know what it takes to tread the path of a software developer. I’ll guide you through your years, especially on self-studying. I’ll be sending you letters when I have a lot of time. The field of software development will be full of symbols, diagrams, and mental models. Yes, you have to be clear with your mental models, that’ll be your bread and butter. A decent skill in maths is necessary. Most of all, you’ll need to be always logical when it comes to the technical aspects. Since most of the manuals, tutorials, and documentation are in English, you might as well improve your English skills with regards to reading and writing; a well-honed reading comprehension skill is a must. Hone your “Googling” skills. Also, your abstract reasoning will be put to the test; I told you what your bread and butter is. With regards to mental models, I always use the IPO model which stands for Input Process Output. Now, now, you don’t have to always draw it on a paper; I use it because it is easy to visualise in my head. Some other complicated diagrams exist, like the Flowchart, or UMLs. For now, just practise the use of the flowchart diligently. This path requires you to efficiently interpret diagrams and symbols, and that can be achieved by practice. I repeat, IPO and Flowchart; the rest can be learned well later. A pen and paper will aid you in learning if you diligently take notes; typing doesn’t have that feel and memory reinforcement. A whiteboard will also do, but use your camera and take photos of what you’ve written there for future reference. Stick to one programming language for the meantime and you’ll be surprised how easily you’ll learn another. I recommend Java or Python. This is what your mentor can teach you for now. I’ll send another letter next week. See you soon! Regards, Haytham Merger P.S In my university, they teach C++ to Nursing students in the very 1st semester.

Sunday, January 28, 2024

My Reflections on Moral Letters to Seneca - Vol. 1

A quick background: I acquired a book published by HarperCollins. Along with someone, I bought it in a Fully Booked bookstore somewhere in the Mall of Asia. She has her own copy and she recommends me to read well the book as might as well write my reflections on it. The book is well known as Letters from a Stoic.

I hereby section it per letter.


On Discursiveness in Reading


Seneca talks about reading literature in general as well as having mentors through a book. One must choose their books well. It is not good to have more books than what you can read as an individual. It is unwise to jump from book to book. If you are reading a book such as Meditations by Marcus Aurelius, better to finish it thoroughly than reading two or more books at once. Of course, there will be students writing their research papers but it is for another topic. There are also books where you read only a particular chapter of it for reference, like an encyclopedia or Greene's 48 Laws of Power, they are out of this scope.

Being too desultory means jumping to one thing or another. The word itself has it roots in a Latin word for a 'skipper'. Its dictionary meaning tells us that it's a lack of plan or purpose. Jumping from one book to another is a desultoriness. Seneca tells us that it is a sign of a troubled mind. Moving too much will cause a lack of firmness. It's better to do things one at a time. He also tells Lucilius to choose his mentors well, and to not have too much. It's basically what we call 'filtering' to take care of your mind and senses in this digital age. In this digital age where something like YouTube serves a deluge of videos, you better choose your channels carefully. Take care not to be sucked in by the algo. This letter is still relevant to this age.

On True and False Friendship


In this letter, Seneca talks about friendship in general. In the latter half of the letter, he warns Lucilius about oversharing to strangers and being too tacit from his friends. One shall not be both. If one needs to tell a friend something, it must be said. I remember some fools in Facebook sharing their relationship problems with their friends or significant others; it occurs more than what you might think.

"It is equally faulty to trust everyone and to trust no one." he said.

On the Philosopher's Mean


He talks about some philosophers here who do not blend with the environment, those who are trying too hard to be ascetic. They are also the ones who neglect their basic hygiene and being too ostentatious about being nonconforming. It reminds me of the Internet Atheists with their fedora and their neckbeard. It also reminds me of these stereotypical angry 3rd Wave Feminists and their bright hair and piercings all over the place. For fairness, I'll also include these ultra-Trad or Alt-right people who doesn't even workout and being too misogynistic. They share the common traits of being unkempt and ostentatious... also include being irritatingly smug. 

There are also concerns about the ones who does not live in the present, the ones who do think too much ahead, and the ones who ruminates too much. It is quite similar to the troubled mind discussed in On Discursiveness in Reading. This speaks "chill out will ya?". 

Friday, July 1, 2022

Allucinator's Tales: The Receipt

The Storyteller

A guy buys a takeout from a famous fastfood restaurant. He noticed that the cashier woman is cute. He checks the receipt, and sees her full name. Receipts often show who the cashier is, either identified by full name, first name only, or some sort of random numbers. 

He checks the name on FB, and oh boy, a solid intel, it is.

Lesson: you are not a CIA or FBI glowie[1]. Don't do this. And as for the receipt/POS makers, use a random sequence of letters or numbers instead to identify the cashier. (So that ID string can be searched in their internal database instead.)

Fortunately, the guy in the end lost his interest after some hours, and did nothing thereafter. And also found out that petite woman is a single mother (though this isn't the reason he lost his interest.) 

[pic related: the storyteller]

[1]Quoted from Terry Davis: "The CIA nig**ers glow in the dark. You can see them if you're driving. You just run them over; that's what you do. Fucking CIA nig**ers."

Thursday, July 9, 2020

Those Hospital Dreams

2020: I found an old binder filler of mine, I saw this dream journal entry of mine. As far as I recall, I have written this around 2015. Never mind the checklist in cursive writing.

The first part

The second part
[TRANSCRIPTION (with some corrections according to the best of my memory)]

I am wandering at a seemingly abandoned hospital. At some parts of the hospital, a random ghost would tap my shoulder. Then I turn my neck to see that ghost. The ghost sometimes looks like he died peacefully. Some others has mangled looks. Some others have contorted joints and other body parts as if they jumped off a high building. All of them would tap my shoulder and point me to a teenage ghost with a female voice. She has a fair skin. She is wearing a duster.

She would often talk about her past miseries. Be it of her love life or how her family does not help. She would try hard to appear creepy and try to bite and nibble my fingers; fortunately, it does not dig into my skin. I am trying to restrain her or hold her tightly as (if) to hush her or comfort her. I have even cuddled her at some point as she bites my fingers like a dog.

She seems to avoid crying by doing such things. All I was feeling was some sort of a pity with a "why?" in mind.

"Where is my baby?" she said.

"Have you named it before it was gone?"

She starts to bite me the bite my fingers as I restrain her.

[Cut to another dream]

I was a woman with a child. It was night in the hospital. It's understandable that (the) lights are closed. But this time, most lights are gone. It's so dark. It feels like something is chasing us. We are running through every corridor.

The we got stuck in what seems to be an equipment[1] room. What was chasing us was Kurt[2] with a distorted figure. I tried to squeeze one of his hands and...

I woke up

(#)


[1] equipment room - I pertain to the room where janitors or other maintenance workers store their broom and other equipment
[2] Kurt - the author, also the guy who narrates in the first dream (in his normal state)

Friday, May 24, 2019

Anything to Write

Here I am; I will write a poem
But first, I need time; I leave home
I casually stroll in daylight
Can't think of anything to write!

I walk the streets of my village
Uneasy, I need an assuage
Fix my mind! My words must look right!
Can't think of anything to write!

I'm on a swing, empty playground
Sitting. Thinking. Still, no words found
Until nine, I bathe in sunlight
Can't think of anything to write!

Here I am; I will write a poem
Can't think of anything to write!

Saturday, May 4, 2019

MILF Analysis

Good day! I’ll introduce myself as a Software Engineer who aspires to be a Software Architect.
Before you start writing an understandable English text, you must have read an English text before, or you’ll have nothing to imitate. You’ll always need example. When reading a source code, I have an acronym in mind: MILF. It’s like a guideline to know what to check first.

The MILF I shall be talking about is neither a group of Philippine Islamic separatists nor a kind of a performer with a beautiful maternal aesthetics. It is an acronym that stands for Machine, Intention, Logic and Language, and Files. Whenever someone spots a bug, proposes some addition of feature, or modification of a feature, I get to the topic and that will be my scope. Today, I shall give you an insight on how I analyze other people’s source code, or even the source code of my past self.

The Machine

Will this be run on a desktop or laptop? On a smartphone? On an embedded device? On a virtual machine (an imaginary computer inside a real computer)? On most cases, you skip this step unless the constitution of the Machine and the OS affects the intended functionality in a huge way, like how file permissions are affected or the view of the web page changes when you use a mobile phone. Also take note whether the file is a system file or an application.

When thinking of the machine, you must think of the environment. The environment depends on the machine. Always. The background always appear first when you write a novel or a short story.

On what machine this is supposed to work well? Speaking of “suppose”…

The Intention

The most important part we have. When looking into a particular function, you ask yourself: “What is the intention of the developer when the code was written?” As much as possible, the intention is clear, concise, and precise. This is where you see things go right or go awry.
Intention of the Writer
Let’s start with a simple objective. The programmer just wants to fetch from a user table and display it in a browser.

<?php
$sth = $dbh->prepare("SELECT name, colour FROM fruit");
$sth->execute();

/* Fetch all of the remaining rows in the result set */
print("Fetch all of the remaining rows in the result set:\n");
$result = $sth->fetchAll();
print_r($result);
?>
// source: http://php.net/manual/en/pdostatement.fetchall.php
 
It basically just fetches data from a database, the intention is just to fetch a list of fruits. However, some things might go awry. However, the code shall not work if:
  • the database of the fruit table is absent
  • the fruit table itself is absent
  • the logged in user of the database has no permission for the action
  • something is amiss on the database engine
  • Some random time-travelling witch from Uganda cast a spell on your machine for no apparent reason other than amusement.
And it cannot be solved by merely changing the snippet, you have to deal with the problems stated above by tinkering with your database settings or contents, or countering that spell by offering a yellow rat, or something. When an error arises due to dependence of some outside influence, or when you have written an implementation by mistake, it is called a side effect.
Side Effects
Side effects exist when some things in the environment are added into the mix. When doing System.out.println("Hello World"); in Java, the developer’s intention is to just print “Hello World”. However, some problems might arise in the terminal which is out of the intention. The functional call I mentioned uses either /dev/stdout of Unix or CON of DOS, which are system files. Side effects can be a “bug” or a “feature”, like a Glutathione pill that is supposed to enhance the health of your liver, but it also whitens your skin. Or when the rugby manufacturers use toluene to enhance the adhesiveness of rugby but was abused by some street rascals for a heavenly experience because the manufacturers were not aware on the effects of toluene (or chose to ignore it because it’s a “feature”). Side effects and environment go hand in hand; you cannot eliminate it, but you can mitigate or contain it. Functional Programming afficionados would like to avoid or contain side-effects: they have monads or something.

Side effects happen when you use the following:
  • Third party libraries
  • The involvement of DBMS
  • System calls and files usage such as print (Python), scanf(C ), System.out.print(Java), and the like.
  • Any variables for function calls involved with the compiler, linker, interpreter environment. An example is PHP’s $_GET, or PDO functions.
  • Any function that uses or calls any of the above.
If something in the runtime of a code goes wrong, look where the side effects were induced. When you need to use one of the items mentioned above, study and try the effects. Remember that PHP snippet earlier? The side effect happens in $sth->execute();.
Getting to Know the Writer’s Intention
The first thing you do when you analyze the intention is to read the code. Some snippets of code are clearly written that you can derive the intended effect with a minimal comment.
When you shall read someone else’s source code, you shall have an idea or gist of intention first from either of the following:
  • How a certain feature of a program is run from the end user’s view
  • Or the logs generated when something’s on debugging mode.
  • The API documentation, the end user’s manual, or any supplementary sources
  • The source code itself if it is concisely made and well-commented enough
  • Or the words of the authors and contributors themselves
When you fail to have a good look through the first four ways aforementioned, the last one of the list is the last resort. Ask the contributor through e-mail, chat, or in person. It is your last resort unless the person has free time, you are in a hurry, or you are in the same team. Healthy communication is always a must. Free coffee or beer please.

Now that you have confirmed the intention of the contributor, you must confirm if the source code gives the intended results which leads to…

The Logic and Language

I don’t want to dive in too much into epistemology, but Language and Logic go hand in hand. Is language dependent on logic? Is logic dependent on language? Well, that’s for another day. However, I can assure that the logic of a source code depends on how the programming language was used. The use of programming language is shaped on how the logic in one’s mind was made. You must assure that the logic of the code matches logic intended by the contributor.

How well do you form your sentences? How well do you group your statements into paragraphs? How well do you form your article? How well do you form your statements? How well do you form your functions? How well do you form your… AAAAAAAHHHHH! You get what I mean, master both your command of the language and your logical skill so you can read codes well. Always know the syntax of the language and the semantics of your intention.

The possible mechanics varies per language. C programmers might be well versed in low-level programming. Most PHP programmers of 2005 just create sophisticated HTML templates. Java programmers will think in objects and interfaces. Japanese language has no future tense, unlike in English where you can say “I will write” while leaving the question “when” not answered specifically.

A source code itself has its own logic just as the contributor has his own intended logic. The two must match or at least the code logic must fulfill the requirements. Do they match?

There’s a room with two people. Assuming that there is a need to engineer a mechanical rice cooker that turns off by itself by a timer, how will a Victorian-era English baron argue with a shinobi from Japan who can’t speak English?

The Files

I assume that when you read other’s source code, you start with one file. You start to read the file block-by-block. You are well aware of the language, and figuring out the logic. Does the code stands alone? It it just a sheet? A leaflet? A booklet? A book? A tome? A library? As much as possible, be mindful on how many files in the system are participating in runtime, it’s what we call stack tracing. What are the files directly involved? Which brings us to…
Scope
This is a no-brainer. The scope determines if your refactoring is an overkill. Again, the scope of the code you read must accord to the scope of the contributor’s intent. The scope of your changes must also accord with the scope of your original intent. When you when you plan to refactor, you must make the scope of your intent appriopriate to the scope of the issue.
Includes, Require, Import, Use
Depending on the language, there’s always that one langauge construct or library function that points to a file using a pathname, a namespace, or a class name. Always look for that. Also, be wary of libraries that uses magic methods, it can impede your stack or file tracing if the library is not that documented.

Conclusion

I’m actually using this technique to analyze the source code of many libraries and the related systems. It’s a gist on how I grasp the involved files whenever a bug is reported. I call it the MILF analysis. How do you like my approach?

This is my original approach. I also have another approach. Here’s the other one