Categories
China iPhone app

WeChat is not banned, at least not yet

Reading Time: 2 minutes

(Update 09-20-2020) It looks like the 9th court temporarily blocked the WeChat ban (NPR). The TikTok ban became irrelevant because there is the new deal with Oracle / Walmart (theverge).

(Original 09-18-2020)

CNN: US will ban WeChat and TikTok downloads on Sunday. Quote: “The only real change as of Sunday night will be [TikTok users] won’t have access to improved apps, updated apps, upgraded apps or maintenance,” Commerce Secretary Wilbur Ross said Friday morning on Fox Business. || Also, quote: “The restrictions targeting WeChat are more extensive. Beginning Sunday, it will be illegal to host or transfer internet traffic associated with WeChat, the Department said in a release. The same will be true for TikTok as of Nov. 12, it said.” I don’t know if this part is doable (again not sure if it’s legal) in the US. Also this part seems contradicts with Wilbur Ross’s comments. Btw, Wilbur Ross made most of his money from coal industry (and coal miners’ pension or healthcare): this part is similar to how his boss got rich…

(Earlier) TechCrunch: Justice Department says WeChat users won’t be penalized under Trump’s executive order : the normal chat / group chat function will continue to work after Sunday September 20. It does seem impact the WeChat pay (financial transaction) as well as the App / Google Play store (workaround later). Also refer to this Ars Technica article.

The workaround for the App store is to change your country / region, for example, change from the US to Canada. You may create a new user if needed. One thing I found out is if I have app store credit on account, I cannot switch. This applies to TikTok users as well.

Workaround

  1. There are ways to download apps even if the apps are no longer available in the US App Store or Google Play Store. The trick is to pick another country / region in the store setting. There is a limit though: if you have balance (credit, money) in the App Store, you cannot switch (have to spend it first). In this case you may have to create another app store id solely for the purpose to download apps (for example, in addition to wechat, there are some other apps only available in China app store).
  2. If the administration decide to block the web traffic (app traffic is a part of web traffic, it’s usually at the http level). One may use VPN service to get around that. This is nothing new.
  3. There is also desktop app (Mac, Windows) and web app on WeChat web site. You may install the desktop app, or use the web app (essentially it’s like a website). Note WeChat still needs the phone app for sign in for those.

Here is a link to the US WeChat User Alliance. They are suing the US government for the unreasonable action (likely illegal as well).

Last but not least, this is mostly a last ditch effort from the current administration to save the re-election (this part if proven, it’s illegal too). Because, in the US the political campaign and governing are separate.

Categories
iPhone app

Dotnet core

Reading Time: < 1 minuteBuild a CRUD App with ASP.NET Core 2.2 and Entity Framework Core

One advantage I see using dotnet core is for .Net shops the transition is relatively smooth in terms of skill set. Second advantage is it’s cross platform (Windows, Mac and Linux): so in away it’s get the same cross platform capability as Java (Spring etc)

also
.NET for Java developers

Migrate your .NET app to Azure

Categories
iPhone app

Javascript jasmine node.js and Alexa

Reading Time: < 1 minuteAlexa

Alexa Account Linking: 5 Steps to Seamlessly Link Your Alexa Skill to User Systems That Require Authentication (Sebastien Stormacq, done)

User Account Linking in Alexa with ASP.NET Web API (Heather Downing, Okta)

Linking Your Alexa Skill Securely with Okta (Jefferson Haw, Okta)

Account Linking : Amazon Alexa and ForgeRock OpenAM using OAuth2 Authorization grant (karthik, Medium)

How to set up Account Linking for Alexa with Auth0 and Jovo (Kaan Kilic, Jovo)

Build an Alexa Skill in Node.js with Jovo (Jan Konig, Jovo, done) : If a user responds with a name, the MyNameIsIntent is triggered. The code is shown below in index.js

Webhook.listen(port, () => {
console.info(`Local server listening on port ${port}.`);
});

Webhook.post(‘/webhook’, async (req, res) => {
await app.handle(new ExpressJS(req, res));
});

also, how to test the code in AWS Lamda…Click “Test” right next to the “Save” button and select “Alexa Start Session” as the event template…

Interaction-Based Authentication for Alexa Skills with Auth0 (Joao Angelo, Auth0)

Developing Alexa Skills Locally with Node.js: Account Linking Using OAuth (Juan Pablo Claude)

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.

JavaScript
Node.js based testing (npm test)

jasmine official website

commonly used commands:
npm install –save-dev jasmine
npm init
npm test

Sample project can be seen here: (please contact me if the repository is private)

Also
Learn JavaScript in 2019 (David Neal)

Categories
iPhone app

Code exercise : linear chamber animation / simulation

