Dynamic Programming: Divide & Conquer

https://dzone.com/articles/dynamic-programming

Diviser chacune des difficultés que j’examinerais, en autant de parcelles qu’il se pourrait et qu’il serait requis pour les mieux résoudre “. C’est la règle de la division du complexe en éléments simples (analyse). – – Descartes

…Divide the problem P into k small sub- problems (P1, P2,P3,…Pk), so that we can resolve with k solutions (S1, S2,S3,…Sk), then combine them into the final solution S.

Huawei Mobile Services (HMS)

https://www.huaweicentral.com/huawei-mobile-services-hms-everything-you-need-to-know/

The alternative of GMS on Huawei Mate 30/ -Pro.

For Singapore, without GMS Map, we can use “Waze” which has more local information.

YouTube can be accessed through Browser.

The rest of GMS (Appstore) is no big deal, easily downloadable from alternate Huawei AppGallery or other third party sites.

Huawei App Gallery $1 billion funding to HMS developers, also charge 15% commission on Apps sales (unlike Apple & Google charge 30%).

https://vulcanpost.com/681770/huawei-support-android-apps/

丘城桐:基础数学和AI, Big Data

AI and Big Data are Twins, their Mother is Math.

“AI 3.0“ today, although impressive in “DeepLearning“, is still using “primitive” high school Math, namely:

AI has not taken advantage of the power of post-Modern Math invented since WW II, esp. IT related, ie :

That is the argument of the Harvard Math Dean Prof ST Yau 丘城桐 (First Chinese Fields Medalist), who predicts the future “AI 4.0“ can be smarter and more powerful.

https://www.toutiao.com/group/6751615620304863755/?app=news_article_lite&timestamp=1572193294&req_id=2019102800213401000804710406682570&group_id=6751615620304863755

… Current AI deals with Big Data:

  1. Purely Statistical approach and experience-oriented, not from Big Data’s inherent Mathematical structures (eg. Homology or Homotopy).
  2. The Data analytical result is environment specific, lacks portability to other environments.

3. Lack effective Algorithms, esp. Algebraic Topology computes Homology or Co-homology using Linear Algebra (Matrices).

4. Limited by Hardware Speed (eg. GPU), reduced to layered-structure problem solving approach. It is a simple math analysis, not the REAL Boltzmann Machine which finds the most Optimum solution.

Notes:

AI 1.0 : 1950s by Alan Turing, MIT John McCarthy (coined the term “AI”, Lisp Language inventor).

AI 2.0 : 1970s/80s. “Rule-Based Expert Systems” using Fuzzy Logic.

[AI Winter : 1990s / 2000s. Failed ambitious Japanese “5th Generation Computer” based on Prolog-based “Predicate” Logic]

AI 3.0 : 2010s – now. “DeepLearning” by Prof Geoffry Hinton using primitive Math (Statistics, Probability, Calculus Gradient Descent)

AI 4.0 : Future. Using “Propositional Type” Logic, Topology (Homology, Homotopy) , Linear Algebra, Category.

为什么 C/C++不会过时 (Outdated) ?

https://m.toutiaocdn.com/group/6746799095844700684/?app=news_article_lite&timestamp=1571588365&req_id=201910210019250100140481310899D951&group_id=6746799095844700684

Biggest IT Lies:

  1. IBM Founder: The World only needs 5 Computers (implied IBM Mainframes)
  2. Microsoft Founder: 640 K Memory is big enough for all computers.
  3. DEC Founder (Ken Olsen) : No such thing as “Personal” Computer! Any computer is designed for sharing (Server).

Modern C++11 Course

C++ is divided into the Old C++ and the Modern C++ after version C++11, and currently C++ 17 (with STL complete Functional Programming features) .

The C++20 will be released in 2020.

Fortunately, C++ is backward compatible.

If you want to learn the Modern C++ which ovetcomes the weaknesses of the old C++, learn this Germany lecture (English complete series) is by far the latest C++11 free online :

Series: https://www.youtube.com/playlist?list=PLgnQpQtFTOGR50iIOtO36nK6aNPtVq98C

Slides:

Modern C++ Course

C++17 Ideal for Mobile Cross-Platform Development

Mobile Cross-Platform :

  1. Android
  2. iOS
  3. Windows
  4. Linux
  5. Web
  6. HongMeng (aka Harmony) OS
  7. IoT

Cross-platform C++ in IDE :

  1. Mac : Xcode, Android Studio, Visual Studio on Mac (fee), Eclipse
  2. Windows : Visual Studio (full featured, pay fee), VS Code (limited feature, free), Eclipse
  3. Linux : many eg. Eclipse…

“So you want to write cross platform code, PAL? (Part I)” by Gal Shelef https://link.medium.com/ijqPGGDWd0

Apps Architecture:

