Tuesday, 28 March 2023

'Never Let Me Go' by Kazuo Ishiguro

set in a parallel universe (carers, donors, guardians of secrecy, Madam's Gallery, weekly medical exams, Sales and Exchanges, limited access to the outside world, infertility, evidence in art, organ donation, training, possible, deferral); narration by association; central characters (Kathy, Tommy, Ruth, Miss Lucy, Miss Emily, Miss Geraldine, Madam); 

PART I: Hailsham
Chapter 1: The Tommy Tantrum
Chapter 2: The Lucy Solution
Chapter 3: The Madam Shudder
Chapter 4: The Ruth Encounter
Chapter 5: The Order of the Secret Guard
Chapter 6: Baby, Never Let Me Go
Chapter 7: The Donor Code 
Chapter 8: The Lucy 22
Chapter 9: The Lucy Retreat

PART II: Cottages
Chapter 10: Ruth's Betrayal 
Chapter 11: Kathy's Arousal
Chapter 12: Ruth's Possible
Chapter 13: Chrissie and Roddie's Curiosity
Chapter 14: Chrissie and Roddie's Betrayal
Chapter 15: Tommy's Theories
Chapter 16: Kathy's Helplessness
Chapter 17: Ruth's Amnesia
PART III: Carers and Donors
Chapter 18: Pair Rendezvous
Chapter 19: Car Conversation
Chapter 20: Intimacy Increment 
Chapter 21: Madam Meet
Chapter 22: Project Failure
Chapter 23: Tommy Completion

Wednesday, 31 August 2022

മനസ്സും കോപവും (സാംജി വടക്കേടം)

കോപം എന്ന വികാരത്തിന്റെ ഗുണങ്ങൾ
  1. മറഞ്ഞിരിക്കുന്ന സ്വഭാവ വൈകല്യങ്ങൾ തെളിഞ്ഞുവരും
  2. സാമൂഹിക നീതി, നന്മ എന്നിവയ്ക്ക് വേണ്ടി പോരാടുവാൻ
  3. മനസ്സിലെ ചിന്തകൾ പ്രകടിപ്പിക്കുവാൻ
  4. സുരക്ഷ; അപകട സാധ്യത തരണം ചെയ്യുവാൻ; ആത്മാഭിമാനം സംരക്ഷിക്കുവാൻ 

കോപിക്കുവാൻ ഉള്ള കാരണങ്ങൾ

  1. മോഹഭംഗം (PhD)
  2. ജോലി (അമിതജോലി)
  3. കുടുംബം (സൗന്ദര്യപ്പിണക്കം)
  4. പരിസ്ഥിതി (മാലിന്യനിർമ്മാർജനം, യാത്രാക്ലേശം)
  5. സാമൂഹിക വ്യവസ്ഥ (സ്ത്രീധനം)
  6. അനാരോഗ്യം (ആർത്തവം)
  7. വാർത്ത
  8. ലഹരിപദാർത്ഥങ്ങൾ
  9. തിരസ്കരണം 
  10. കുറ്റബോധം 

പക്വതയാർന്ന വികാരപ്രകടനം

  1. ആത്മാഭിമാനം
  2. സമചിത്തതയുള്ള ജീവിതം (ശാരീരികം, മാനസികം, ബൗദ്ധികം, ആത്മീകം, കുടുംബം, പ്രകൃതി, സമൂഹം)
  3. ക്രിയാത്മകത (വൈവിധ്യങ്ങളെ തുറന്ന മനസ്സോടെ സ്വീകരിക്കുക)
  4. സമയക്രമീകരണം
    • പണം vs. സമയം (യന്ത്രവൽക്കരണം)
    • ചുമതലപ്പെടുത്തുക (എല്ലാം സ്വയം ചെയ്യണമെന്നുള്ള വാശി ഒഴിവാക്കുക)
  5. നിർദ്ധാരണശൈലി (assertiveness, say NO if necessary)
  6. ആർദ്രത (മനസ്സിലാക്കുക, ആംഗീകരിക്കുക, ക്ഷമിക്കുക)
  7. സംഭാഷണശൈലി
  8. ശ്രവണം
  9. ആംഗ്യഭാഷ (non-verbal communication)
  10. പരിചിന്തനം (retrospection)
  11. പ്രാണായാമം, യോഗ, ധ്യാനം

Sunday, 17 July 2022

Love & Love Only

I love you as my own body
I thank God for bringing you into my life

I fall at your feet
I hear your voice
I hold your hands
I caress you gently
I adore your dimple
I massage your legs
I wrap you in my arms
I listen to your heart beat
I kiss you all over the face
I rest my face on your body
I feel comfort in your embrace
I admire the colour of your eyes
I run my hands through your hair

I share my life with you
I partake in your happiness
I join you in your struggles
I aspire to be more than a friend to you

I apologize for hurting you
I hope to improve myself
I try to tame my tongue
I am willing to change

I miss you, milady
I seek you, sweetheart
I bide my time, beloved
I dwell in my thoughts about you, dear
I wait to meet you soon, wife of my youth
I love you, LOVE

Thursday, 14 July 2022


This article is a summary of the book Logicomix: An Epic Search for Truth, written by Apostolos Doxiadis and Christos Papadimitriou.

1. Pembroke Lodge: Russel's struggle in comprehending the illogical world (forbidden fruit of knowledge, religious studies, stern grandmother, faith) and finding solace in the logical mathematics (axioms, proofs, theorems, ...)

2. The Sorcerer's Apprentice: Russel breaks loose from the shackles of his strict religious upbringing and becomes an atheist. Russel embarks on a quest for rationality, reasoning, truth and knowledge about the world. However, Russel finds himself in turmoil over the state of mathematics (unproved axioms, circular definitions) and philosophy (disagreement among philosophers). Russel is introduced to logic and works of Boole (Boolean laws). Russel's mission is now to put the house of Mathematics "Queen of the Sciences" in order.

3. Wanderjahr:  Russel goes to the Continent and meets with Gottlob Frege who dreamed of a new logical language to serve as the foundation of mathematics, and (the insane) George Cantor who developed set theory. Russel attends the 1900 ICM Paris in which there are two schools of thought led by Henri Poincaré (proponent of human intuition) and David Hilbert (proponent of mathematical proofs, reasoning and logic).

4. Paradox: Russel discovers the paradox related to definition of sets (the supposed foundation of logic and mathematics), and publishes it in the `Principles of Mathematics.' Russel and Whitehead collaborate on Principia Mathematica, a planned set of three books to create a new foundation of mathematics. The authors struggled a lot while working on the manuscript, and ultimately self-publish the first volume.

5. Entr'acte: Logicians tend to confuse the abstract (Map) with the concrete (Reality).

6. Logico-Philosophical Wars: Wittgenstein begins to study under Russel. At the same time, Europe is reeling under the tension caused by the Great War. Reality confronts Russel. Wittgenstein, due to his trust in natural language, formulates the `Picture Theory,' according to which statements are meaningful only if they can be pictured in the real world. Thus, the statement "There are at least three things in the universe" is meaningless because we can't picture the universe.

7. Incompleteness: Gödel formulates his incompleteness theorem according to which some questions are unanswerable. Russel and Wittgenstein experiment with reforms in the field of education (authoritarian and anti-authoritarian respectively), but ended up as failures in practice. Russel's life (Nazism, Frege's logically-sound anti-semitic rant, WWII) teaches him that there is no royal path to truth. Instead of renouncing the old Trinity composed of Intuition, Emotion and Habit, Russel proposes the new Trinity composed of Responsibility, Justice and knowledge of Good and Evil.  

