Wednesday, October 10, 2018

Find all the Replace by Chaining ack output to sed

From the command line, I was able to replace Bootstrap 3 classes with Bootstrap 4 class using
ack, sed and xargs. 
ack "search text" -l --print0 | xargs -0 -n 1 sed -i "s/search text/replacement text/"
Sed recursively with the help of ack and xargs

Sunday, October 07, 2018

Top 3 Lessons from Successful Open Source Projects

  1. Every good work of software starts by scratching a developer's personal itch.
  2. Good programmers know what to write. Great ones know what to rewrite (and reuse).
  3. Smart data structures and dumb code works a lot better than the other way around.
Linux was not written from scratch. Linus Torvalds took the Minix as the starting point. It is easier to start from a good partial solution. Minix provided the scaffold and eventually the Minix code was either rewritten or deleted. Read more at Cathedral Bazaar

Sunday, September 30, 2018

Organized Topics for Coding Skills

Big O Notation

Construction of Loops
Establishing Initial Conditions for Loops
Finding the Iterative Construct
Termination of Loops
Iteration Trace Table
Iterative Program Structure
While Loop Structure
For Loop Structure
For Loop Examples
Comparison: Loops vs Recursive Functions

Recursion : Algorithmically, Semantically
How to Code Recursively
Stack Overflow Example
Compute a to the power b
Induction and Recursion

Summation Algorithm
Add a sequence of numbers
Recursive Sum

Iterative Solution
Recursive Solution

Division without divide operator
Trace : Desk Check a solution
Non-Linear Recursion

Recursive Solution
Optimized Solution
Factorial Call Stack
Factorial Algorithm
Factorial Implementation

Compute a to the power b
Recursion Solution
Iterative Solution

Compute a % b
Iterative Solution
Efficient Solution

Fibonacci : Multiple Bases Cases - Recursion
Efficient Fibonacci
Fibonacci Runtime
Fibonacci Number Efficiency
Fibonacci Iterative Solution

Dynamic Programming

Square Root Desk Check Table
Binary Recursion
Even Number
Square Root
Linear Recursion

Exponentiation Function
Factorial C
Array C
Binary Search C
Reverse String C
Sum the Digits

Find Repeating Elements
Unique Characters
Unique Characters with Constraints
Duplicate Elements in Array
Recognize Non-Linear Recursion
Add Adjacent Elements
Runtimes + , *
Powers of 2 from 1 through n
Remove White Spaces
Remove Duplicates in a String
String Segmentation
Palindrome Substrings Diagrams

Tuesday, September 25, 2018

How to override merge conflict

To use the latest git version of the file. We can replace file that has conflict with the latest from repo by running these commands:

git reset -- path/to/file.ext

git checkout path/to/file.ext