YouTube keyboard shortcuts

Please use keyboard shortcuts for YouTube :
f => Toggle full-screen
t => Toggle theater mode (expand the playing area)

When in full-screen mode, or the player is in focus, then following shortcuts also work :

down arrow => Decrease volume by 10%
up arrow => Increase volume by 10%
space => Toggle play/pause

0 => Seek to the beginning of the video
1 => Seek to 10% of the video time (if video is of 55 minutes, then pressing 1 would take you to 5.5 minute marker)
2 => Seek to 20% of the video time
Same for 3, 4, 5, 6, 7, 8 and 9

left and right arrows go 5 seconds in the direction of the arrow

If the video is “paused” (and video-player is in focus) then you can move back and forward “1 frame at a time” using comma (,) and full stop (.)

I have set “Ctrl + Shift + Space” as global shortcut (in Ubuntu) to play/pause from anywhere, even when YouTube (or any other “audio/video player”) is in the background

What is Javascript, Node JS, React, Mongo DB – for students/freshers

What I am NOT:

  • I am not a Node JS developer
  • I am not a React developer
  • I do not have any significant MongoDB understanding
  • I am not “new”

What I AM:

  • I am a PHP developer with 16+ years of experience in web-development
  • I wrote my first javascript web-page in 2002
  • I am an Oracle Certtified Associate (SQL developer) since 2006
  • I am “old” (not *that* old, but still old)

Since I am old experienced, and I love talking / communicating, and I tend to connect with a like-minded people.

A lot of young folks – students, freshers, learners – have recently asked a lot of queries around javascript and related technologies.

Considering that I am not a javascript developer, I will be unable to provide in-depth details of these terms, however I will share “my” version of these.


Following are the key things that I would be rambling about:

  • Javascript
  • Node JS
  • React JS
  • Mongo DB

Javascript

TL;DR : Programming language, can run on client (browser) and on server (web-server)

JavaScript / javascript / JS = Is an “event-driven language” originally created for the browsers (or “websites”).

“Event” is something that we do with mouse or keyboard (usually on a website), like “click” or “scroll” or “type something”.

Node JS

TL;DR : Javascript running on server (aka “backend”)

Every browser is having a “javascript-engine” that runs the code written in javascript.

Internet explorer, Edge, Firefox, Opera, Safari, Chrome etc.

When “Chrome” was launched, they included a special engine of javascript, called “V8” engine – it was very fast [I might be wrong here, and yes, I am lazy as well]

The “V8” part was taken outside chrome, and used that to run javascript outside the browser to create different kind of apps.

The “environment” that was created (where javascript code could run) was a “run-time-environment” and it was named “Node JS”.

Node JS is NOT a programming language, and is rather a “run-time environment”, and the language that is used to write code that can run in such an environment is “javascript”.

When someone says they are a “Node JS developer”, basically what they are saying is that they are “javascript developers” – and since Node JS is usually used to run application on server side, and not on the client side (i.e. a browser), so a Node JS developer is a “backend” developer (the one who would usually *create* APIs).

Please note that the word “usually” is used often. Which means exactly that – “usually” – not “always” or “almost always” and rather “usually” – as in “most of the time, but not always” [I know JS people have varied levels of interests, which I may be completely ignorant about].

React

TL;DR : Javascript library, by Facebook, to create reusable-component-driven UI, to improve UX (aka “frontend”)

  • UI = User Interface (how does a website “looks”)
  • UX = User eXperience (how does a website “works” or “responds-to-events”)
  • Component = A small section of the design of a website (like a post, header, footer, menu etc)

Every developer writes code in their own way, including JS devs (Javascript Developers).

There are many challenges in writing code in javascript (for browsers/clients), and we’ll focus on these 2 only (for now):

  • Cross browser compatibility = A website must look-and-function same across all browsers
  • Responsiveness = A website must look good, with same/similar functionality, across various screen-sizes like desktop-monitors, laptops, phones, tablets etc

Making a website cross-browser compatible and responsive is a pretty big deal for any single/individual developer.

