Code/Uncategorized

CSS Properties and Selectors

Posted by Danial on

Pretty fun refresher on css properties and selectors today and playing around with stylesheets.

CSS Tricks: cheatsheets and guides on everything CSS

Paletton Color Picker: color scheme picker when choosing colors to mix and match

W3C Selectors list

MDN Reference on Cascading and Inheritance

Specificity Calculator

CSS Cheat Sheet

Reference:
*https://www.w3schools.com/cssref/css_selectors.asp
*https://css-tricks.com/almanac/

Cascading Style Sheets at the most basic level it indicates that the order of CSS rules matter.

.class

#id

*
element
element, element
element element
element > element
element + element
:hover
:last-child
:first-child
!important (not recommended)

What selectors win out in the cascade depends on:
-Specificity
-Importance
-Source Order

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

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)]

Code/Productivity

No Zero Days [Days since last zero day: 1]

Posted by Danial on

My last post was in 2016 (it’s been that long!). A lot has changed in the past 4 years, and now I’ve dived headfirst into the tech world. I won’t go into detail on what has happened so far, suffice to say, I’m now fully invested in a career revolving around tech, and am also self learning web development in my free time.

Which brings me to where I am now. After being interested in data science for the longest time, I finally managed to complete my basic Python learning (courtesy of Python Crash Course) when a semi-lockdown was in place where I’m located (March – June 2020). While it felt empowering to be able to code in Python and build random cool programs, I soon realized the limitations of Python. Python was great to build toy projects, and was powerful for data projects, but limiting when it came to the ideas I had i.e. building a personal website, creating a hobby site where I can build tools for Pokémon trading card game competitive play etc. HTML/CSS was the first order of building things, executing and implementing it for the world, and JavaScript very close behind to provide powerful performance to those things.

And thus came my pivot to learning web development in late-April/early-May. I completed the HTML/CSS curriculum on freeCodeCamp and had only 2 projects to go (technical documentation and personal web pages) before I could officially earn the Responsive Web Design Certification, but I then fell by the wayside and stopped completely the last 2 months.

I had started a 100 days of Code and was restarting so many times. I dreaded having to log in some work or learning every day, assuming that I had to put in a substantial piece of work for the day to count. And then updating it on Twitter and GitHub.

This time round, I’m taking a simple approach.

Show up every day.

Just type out a line of code or sentence.

Make sure every day has something in it that furthers learning, even if just one minute.

No zero days.

I am now following Andrei Neagoie’s Zero to Mastery Complete web development course, and validating my learning by building out a website as I follow his lessons. You can follow my learning journey here at https://firstwebsite.danialfaizsal.repl.co/ where I progressively develop the website as I learn HTML, CSS and JavaScript.

Days since last zero day: 1 (22-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.

Fun/Productivity

This is 2013

Posted by Danial on
This is 2013

So this post is a little late for a 2013 post. In the past 2 months from December 2012 to January 2013 I managed to do a lot of reflective thinking. I was called up for reservist in December and early January was kind of a holiday-cum-rest period before term begin. While I was preoccupied for a large part of this period I managed to reflect a lot upon my life these past 23 years.

A lot has happened and I’ve definitely went through multiple turning points in the past 7 years. I stood on the threshold of the new year and I started to wonder where was I headed And I realized I didn’t really know. But what I did know was that I repeated certain mistakes that I didn’t want to repeat again and there was definitely a list of habits I wanted to cultivate in 2013. So for this year I’ve decided to do something different. Resoultions never seem to work for me and for many others. This time round I decided instead employ a daily checklist coupled with a list of 10 simple and clear rules to follow. In Switch a book by Chip and Dan Heath there were three crucial factors towards affecting change namely the rational emotional and environmental. The daily checklist and 10 rules provide and important daily script that I can follow with very clear goals. For example I divide the day into 7 timecycles (late night-morning-noon-afternoon-late afternoon-evening-night) each with specific tasks that would structure my day i.e. Check email at 1230pm. The 10 rules help to complement the checklist by reinforcing the habits they are trying to create. For example the rule “Sleep by 11pm latest” ensures that I am able to maintain a regular sleep schedule a schedule that is outlined by the timecycle approach for the daily checklist. I also make sure to reduce all tasks to something that is easy to do i.e. 30 minute revision. The best part about this approach is that it is meant only as a guideline and i follow them only to the point I am able to day by day hoping that by the end of 2013 I am able to follow through the checklist from the first to the last task. In this way I’m able to go at my own pace and also hopefully cultivate some new habits in the process.

Also, we only had about 2 weeks of holiday break in January, but me, Hudz and Farid managed to plan at the last minute a 5-day holiday to Penang and Hat Yai. A well deserved getaway and most of the time we were either eating or just chilling. Not really a sightseeing trip but good enough for us to just unwind away from Singapore.

It’s now already week 2 of the new term, but already I have a good feeling for the year ahead. But as always, only time will tell. For now, I’ll just take one step at a time, at my own pace.

-MDF

Projects

12.12.12 & Start of a productive month (probably)

Posted by Danial on

So exams are done and semester is officially over. While it has been a somewhat turbulent few months for me, which also saw me taking a short trip to Malacca to visit grandma and at the same time do a bit of self-instropection, I must say that I’ve come out with not only clarity of vision but also a greater sense of purpose. Previously, I was doing too many different things at the same time without really knowing if everything tied in with what I really wanted to do. But not anymore. And yesterday was probably a start towards what is hopefully a very productive holiday.

After a sort of hiatus from NUSMS events, I’ve decided to join up with one of the project committees and recently had our first meeting. Once details are confirmed, I’ll be sure to post more of it here, but suffice to say it looks to be a very interesting event.

I also had the opportunity to attend a session of Suara Musyawarah. For those who might not have heard about it, Suara Musyawarah is an Independent Committee to engage the Malay/Muslim community by gathering feedback, opinion and perspectives from the ground. It can probably be alluded to the National Conversation, but more specifically targeted for the Malay/Muslim community. The session I attended was mainly composed of tertiary students and young professionals, and many pertinent issues and sentiments were raised. It’ll be interesting to see what kind of opinions and perspectives from the community might arise as more of such sessions are conducted. If more segments of the Malay/Muslim community are represented in such sessions, I’m sure a very frank and enlightening collection of perspectives from the community can be extracted.

In other news, I might also be involved in another Youth Expedition Project, but we’ll see God Willing:)

-Danial