Reading Time: < 1 minuteThis is the code that works (my code):

Junit test code is here.

I will add some ReadME as time permits. This is not as straightforward as it sounds. I didn’t get it working initially after spending hours on it 🙁

Categories
iPhone app

h2 database

Reading Time: < 1 minuteH2 Database – Installation

H2 Database – JDBC Connection (the only differs from the docs is we need to add “mem” before the “:~/test”. Otherwise it gives me error.

Mixed mode

Another Java H2 tutorial

Last but not least, how much time should a coding test be? I feel couple hours are probably the way to go (think of Filtered AI, Hacker Rank etc). The other approach is more like open-ended projects: those could take from a few hours to a few days 🙁 In some cases I was suspecting the hiring companies could use this opportunity to get some real work done (if they ask for source code 🙂

Something to keep in mind when doing code test.

Categories
iPhone app

Streaming data, data streaming

Reading Time: < 1 minuteApache flink
SE-Radio Episode 346: Stephan Ewen on Streaming Architecture;
Software Engineering Daily Apache Flink with Stephan Ewen – Nov 2015; Spark and Streaming with Matei Zaharia – Feb 2018

AWS Streaming data

Categories
iPhone app

Database deployment automation

Reading Time: < 1 minuteDB deployment (schema or DDL, package)
Continuous integration and deployment of database is a main issue for many legacy monolithic web app. I came across this article recently, and I think it touched some good points.

On a related matter, Jeff Atwood (cofounder of stack overflow), has a good piece on database version control.

I understand the world is going microservice, and the monolithic relational database is not used as frequently as it’s being used in those legacy web apps. But nonetheless, it helps the dev team to be agile if version control / CI / CD can be applied to database update as well as the application update.

Tracking data changes in DB
This also reminds me of an app I worked in 2010/11, in which we have an DB audit log for many (if not most) database changes: add, update, delete. It’s usually achieved via trigger in Oracle, or interceptor in Java. I read an article from a startup engineering blog (credit karma? Or something like this), they detailed how this is implemented.

Categories
iPhone app

Working from home friendly companies

Reading Time: < 1 minuteOr companies that allows or encourages remoting.

Zapier (Emily Irish) The Remote Work Survival Guide: 9 Do’s & Don’ts Every Remote Worker Needs to Know

stackoverflow remote dev jobs:
e.g., MobyMax: this is very interesting because I learned about Mobymax because my daughter’s school has the subscription.

Top 30 Companies for Work-from-Anywhere Remote Jobs in the U.S.

Work From Home 2018: The Top 100 Companies For Remote Jobs

Last but not least, LinkedIn has the top startup list for 2017 and 2018. Note many startup like people to work onsite for more communication but there are some exceptions (InVision for one).

Categories
iPhone app

Webhooks

Reading Time: < 1 minute(Update 2 09-30-2020) Webhooks — The Definitive Guide [2019]

Other Useful Tools For Debugging/Testing Webhooks

A modern request bin to inspect any event

(Update 03-21-2019) Add the Power of Webhooks to Your App with Okta’s System Log (Joël Franusic at Okta).

(Original 12-28-2008)
Webhooks
I heard webhooks from Zapier the first. Below is an good article written by the folks at Zapier.
What are the webhooks? (Zapier)

Was trying to follow the tutorial from the above
requestbin tool

requestbin works like described (encountered a few 500 errors, but mostly working)

It seems I could not open the hurl.it link from runscope community page.

I am reading this more technical webhooks blog by @brandur

My interest in webhooks is also inspired by this little JS program I wrote a long time ago. And this was rekindled recently due to the atomist-sdm (GitHub) (node.JS based SDM, automation, quick start here).

Categories
iPhone app

Node js tutorials and webtask

Reading Time: < 1 minute(Original 11-30-2014, to be worked on)

I heard about Node js for a while, until recently I had opportunity to practice it. I used this tutorial from raywenderlich.com as a start, as I had good experience using the iOS tutorial on ray’s site. But I need to learn more. Here is another one (similar to Ray’s tutorial).

http://nodeguide.com/beginner.html (update 03-07-2019: it seems the site is no longer available)

How do I start with Node.js after I installed it?

Webtask (Auth0)
https://webtask.io/make (for me I used GitHub as SSO login)

If This Then Node.js

more about auth0 vs okta

JavaScript
http://eloquentjavascript.net/03_functions.html

Atomist: a SDM based on Node.js (SDM stands for Software Delivery Machine)
https://docs.atomist.com/quick-start/

I was also following the first few lessons of the advent of atomist automations. Got a bit stuck at the SDM team mode. Local mode seems working fine. I did receive the free trial for Atomist. Maybe I need to update the package as I downloaded Atomist a while ago (in August, I think).