8. Finale: John von Neumann and later Alan Turing build upon the hitherto works to come up with the Turing machine and the stored-program architecture, and together they pioneer the field of computer science.

"The meaning of the world does not reside in the world." - Wittgenstein thinks to himself.

"All the facts of science aren't enough to understand the world's meaning. For this, you must step outside the world." - says Wittgenstein to Russel.

"Applying formulas is not good enough when you are faced with really hard problems." - Bertrand Russel.

Tuesday, 5 April 2022

Automatic Speech Recognition

Conversational AI: Automatic Speech Recognition) --> Natural Language Understanding --> Information Retrieval --> Natural Language Generation --> Text-to-Speech

P(W|O)  = argmax_W P(O|W).P(W)
The acoustic model estimates the observation likelihood P(O|W).
The language model estimates the prior probability P(W).

Applications: YouTube closed captioning; Cortana/Siri/Alexa front end; dictation systems

Resources: phonemes, pronunciation dictionary, speech data (labelled for phonemes and words), word vocabulary


  • speech recording: quality and acoustic range of the mic; 
  • background noise;
  • speaker: speed, age and accent of pronunciation; volume of speech (distance between speaker and mic)
  • language-specific constraints: inflections, no writing system;
  • code mixing; multilingual setting; 
  • speed of ASR (esp. in time-critical applications); 
  • task complexity: identify speaker; account for speech-noise; listen continuously or push-to-talk;
  • train ASR for new languages: create resources such as pronouncing dictionary, learn HMM and n-gram probabilities

