Category Archives

25 Articles

Code/Uncategorized

Cascading Style Sheets – Separation of Concerns

Posted by Danial on

Went into the CSS portion of Andrei Neagoie’s Zero to Mastery WebDev course; it’s more a refresher of CSS concepts that I went through in freeCodeCamp.

The introductory CSS lesson outlined the basics to writing CSS and Andrei went some way to explain why css code is contained in a separate file rather than having the code inline within the html file; namely separation of concerns

As websites get bigger and more complex, it’s cleaner to separate code governing styles from the main website code so that it’s easier to edit appearance of the website without adding lines to the main website code.

Days since last Zero Day: 2 (31/8/2020)

Code/Uncategorized

Adding pages to First Website

Posted by Danial on

It’s been a rough week at work and spent the past few days focused at my day job and resting when at home. Without a system to ensure that I do something every day, I racked up a chain of 5 zero days between 26/8 to 31/8.

I decided to set up a system to structure my days so that I will definitely put in at least a one-liner every day regardless of the situation. On top of that, the system, will also make it more sustainable for me to maintain no zero days by determining the extent of work I should put in every day depending on my fatigue, motivation and schedule.

[1] Tracking: A one line code added to First Website (can be content, tags, add or modifications etc.) and a corresponding one line progress log on blog that also updates ‘Days since last Zero Day’ tracker. Should take 2-3 minute tops and will guarantee no zero days.

[2] Implementation Intentions: If/Then conditionals to plan day-to-day schedule that will determine how extensive the progress should be. The conditionals were designed after considering my irregular shift schedule. Basically: If (tomorrow) == >10.45am shift OR Off day; Then log an additional coding/learning session + If (today) == OFF day; Then log an additional coding/learning session. Note that this is in addition to the daily one line code + progress log at the start of each day.

[3] Coping plans: These are plans (also in the form of an If/Then conditional) to prepare for specific circumstances where an additional coding/learning session cannot be logged. Basically: If EOW / Off day == bad day / late OR close to bedtime / busy errand day; Then write one line code + one line progress log. There are 2 reasons for the additional one line code + one line progress log in addition to the one already planned at the start of the day namely: (a) A bad day might start from point of waking up so this coping plan acts as a failsafe & (b) starting and ending the day with the one line code + one line progress log ritual reinforces the No Zero Days habit and increases the odds that the next day will be a No Zero Day; in effect creating a chain effect that should theoretically be hard to break.

Days since last Zero Day: 1 (31/8/20)

Code/Uncategorized

HTML Forms

Posted by Danial on

Forms are a ubiquitous component of websites. Be it to create a funnel and capture leads, survey or questionnaire, or just simply as a means for site visitors to contact the owner, forms provide a simple and effective way to collate data from visitors for a variety of reasons.

Today’s lesson went into the basics of creating forms on a website: creating text fields, checkboxes and options to be selected when filling out a form.

https://firstwebsite.danialfaizsal.repl.co/

[Days since last Zero Day: 1 (24-08-2020)]

Uncategorized

The Things We Think and Do Not Say

Posted by Danial on

I was watching Jerry Maguire recently on a whim, as I wanted to relive the clichéd quotes and scenes that I remember watching back when I was still a wide-eyed teenager. Right from the onset I was hooked by Maguire’s mission statement scene, whereby he is taken by an epiphany and starts to type out his mission statement embodying his new philosophy for the job: The Things We Think and Do Not Say.

I’m turning 27 this September, and the last time I ever came here was more than 2 years ago. In that time, I had seen, thought, did many things. I was always a voracious reader and always was fascinated with ideas and notions. After my high school life, I moved away from fiction and started to really get into non-fiction productivity books and thereafter drowned myself in reading online articles and Quora posts. My Instapaper is a sprawling repository of articles I’ve bookmarked over the years, and my Quora is similarly following a similar fashion, especially with my newfound interest in Data. So many inspired thoughts but all of them unorganised in my mind, evernote and random text files in my 6-year-old MacBook Pro.

One night, about 1-2 weeks back. I couldn’t sleep. It was drizzling and 1am in the morning. I took my traveller’s notebook and started poring over my quora, instapaper and evernote accounts. The rest, as they say is history. What follows is the product of my Jerry Maguire-esque epiphany:

Memo

There is no God but Allah and Muhammad Sallahu Alayhi Wasallam is His Messenger.

I choose to have faith in Allah over that which I do not control; in all other things I am the dominant creative force.

I will leave a legacy of human flourishing. To this end, I will grow one percent at one thing everyday.

I will center my world on Islam and live on the basis of Islam, Iman and Ihsan.

I will walk the world with many books in hand and employ multiple disciplines in solving the problems of this world. When reaching for a solution, I will take a middle way.

I will construct my mind as a deep knowledge machine. I will immerse in deep work when seeking knowledge. I seeking knowledge, I will employ a systematic and immersive structure to learn faster and better.

I will make every week a good week, with no bad weeks in succession. Every day I will apply the 10 years test, to forecast what 10 years in the future looks like based on today. Every month will be a life experiment, to build good habits and kill bad behaviours.

Every morning after waking will be a ritual,
Wake up by five dawn and give gratitude;
Next a quarter period to energise the body;
And a quarter period to master the mind.
Promptly I will then establish prayer.
The next two periods will be portioned into four parts;
a part to reading;
a part to dreaming, thinking or writing;
a part to learning;
and a part to productivity.

I will hold onto five guiding principles in societal ties:

– Family comes first
– Marriage is a struggle to grow strength to strength
– Seek out big thinkers
– Surround myself with people who inspire
– Find a mentor for every endeavor

In framing my intellect in my outlook of the world, I will abide by eleven commandments:

– Do one thing at a time
– Keep moving out of my comfort zone
– Before reacting, listen and understand
– Constantly challenge my beliefs
– Keep awareness of every lived moment
– Analyse the outer world and do not live on autopilot
– Notice the details
– Train my intuition and play with my gut
– Have fun
– An obstacle is an opportunity
– Don’t dwell on the past

I leave with George Bernard Shaw’s “A Splendid Torch”, as an apt closing to this memo:
This is the true joy in life, the being used for a purpose recognized by yourself as a mighty one; the being a force of nature instead of a feverish, selfish little clod of ailments and grievances complaining that the world will not devote itself to making you happy.

I am of the opinion that my life belongs to the whole community, and as long as I live it is my privilege to do for it whatever I can.

I want to be thoroughly used up when I die, for the harder I work the more I live. I rejoice in life for its own sake. Life is no “brief candle” for me. It is a sort of splendid torch which I have got hold of for the moment, and I want to make it burn as brightly as possible before handing it on to future generations.