Thursday, January 30, 2020
Monday, January 27, 2020
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.
Labels:
big data,
data-pipeline,
database,
elixir,
performance
Elixir - online resources for learning
- ElixirConf Youtube Channel — All of the videos of speakers from ElixirConf starting back from 2017. Lots of great information and different perspectives.
- Elixir Forum — An active Elixir only forum where you can get quick and valuable feedback from engineers working in Elixir.
- Elixir tutorials and classes — A mixture of free and paid training classes.
- Elixir School — A destination for newbie and experienced Elixir programmers.
- 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.
- Elixir training on Github
- Slack Bot tutorial — How to develop a Slack bot with Elixir and Phoenix.
- How to Learn Elixir for Hipster Javascript Developers — Some great basic concepts of Elixir.
- Learn Elixir in Y minutes — A high-level overview of Elixir on one page.
- 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
https://github.com/philcallister/elixir_prometheus_telemetry
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
Labels:
html,
javascript,
web applications
Thursday, January 23, 2020
Thursday, January 16, 2020
Wednesday, January 15, 2020
React concepts to know before learning/using Redux
Below is a 2017 article, but it has good info related to setState(), lifting state, higher-order components, Context, Container & Presenter pattern
https://www.robinwieruch.de/learn-react-before-using-redux
https://www.robinwieruch.de/learn-react-before-using-redux
Tuesday, January 14, 2020
Monday, January 13, 2020
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
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.
Labels:
algorithms,
computer science,
design,
programming
New Web APIs
Picture in Picture API - https://css-tricks.com/an-introduction-to-the-picture-in-picture-web-api/
Intersection Observer API - https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
Intersection Observer API - https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
Sunday, January 5, 2020
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
Labels:
distributed,
docker,
erlang,
kubernetes
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
Subscribe to:
Posts (Atom)

eremy commented on 26 Oct 2018