Components: Acoustic Model (sampling, Fourier transform from time-domain to frequency-domain, pronouncing dictionary, HMM to map phonemes to word), Language Model (n-gram probabilities, smoothing, back-off, linear interpolation)

time-domain: time vs. frequency (pitch) plot
frequency-domain: extract component frequencies with the corresponding amplitudes

Evaluation: Word Error Rate (WER) is a measure of the word-level edit distance in terms of insertions, deletions and substitutions between the reference and the model output.

Vocabulary: humans learn ~30K words by middle age; in case of an open-vocabulary setting, consider all unknown words as the special token <UNK>

HMM: observations (phonemes), states (words), decode the HMM (estimate the best state sequence), train the HMM, evaluate the HMM (estimate the best observation sequence)

International Phonetic Alphabet: list of phones; English has 26 letters to convey the 44 syllable sounds;

CMU Pronouncing Dictionary (CMUdict): mapping between words and phones for North American English; 134000 entries; challenges (names, inflections, numbers)

ASR: CMU Sphinx (2015), Espresso (2019)
TTS: WaveNet (2016), Tacotron (2017)

frequency (pitch)
amplitude (loudness)
digitization (sampling, quantization); spectrum computed using Fourier transform; spectrogram; spectral features as vectors (LPC, PLP); phone likelihood estimation (using neural networks);

How to train an HMM?
How to remove background noise?
How to build ASR for different dialects of English?
Do we need a resource that is labelled for phonemes?
How to map speech to phonemes?
Why not build end-to-end ASR systems?

On Construction of the ASR-oriented Indian English Pronunciation Dictionary


Monday, 7 March 2022

Principles of Computing


Theorems or Adages

  • No Free Lunch theorem - there is always a trade-off; originally proposed in the context of search and optimization
  • Black swan theory - theory on seemingly unexpected grand events
  • Hofstadter’s law - "It always takes longer than expected, even if you take into consideration the Hofstadter’s law."
  • Murphy’s law - "Anything that can go wrong will go wrong."
  • Infinite monkey theorem
  • The Chinese Room Argument - [discussed under Linguistics]
  • Pigeonhole principle
  • Moravec’s paradox - While hard tasks such as playing Go, logical reasoning, algebra are easy for AI systems, easy tasks such as moving an object, using common-sense are hard for AI systems.
  • AI effect refers to the tendency for onlookers to dismiss (artificial) intelligence for sheer brute force, number crunching or plain computation. This effect is also observable in magic when the trick gets revealed to the audience.
  • Church-Turing Thesis - Can a Turing machine compute everything that is computable? What is an algorithm? The Church-Turing thesis states that the Turing Machine model is at least as powerful as any computer that can be built in practice. The Church-Turing thesis states that known programming languages are capable of describing everything that could be described as an algorithm. In other words, it says the conventional definition of "algorithm" as that which can be done by executing programs-as-we-know-them is the right definition.
  • Turing-completeness - In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any single-tape Turing machine. So, if somebody says "my new thing is Turing-complete" that means in principle (although often not in practice) it could be used to solve any computation problem. A basic calculator or a scientific calculator is not Turing-complete. Programming languages are similar to those machines (although virtual). They take programs and run them. Most programming languages, conventional and unconventional, such as C, Java, Lisp, Haskell and Prolog, are Turing-complete. The typesetting language LaTeX is also Turing-complete. However, markup languages such as XML and HTML are non-Turing-complete languages. Formal languages such as regular languages and context-free languages are Turing complete. On the other hand, logics such as propositional logic and predicate logic are not Turing complete.
  • AI-complete - The hardest problems in AI (such as vision, natural language understanding, and planning) are AI-complete. In other words, solving an AI-complete problem is equivalent to making computers as intelligent as people.
  • Strong AI vs. Weak AI - Strong AI is general AI (a.k.a. AGI) that can perform any intellectual task that a human being can. Weak AI (a.k.a. narrow AI) is AI that can perform specific intellectual tasks (e.g. IBM Watson).
  • Friendly AI - FAI is general AI that would have a positive impact, rather than a negative effect, on humanity. The closely-related areas are machine ethics and AI takeover.
  • Colossal Disaster - IBM Watson is merely a massive engineering (and marketing) effort comprised of heavy parallelism, huge knowledge base and clusters. The technologies that power Watson include (1) information retrieval and information extraction, (2) computational linguistics (statistical paraphrasing, semantic role labelling), (3) machine learning and (4) knowledge representation and reasoning (temporal reasoning, geospatial reasoning). Watson is expert at playing Jeopardy!. So maybe it is an expert system. But is it an AI system? Roger Schank doesn’t think so because it is yet to display intelligence. If it were an AI system then it should be able to answer the following kinds of questions: (1) between Jim and Betty, who is the better person to lead our new social initiative while creating a more transparent culture, (2) can you create an operational strategy to achieve these revenue objectives, (3) how would you rate the CEO’s speech on employee morale?, (4) how do you think this marketing campaign will impact our customers and prospective customers, or (6) was Jim’s joke funny? These questions pertain to request for opinion, strategy and complex phenomena such as morale, jokes, feeling and emotions.
  • Recommender systems - The technosphere is filled with recommender systems such as Google search, Facebook feed, Twitter feed, YouTube video recommendation and Amazon product recommendation.
