Tuesday, March 24, 2020

UI Colors

https://flatuicolors.com/ - get hex values for colors

https://www.uicolor.io/ - convert hex values to RGB values

Excalidraw - whiteboard tool

https://excalidraw.com

Excalidraw is a whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them.

Thursday, March 19, 2020

CPU Utilization discussion around Elixir

CPU Utilization discussion around Elixir
https://www.reddit.com/r/elixir/comments/fi6hfe/has_cpu_utilization_been_improved_since_17/

Below artice shows high CPU usage for Elixir
https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixir/

Below article explains why and how it is actually a feature of BEAM (busy waiting) which might be interpreted wrongly, but since AWS will also interpret it wrongly, how to turn off busy-waiting
https://stressgrid.com/blog/beam_cpu_usage/

Tabular data sorting/pagination with Phoenix LiveView

Wednesday, March 11, 2020

How To Show Confirmation Alerts With OK And Cancel Buttons Using Swift 5?

Why your software should use UUIDs in 2020s

https://devforth.io/blog/why-your-software-should-use-uuids-in-2020s

Excerpt:

Conclusion

  • UUIDs solve the problem of centralized ID store making possible working in offline and handle complex relations on frontend by making frontend independent from the server which makes it super-responsive
  • UUIDs allow you to implement shards for high-load scalable systems
  • UUIDs make your IDs more secure by hiding records count
  • To decrease insert time use UUIDv1 as IDs system
  • Store it in the database as 16 bytes
  • To save traffic transmit Shot UUIDs

Read a paper: My VM is Lighter (and Safer) than your Container




Also look at Firecracker from Amazon

React Lessons

Build an iMessage Clone with The Stream Chat iOS SDK

Wednesday, February 12, 2020

Understanding modern cloud architecture on aws - A concepts series

Articles to Read Later

NoSQL related:
https://www.memsql.com/blog/why-nosql-databases-wrong-tool-for-modern-application/

React:
https://www.robinwieruch.de/react-libraries

Design, Web Applications:
https://changelog.com/posts/monoliths-are-the-future

UI, Javascript, Web Applications:
Infinite Scroll bugs - https://www.youtube.com/playlist?list=PLbZZF2MaiZb5bZKRQ8OtdeX3LTSUS7nsw

AWS, DevOps, Serverless:
Serverless Computing: One Step Forward, Two Steps Back - https://www.youtube.com/watch?v=dIb0xbXo6es&feature=youtu.be

General, Design:
'A Systemwide Disaster': How the Iowa Caucuses Melted Down
https://www.nytimes.com/2020/02/04/us/politics/what-happened-iowa-caucuses.html

General, Mobile:
The Rise and Fall of Mobilee - https://deprogrammaticaipsum.com/2020/02/03/the-rise-and-fall-of-mobile/

Elixir:
https://blog.agentrisk.com/elixirs-with-statement-is-fantastic-1431bcbcde3

General:
DHH Interview -  Software Contrarian - https://corecursive.com/david-heinemeier-hansson-software-contrarian-transcript/

Web Applications:
Develop a web crawler in 90 seconds - https://medium.com/@MarvinZhang89/develop-a-web-crawler-in-90-seconds-dab74bd1473f

General, Hardware:
Best Laptops for Programmers in 2020: https://www.reddit.com/r/programming/comments/ez6o87/best_laptops_for_programmers_in_2020/

React, Redux:
Introduction to using Redux with React Native - https://blog.afmonteiro.pt/react-native-and-redux/

Web Applications, Design, Performance:
Using queues to offload Web API - https://thomasvilhena.com/2019/07/using-queues-to-offload-web-api

YAML, DevOps, Kubernetes:
Overcooming YAML Pain in Continuous Integration - https://ithrowexceptions.com/2020/02/04/yaml-hell-in-devops.html

Web Applications, Design:
Nanoservices - https://labrary.online/nanoservices.html

Web Applications, DevOps:
https://www.bearer.sh/blog/what-is-an-api-gateway

React, Redux, Hooks:
https://blog.betomorrow.com/replacing-redux-with-observables-and-react-hooks-acdbbaf5ba80

Web Applications, DevOps:
The Amazon Premium: http://calpaterson.com/amazon-premium.html

Elixir
https://medium.com/@iantbutler01/writing-a-quick-and-dirty-web-crawler-in-elixir-b6aac2cfaac4

Passenger, Performance:
Request Load Balancing in Phusion Passenger - https://www.phusionpassenger.com/library/indepth/ruby/request_load_balancing.html

Web Applications, Security:
https://www.andrew-best.com/posts/learn-auth-the-hard-way-part-one/

iOS, Swift, SwiftUI:
https://developer.apple.com/tutorials/swiftui/

Database, ETL:
Introduction to Stream Processing - https://blog.frankel.ch/stream-processing/1

Kafka:
Why Kafka is so fast - https://medium.com/swlh/why-kafka-is-so-fast-bde0d987cd03

Multithreading, Performance, Concurrent:
https://i-kh.net/2020/02/10/multithreading-without-locks/




Monday, January 27, 2020

Using Phoenix and Rails together for a project, Terraform

