Target: To code for at least an hour every day for the next 100 days.
More details about the challenge can be found at 100daysofcode.com or the official repo.
Start Date | End Date |
---|---|
11 December, 2019 | ? |
- Code or learn coding for at least an hour every day.
- Learn new technologies and languages/frameworks
- Make some solid projects
No | Project Title | Completed On |
---|---|---|
1 | A simple Android Dice Roller App | Day -9 |
2 | A simple JS based (non persistent) TODO app | Day 12 |
- Started learning Android dev using Kotlin
- Made my first Hello World Android app
Today's Progress:
- Completed my first (useful) app, a dice roller!
What I learned:
- How to connect Android views to actual code
- Tools namespace in views
- lateinit in Kotlin
- gradle basics
Thoughts:
- GG, so far.
What I learned:
- Learned about the various Layouts in Android, like linearLayout, constraintLayout etc
Thoughts:
- Had to maintain (and repair) my PC, so could not do much. High hopes for tomorrow.
Progress
- Learned more about constraint layout
- Learned about Data binding
- Also learned about Kotlin's Data class
- Started a new project to learn constraintLayout: color My Views
Thoughts:
- I can see how committing to doing something everyday can be a challenge. Hopefully the habit-making part of my brain will soon fire up.
Today's Progress:
- Completed the project colorMyViews!
What I learned:
- Constraints, ratios, chaining and baselines in constraintLayout
- Fragments
- Navigation
Thoughts:
- Programming is fun!
Today's Progress:
- Started new project, a simple android trivia app!
What I learned:
- Navigation, and adding navigation graphs
Thoughts:
- Programming requires peace and quiet. Difficult when you don't have any.
Today's Progress:
- Decided to take a light break, and learn something new for today
What I learned:
- DISM on windows, imaging systems over the network, slipstreaming drivers
Thoughts:
- Variety keeps you interested
Today's Progress:
- Had something sudden come up; learned something else.
What I learned:
- Using openpyxl and working with spreadsheets in python
- pyautogui and manipulating the cursor
Thoughts:
- Had something sudden come up. Required lots of tedious work. openpyxl and pyautogui seved the day!
Today's Progress:
- Continued with Android dev
What I learned:
- Conditional Navigation
- Backstack manipulation
Today's Progress:
- Continued with Android dev
What I learned:
- Adding an UP button
- Adding a menu!
Today's Progress:
- Completed my seconf project, a trivia app!
- Completed "app navigation"(ch 3) of Udacity Android dev with Kotlin Course!
What I learned:
- Navigation basics in android
- Adding navigations graphs
- Adding navigation drawer
- Adding animations to navigation!
Thoughts:
- Left 100 days of code, had to start again. Hoping this goes better than my last attempt
Today's Progress:
- Completed Ch 4 and Ch 5 of Udacity Android dev course!
- Udacity Android dev course is now 50% complete!
What I learned:
- Activity and fragment lifecycle
- How powerful Data Binding is
- MVVM architechure
- ViewModel, UILayer, LiveData
Thoughts:
- Programmed for 11 hours straight! With a couple of hors before going to sleep too! When the programming bug bites you...it bites you.
Today's Progress:
- Started ch6, which is Data persistence
What I learned:
- Basics about SQLite and Room
- Designing Entities
- Adding a DAO
- Basics of Kotlin Coroutines
Thoughts:
- Feel like I am genuinely learning new stuff, not just about android apps, but software development in general!
- Getting in the holiday spirit! Will be back soon!
Today's Progress:
- Implemented multithreading via coroutines!
What I learned:
-
Job, Dispatcher and Scope
-
Suspend functions
Thoughts:
- Multithreading and coroutines are not as hard as I thought.
Today's Progress:
- Saw how apps are made in the wild
What I learned:
-
Watched so many youtube videos about making android apps.
-
It was fun to see real devs' thought proccesses making apps and how they approach solutions.
Thoughts:
- Goofed off and watched lots of videos today. Did not actively make something, but still learnt a lot!
Today's Progress:
-
Made some important descisons:
-
The project I want to build needs to be cross platform (maybe even a PWA version)
-
Learning native android and swift along with implementing a web app seems very infeasible.
-
It's not too late (only 3 + 9 days into android native dev), plus I learnt deep workings of android's internal architechure for apps
-
So decided to switch to React Native; starting CS50's Mobile App Development with React Native on EdX
What I learned:
- Quick refresher on basic javascript
Thoughts:
- Yeah, yeah, sunk cost fallacy and all that. I think it's best to do what's best.
What I learned:
- Closures in javascript
Thoughts:
- Busy day today. Still managed.
Today's Progress:
- Almost completed lecture 1 on CS50x React Native course
What I learned:
-
Closures
-
IIFEs
-
Asynchronous JS
-
Callbacks
Thoughts:
- I really like C++, and Kotlin is the best!
What I learned:
- Promises in js
Thoughts:
- Exhausting day
Today's Progress:
-
Completed Lecture 1 (finally! whew)
-
Learnt a lot of new things. Never knew DOM manipulation was this fun!
What I learned:
-
Promises (properly)
-
this in js
-
DOM manipulation (thanks Traversy Media!)
Thoughts:
- DOM manipulation is fun!
Today's Progress:
- Started working on Project 0 of cs50-mobile
What I learned:
-
Getting checkboxes to show up in CSS
-
createNewTextNode()
Thoughts:
- It has been a while, but I am glad to be back making things!
Today's Progress:
- Completed project 0: A simple Js based TODO app!
Thoughts:
- Tinkering with and making stuff is always enjoyable.
Today's Progress:
- Started lecture 2 in CS50x
What I learned:
-
classes in js
-
extends and super in js
-
Set data structure
Today's Progress:
- Learning React
What I learned:
-
Components
-
Props
-
State
Today's Progress:
- Learning React (cont.)
Today's Progress:
- React stuff
Thoughts:
- React is deep
Today's Progress:
- React
Thoughts:
- Busy day today. Barely managed to make time.
Today's Progress:
-
Completed lecture 2 of CS50m!
-
Started new project, a react based todo app!
What I learned:
- Impereative vs declaerative programming
Thoughts:
- Took a long time, but we're finally here! React!
Today's Progress:
- Completed Unit 2 of Udacity's Intro to ML. Will do project.
What I learned:
- Naive Bayes
Thoughts:
- Started learning ML a few days back.
Today's Progress:
- Started new project in C++, a simple physics simulation of spheres!
What I learned:
- Basics of C++ library, Cinder
Today's Progress:
- Continued work on CircleSim
What I did:
- Bug fixes mostly. Implemented a few features.
Today's Progress:
- Continued work on CircleSim
- Leetcode TwoSum
What I learned:
- Hashmaps, what are they, and how they can be useful
Thoughts:
- Happy Holi!
Today's Progress:
- Leetcode Best Time to Buy and Sell Stock
What I did:
-
Implemented a nice solution for the Leetcode problem. Read up on even better solutions.
-
Identified a few bugs in CircleSim.
Today's Progress:
- Read up on Sets, Red Black Trees, Hashmaps
- Started reading Bjarne Stroustrup's Programming Principles and Practice using C++
What I did:
- Completed Chapter 3
What I learned:
- Universal and uniform initialization in C++ using { }
Today's Progress:
- Continued working on CircleSim: squashed some bugs (which created new ones lol) and implemented better handling of time
What I did:
- Implemented better handling of timeStep, also fixed issue where ball went out of window
Today's Progress:
-
Leetcode Contains Duplicate
-
Leetcode Product of Array Except Self
-
Leetcode Maximum Subarray
-
Started learning about Trees from mycodeschool
-
Completed chapter 4, and started chapter 5 (Errors) of C++ book.
What I learned:
- Sets and unordered sets in C++
- Basics of Dynamic Programming!
- Kadane's Algorithm for maximum subarray
Today's Progress:
- Currently attending a Machine Learning Workshop!
What I learned:
- Learnt how a complete ML Project works from beginning to end.
- Learnt about collecting, sorting data. Analysing it. Feature extraction, feature engineering.
- Learnt about many different Machine Learning Algorithms, and when to apply them.
- Learnt about and implemented KNN for a given dataset.
- Learnt about different ways of validating and checking results.
Thoughts:
- Happy PI Day!
Today's Progress:
- Day 2 (of 2) of Machine Learning Workshop
What I learned:
- An overview of deep learning
- Learnt about ANNs
- Used an ANN model to predicty outcomes (Big Mart Dataset)!
Thoughts:
- ML is not as difficult as I thought previously.
- Also, learnt about the difference between Ml and DL!
Due to the nCoV-19 concerns, uni closed and I was temporarily not able to continue the challenge.
Today's Progress:
- Looked at a lot of web development stuff
- Leetcode Maximum Product Subarray
What I learned:
- CSS Grid
- CSS Flexbox
- SVG as code
- lots of front end ux stuff
Thoughts:
- Wanted to get a brief overview of web dev stuff before I decide to properly dive into it.
Today's Progress:
- Made a simple Rock Paper Scissors webpage game!
- Leetcode Find Minimum in Rotated Sorted Array
What I learned:
- SASS
- That watching tutorials nad how to do stuff is far easier than actually making the stuff, even simple things.
- Revised Binary Search
Thoughts:
- Diving into web dev proper.
Today's Progress:
- Learnt about testing in javascript using jasmine.
- Couldn't solve Leetcode Search in Rotated Sorted Array. Need to get help. Got a TLE.
What I learned:
- Testing in js.
- Binary Search?
Thoughts:
- Completing Odin Project exercises as fast as possible.
- Also, it was the first day of lockdown in India. We'll see.
March 23, 2020: Taking a break for a day.
Today's Progress:
- Made a project in JS! Wes Bos's JavaScript Drum Kit!
What I learned:
- Revised arrow functions
- Heroku
Started reading a book, that has me extremely engrossed. Might be out for a while.
Today's Progress:
- Had a competitive programming contest organised by the Association of Comuter Machinery (ACM), BIT Mesra chapter on hackerrank.
- The contest was fun. Learned lots. Was ranked 13 among 100+ participants.
What I learned:
- Making pairs on maximum and 2nd maximum values in all possible subarrays of a list.
- Finding out LCM using GCD.
Thoughts:
- Will have to solve all the questions again. Learn all the missing concepts.
Back to reading the book. It's along one (700 pages), but I am hooked.
Today's Progress:
- Watched some google kickstart solution videos on youtube. Also watched a couple of google phone interviews. Motivated me to invest time in competitive programming.
- Solved Leetcode Valid Parentheses
- Solved Leetcode Merge two sorted lists
- Solved Leetcode Two Sum (again)
- Solved Leetcode Maximum Subarray (again)
What I learned:
- Had forgotten about properly using linked lists. Helped lots.
- Merging two sorted linked lists.
Thoughts:
- Having fun. It's like solving maths problems!
Today's Progress:
- Solved Leetcode Climbing Stairs
- Solved Leetcode Best Time to Buy and Sell Stock (again)
- Solved Leetcode Single Number
- Solved Leetcode Linked List Cycle
- Solved Leetcode Min Stack
- Solved Leetcode Intersection of Two Linked Lists
- Solved Leetcode Majority Element
What I learned:
- Braking down the climbing stair problem into a Fibonacci Sequence. Solving it using DP (very similar to Kadane's Algorithm)
- That XOR can tell us the unique number when all other numbers have a matching pair.
- That a tortoise and a hare can help tell if there is a cycle in a linked list
- How to find intersection in a two linked lists
- You can use votes (++ if present, -- if not) to find the majority element in a list.
Thoughts:
- Solving lots of problems.
Today's Progress:
- Learnt about Trees and Binary Search Trees
What I learned:
- Trees
- Height and calculating height of binary tree
- Implementing binary and binary search trees in C++
- How to insert and delete nodes in BST
- How to search for a value in BST
- Binary Tree traversal(BFS: level order; DFS: pre, in and post order)
- Checking if a Binary tree is a BST
Thoughts:
- Wanted to learn about trees since when I was in class 11! Feels good to finally have the knowledge!
Today's Progress:
- Solved Leetcode Symmetric Tree
- Solved Leetcode Maximum Depth of Binary Tree
- Solved Leetcode House Robber
- Solved Leetcode Reverse Linked List
- Solved Leetcode Invert Binary Tree
- Solved Leetcode Single Number (again)
- Solved Leetcode Happy Number
- Solved Leetcode Palindrome Linked List
- Solved Leetcode Move Zeroes
- Solved Leetcode Find All Numbers Disappeared in an Array
- Solved Leetcode Diameter of Binary Tree
What I learned:
- How to check if a tree's nodes are mirrors of each other.
- Reversing a linked list
- Inverting a binary tree
- Efficient way of moving all copies of a certain element to the last in a list
- ios_base::sync_with_stdio(false)
Thoughts:
- Even easy problems are difficult for me right now, but learning fast. Especially struggle with dynamic programming problems.
Today's Progress:
- Solved Leetcode Shortest Unsorted Continuous Subarray
- Solved Leetcode Merge Two Binary Trees
- Solved Leetcode Add Two Numbers
- Solved Leetcode Longest Substring Without Repeating Characters
What I learned:
- How to find shortest unsorted contigous subarray
- Merging two binary trees was pretty straightforward
- Using DP to find longest substring without repeating characters
Thoughts:
- I still struggle with DP problems. Leetcode Longest Substring Without Repeating Characters really stumped me.
- Didn't solve many questions today. Was feeling lazy, did some chores instead.
Today's Progress:
-
Solved Leetcode Maximum Subarray (again)
-
Couldn't solve Leetcode Longest Palindromic Substring. Need some help.
-
Solved Leetcode Container With Most Water
-
Solved Leetcode Move Zeroes (again)
-
Participated in Leetcode Biweekly Contest 23. Ranked 2421 out of 7025. Was able to solve 2/4 questions during the contest.
-
Solved Leetcode Letter Combinations of a Phone Number
What I learned:
- Whenever you want to have 'k' nested loops, use recursion.
- If your code using chars is not working, make sure you used ' ' when writing that char in your code. Had me stumped for a stupidly long time.
Thoughts:
- Solving CP problems and taking part in contests is fun. Also, particiapted in my first CP contest out of college.
Today's Progress:
-
Solved Leetcode Remove Nth Node From End of List
-
Participated in Leetcode Weekly Contest 183. Ranked 5398 out of 12542. Was able to solve 2/4 questions during the contest.
-
Participated in a contest held by ACM BIT Mesra on hackerrank. Was quite tough. Was able to solve only one question.
What I learned:
- Two pointers, a fast one and a slow one are your friends.
- Pointers are extremely finnicky. Need to be very careful when using them.
- Hashmaps can be subsituted to vectors when the keys are known and are in a limited range.
Today's Progress:
- Solved Leetcode Minimum Subsequence in Non-Increasing Order
- Solved Leetcode Number of Steps to Reduce a Number in Binary Representation to One
- Solved Leetcode Best Time to Buy and Sell Stock II
- Solved Leetcode Generate Parentheses
What I learned:
- The peak and valley method
- Backtracking
Today's Progress:
- Solved the problems I couldn't solve from the competitions I participated on April 4 and April 5.
Thoughts:
- Assignments from online classes are :(
Today's Progress:
- Started new project: kMessage! It is a realtime chat app based on firebase realtime database.
Today's Progress:
- Continued progress on kMessage.
- Added features to upload photos.
Today's Progress:
- Continued progress on kMessage.
- Made an activity for new message!
Today's Progress:
- Continued progress on kMessage.
- Added an activity for chat log
Today's Progress:
- Continued progress on kMessage.
- Fix a lot of bugs. Chatting now actually works
Today's Progress:
- Started the Algorithms course by Stanford on Coursera!
- Completed material for Week 1 of course Divide and Conquer, Sorting and Searching, and Randomized Algorithms.
- Completed quiz for week 1. Unfortunately, you need to pay to submit answers :(
What I learned:
- Merge sort and it's analysis
- Grade school multiplication algorithm and it's analysis
- Karatsuba Algorithm.
Today's Progress:
- Programmed Karatsuba Algorithm. Understood how it is derived.
- Completed Assignment 1 of Week 1. Couldn't submit to verify the answer, but independently verified it using Wolfram Alpha.
- Solved Leetcode Group Anagrams
- Solved Leetcode Counting Elements
What I learned:
- Karatsuba Algorithm.
- stoi in C++
- Divide and conquer approach for maximum subarray problem
Today's Progress:
- Completed (all the non-optional parts of) Chapter 3 of Course (Divide & Conquer Algorithms) (I'm currently halfway done through week 2).
- Solved Leetcode Jewels and Stones
- Solved Leetcode Defanging an IP Address
- Solved Leetcode To Lower Case
- Solved Leetcode Kids With the Greatest Number of Candies
- Solved Leetcode Number of Steps to Reduce a Number to Zero
- Solved Leetcode Range Sum of BST
- Solved Leetcode Maximum Binary Tree
- Solved Leetcode Subtract the Product and Sum of Digits of an Integer
- Solved Leetcode Decompress Run-Length Encoded List
- Solved Leetcode How Many Numbers Are Smaller Than the Current Number
- Started work on a personal website!
What I learned:
- Learnt about nlogn algorithm for counting array inversions (using divide and conquer).
- Learnt about Strassen's Matrix Multiplication Algorithm.
- C++ std::transform() function
Today's Progress:
- Solved Leetcode Hamming Distance
- Solved Leetcode Unique Morse Code Words
- Solved Leetcode Find Numbers with Even Number of Digits
- Solved Leetcode Number of Students Doing Homework at a Given Time
- Solved Leetcode Middle of the Linked List
- Solved Leetcode Kth Smallest Element in a BST
Today's Progress:
- Solved Leetcode Count Square Submatrices with All Ones
- Solved Leetcode Backspace String Compare
What I learned:
- Floyd's Tortoise & Hare Algorithm
Today's Progress:
-
Learned about graphs, and how they are represented in memory (finally, whew!)
-
Registered in AtCoder Grand #044.Couldn't attempt even one single question. The 'grand' should have tipped me off to the contest's difficulty lol.
-
Solved Leetcode Interval List Intersections
-
Solved Leetcode Min Stack
-
Solved Leetcode Diameter of Binary Tree
-
Solved Leetcode Last Stone Weight
What I learned:
-
Graphs, and how to represent them in memory (adjacency list, adjacency matrix)
-
Min and max Heaps
-
Heaps in C++ STL.
-
Priority Queues
Today's Progress:
- Participated in CodeForces #644 Div 3. Started an hour late. Ranked 10800. Was able to solve 2 questions on time (A & B), and solved D after time was up(if only I didn't think to be fancy and used a straightforward solution).
What I learned:
- KISS (Keep It Simple, Stupid).
Today's Progress:
- Solved Leetcode Merge Two Binary Trees (again)
- Solved Leetcode Robot Return to Origin
Today's Progress:
- Participated in CodeForces #645 Div 2.
- Was only able to solve two questions.
- Ranked 6213
Today's Progress:
- Continued Coursera Algorithms course.
What I learned:
- Master method and it's proof.
Today's Progress:
- Participated in Educational Codeforces #88 Div 2.
- Was only able to solve 2 questions.
- Ranked 9783
Today's Progress:
- Participating in MLH's Rookie Hacks Hackathon!
- It's a 3 day event till Sunday.
Today's Progress:
- Making progress in Rookie Hacks.
- We have our project decided and a few mockups for the UI already made
Today's Progress:
- Rookie Hacks ended,
- While we weren't able to complete our project, did have a lot of fun, and I made some new friends!
Today's Progress:
- Learned some algorithms, solved questions of my past codeforces contests.
Today's Progress:
- Started learning about backend stuff and how it works
What I learned:
- HTTP requests
- node
- Express basics
Today's Progress:
- Learned about more backend stuff
What I learned:
- Routing in Express
- Serving up dynamic pages
- how to make post requests
- APIs and how to make API requests
Today's Progress:
- Found a youtube channel that shows C++ stuff: javdx9!
What I learned:
- Mostly watched lots of C++ videos.
- Stuff you should not do in C++
Today's Progress:
- Learned about backend stuff
- Made my own api!
- Interact with mongoDB Atlas
- Extremely basic Vue
What I learned:
- How to listen for different types of HTTP requests (GET/ POST/ DELETE/ etc) on a route
- How to connect to a mongoDB cluster in MongoDB Atlas, and retreive/ add/ delete information
- Send appropriate HTTP response with corrent HTTP code
Thoughts:
- Actually excited to be learning actual stuff that can be seen on the web
- Lol @ a thoughts section after so long
Today's Progress:
- Created the front end of my app with vue!
- Learnt some new things about Git too!
What I learned:
- Learnt how to make api calls from the front end (using axios)
- How Vue components work
- Making dynamic webpages
- How to manage merge conflicts in git
- How to use git commit --amend
Today's Progress:
- Learned some stuff about C++ linking
- Hid some secret API keys using environment variables!
- Spent a ton of time configuring the new Windows Terminal and WSL
- Installed zsh and pure, and now my terminal looks extremely snazzy
- Configured VS Code to work with WSL
What I learned:
- How to fetch changes from an upstream repository, and merge the changes
- How compliling in C++ produces a .obj for every file, which the linker then combines into a single executable.
- Now finally know what a linker does!
- How environment variables can be used in node apps using dotenv and in Heroku
Today's Progress:
- Started learning about Operating Systems (from Berkely's CS162 videos on YouTube)
- Started new project (which is kind of homework 0 of CS162) WordCount! It's a command line application in C++ which can count the number of words or the frequency of each word in a text file.
Today's Progress:
- Worked on WordCount a bit
What I learned:
- How to correctly handle command line arguments in C++
- Working with files in C++
Today's Progress:
- Worked on WordCount, almost completed it (small housekeeping remains)
What I learned:
- How to teminate program from any function in C++ (using exit())
- How to get error description in C++ (using strerror_s and errorno)
Today's Progress:
- Continued with Operating Systems, lecture 2 (the four fundamentals of operating systems)
- Since I couldn't find lecture 3 and 4 of CS162 (SP20), watched lecture 3 from SP15, Proccesses, Fork, IO, Files
- Also watched SP15 lecture 5: Concurrency: Processes and Threads
What I learned:
- The refree, illusionist and glue model of OS
- Four fundamentals:
- Thread, Adress Space, Process, Dual Mode
- Process Control Block and Thread Control Block
- Address Space Translation
- Multithreaded Processes
- fork(), exec()c wait(), signal()
- Multiplexing threads/proccesses in time
- Lifecycle of a process
- Lifecycle of a thread
- Kernel Mode(L0) vs User Mode(L3)
Today's Progress:
- Received my first ever pull request! Verified and merged it!
- Watched lecture 6 from SP15: Cooperating threads and synchronisation
What I learned:
- What merge as rebase does
- Fixing 3-way merge conflicts
- LF vs CRLF
- Signing commits using GPG keys
- Processes have threads and address spaces
- Concurrency by multiplexing in time
- Atomic operations
- Multithreaded applications must be insensitive to arbitrary interleavings
- Difference between multiproccessing, multiprogramming and multithreading.
Thoughts:
- Lierally jumped with joy (for only a bit, not too long mind you) when I saw that I had received a pull request! Made my day!
Today's Progress:
- Watched lecture 5 from SP20 of CS162: Concurrency and Mutual Excusion
What I learned:
- Fork, Wait and Exec
- Yield
- ThreadFork vs ProcessFork
- Correctness for systems with concurrent threads
- Thread Pools
- Atomic Operations
- Synchronization: using atomic operations to ensure cooperation between threads
- Mutual Exclusion: ensuring that only one thread does a particular thing at a time
- Critical Section: piece of code that only one thread can execute at once. Only one thread at a time will get into this section of code
- Lock: prevents someone from doing something
- All synchronization involves waiting
Thoughts
- Finally covered syllabus of Lectures 3 and 4 of SP20 by watching lectures of SP15. Now have access to all further videos of SP20!
Today's Progress:
- Watched lecture 6 from SP20 of CS162: Sychronisation: Locks
What I learned:
- How does a new thread start
- There can be many Kernel threads and many User threads, with one-to-one, one-to-many, many-to-one, and many-to-many user threads for kernel threads
- Locks
- Implementing locks via Read-Modify-Write Instructions (test & set, swap, compare & swap etc)
Thoughts
- Had a massive internet upgrade! From 512 KiBps to 12.5 MiBps!
- Having so much fun getting to know about CS concepts as someone who is not studying (but wants to!) study CS
Today's Progress:
- Started Week 3 of Coursera's Algorithms Course!
What I learned:
- Quick Sort and how it works
- Partitioning elements around a pivot in linear time
- Choosing a pivot and how it affects the running time
- How quich sort is O(n log n) in "average case"
Thoughts
- Had heard about quick sort since I was in class 12, it was pretty great actually learning to code up (and understand) the algorithm finally!
- I wonder why I didn't look it up before?
Today's Progress:
- Watched lecture 7 of CS162: Semaphores, monitors and readers/writers
- Completed Week 3 of Coursera's Algorithms Course!
What I learned:
- Busy waiting bad, sleep waiting good
- producer-consumer with bounded buffer, and how to solve it
- Semaphores, P() and V() operations
- How semaphores can be used for mutual exclusion, and scheduling
- mutexes
- Monitors: locks with condition variables
- Mesa vs Hoare monitors (while vs if)
- Readers/writers problem and solution using monitors
- Analysis of quick sort
- How it runs in n log n in average case (proof)
Thoughts
- Lecture 7 was so long (2 hours), absolutely exhausted me. But on the up side, now I know about semaphores and monitors!
Today's Progress:
- Coded up quick sort myself
- Finally realised a use case for having multiple projects in one single solution in Visual Studio. Makes so much sense!
- Couldn't find lecture 8 of SP20 of CS162, so to compensate, watched lectures 3 (from I/O onwards), 4 (I/O, Sockets and Networking) and 5 (Networking continued only)
What I learned:
- (recalled) random number geration in C++ with random device, random engine and uniform distribution
- F10 for running code line-by-line while debugging in VS
- UNIX I/O concepts (byte oriented, single interface for all devices, buffering)
- How C's file API works
- Client-server models (using sockets)
Thoughts
- It is annoying when I can't find lectures of SP20, although lectures SP15 are fine (I just like to watch the latest version. If only I could have studied this in person, Prof Kubi seems so great)
Today's Progress:
- Watched lecture 9 of CS162(SP20): Sockets, Networking(cont) & Scheduling
What I learned:
- Life cycle of an I/O request
- Request response protocol
- Sockets over TCP/IP
- Scheduling!
- Why first come first serve can be bad
- Convoy effect
- Round robin scheduling
- Thrashing
Thoughts
- Finally got to scheduling!
Today's Progress:
- Watched lecture 10 of CS162: Scheduling (cont)
- Started Week 4 (final week) of Stanford Algorithms!
What I learned:
- Scheduling policies (maximise responsiveness/throughput etc)
- Scheduling fairness
- Lottery Scheduling
- Shortest Job First/Shortest Time to Completion First
- Shortest Reamining Time First (SRTF) (requires knowing the future)
- Multilevel Scheduling
- Linux Completely Fair Scheduler (CFS)
- Real Time Scheduling
- Earliest Deadline First
- Randomized Selection (and its proof)
Thoughts
- CS162 is 50% complete! Only 14 more lectures remain! Hoping to complete the course by the end of this month!
- The Course 1 of Stanford's Algorithms Specialisation is in the final week! Soon to be over!
Today's Progress:
- Watched lecture 11 of CS162: Scheduling(fin) and Deadlock
- Continued Week 4 of Algorithms
- Coded up graphs in the form of an adjacency matrix and adjacency list
What I learned:
- Starvation vs deadlock
- Four requirements for deadlock: Mutual exclusion, Hold and wait, No preemption, Circular wait
- Detecting deadlocks
- Preventing deadlock
- Banker's algorithm to avoid deadlock
- Priority donation to solve priority inversion
- Graphs
- Representing graphs via adjacency matrix & adjacency list
- std::vector.resize() in c++, and creating 2d matrices using vectors
- std::search() in c++
Today's Progress:
- Watched lecture 12 of cs162: Address Translation & virtual memory
What I learned:
- Adress spaces (and virtual address spaces)
- Memory multiplexing
- Segmentation in memory
- Segment Translation
Thoughts:
- Was not able to accomplish much, but atleast completed the cs162 lecture for the day. No zero days, right?
Today's Progress:
- Watched lecture 13 of cs162: Address Translation (cont.), Caching and TLBs
What I learned:
- Paging and page tables
- Two (and multi) level page tables
- Caching
- Look aside Buffer
Thoughts:
- Again, no zero days
Today's Progress:
- Watched lecture 14 of cs162: Caching and TLB (finished), Demand Paging
Today's Progress:
- Watched lecture 15 of cs162: Demand Paging
- Found the CSES Problem Set! Started solving problems.
Today's Progress:
- Solved a couple of problems from the CSES Set.
Today's Progress:
- Solved problems from CSES.
- Participated in Codeforces #658. Ranked 8416.
Today's Progress:
- Solved a couple of problems from CSES.
Thoughts:
- Didn't do much coding. Taking a break.
- Had to setup an existing wifi router + modem in bridge mode to another router. Ended up learning a lot about DHCP servers doing this!
- Took a break. However in the meantine, did keep checking Github, following programming, and even solved a few Leetcode questions.
- Also read (some) of the Competitive Programmer's Handbook
- Learned about C++ Tuple
Today's Progress:
- Ashish (Knighfury)'s birthday was coming up (August 2nd), so Shivam (TREXXX27), Piyush and I decided to host a CTF for his birthday (funny, I know)!
- Worked a lot on the repo for the CTF (as might be visible in my GitHub contribution matrix).
- Deployed the website to Heroku!
- Purchased a free domain (.cf) for the CTF website!
What I learned:
- Making a basic backend (we didn't need much) using ExpressJS
- Encoding messages in DTMF
- Difference between A and CNAME records.
Thoughts:
- Had lots (and lots) of fun making the website!
- The pair programming sessions with Shivam were really great, and made me realise how fun it can be programming together.
- Didn't realise how long DNS propagation for a new domain can take. Anyways, figured it out eventually!
(I won't be posting the repository nor the link to the CTF website because of the private nature of the inside jokes used in the site. So just trust that it exists.)
Today's Progress:
- Worked really hard on completing the website. Finished it by 7 in the morning!
- It was Ashish's birthday today, so handed him the link for the CTF to solve (with lots of birthday wishes, of course!)
What I learned:
- Hacking together a CTF website with two friends in 36 hours :D
Thoughts:
- In the end, this was very similar to a hackathon. We worked pretty much non stop, and finished the website in literally just 36 hours.
- The website is a hack, sure, but I still am really proud of it :D
- Thanks Shivam, Piyush, and Ashish! If you're reading this, then you should check them out, for sure!
- P.S. Happy Birthday Ashish! ππ
Today's Progress:
- Revised Operating System concepts a bit, alongside Shivam.
Thoughts:
- Took a break, pretty much. But slowly getting back into the groove.
- Didn't even realise I crossed 90 days already! Pretty great!
Today's Progress:
- Revised C++'s STL with Malviya!
Thoughts:
- Catching upto everything now. Slowly getting back into the groove.
- In other (big) news, Malviya just started 100DaysofCode! All the best! It's an amazing journey, learning so so much new stuff!
- P.S. Shivam has been appearing in my logs quite a bit during the last couple of days. π It's cool seeing your friend get into coding. Especially great that I can show someone the ropes and get them started!
Today's Progress:
- Learned that you can format stdout in C++ in a lot of ways :P
- Revised Leetcode Single Number
- Revised Leetcode Happy Number
- Revised Leetcode Maximum Subarray
- Revised Leetcode Move Zeroes
- Revised Leetcode Best Time to Buy and Sell Stock
- Revised Leetcode Group Anagrams
- Revised Leetcode Middle of the Linked List
- Revised Leetcode Backspace String Compare
What I learned:
- RELEARNED a xor a = 0
- Instead of a costly hash table, can use an array for strings if the charset is known
Thoughts:
- Mostly revised previous Leetcode problems
- Watching Errichto is pretty informative, even if you came up with a solution on your own
std::cout << std::hex << var
Will format the var as hex- Malviya just had his first day in 100 Days of Code! Go check him out!
Today's Progress:
- Revised Leetcode Min Stack
- Revised Leetcode Diameter of Binary Tree
- Revised Leetcode Last Stone Weight
- Leetcode Contiguous Array
- Participated in 32nd LeetCode Biweekly Contest. Was able to solve 3 out of 4 questions (yay!), and ranked 1309 out of 10463 participants.
- Leetcode 1539. Kth Missing Positive Number
- Leetcode 1540. Can Convert String in K Moves
What I learned:
SHIFT + ALT + DOWN ARROW
copies the current line to the next line in VSCode- RECALLED
make_heap(hp.begin(), hp.end()); //heapify a container
int a = hp.front(); pop_heap(hp.begin(), hp.end()); //pop from heap
hp.push_back(x); push_heap(hp.begin(), hp.end()); //push into heap
- Priority Queues in C++ (
priority_queue<int> pq;
) - Prefix sums
Thoughts:
- Leetcode Contigous Array was HARD. Took me a while to first learn about prefix sums and then understand all the concepts. Watching Errichto after learning prefix sums helped quite a lot.
- Participated in a Leetcode contest after quite a while. And for the first time ever, was able to solve 75% (3 of 4) questions! Would have solved the last one too, were it not for the time :P
- It was pretty great seeing that I was able to solve 3 questions (never was able to do it before). Next goal: all four of four questions!
- I guess having someone to do all of this competitive programming stuff together with you is pretty great. We even discussed the questions and our approaches after the contest. How cool is that! (Talking about @TREXXX27)
- Only 5 days left for my #100DaysofCode challenege. In a sense, I don't really want it to end, but we'll see. The countdown has begun, anyways.
Today's Progress:
- Participated in LeetCode Weekly Contest 201. Was able to solve only 2 out of 4 questions (womp womp); ranked 2775 out of 10002 participants.
- Revised Leetcode 238. Product of Array Except Self
- Leetcode 1544. Make The String Great
- Leetcode 1545. Find Kth Bit in Nth Binary String
- Leetcode 1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
- Read some Competitive Programmer's Handbook
Thoughts:
- Leetcode 1546 was pretty interesting in the way prefix sums could be used.
- Was absolutely tired yesterday. Wanted to participate in the Codeforces contest, but I ended up asleep quite a bit before that.
Today's Progress:
- Leetcode 678. Valid Parenthesis String
- Read about Graphs in the CPHB.
What I learned:
- Revised Graph Representation (Adjacency Matrix and Adjacency List)
- Learnt about Edge List representation of graphs
- Graph Traversal!
- DFS and BFS in graphs
- Checking if graph is connected
- Finding distance between two nodes in a graph (not necessarily shortest path) (using BFS)
- Checking if graph has cycles (using DFS/BFS)
- Chacking if graph is bipartite
- About bipartite graphs
Thoughts:
- Reading about graphs clears up so many things I wanted to know!
- Realised how similar DFS and BFS are for trees and graphs. Makes sense though. Trees are special cases of graphs, after all.
- Only 3 more days to go!
Today's Progress:
- Implemented BFS traversal of graphs
- Implemented DFS traversal of graphs
- Leetcode 200. Number of Islands
- Finding shortest paths in graphs!
- Read more CPHB.
What I learned:
- Generalising the idea of graph traversal to any sort of graph (adj matrix/ adj list/ 2d matrix etc)
- Detecting negative cycles in weighted graphs using Bellman-Ford Algorithm
- Finding shortest paths in graphs (with no negative cycles) using Bellman-Ford and Dijkstra's Algorithm.
- Finding shortest path in non-weighted graphs using BFS.
Thoughts:
- Number of questions solved is low, but I feel that I am learning lots!
- Will catch up to the number of questions solved thing soon.
- Only two more days!
Today's Progress:
- Revised Leetcode 617. Merge Two Binary Trees
- Watched this video on Dynamic Programming. Learnt a lot about the standard problems.
What I learned:
- Lots of standard DP problems
- How to approach DP problems in general
- Realised I know was solving the coin change problem all wrong (using the greedy approach).
- Learnt how the coin change problem can be solved using DP.
- Learnt about a very weird thing in C++
//Lets say you have an array of chars (a string), and a pointer p to that array
while(*p != '\0')
{
cout << ++*p++;
}
//this first post increments p
//the initial value is then derefrenced (by *)
//and then the dereferenced char value is incremented (a to b and so on)
//which is then printed in stdout
Pretty sure the above is horrible in terms of best practices in C++, but well, the more you know?
Thoughts:
- Couldn't do a lot of programming today, had (a lot of) personal obligations. Yet, it was a great day, thanks to some amazing friends of mine.
Progress:
- Huge
- I went from not knowing how apps work, to actually coding apps from scratch for Android and the web!
- Learned about competitive programming!
- Picked up new languages!
- I know now how many different and unrelated programs run seamlessly on computers on top of operating systems.
- Went from using C99 style C++ to clean, modern C++ with STL
- Finally, graphs and trees aren't a mystery anymore! You won't get me confused mentioning DP either!
- Participated in my first hackathon!
- Even ended up making new friends!
What I learned:
- Lots of stuff, the 2000 lines of text in this document has all.
- However, the biggest thing I learnt was that practice and steady continuous pace gives the best results. I learnt so much more when I was regular.
Thoughts:
- Extremely glad I did this challenge. I was not able to stay regular, yes, which means that this is not exactly the 'proper' #100DaysOfCode, but still, these 100 (110 actually!) days are invaluable to me.
- The exposure to the dev community, and so many of the resources I got access to, is mind boggling. I found that devs are a most helpful bunch of people (which is not the first impression you get at all).
- This was a great experience, and I think it was a great habit logging down everything I did. So I think I'll be continuing with this tradition, and starting a Dev Log!
- And thanks to the reader, if you read all the way (or even partially), this slice of my life. Thanks for being a part of my dev journey.
- Special thanks to everyone who encouraged me throughout all of this, and kept me motivated/helped me out. You guys are the best (you know who you are)!