Computer Languages
  • General Purpose Programming Language: C (procedural programming, ancient); Java (no pointers, garbage collector, enterprise language, statically typed, Hibernate database application framework, Struts and Spring web application frameworks); Scala (object-oriented + functional programming, statically typed); C++ (object-oriented programming)
  • Scripting Language: Python (dynamically typed, Django web application framework); awk (structured text search and replace)
  • Functional Language: Haskell (functional programming, statically typed)
  • Logical Language: Prolog (logic programming)
  • Query Language: SQL (query rdbms database); XPath (query xml database)
  • Shell Programming Language: bash (run commands from script)
  • Data Language: HTML (exchange data, common in www); XML (exchange data)
  • Modelling Language: RDFS (less expressive modelling); OWL (more expressive modelling)

Saturday, 5 February 2022

Deutschlernen Tracker



  • YourDailyGerman
  • Accusative prepositions:  für, ohne, durch, um, gegen
  • Dative prepositions: aus, nach, von, bei, zu, mit, ab, seit, außer
  • Two-way prepositions: use the accusative case when there is a position change from point A to point B; use the dative the rest of the time.
    • Ich bin im Kino.
    • Ich gehe ins Kino.
  • The adverb always comes after the verb.
  • Prepositions with Locations: in (inside, as in classroom), an (near, as in beach), auf (on a surface or at a public building such as bank), bei (specific places, as in Zentralmensa) 
    • an der Universität
  • Adjective endings
  • Articles
  • Conjunctions
    • Wenn das Wetter gut ist, dann wandern viele Leute nach Heiligenberg. 
    • Weil das Wetter gut ist, wandern viele Leute nach Heiligenberg. 
    • Viele Leute wandern nach Heiligenberg, obwohl das Wetter schlecht ist.


  • Ankidroid
  • Clozemaster app


  • nachrichtenleicht.de
  • SlowGerman (Annik Rubens Podcast)
    • Was wären wir ohne Internet? SG #238
    • Das Schloss Neuschwanstein – SG #237
    • Arm und reich in Deutschland – SG #223
    • Die Hobbys der Deutschen – SG #218
    • Die Uhrzeit – SG #210
    • SG #192: Online-Shopping
    • SG #147: Die Bahn in Deutschland
    • SG #011: Denglisch
    • SG #009: Bus und Bahn 
    • SG #160: Die Volkshochschule



Video Series
  • Nicos Weg 
    • Nicos Weg A1
    • Nicos Weg A2
  • Extr@ (German)
    • EXTRA auf Deutsch - Folge 01 | Sams Ankunft
    • EXTRA auf Deutsch - Folge 02 |
    • EXTRA auf Deutsch - Folge 03 | Sam hat ein Date
    • EXTRA auf Deutsch - Folge 04 | Sam sucht einen Job
    • EXTRA auf Deutsch - Folge 05 | Ein Star ist geboren
    • EXTRA auf Deutsch - Folge 06 |
    • EXTRA auf Deutsch - Folge 07 | Der Zwilling
    • EXTRA auf Deutsch - Folge 08 | Die Kusine der Vermieterin
  • Pluspunkt
  • Kendra's Language School

Friday, 4 February 2022

Modern DS Software Development

Team Structure

  • Developers
    • Planning: Agile (SCRUM, Kanban)
    • Coding: version control system (svn, git), integrated development environments (Eclipse, PyCharm)
    • Building: makefile, Maven (pom.xml)
    • Testing: Selenium, HP QTP
  • DevOps: Jenkins
  • Operations
    • Deploy: Docker
    • Operate
    • Monitor: Nagios