Here come the “help” in the form of various libraries and frameworks written by the best of the best.

React JS is one such library, developed by the guys at Facebook, that allows JS devs to make UIs for websites using “components”, which eventually makes it easier (and consistent) for developers to focus on making websites cross-browser-compatible and responsive.

React JS is having a very large community of developers that has created a lot of components and tutorials, and other code-snippets, to help other developers.

Angular is another library/framework which does a similar job, in its own unique way, and is developed by Google.

Vue.js is another such framework which does a similar job, in its own unique way. It was created by Evan You, and is now maintained by him and the rest of the Vue core team and other community developers.

jQuery is another library which does a similar job, in its own unique way. It was the default choice for a lot of developers before Angular/React/Vue became popularised, around 6–7 years ago, and is now not preferred, but it is still the most used library on the internet.

Context : The javascript libraries of around 75% of the websites is “known”, and out of those 75%, more than 95% websites use jQuery. So, jQuery is a big deal, even today, and it does not looks like it’s share will go down anytime soon for the next decade or so.

Mongo DB

TL;DR : It is a database, where data is stored, and queried. Similar to (not same) as Oracle/MySQL/PostgreSQL in terms of functionality. Dissimilar to the other databases in a lot of ways as well.

Mongo DB has nothing special to do with javascript.

People who tend to work in a specific tech-stack, usually use the same tech-stack for almost all of their projects, and name it something that can be easily referred.

People who work with Node JS (the “backend”) often use MEAN stack

  • M : Mongo DB
  • E : Express Engine [Node JS framework]
  • A : Angular [Frontend library]
  • N : Node JS [The JS web server / run-time-environment]

Mongo DB is the “database” as part of the stack, and people who use “javascript” often tend to use MEAN stack, so Mongo DB is their primary/default choice of DB.

Similarly, people who work in PHP (like myself) work in XAMPP stack, which uses “MySQL” as the default database, so MySQL is their primary/default choice of DB.

Explaining “Mongo DB” is probably out of scope of this article, and should be done by someone who has extensive (and correct) understanding of that.


Disclaimer : Although I am confident about what I have written, however, if you are a student/fresher and intend to move forward with learning/exploring any of the above topics, I strongly recommend to find some other articles/documentation/videos or any other kind of content created by respective subject matter experts, since my understanding of the above is based on reading/talking about these topics, with colleagues/friends/SMEs, and my knowledge may not be latest (if not wrong).

Why and how much one should exercise/train in software development?

TL;DR

If you want to be the best of the best, then a lot.
If you want to be good, then less than a lot, but still a lot.
If you want to be “just ok”, then not quite a lot, but enough to not to stay behind than the 80% of the competition.

If you do not exercise/practice/train/learn – then you will stay far behind, around the last 20%.


Software development is a unique field. While the whole world seems to run on software nowadays, the speed with which it is evolving, it is quite a surprise that the world does not crashes every few minutes or hours.

In software, a new version is launched, a new PR is merged, a new commit is pushed, a new line of code is written – and something changes.
What you knew a second ago, has changed, and while you were looking at the change, something else has changed.
Obviously, we cannot keep up with this pace of change.

So, how much one should exercise or train in software development?

Rather than focusing on just learning in software development, let’s compare it to some other common things that are supposed to make us better.

We know for a fact that a healthy diet and exercise are good for us – even if we don’t do it, we “know” it is good for us.
We know that we should eat healthy, but we don’t do it.
We know that we should exercise, but we don’t do it.

Why?
Because it requires effort, and we are lazy (or we are not lazy, but we are busy).

If you want to have a healthy diet

  • Follow a strict diet on a regular basic (even if you feel repelled by it, initially)
  • Have a cheat-day, when you can have anything else (not necessary, but it helps)
  • Keep changing the diet-plan, to focus on different body needs, like protein-based, carbohydrates-based, fat-based etc

If you want to be physically fit

  • Follow a strict exercise regime on a regular basis (even if you feel repelled/challenging, initially)
  • Have a cheat-day, when you don’t exercise, and rest (not necessary, but it helps)
  • Keep changing the exercise plan, to focus on different body parts, like legs, core-strength, arms, back etc