The Salami Method

  • Cross-platform Language: C++ (preferred version 17 with STL for Functional Programming)
  • Apps divided into 2 parts:
    • UI logic: platform specific
      • Android : Java / Kotlin in Flutter framework
      • iOS: Swift / Objective-C
    • Core logic: C++17

Platform-specific Binding : PAL

What is Harmony OS? Huawei’s “Android rival” explained!


https://www.androidauthority.com/huawei-harmony-os-1030848/

1. Harmony OS : Micro-Kernel for ‘1+8+N’ IoT devices

2. ARK Compiler for Android code compatibility (Java, C/C++, Kotlin, JS), yet 60% faster

3. AppGallery : confirmed ‘Yes’ for Facebook, WhatsApp, Insragram. Next ? will be Google Mobile Services (YouTube, Gmail, Google Map, Google Playstore )

4. HMS (Huawei Mobile Services) : $1 billion Apps development fund by Huawei

IT Math

There is a strange phenomenon in IT Profession : Computer Science / IT graduates usually become application / system programmers, while Math graduates are advanced software developers (Compiler, AI, Big Data…)

Why?

Answer:

  • CS / IT grads study Applied Math eg. Linear Algebra, Polynomial, etc;
  • Math grads study Pure (Theoretical) Math eg. Abstract Algebra, Category Theory, Lambda Calculus, Algebraic Topology, Homological Algebra, etc. which are necessary for Compiler design, Functional Programming, etc.

https://m.toutiaocdn.com/group/6737924972385141252/?app=news_article_lite&timestamp=1568828552&req_id=20190919014232010014041160373D350B&group_id=6737924972385141252

Flutter vs React Native vs Xamarin or Native Codes: Which is the best choice for 2019?

Mobile Apps developed for cross-platform : iOS, Android, Web… (Huawei HongMengOS ? )

  1. Flutter (Google) — Dart
  2. Xamarin (Microsoft) — C#
  3. React Native (Facebook) —Javascript

https://towardsdatascience.com/flutter-vs-react-native-vs-xamarin-which-is-the-best-choice-for-2019-2bc30fc76442

The above analysis for the 3 tools is neutral – beauty is in the eye of the beholder – they are more or less the same family based on current Object-Oriented paradigm.

However, I would recommend a 4th option with additional future-promising Functional Pragramming (FP) paradigm for multi-platform mobile apps:

4. Native Codes in C++ (Version 17) with Standard Template Library.

  • C++ can be developed in Android Studio, called by Java / Kotlin / Flutter via JNI interface.
  • Or in React Native IDE.
  • IEEE 2019 Ranking : C++ / C is ranked 3rd popular language behind Python (1st) & Java (2nd), but it is unique in multi-paradigm & multi-platform, an advantage compared to the others.

“The dawn of a new era in app development”

[Source: please read the below link:]

“The dawn of a new era in app development” by gk_ https://link.medium.com/fDulXo3zWZ

The dilemma of maintaining 4 code bases for multi-platfofms:

  1. iOS,
  2. Android,
  3. Windows,
  4. Web.

Key Points:

  • Cross-platform tools for Web / Native codes.
  • Google’s future Android-replacement Fuchsia OS (OO&FP Logic : C++/C, Phone UI: Dart, Web: Rust, Server: Go) Flutter framework for iOS / Android / Windows / Web [Notice: the conspicuous absense of Java]

华为 鸿蒙 Huawei HongMeng‘s answer : “1+8+N” iOT multi-platforms (which will soon obsolete Apple iOS & Google Android)

  1. Smart HD TV (out in August 2019)
  2. Mobile Phones / Notepads (April 2020 Huawei P40)
  3. Driverless Car
  4. PC Desktop
  5. Earphones
  6. AI Sound boxes
  7. Virtual Reality (VR)
  8. Wearables
  9. (+ N) All iOT devices

Remark:

C++ version 17 (Standard Template Library STL‘ for Functional Programming) is multi-paradigm : Imperative, OO & FP. It curently supports Android as Native codes (ie bypass JVM).

Data Science: 5 Statistics & Math tools

【掌握这五大统计学知识,让你笑傲数据科学界】
https://m.toutiaocdn.com/group/6723020943871967751/?app=news_article_lite&timestamp=1565375984&req_id=20190810023944010152028205708822C&group_id=6723020943871967751&tt_from=android_share&utm_medium=toutiao_android&utm_campaign=client_share

1. MEAN / MEDIUM

2. PERCENTILE

3. SKEWNESS

4. STANDARD DEVIATION

5. PCA = Pricinpal Component Analysis

【学习大数据,我不会数学怎么办?还要不要学啦?】
https://m.toutiaocdn.com/group/6706386149763449356/?app=news_article_lite&timestamp=1565378178&req_id=20190810031618010152042134003992B&group_id=6706386149763449356&tt_from=android_share&utm_medium=toutiao_android&utm_campaign=client_share