Web Development

  • browser: Firefox, Chrome, Safari
  • PL: what to do (Java, JavaScript, Python, Ruby, PHP)
  • HTML: what to show
  • CSS: how to show
  • database: how data is stored (MySQL, Oracle, MongoDB)
  • data format: how data is exchanged (JSON, XML)
  • framework: platform or content-management system (Struts/Java, Meteor/JavaScript, Django/Python, Rails/Ruby, WordPress/PHP, Drupal/PHP)
  • front-end: browser, HTML, CSS, PL
  • back-end: server, database
  • client: user of a web application
  • server: where application is stored
  • protocol: how machines communicate (HTTP)
  • cloud computing services
    • compute power, database storage, DBMS, AI services;
    • SaaS (Google Apps); PaaS (Amazon retail, Flipkart retail); IaaS (Google Drive, Amazon Web Services, Microsoft Azure);Network-as-a-Service or NaaS (Asianet ISP); Data-as-a-Service or DaaS

ELK Stack: ElasticSearch (full-text search engine, run ML); Logstash; Kibana (data analysis and visualization)


  • Relational (SQL) databases
    • have to have a schema
    • poor horizontal scaling (possibly due to tight coupling between tables)
    • e.g. SQL Server, MySQL
  • NoSQL
    • enables better horizontal scaling (adding new servers, partitions)
    • no need to have a schema (good for constantly evolving data)
    • flexible
    • key-value storage (JSON)
    • e.g. MongoDB, Cassandra
  • facilitate faster application delivery and deployment; ensure portability by separating application from infrastructure; enables a microservice-based architecture
  • wrap OS, dependencies, configuration, directories and files (and not data) into a single lightweight application
  • follows a client-server architecture; relies on Linux virtualization, cgroups, namespaces
  • use Dockerfile to build a Docker image
    • FROM (choose base image), MAINTAINER (for documentation purpose), RUN (execute commands during image building), CMD (execute commands by the running image), ADD (files to image), ENV (define environment variables), VOLUME, WORKDIR (change working directory), USER
  • save images on (public/private) registry, e.g. Docker Hub
  • run images as a Docker container
  • use volumes for persistent data
  • Docker commands
    > docker pull, push
    > docker create, run, start, kill, rm, stop, commit
    > docker images, rmi, ps, logs


  • container orchestration platform
  • automatically deploy, manage and scale containerized applications
  • k8s cluster services
  • application configuration (app1.yaml file)

Principles of Rhetorics

Gricean Maxims

The Gricean maxims is a set of four principles for effective communication. When the maxims are followed correctly, the speaker is able to communicate effectively to the listener.

  • According to the Maxim of Quantity, share only the right amount of information that is suitable for the conversation.
  • According to the Maxim of Quality, share only information that is true and supported by sufficient evidence.
  • According to the Maxim of Relevance, share only information that is relevant to the conversation; that is, do not divert from the topic.
  • According to the Maxim of Manner, be clear, unambiguous and orderly while engaging in a conversation.
  • Algorithmic bias -
  • Inductive bias (or learning bias) - assumptions used by a learning algorithm to make prediction on unseen data e.g. maximum margin in SVMs, test of generalization power using test data, Occam’s razor
  • Cognitive bias
    • Confirmation bias - the tendency to favour information that agrees with previously held beliefs
    • Gender bias, racial bias - the tendency to believe that a certain gender (typically women) and certain races (typically black) are intellectually and physically weak
    • Systemic bias - discrimination inherent in the system e.g. Apartheid
    • Selection bias - the bias introduced by the selection of individuals; bias introduced due to incomplete data e.g. in surveys
    • Stereotyping - the tendency to attribute a certain characteristic to an entire group based on lack of evidence e.g. All Muslims are terrorists. All white people are racists.
    • Survivorship bias - tendency to focus on individuals that survived and overlooking the ones that failed to make it due to their lack of visibility; e.g. WW2 bombers (the others that were shot down), All IITians bag 1Cr packages (the others don’t even make the headlines).
    • Information bias - the tendency to seek information when it does not affect action


These tactics are commonly employed in debates and political speeches to distract the masses or to avoid discussing the topic at hand.

  • Red herring - tool for distraction
    • Straw (weak) man - argument based on a weaker or misrepresented version of the opponent’s position
    • Ad hominem - attack the arguer (1) appeal to motive, (2) appeal to authority, (3) appeal to hypocrisy (whataboutism)
  • cum hoc ergo propter hoc - correlation does not imply causation
  • No true Scotsman - change the generalization by excluding the counterexample
  • Cherry-picking - pointing at individual cases from a population to support one’s argument while ignoring evidence from the population to the contrary
  • Appeal to consequences - argument primarily based on consequences of the argument e.g. caste-based politics (Hindu khatre mein hain!)
  • Appeal to tradition - argument primarily based on premises that are long held to be true e.g. conservatives
  • Appeal to emotion - argument primarily based on manipulation of emotions rather than using valid, logical reasoning e.g. speech by politicians

