Monday, December 23, 2019
Tuesday, December 17, 2019
Sunday, December 15, 2019
Saturday, December 14, 2019
Structure and Interpretation of Computer Programs, JavaScript Adaptation
Structure and Interpretation of Computer Programs, JavaScript Adaptation
https://sicp.comp.nus.edu.sg/index.html
https://sicp.comp.nus.edu.sg/index.html
Thursday, December 12, 2019
Tuesday, December 10, 2019
Monday, December 9, 2019
Ruby: see source code of a method
https://stackoverflow.com/questions/3393096/how-can-i-get-source-code-of-a-method-dynamically-and-also-which-file-is-this-me
$ rails console
> require 'method_source'
> I18n::Backend::Simple.instance_method(:lookup).source.display
class A
def foo
end
end
file, line = A.instance_method(:foo).source_location
# or
file, line = A.new.method(:foo).source_location
Sunday, December 1, 2019
Shell Scripting Tutorial
Tutorial:
https://www.shellscript.sh/
How to provide SSH password inside a script or oneliner:
https://srvfail.com/how-to-provide-ssh-password-inside-a-script-or-oneliner/
https://www.shellscript.sh/
How to provide SSH password inside a script or oneliner:
https://srvfail.com/how-to-provide-ssh-password-inside-a-script-or-oneliner/
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.
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.
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.
Monday, November 25, 2019
Sunday, November 24, 2019
Friday, November 22, 2019
Wednesday, November 20, 2019
Tuesday, November 19, 2019
Thursday, November 14, 2019
Monday, November 11, 2019
Thursday, November 7, 2019
Wednesday, November 6, 2019
Saturday, November 2, 2019
Friday, November 1, 2019
Comparing Kubernetes & OTP
https://blog.kenforthewin.com/what-erlang-taught-me-about-distributed-systems/
http://blog.plataformatec.com.br/2019/10/kubernetes-and-the-erlang-vm-orchestration-on-the-large-and-the-small/
https://twitter.com/mononcqc/status/1122872187894018048?ref_src=twsrc%5Etfw
https://blog.ispirata.com/clustering-elixir-erlang-applications-in-kubernetes-part-1-the-theory-ca658acbf101
http://blog.plataformatec.com.br/2019/10/kubernetes-and-the-erlang-vm-orchestration-on-the-large-and-the-small/
https://twitter.com/mononcqc/status/1122872187894018048?ref_src=twsrc%5Etfw
https://blog.ispirata.com/clustering-elixir-erlang-applications-in-kubernetes-part-1-the-theory-ca658acbf101
Thursday, October 31, 2019
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);
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);
//
Saturday, October 26, 2019
Thursday, October 24, 2019
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
cd mongodb-dump-oct24-2019
mongorestore
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.0brew services start mongodb-community@4.05) Restore data
cd mongodb-dump-oct24-2019
mongorestore
Monday, October 21, 2019
Wednesday, October 16, 2019
Tuesday, October 15, 2019
Monday, October 14, 2019
Video processing project
AWS Solution:
https://github.com/aws-samples/aws-media-services-vod-automation/blob/master/MediaConvert-WorkflowWatchFolderAndNotification/README-tutorial.md
Elixir:
https://elixirforum.com/t/video-processing-and-editing-in-elixir/13842
https://stackoverflow.com/questions/34246817/video-uploads-and-conversions-in-elixir-phoenix
https://github.com/aws-samples/aws-media-services-vod-automation/blob/master/MediaConvert-WorkflowWatchFolderAndNotification/README-tutorial.md
Elixir:
https://elixirforum.com/t/video-processing-and-editing-in-elixir/13842
https://stackoverflow.com/questions/34246817/video-uploads-and-conversions-in-elixir-phoenix
Monday, October 7, 2019
Friday, October 4, 2019
Wednesday, October 2, 2019
Monday, September 30, 2019
Sunday, September 29, 2019
Saturday, September 28, 2019
Thursday, September 26, 2019
Wednesday, September 25, 2019
Tuesday, September 24, 2019
Monday, September 23, 2019
Sunday, September 22, 2019
'less' related
To search for 1st occurrence from top of file:
To search for 1st occurrence from bottom of file:
less +/FATAL log/production.logTo search for 1st occurrence from bottom of file:
less +?"Processing by" log/production.log
Monday, September 16, 2019
Rails & Mongo - connecting to Mongodb from rails console
client= Mongo::Client.new('mongodb://username:password@serverIP:27017/databaseName?authSource=authSource db')
db = client.database
db.collections
Saturday, September 14, 2019
Thursday, September 12, 2019
Wednesday, September 11, 2019
Sunday, September 8, 2019
Thursday, September 5, 2019
Wednesday, September 4, 2019
Monday, September 2, 2019
Sunday, September 1, 2019
Saturday, August 31, 2019
Thursday, August 29, 2019
Open Source related - 'Funding' Experiment Recap
Very interesting and thought-provoking article about Funding for OSS
https://feross.org/funding-experiment-recap/However the comments section also includes this very valid comment from Mjölnir :
There were numerous valid concerns like the ones I'm raising now. You've only cherry-picked the most positive ones and used them to support your arguments. Yes there was an inundation of responses and I'm sure it's not easy to be at the receiving end of so much derision but there were TONS of valid concerns and dismissing the VAST majority of people in the ecosystems with such a flagrant disregard for conflicting opinions does not bode wellMore comments over here - https://www.reddit.com/r/programming/comments/cwwe8c/recap_of_the_funding_experiment_ferossorg/
Monday, August 26, 2019
Thursday, August 22, 2019
Seated-Meditation vs Seated-Programming
"It's thought that KungFu was developed by the early Chinese monks as a way to stay fit enough for hours of seated meditation."
Seated Programming/Studying is not very different from Seated-Meditation.
Hence, the need for being extremely fit for hours of seated-meditation applies to seated-studying/programming as well.
Seated Programming/Studying is not very different from Seated-Meditation.
Hence, the need for being extremely fit for hours of seated-meditation applies to seated-studying/programming as well.
Monday, August 19, 2019
mysql2 gem problems on Mac
https://github.com/brianmario/mysql2/issues/1005
To fix for a manual gem install:
brew install openssl
gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)"
To fix for all bundle installs:
brew install openssl
bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"
bundle install
|
Saturday, August 17, 2019
Friday, August 16, 2019
Wednesday, August 14, 2019
Native vs Flutter/React Native/Xamarin, Dropbox going full Native
https://blogs.dropbox.com/tech/2019/08/the-not-so-hidden-cost-of-sharing-code-between-ios-and-android/
https://www.reddit.com/r/programming/comments/cqe90r/the_not_so_hidden_cost_of_sharing_code_between/
-- has good discussions about Flutter, React Native, Xamarin
https://www.reddit.com/r/programming/comments/crunfh/dropbox_would_rather_write_code_twice_than_try_to/
https://www.reddit.com/r/programming/comments/cqe90r/the_not_so_hidden_cost_of_sharing_code_between/
-- has good discussions about Flutter, React Native, Xamarin
https://www.reddit.com/r/programming/comments/crunfh/dropbox_would_rather_write_code_twice_than_try_to/
Tuesday, August 13, 2019
Saturday, August 10, 2019
Some articles to read later (that i found in reddit.com/r/programming)
https://medium.com/@gajus/pre-loading-cache-cbb0fae2747d
https://stackoverflow.blog/2019/08/06/how-stack-overflow-caches-apps-for-a-multi-tenant-architecture/
https://blog.couchbase.com/postgres-jsonb-and-nosql/
https://nickcraver.com/blog/2019/08/06/stack-overflow-how-we-do-app-caching/
https://pgdash.io/blog/postgres-server-side-programming.html
https://itnext.io/a-comparison-of-graphql-and-rest-e125d77fb329
https://mystor.github.io/git-revise.html
https://codersera.com/blog/what-is-scala-used-for-a-brief-overview/
https://medium.com/onfido-tech/metaprogramming-in-javascript-with-jscodeshift-8c72ae56759c
https://medium.com/@jotadeveloper/abstract-syntax-trees-on-javascript-534e33361fc7
https://medium.com/@leventov/hash-table-tradeoffs-cpu-memory-and-variability-22dc944e6b9a
https://jamesmonger.com/2019/08/06/return-early-return-often.html
https://www.anishathalye.com/2018/04/03/macbook-touchscreen/
https://www.programmableweb.com/news/what-graphql-and-how-did-it-evolve-rest-and-other-api-technologies/analysis/2019/07/31
Friday, August 9, 2019
Thursday, August 8, 2019
Tuesday, August 6, 2019
Ziacode - a new E-Commerce concept
Ziacode is a new Ecommerce concept that let you make money just by sharing your Ziacode across platforms.
Sunday, August 4, 2019
Saturday, August 3, 2019
Web Components
State of Web Components (2019) -
https://medium.com/swlh/the-state-of-web-components-e3f746a22d75
Web Components - The Secret Ingredient Helping Power The Web
https://medium.com/swlh/the-state-of-web-components-e3f746a22d75
Web Components - The Secret Ingredient Helping Power The Web
Elixir related - Concurrency & Absinthe, Temple HTML library, Elixir + Kubernetes, How Elixir helped improve performance, setup Phoenix + PostgreSQL using docker-compose
https://www.reddit.com/r/elixir/comments/ckihkc/i_thought_concurrency_was_a_big_thing/ - A discussion about concurrency and Elixir libraries like Absinthe.
https://www.mitchellhanberg.com/introducing-temple-an-elegant-html-library-for-elixir-and-phoenix - Introducing Temple: An elegant HTML library for Elixir and Phoenix
https://bbhoss.io/posts/announcing-cainophile/ - a library to assist you in building change data capture (CDC) systems in Elixir. With Cainophile, you can quickly and easily stream every change made to your PostgreSQL database, with no plugins, Java, or Zookeeper required.
https://itnext.io/elixir-plus-kubernetes-part-1-80129eab14f0? - Elixir + Kubernetes
https://selleo.com/blog/how-elixir-helped-me-boost-app-performance - How Elixir Helped Me Boost App Performance
https://medium.com/@ricardo.trindade743/setting-up-phoenix-postgresql-with-docker-compose-for-local-development-afeb4a4ace6c - Setting up Phoenix + PostgreSQL with docker-compose for local development
https://www.mitchellhanberg.com/introducing-temple-an-elegant-html-library-for-elixir-and-phoenix - Introducing Temple: An elegant HTML library for Elixir and Phoenix
https://bbhoss.io/posts/announcing-cainophile/ - a library to assist you in building change data capture (CDC) systems in Elixir. With Cainophile, you can quickly and easily stream every change made to your PostgreSQL database, with no plugins, Java, or Zookeeper required.
https://itnext.io/elixir-plus-kubernetes-part-1-80129eab14f0? - Elixir + Kubernetes
https://selleo.com/blog/how-elixir-helped-me-boost-app-performance - How Elixir Helped Me Boost App Performance
https://medium.com/@ricardo.trindade743/setting-up-phoenix-postgresql-with-docker-compose-for-local-development-afeb4a4ace6c - Setting up Phoenix + PostgreSQL with docker-compose for local development
Thursday, August 1, 2019
Tuesday, July 30, 2019
Sunday, July 28, 2019
Chinese Banking revolution - Use of big data and artificial-intelligence technology to give loans to Small Businesses
Chinese Banking revolution - Use of big data and artificial-intelligence technology to give loans to Small Businesses:
Excerpts:
One uniquely Chinese source of information for banks is the government-administered social credit system, which is being tested in cities across the country as a way to reward good deeds and punish misbehavior. In one potential scenario cited by MYbank President Jin Xiaolong in a recent interview, a small-business owner whose social credit score dropped because he failed to return a borrowed umbrella would find it harder to get a loan.
But the biggest data trove may come from payments providers like the one operated by Ma’s Ant Financial, the biggest shareholder of MYbank. After obtaining authorization from borrowers, MYbank analyzes real-time transactions to gain insights into creditworthiness. For example, a drop in customer payments at a retailer’s flagship store might be an early indicator that the company’s prospects -- and its ability to repay debt -- are deteriorating.
The upshot of more information is a loan approval rate at MYbank that’s four times higher than at traditional lenders, which typically reject 80% of small-business loan requests and take at least 30 days to process applications, according to Jin, who plans to double MYbank’s roster of borrowers in three years. He said the Hangzhou-based firm’s operating cost per loan is about 3 yuan, versus 2,000 yuan at traditional rivals.
Friday, July 26, 2019
Sunday, July 21, 2019
Friday, July 19, 2019
Yes silver bullet by Mark Seemann
https://blog.ploeh.dk/2019/07/01/yes-silver-bullet/
Excerpts:
Excerpts:
So it is with technology improvements. Automated testing is available, but not ubiquitous. Git is free, but still organisations stick to suboptimal version control. Haskell and F# are mature languages, yet programmers still program in C# or Java.
....
....
If you accept my argument, that order-of-magnitude improvements appeared after 1986, this implies that Brooks' premise was wrong. In that case, there's no reason to believe that we've seen the last significant improvement to software development.I think that more such improvements await us. I suggest that statically typed functional programming offers such an advance, but if history teaches us anything, it seems that breakthroughs tend to be unpredictable.
Thursday, July 18, 2019
Wednesday, July 17, 2019
Monday, July 15, 2019
Saturday, July 13, 2019
Sunday, July 7, 2019
Thursday, July 4, 2019
grep for .gz files
https://alvinalexander.com/blog/post/linux-unix/how-grep-search-compressed-gzip-gz-text-file
zgrep foo myfile.gz
grep 'GET /blog' access_log.gz
Wednesday, July 3, 2019
Sunday, June 23, 2019
Friday, June 21, 2019
Tuesday, June 18, 2019
Data Structures & Algorithms - leetcode.com,skerritt.blog
A platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.
https://leetcode.com/
https://skerritt.blog/tag/computer-science/
https://leetcode.com/
https://skerritt.blog/tag/computer-science/
Data Structures and Algorithms in JavaScript
Data Structures and Algorithms in JavaScript
https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascriptSunday, June 16, 2019
DevOps Tutorial for Beginners
Intellipaat DevOps course: https://intellipaat.com/devops-certif... In this devops tutorial for beginners video you will learn devops end to end right from what is devops, various devops tools it has like docker, git, jenkins, chef, kubernetes, nagios, puppet, ansible in detail.
https://intellipaat.com/tutorial/devops-tutorial/
.Net related: Blazor
https://blazor.net
https://github.com/AdrienTorris/awesome-blazor
https://studyblazor.com/
https://www.hanselman.com/blog/WhatIsBlazorAndWhatIsRazorComponents.aspx
May 7 2019
Full stack web development with ASP.NET Core 3.0 and Blazor - BRK3017
https://www.youtube.com/watch?v=y7LAbdoNBJA
https://aka.ms/blazorworkshop
https://github.com/AdrienTorris/awesome-blazor
https://studyblazor.com/
https://www.hanselman.com/blog/WhatIsBlazorAndWhatIsRazorComponents.aspx
May 7 2019
Full stack web development with ASP.NET Core 3.0 and Blazor - BRK3017
https://www.youtube.com/watch?v=y7LAbdoNBJA
https://aka.ms/blazorworkshop
Rust related: Actix & Actix Web framework
OTP -> rust Actix, Phoenix -> actix-web, Ecto -> diesel
https://actix.rs/
https://github.com/actix/actix
https://github.com/actix/actix-web
https://actix.rs/
https://github.com/actix/actix
https://github.com/actix/actix-web
Saturday, June 15, 2019
Sunday, June 9, 2019
Would you still pick Elixir in 2019? (github.com) - continuation - comparison with Scala/Akka
An interesting question and discussion related to Elixir for same link as previous post:

eremy commented on 26 Oct 2018