If you want to be good at software development

  • Follow a strict learning/practice/training regime on a regular basis (even if you feel it challenging/difficult, initially)
  • Have a cheat-day, when you don’t exercise/learn, and relax your mind (not necessary, but it helps)
  • Keep changing the learning plan, to focus on backend, frontend, DevOps, security, code-quality etc

The key word here is “If you want…”
If you don’t want to have a healthy diet, you don’t have to put in any extra effort.
If you don’t want to be physically fit, you don’t have to put in any extra effort.
If you don’t want to be good at software development, you don’t have to put in any extra effort.

Stay Lazy, Stay Content – that is one mantra that is NOT going to help you.

A lack of “Healthy Diet” and “Exercise” does not mean that you won’t survive.

  • You will survive, but you will be unhealthy, and you will be weak.
  • Your life would not be “great” in the long run.
  • You will always find yourself “not good enough”
  • You are not going to be able to do things that you want to do.
  • You are lazy, and are not willing to do the right things for yourself, for your family, for your kids.
  • Lack of healthy-diet and not-being-physically-fit could cause you to (die early) crash in the event of a disease/infection, and people around you will suffer.
  • Lack of these would also prevent you from leading a healthy, energetic and positive life – as an individual, and as a contributor to your family and society.

A lack of “Learning” and “Practice” does not mean that you won’t survive.

  • You will survive, but you will be unskilled, and you will be weak.
  • Your life would not be “great” in the long run.
  • You will always find yourself “not good enough”
  • You are not going to be able to do things that you want to do.
  • You are lazy, and are not willing to do the right things for yourself, for your colleagues, for your company.
  • Lack of learning and not-practicing could cause you to (die early) crash in the event of a project, and people around you will suffer.
  • Lack of these would also prevent you from leading a healthy, energetic and positive life – as a developer, and as a contributor to your company and community.

People usually assume that I am good at software development, having worked on many projects in various organisations in the software industry for more than 20 years, .
It is not true.
I am good at software development, not because of the time that I have spent on the projects, but because of the time that I have spent learning, practicing and training.

On a regular day (while working on a project) I spend somewhere between 1-2 hours learning and training
When not working on a project, somewhere around 3-4 hours, at least.

In the famous words of the great Usain Bolt:
“The work is behind the scene. Competition is the easy part. Behind the scenes is where everything is done to get to that one race that you need to run!”
“Easy is not a option. No days off. Never quit. Be fearless. Talent is what you have naturally. Skills are only developed by hours and hours of work.”

Train daily.
Train fearlessly.
Train to be the monster that you want to be.

Train as much as you can, based on what you want yourself to be.

How much to train?

If you want to be the best of the best, then a lot.

If you want to be good, then less than a lot, but still a lot.

If you want to be “just ok”, then not quite a lot, but enough to not to stay behind than the 80% of the competition.

Why reading programming books is good for you (especially if you are a programmer)

Books are a great source of knowledge, yes, and there are a few other things that make book reading, especially programming books, much more valuable.

Patience : For obvious reasons

Focusing on a topic for longer duration : This applies to reading any book (not just programming/coding books)

Attention to detail : Videos/blogs etc are good for “high” level learning (yes, even video courses with 50 episodes are high-level learning), and when you are reading a book you have to give your full attention to the line/paragraph/section that you are reading, because it is not someone else teaching (that you can skip or lose-track-of), it is you who is reading and until the subject matter is clear in your head you would not be able to move on to the next section/line. So it becomes paramount that we have to give attention to the details mentioned therein.

Problem understanding : In a programming book, the problems are laid out in a detailed manner, and it requires intense focus and attention to understand the given problem (so that when the solution/answer is discussed in subsequent sections/chapters, you can grab that).

Problem solving : Once you have understood the problem, it is equally important to solve the problem as well, and when you are reading a book and the author is taking you through the detailed steps of solving the problem, you understand the journey (and not just the solution)