Ethics and Philosophy

  • Trolley problem: who should I save; how to make this decision; e.g. autonomous driving
  • Tragedy of the Commons: individual goals vs. collective goal; e.g. female infanticide;
  • Prisoner's dilemma: cooperation vs. competition; trust issues;
  • Volunteer's dilemma: should I sacrifice a little to benefit others; e.g. പൂച്ചക്കാര് മണികെട്ടും; 
  • Bystander effect: someone else will do it; e.g. mass emails vs. personal emails; sense of responsibility is tied to presence of bystanders; 
  • Allegory of the cave
  • Principle of double effect: e.g. Is it lawful to kill a person in self-defense?, ധർമ്മസങ്കടം

Tuesday, 25 January 2022

Western Music Piano

Notation: C Major refers to the key and Cmaj refers to the triad.

Practise scales and chords with both hands.
Practise time using metronome.
Learn all scales (major, natural minor and harmonic minor)
Learn all diatonic chords in a scale (major, minor, augmented, diminished, suspended)
Practice chord inversion

Learn chords progression
Memorize time intervals

Learn Sight Reading
Learn Sight Singing



Stave lines represent the lines with the notes, clefs, key signatures, and time signatures of a song. The various types are Single Staff, Double Staves.

Clefs move the stave lines up or down the pitch ladder. The various types are Treble Clef (G Clef), Bass Clef (F Clef), C Clef (Alto Clef, Tenor Clef). The middle C is exactly between the Bass clef and the Treble clef.

Pro Tip:

Treble lines: Every Good Boy Deserves Fudge.
Bass lines: Green Birds Don’t Fly Away

Treble spaces: FACE,
Bass spaces: All Cows Eat Grass

Note that the Treble clef is called G clef because the clef sign wraps around the G line. Similarly, the Bass clef is called F clef because the dot are on either side of the F line.

A pitch is a frequency of sound. A note is a named pitch. The pitch of piano key C4 is different from that of key C5. There are 12 notes in Western music. After twelve, the notes repeat in the next higher register or octave. The notes are C, C#(Db), D, D#(Eb), E, F, F#(Gb), G, F#(Ab), A, A#(Bb) and B.

Scale (Key)
Key signature denotes how many sharp and flat notes appear in a song. The sharp and flat notes raise a note by a half, or even a full, step. Not all notes in a scale are used in a song. Many songs work with just 7 notes creating a harmony. In every key, notes in same position work in the same way.

We play a scale. We cannot play a key. A song is in some scale or key.

A scale is a group of notes played in succession. Chords are built from scales.The various types of scales are major, minor(natural, harmonic, melodic), blues, jazz, pentatonic and so on. Pentatonic scales are based on major or minor scales. The various examples are C Major, C natural minor, C harmonic minor, C melodic minor, C major pentatonic, C minor pentatonic...

Every scale has a formula.

  • The Major scale formula is W - W - H - W - W - W - H. It is a cool major scale.
  • The Natural minor scale formula is W - H - W - W - H - W - W. It is a cool minor scale.
  • The Harmonic minor scale formula is W - H - W - W - H - WH- H. The problem with natural minor is that the leading tone is absent.
  • The Meladonic minor scale formula is W - H - W - W - W - W - W. The problem with harmonic minor is the large gap between 6th and 7th notes.

Relative scales share key. A relative minor scale is built from the sixth degree of the major scale. The relative scale of C major is A minor. In C major, the root note C is special. In A minor, the root note A is special. The same note plays a different role in each relative scale.

Time signature denotes the number of notes in a measure and the note values that gets the beat. The various types are 4/4, 3/4, 5/4, 6/8, 3/8 and 2/2. In the 4/4 time, there are four beats in a measure and one quarter note gets the beat.

The smallest interval in Western music is a half step or semi tone. A major second will have the same feeling in any scale.

Perfect First (Unison): 00 half step
Minor Second: 01 half step (JAWS soundtrack)
Major Second: 02 half steps (Happy Birthday)
Minor Third: 03 half steps
Major Third: 04 half steps (Kumbaya my LORD)
Perfect Fourth: 05 half steps (Here comes the bride)
Tritone: 06 half steps
Perfect Fifth: 07 half steps (Mary had a little lamb)
Minor Sixth: 08 half steps
Major Sixth: 09 half steps (My Bonnie lies over the)
Minor Seventh: 10 half steps
Major Seventh: 11 half steps (Take on me)
Perfect Eighth (Octave): 12 half steps

In short, there are eight types of intervals classified into two:

  1. Perfect: first, fourth, fifth, eighth
  2. Major: second, third, sixth, seventh

Tritone is a dissonant interval.