1. Probability & Statistics

2. Linear Algebra (Matrix, Eigenvectors, Eigenvalues)

3. Optimisation : eg. Gradient Descent, etc.

4. Discrete Math in Computing

(想看更多合你口味的内容,马上下载 今日头条)
http://app.toutiao.com/news_article/?utm_source=link

Functional Programming Python: Lambdas, Decorators, and Other Magic

https://dev.to/codemouse92/dead-simple-python-lambdas-decorators-and-other-magic-5gbf

Python is multi-paradigm: OO or FP.

Useful Functional Programming Techniques :

  • Closure: local variables
  • Resursion : stop unlimiting looping
  • Lambdas : anonymous function for 1-time throw-away functions
  • Nested Function: function returns a function as result.
  • Decorators : wrap an existing function with additional features without modifying it.

The Future of Programming is Dependent Types

Read the example in this excellent blog for explanation of Dependent Type (ie Type depends on its Value) :
eg.

Type ArrayOfOne with value ‘length’ of INT 1.

Type ArrayOfTwo with value ‘length’ of INT 2.

Type ArrayOfThree with value ‘length’ of INT 3.

Then compiler will know if correct (before run time error) :

ArrayOfThree = ArrayOfOne + ArrayOfTwo

or wrong if:

ArrayOfTwo = ArrayOfOne + ArrayOfThree

https://medium.com/background-thread/the-future-of-programming-is-dependent-types-programming-word-of-the-day-fcd5f2634878

Math High-Pay Career in Data Science

https://towardsdatascience.com/data-science-jobs-with-their-salaries-171acd3bf9be

Gone are the days where Math graduates were destined to low-pay teachers in the 1960s to 1990s.

Now Math career is the hottest high pay job in the 2 key engines of the “4th Industrial Revolution” , ie Mind Automation by Machine Learning (in Big Data) and its ‘Young Mother’ Artificial Intelligence.

The 3 top jobs (by order of pay) :

1. Data Scientist (US $120K) :

Skills : Math (Stats, Linear Algebra, Calculus, Probability, & potentially Algebraic Topology / Homological Algebra) + A. I.

Mathematician PhD preferred.

2. Data Architect / Engineer (US $100K)

Skill: Math + IT (especially in Big Data technologies).

3. Data Analyst / (US $65K)

Skills : IT + Business + some Math (Stats).

What Makes Functional and Object-oriented Programming Equal

http://codinghelmet.com/articles/what-makes-functional-and-object-oriented-programming-equal

Comparison of 4 Functional Programming (FP : F#, Lisp/Clojure Haskell, Scala,… ) concepts in Object-Oriented (OO: C#, C++, Java,… ) :

[Not covered here] : There are other FP techniques lacking in OO: Functor (FoldMap), Monad, etc.

1. Function:

2. Closure (variable binding)

3. Currying

4. Function Composition

Conclusion:

A Programmer’s Regret: Neglecting Math at University – Adenoid Adventures

Advanced Programming needs Advanced Math: eg.

Video Game Animation: Verlet Integration

AI: Stats, Probability, Calculus, Linear Algebra

Search Engine : PageRank: Linear Algebra

Abstraction in Program “Polymorphism” : Monoid, Category, Functor, Monad

Program “Proof” : Propositions as Types, HoTT

https://awalterschulze.github.io/blog/post/neglecting-math-at-university/

Abstraction: Monoid, Category

Category

信息熵 (Information Entropy) 是怎样炼成的

【信息熵是怎样炼成的 | 纪念信息论之父香农】
https://m.toutiaocdn.com/group/6685498360318657036/?app=news_article_lite&timestamp=1561737552&req_id=201906282359120101520481610092161&group_id=6685498360318657036&tt_from=android_share&utm_medium=toutiao_android&utm_campaign=client_share
(想看更多合你口味的内容,马上下载 今日头条)
http://app.toutiao.com/news_article/?utm_source=link

Huawei CEO Ren : P30 the Best ever phone camera is Math

【任正非真正的忧虑是什么?】
Huawei P30 the Best ever phone camera is Math.

https://m.toutiaocdn.com/group/6706661065654010372/?app=news_article_lite&timestamp=1561530044&req_id=20190626142044010152040076039145F&group_id=6706661065654010372&tt_from=android_share&utm_medium=toutiao_android&utm_campaign=client_share
(想看更多合你口味的内容,马上下载 今日头条)
http://app.toutiao.com/news_article/?utm_source=link

Programming with Math (Exploring Type Theory)

If you are inventing a new language, start to study Type Theory.

These 3 are the same thing:

Logic = Category = Type

Unfortunately Milewski’s presentation was cut short due to time constraint, he only presented the first few “Type” functions:

  • Unit,
  • Product,
  • Sum,
  • Exponential,…

(these are from Category Theory refound in Type Theory).