Slow gratification process : Once you have started a book, the journey begins to explore the details on various topics (depending on the subject of the book), and the emotional satisfaction of finishing a book makes up for a slow, but very high gratification, which makes you happy, and as a programmer, makes you more confident and allows you to be more communicative and sharing (very important things that you cannot achieve via videos/blogs etc)

Organised reading/follow-up : Finishing a book makes you understand the intricacies of content-writing (and eventually code-writing), and helps you become a more organised developer, especially around managing the non-coding content. JIRA/Trello stories, understanding documentation of 3rd party APIs/other-platforms, improving upon the instinct/gist of going through various docs and enables you to find the required/focused content sooner. The more you read organised and complete content (books), the more you improve your intuition and you grow faster-reading skills , without missing on the key information (which is a huge cause of frustration for developers, since they tend to skip a lot of seemingly-insignificant content while reading the project/task details and end-up with half-baked features/products

This is in no way a complete list of the good things that happen to you (as the reader/programmer) when you read a programming book, but this should help you understand the importance of reading books (hard-copies, not e-books).

Perhaps the only post in 2021, on December 31’st

I find problems!

I find problems – that’s what I have been doing – and I fix them – that’s also something that I have been doing.

If I can’t find a problem in something, then I can’t give suggestion to fix it – and I feel disappointed with myself.So, it’s not you, it’s me – I have the urge to identify problems in almost everything, and I try to push myself and others in fixing those problems.

Almost everything that you would share with me would have “some” scope of improvement, and my initial/knee-jerk reaction would be to identify the problem and share the solution.

Don’t be mad/sad about that – that’s just the way I am – I am pretty sure I am not so proud of myself here, but I believe this is important for the sake of improvement in our lives.

The day I stop complaining/giving-suggestions/finding-problems – that’s the day either I am dead, you are a perfectionist or I don’t care…

Tee3 | Tips, Tricks and Technologies

I have been into web development from 2 decades (starting with static HTML websites back in 2001), and moving up the ladder by learning/implementing Photoshop/graphic design for 5 years, and from 2006 onward professional PHP (and related tech-stack) based development.

Seeing people struggling with basic know-how of core programming and related skills and ending up with confusion, lack of confidence, being less efficient/productive, filled with anxiety and stress etc, is a difficult thing to watch, and I see it(almost daily) and intend to help these young developers (and some experienced/seasoned ones as well) to do things faster than they are doing now, by teaching the tips, tricks and technologies that would help them do things in (may be) 2 years what I was able to do in, say, 5 (or more).

I speak often at devTalks (local meet-up group) where we talk/deliver-session about various topics from different layers of technologies : server, client, DevOps, DB, upcoming technologies etc and during the lock-down we conducted a lot of online sessions (open and free for all) helping people who are at home (and/or working-from-home) and continue to help a lot of young and mature developers alike, and I would want to focus on some specific sections (from the tech-stack that I know) that I believe will make things much easier/better for most of the developers.

If I were to start a course tomorrow, the title would be:
How Docker could put your career on a fast track

Class project (after/during the course):
Deploy a CI/CD pipeline on GCP Cloud Run using bespoke docker images created after learning Docker and related tech-stack(from the course) and using available services – for PHP and Nodejs.

Some key lessons to be included:
– The Why and What of Docker in brief : The introduction (~2 mins)
– Installation instructions (Ubuntu only, other OS instructions linked/referred) : docker, docker-compose, git (optional), hub.docker.com account (to push images to docker hub, to be used during CI/CD setups) (~5 mins)
– Docker images and containers “What are those?” : Names and tags, local images, pull-from/push-to docker hub, difference and similarity, context
– Build docker images : How to build from official/base versions, create your own images, why the need to create custom images
– Docker containers (details yet to be listed)
– “docker-compose” : Services, networks, volumes and containers. Using CLI and VS Code (non-CLI)

I might need following tools (already with me, or need to update/install):
Equipment : Smart phone, DSLR camera, silent space, lights.
Software : Screen recording tools, PhpStorm (and inbuilt tools), OBS studio (multi window/source management, streaming/recording) etc

Some of the links (from gist.github.com/jdecode) related to Docker/docker-compose:
– Dockerfile for PHP 8.0 RC2 with MySQL and Postgres support: https://gist.github.com/jdecode/77b554ba217c5dfcf5f78f89260c8561
– Setting up Dockerfile and docker-compose for a CakePHP project : https://gist.github.com/jdecode/f25b66b8993d5ca32c4a25353e9f2ec9
– Steps to run Docker project (similar to the above link, but different and important – uses MySQL): https://gist.github.com/jdecode/b2754547a461f289493df38a51776524
– Screenshots accommodating the content of the course : https://gist.github.com/jdecode/3dd9a6edd6c0411756681c0035b76c41

Which one is more difficult?

There are 2 steps to doing something:

  1. Making up your mind
  2. Committing yourself to that

In my personal experience, commitment is an issue – especially when I have made up my mind to do something.

There are times (like today/nowadays) when I am unable to make up my mind towards exactly what I want to do.

And then there are times when I am pretty much clear of what exactly I want/need to do, but I am unable to follow it through – from a commitment point of view.

I lack commitment more (not always though) than making up my mind.

I am going to get over this (I am not going to “try” it, I “will” get over this).

I’ve got a few things going on – personally(pertaining to just me, not my wife/kids/parents/relatives – just me – “personal”), professionally, family wise, financially etc – and I believe I am going to be “making my mind” on some of these things in about a week (or a “focused all-night-er” – perhaps tomorrow, may be…) and then I would be committing myself to the actions required for those.

Both of these things are extremely difficult.

  1. Making up your mind to do something (planning)
  2. Committing yourself to do those things (executing the planning)

Execution has been a bigger issue for me, yet, and I am going to eliminate this issue – by executing my plans the way they should be.

What are the things that I believe are needed for:

  1. Planning : Clarity of thoughts, written-down thoughts (prefer hard-copy version, if soft-copy is your thing then go ahead with that), revisit the thoughts every few days/weeks, bridge the gap between your “family persona” and “official persona”, bring your love for family to your work(not company), and bring your love for your work(not company) to your family, think more, give yourself “phone-free” or “distraction-free” time – daily, read what you “think” you are going to “plan”, be more focused, give attention to detail, be competitive, be fast, be faster, be more efficient, talk more, share more, feed your mind more, do not “indulge” in entertainment, do not be addicted to anything, be flexible, be strong and not rigid, be courageous and not bounded, be free, think more(yes, this is repeated, because it is important – THINK MORE)
  2. Execution: Will!

I lack(ed) will, hence the lack in execution, and I am catching up to my will… I still fail and falter, and I shrug off the problems every now and then by doing merciless introspection – I don’t make myself a fool, and I expect very high level of “common-sense” from myself during those introspection sessions – which usually kick-off with “Yes, Mr. JD, what the f*ck is going on?” and the answers start like “Well, you know how *something* is happening/about-to-happen, and I think believe I must do this *something* with more focus, commitment and will”

Well – that’s a lot of stuff for a post that I thought would be 2 lines – I guess that’s what 3.30 AM does to you… removes the brakes of the thought-train, and it doesn’t stop… you have to jump out from the running train (missing on a lot of unexplored venues if you would have stayed on that train… but you are scared that you would never want to jump if you continue to ride…)

Funny thoughts!

Should I change?

So yesterday I had a chat with my CTO regarding my appraisal.

It went great – I am more than happy with the discussion (and the result of the discussion as well).

There are a few people who I genuinely enjoy having conversations with, and he is one of those fellas!

Anyway, I have been thinking about a couple of things that we discussed (there is new/unique way of taking feedback in ucreate – more on this some other time) – and that included sharing some notes (anonymously) from different people who have given feedback for me.

  1. I am awesome
  2. I need to change

While most of the people (including myself) consider me as pretty awesome (and no, I am not letting that go into my head… but it feels pretty awesome to write “pretty awesome” about myself… 😀 ), there are suggestions for some changes as well (including from myself).

E.g. I talk a lot, and that (mostly/usually) causes the meetings to be stretched (I am trying to handle this in a much better way, but still needs to be manged better). Now that doesn’t mean I don’t make sense when I talk, but sometimes (well, most of the time) the core point is addressed either very early in the discussion (thus the person with whom I am talking feels that the call should have been over after first 5-10 mins) or the core points is addressed very late, and sometimes never(hovering over surrounding areas consumes all the time) – and when it is so, then the journey/path around other areas (the surrounding areas) is more important than the destination(which, philosophically speaking, is true most of the time).

In short – I talk a lot, that means I take a lot of time (of others), and that means that people feel that their time is being wasted, but there is a certain closure to the conversation as well.

So, should I “not talk a lot” and just “fix the issue/problem at hand”, thus avoid the “conversation” part for which I was (and still am) being considered a better “lead” (or the way I see it as – “a better human” or “a better conversationalist”), or should I “not change” and continue to do what I believe is better for me(and for those who I interact/converse with)?

If I change, then yes, I have considered other people’s opinions and suggestions and changed myself, but then it also makes me “not me” – and that’s something that will affect my conversations and I might stop getting “effective” in what I do.
On the other hand, if I do NOT change, then I will be discarding the feedback/suggestions that I have received and I will come out as “arrogant” or “rude” and then people might not want to give any suggestions in the future as well (knowing that I wouldn’t be changing anything and would ignore their inputs).

And this was ONE example, and may be for this particular case I could do some improvements that would allow me to function the way I do, and still be able to inculcate some of the inputs.
E.g.
– I would be sharing Agenda and some sub-points before a meeting so that people would know what to expect, and probably a rough time-estimate of each topic (so that I do not over-indulge in a particular point)
– If there is something that I am already aware of (and I just need to communicate it), then I would be sharing document/notes and would share my expectation from the receiver to go through the notes/document and come up with confirmation of understanding and/or any questions or follow-ups for a particular topic/scenario
– Rather than being the “speaker” and “driver” of the meeting, I would want to “speak-last” (like a good leader, knowing/considering other’s opinions before I share mine) and thus allowing others to share more and do not worry about the time considering they would have shared their feedback for the issue/point/scenario already

There is obviously a clear solution to ONE specific problem/change.

There are some other things that have started to bother me as well – and that are “changes” as well – the stuff that keeps me anxious is more technical in nature. E.g. Learning TDD and Laravel (and the ecosystem around Laravel).

I have been good with CakePHP and I am still continuing to work in CakePHP only, for my pet/personal projects.
On occasion I have used/tried SlimPHP framework as well (very light-weight, totally love it).
In ucreate we use “only” Laravel (for PHP) and I sometimes worry if my lack of knowledge(almost zero understanding of Laravel as a framework) of Laravel could be keeping the quality of an average PHP project from improving.

If I would know Laravel (like I know CakePHP, or I “think” I know CakePHP) then I would be jumping in code blocks of different projects, making changes (hopefully without introducing new bugs), doing much better code reviews, adding TDD, adding complex test cases, faster build times by utilising custom Docker images (private/public) that use PHP/Laravel’s optimised ways of doing things, static code analysis, less dependency on 3rd party extensions and what not…

What it also means is that I would start getting inputs/feedback like “Now you know that Laravel is having this issue, while CakePHP may not, so you will have to agree to the way things are done within Laravel eco-system”.

While I know Laravel is adding so much stuff so quickly, and is growing at an amazing speed, however I also happen to know how much more it could do, and I know this because of my experiments with CakePHP and SlimPHP, and seeing how amazing these frameworks are and how they handle the same use-case differently (across Laravel, CakePHP, SlimPHP).

If I would start learning/using Laravel then yes, my tech discussions with team would improve a lot, and that would also mean that my scope of knowledge would also be bounded(for the lack of a better word) and eventually I would know things just as they are in Laravel, and not as how could have been(for better or worse).

So, I am confused – should I change?

I will need to strike a balance for things like these, but then, these 2 things (time-management during discussions and learning Laravel) represent less than 2% of the other such imbalanced/unclear thoughts/decisions.