In addition, an augmented interval is a half-step larger than a perfect or a major interval, and a diminished interval is a half-step smaller than a perfect or a minor interval.

There are multiple ways to call the same interval:

tritone = augmented perfect fourth = diminished perfect fifth
Major sixth = augmented minor sixth =diminished octave
Minor third = augmented major second = diminished major third

Intervals can also be inverted. Perfect intervals remain perfect upon inversion. Major intervals become minor (and vice-versa). Augmented intervals become diminished (and vice-versa).

A chord is a group of notes. The different types of chords are Cmaj, Cm, Csus, Caug, Cdim, Cmaj7, Cmin7, C7, Csus4, C7sus4, C6, Cmin6, C7-5, C7+5, Cm7-5 and A/C.

A triad is a chord constructed with 3 notes. The various types of triads are major (happy), minor (sad), augmented (mysterious) and diminished (dissonant). Every triad has a formula. A major chord is a chord that has a root, major third, and perfect fifth. A minor chord is a chord that has a root, minor third, and perfect fifth. An augmented triad is a chord, made up of two major thirds (augmented fifth). A diminished triad is a triad consisting of two minor thirds above the root. A suspended chord (or sus chord) is a musical chord in which the (major or minor) third is omitted, replaced usually with either a perfect fourth or a major second although the fourth is far more common.

Extended chords are extension to the triads. Various extended chords are 7 chords, 9 chords, 13 chords and so on. Types of 7 chords are Major 7 (maj7), Minor 7 (m7) and Dominant 7 (7).

Slash chords are another type of chords. An example is A/C.

Diatonic chords are chords that naturally belong to a key. The pattern of diatonic chords for a Major key follow a formula: 1(Major) - 2(Minor) - 3(Minor) - 4(Major) - 5(Major) - 6(Minor) - 7(Diminished). The pattern of diatonic chords for a Minor key follow a formula: 1(Minor) - 2(Diminished) - 3(Major) - 4(Minor) - 5(Minor) - 6(Major) - 7(Major). Each diatonic chord has a function - tonic, subdominant, dominant. For example, in the major scale, the function is shown in brackets: I(t) - ii(s) - iii(t) - IV(s) - V(d) - vi(t) - vii(d)

Chord inversion gives a nice flavor to the original chord. They are useful for making progressions on piano easier to play and smoother sounding. A triad has a root inversion (root is at the root position), a first inversion (root note is at the top position) and a second inversion (root note is at the middle position). A 7 chord has a root inversion, first inversion, second inversion and third inversion.

Chord Progression

A chord progression is a series of chords played in a pattern.
e.g. I-IV-V-I
e.g. I-VI-II-V-I

1 - any
2 - 5
3 - 6
4 - 1 or 5
5 - 1
6 - 2

Counting Notes
Everything written below is w.r.t. the common time.
A whole note spans the whole of a measure.
A half note spans a half of a measure.
A quarter note spans a quarter of a measure. There are one quarter note in each beat and four quarter notes in a measure. (One Two Three...)
An 8th note spans 1/8th of a measure. There are two 8th notes in each beat and eight 8th notes in a measure. (One and Two and Three and...)
A 16th note spans 1/16th of a measure. There are four 16th notes in each beat and sixteen 16th notes in a measure. (One ee and a Two ee and a Three ee and a...)
An 8th note triplet is three 8th notes in each beat. There are four triplets in a measure. (One and a Two and a Three and a...)
A 16th note triplet is six 16th notes in each beat. There are four triplets in a measure.

Friday, 31 December 2021

Review: OOP Concepts

OOP Concepts: Encapsulation, Inheritance (reuse properties and behaviours), Polymorphism (method overloading and method overriding), Abstraction (abstract classes and interfaces)

 - parameter (function declaration) vs. argument (function call)
 - method vs. function

 - access specifier: private (only within class), default (within the package), protected (within same package and for subclasses), public
 - abstract (just idea; define in subclass) vs. interface (all methods are abstract)
 - extends (wrt class) vs. implements (wrt interface)
 - final (cannot override)
 - static
 - super vs. this
 - static binding (method overloading) vs. dynamic binding (method overriding)

 - single-level inheritance vs. multi-level inheritance
 - multiple inheritance vs. hierarchical inheritance
 - hybrid inheritance

 - getter vs. setter
 - high cohesion vs. loose coupling

Monday, 8 November 2021

Every Good Endeavour - Tim Keller, Katherine Leary Alsdorf


obstacles - expressive individualism; job vs. vocation; work to live vs. live to work