Abandoning MySQL in favor of a database-free architecture and an Elixir-driven data indexing model

https://moz.com/devblog/moz-analytics-db-free
We are abandoning MySQL database storage—our current infrastructure’s decisive bottleneck—in favor of a database-free architecture and an Elixir-driven data indexing model. 

Elixir - online resources for learning

  1. ElixirConf Youtube Channel — All of the videos of speakers from ElixirConf starting back from 2017. Lots of great information and different perspectives.
  2. Elixir Forum — An active Elixir only forum where you can get quick and valuable feedback from engineers working in Elixir.
  3. Elixir tutorials and classes — A mixture of free and paid training classes.
  4. Elixir School — A destination for newbie and experienced Elixir programmers.
  5. Programming Elixir 1.6 — If you’re an experienced programmer looking for a comprehensive written resource on programming in Elixir, then this book is for you.
  6. Elixir training on Github
  7. Slack Bot tutorial — How to develop a Slack bot with Elixir and Phoenix.
  8. How to Learn Elixir for Hipster Javascript Developers — Some great basic concepts of Elixir.
  9. Learn Elixir in Y minutes — A high-level overview of Elixir on one page.
  10. How We Learned Elixir — A great story, with examples, about how engineers at a company learned Elixir.

Elixir, Telemetry, Prometheus example

A base Elixir project with Prometheus instrumentation through telemetry
https://github.com/philcallister/elixir_prometheus_telemetry

htop explained visually

The Sass Ampersand

Friday, January 24, 2020

Web Components related

What Would You Do Without a Framework? Front-End Anew with Lit-HTML - May 29 2019







Declarative Reactive Web Components with Justin Fagnani - June 2019


Sunday, January 12, 2020

Iterator

Excerpt from https://davidwalsh.name/es6-generators

Iterators are a special kind of behavior, a design pattern actually, where we step through an ordered set of values one at a time by calling next(). Imagine for example using an iterator on an array that has five values in it: [1,2,3,4,5]. The first next() call would return 1, the second next() call would return 2, and so on. After all values had been returned, next() would return null or false or otherwise signal to you that you've iterated over all the values in the data container.

New Web APIs

Friday, November 29, 2019

Difference between Dynamic Programming & Divide And Conquer

https://en.wikipedia.org/wiki/Dynamic_programming

There are two key attributes that a problem must have in order for dynamic programming to be applicable: optimal substructure and overlapping sub-problems. If a problem can be solved by combining optimal solutions to non-overlapping sub-problems, the strategy is called "divide and conquer" instead.[1] This is why merge sort and quick sort are not classified as dynamic programming problems.

RSA Encryption Algorithm


Wednesday, November 27, 2019

An educated mind

Aristotle famously stated that the mark of an educated mind is the ability to entertain a thought without accepting it.

Intro to B-Trees

Monday, October 28, 2019

Tail-Recursion, Tail-Call Optimization

https://stackoverflow.com/questions/33923/what-is-tail-recursion
https://stackoverflow.com/questions/310974/what-is-tail-call-optimization

Examples done after reading the answers in the 1st link above:

// 
//////////// Sum till n ////////////
//

// - normal recursion
function sumTo(n) {
  return (n == 0 ? 0 : (n+sumTo(n-1)));
}
var result = sumTo(10);
console.log(result);

// - tail recursion
function sumTo2(n) {
  return sumTo2_aux(n, 0);
}
function sumTo2_aux(n, acc) {
  return (n == 0) ? acc : sumTo2(n-1, acc+n);
}
var result2 = sumTo2(10);
console.log(result2);


//
//////////// Factorial ////////////
//

// - normal recursion
function factorial(n) {
  return (n == 1 ? 1 : n * factorial(n-1));
}
var factorial_result1 = factorial(10);
console.log(factorial_result1);

// - tail recursion
function factorial2(n) {
  return factorial2_aux(n,1);
}
function factorial2_aux(n, acc){
  return (n == 1 ? acc : n * factorial2_aux(n-1, acc));
}
var factorial_result2 = factorial2(10);
console.log(factorial_result2);

//

Thursday, October 24, 2019

Firebase related

Data Structures related

Uninstall Mongo old version and Install new version

1) backup data

mkdir mongodb-dump-oct24-2019
cd mongodb-dump-oct24-2019
mongodump

Above will create a folder called 'dump' within 'mongodb-dump-oct24-2019' folder.

2) Uninstall existing version of mongodb
https://medium.com/@rajanmaharjan/uninstall-mongodb-macos-completely-d2a6d6c163f9

3) Install new version
https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew

brew tap mongodb/brew  
brew install mongodb-community@4.0
4) brew link --force mongodb-community@4.0
brew services start mongodb-community@4.0
5) Restore data
cd mongodb-dump-oct24-2019
mongorestore

Sunday, September 22, 2019

'less' related

To search for 1st occurrence from top of file:
less +/FATAL log/production.log

To search for 1st occurrence from bottom of file:
less +?"Processing by" log/production.log


Linux - Tools, System Administration Basics

Monday, September 16, 2019

Followers

Blog Archive