hope - Leaf by Niggle by J.R.R. Tolkien (the author of The Lord of the Rings, writer's block, question his vision to produce a fantasy, in the league of The Iliad, The Mahabharata); our work will bear fruit in heaven; Is this idea backed by the scripture?

how to make the right choice - ability (Can you do it?), affinity (Do you like it?), opportunity (Is there any open position?);

Part One: God's Plan for Work

1. The Design of Work - God-ordained; God did work and God saw that the creation was good; God took rest; Jesus was a carpenter (The Chosen); Paul was a tent-maker;
2. The Dignity of Work - basic human need; The Remains of the Day by Kazuo Ishiguro (depicts the dignity of labour, the protagonist is a butler); Mike, the doorman;
3. Work as Cultivation - culture mandate (culture building); job description (Genesis 1)
4. Work as Service - the Divine providence; spiritual work vs. secular work (Martin Luther, we have many needs including food, clothing, shelter, WiFi);

Part Two: Our Problems with Work

1. Work becomes fruitless - sin (paradise lost, things fall apart); two extremes: idealism (optimistic about good end-result) vs. cynicism (pessimistic about good end-result); choice (post-war years vs. current years, my parents' generation vs. my generation); wrong job probably;

2. Work becomes pointless - Ecclesiastes (meaningless, chasing after the wind;); alienated labour, Karl Marx (unable to see the end-result, agrarian economy vs. industrialized economy vs. service economy);

3. Work becomes selfish - Tower of Babel (establish one's identity, pride in one's own labour, tribalism to ensure security); Esther "in the Palace"; the Ovarian lottery (privilege, grace of God); IIT-JEE top rankers (identity through CS IITB); competitive pride (C.S. Lewis, publish or perish, by hook or by crook);

Idols of `Workship': Idol is something that is prominent, takes away too much of your energy and is considered sacrosanct. (1) traditional: collectivism (racism, religious fundamentalism, casteism, nationalism); (2) modern: individualism, emphasis on science, facts and figures, power of reasoning; and (3) post-modern: rise of cynicism (e.g. Terminator, Jurassic Park), liberalism (e.g. gender fluidity), means-without-an-end. 
Christians ought to discern the idols functioning in their professions and industries. Some examples are shown below:
  • Idols in UESI Ministry: organize camps vs. personal evangelism, share gospel vs. build relationships, study WoG vs. practise WoG;
  • Idols in NLP research: publication quantity vs. value of output; SOTA vs. elegance;

Part Three: The Gospel and Work

a new worldview: three questions (origin, purpose, destiny); the gospel worldview (everything was good, the world is fallen, Jesus as the embodiment of God's grace); think of the gospel as a pair of glasses through which you look at everything else in the world;

impact of gospel view on society: culture of Europe and the West in general; high regard for human rights; development of democracy; civil society (waste management, punctuality, product quality, efficiency at work);

dualism vs. integration at work: wrong notion that Christian work means taking part in overtly Christian activities; the danger of excessively spiritualizing things in life;

the doctrine of common grace (everybody is created in the image of God; Psalm 19); appreciate the work done by non-Christians; the Divine providence; avoid disengagement with popular culture (James Cameron, Hans Zimmer, Blessy, JRR Tolkien, CS Lewis, Vaikom Muhammad Basheer, MN Karassery, Sunil P Ilayidom, Santhosh George Kulangara);

ethics and morality at workplace: personal dishonesty (e.g. exaggerate current salary), corruption (e.g. lobbying), lack of transparency (e.g. complex financial instruments);

How to incorporate faith into work? 

  • in general: respect coworkers and colleagues; exercise wisdom (know God, know oneself, learn from experience, the book of Proverbs, the Holy Spirit); be generous with time and investment; display resilience under distress or failure;
  • gospel worldview and business: serve the common good; profits are not inherently evil;
  • gospel worldview and higher education: improve quality; make it accessible to everyone regardless of background, sex or race; avoid pride (IIT/IITM, Ivy League)

Do the right thing not because of the incentives it brings but because it is the right thing to do.

"Yet when I surveyed all that my hands had done and what I had toiled to achieve,
everything was meaningless, a chasing after the wind;
nothing was gained under the sun." (Ecclesiastes 2: 11)

"I have fought the good fight, I have finished the race, I have kept the faith. Now there is in store for me the crown of righteousness..." (2 Timothy 4: 7, 8a)

vocational discipleship

How can we have any freedom from the temptations of work and still keep our job?

motivation: passion (passion of the Christ), living sacrifice (Romans 12: 1); serve the work;
rest: rest in the finished work of God (Leaf by Nibble);

people matter < institutions matter


  1. Book URL
  2. Study guide, Nancy Erisman
  3. Keller/Alsdorf, Redeemer Church
  4. Alsdorf, ToW