Tuesday, March 19, 2019

GraphQL API

Code | GraphQL

graphql-dotnet/graphql-dotnet: GraphQL for .NET

Getting Started with GraphQL in ASP.NET - Simple Talk


Serverless GraphQL with Tanmai Gopal - Software Engineering Daily


Building a GraphQL API with ASP.NET Core 2 and Entity Framework Core

"As our application grows, the number of REST endpoints we must build and maintain starts to explode. A growing number of endpoints demands more and more time and effort to test and support - on both the client and server. And if you eventually need to version your API, you've got a lot more to consider.

In GraphQL, we can define Query types in our Schema to retrieve (or mutate) any combination of types in our system through one endpoint i.e /api/graphql.
With types and a query defined in the schema, we can now issue requests via GraphQL similar to the RESTful ones listed above. However, we only need to send them to one endpoint. "


GET /api/graphql?query={ student(id: "10") { firstName, lastName, courses { title } } }
{
  "firstName": "Mark",
  "lastName": "Macneil",
  "email": "mark@fullstackmark.com",
  "courses": [
    {"title": "Advanced ASPNET Core" },
    {"title": "Introduction to GraphQL" }
  ]
}

Monday, March 18, 2019

Blazor: C# full stack for web development

Web Development - Full Stack C# with Blazor @ MSDN magazine

"C# programmer can write desktop, server-side Web, cloud, phone, tablet, watch, TV and IoT applications. Blazor completes the puzzle, allowing a C# developer to share code and business logic right into the user’s browser."

Sunday, March 17, 2019

SAFE: F# full stack for web development

F# => JavaScript, CSS; without WebAssembly
all strongly typed, including no need for custom JSON.
+ interactive web app updates while keeping current state(!) Even JavaScript web frameworks are not doing this yet!

Fable REPL

informative podcast:

Functional Web Programming using SAFE with Anthony Brown @ .NET Rocks! vNext

Saturday, March 16, 2019

Normalizing Unicode strings

A very informative story about encoding text with Unicode.

When "Zoë" !== "Zoë". Or why you need to normalize Unicode strings | With Blue Ink

"the dog emoji 🐶 has the code point U+1F436.

When encoded, the dog emoji can be represented in multiple byte sequences:

UTF-8: 4 bytes, 0xF0 0x9F 0x90 0xB6
UTF-16: 4 bytes, 0xD83D 0xDC36


Most JavaScript interpreters (including Node.js and modern browsers) use UTF-16 internally. Which means that the dog emoji is stored using two UTF-16 code units (of 16 bits each). So, this should not surprise you:
console.log('🐶'.length) // => 2



...some characters appearing identical, but having different representations.

...The problem is that some of these characters could be represented in multiple ways.

For example, the letter é could be represented using either:
A single code point U+00E9
The combination of the letter e and the acute accent, for a total of two code points: U+0065 and U+0301

The two characters look the same, but do not compare as equal, and the strings have different lenghts. In JavaScript:
console.log('\u00e9') // => é
console.log('\u0065\u0301') // => é
console.log('\u00e9' == '\u0065\u0301') // => false
console.log('\u00e9'.length) // => 1
console.log('\u0065\u0301'.length) // => 2 
...

This can cause unexpected bugs, such as records not found in a database, passwords mismatching letting users unable to authenticate, etc."

AWS AWSome Day Online

AWS AWSome Day Online

2019-04-09 12:00pm–4:30pm Eastern Time

free, online training will provide an introduction to the core AWS services for compute, storage, database, and networking.

Thursday, March 14, 2019

egghead.io free class: Create a React Native App

Short, instructional screencast video tutorials for web developers on @eggheadio

"egghead is a group of working web development professionals and open source contributors that provide you with concise, information dense video courses on the best tools in the industry."

egghead.io @ GitHub

Tuesday, March 12, 2019

World Wide Web: 30 years

World Wide Web - Wikipedia

The World Wide Web turns 30: our favorite memories from A to Z - The Verge

"On this day 30 years ago (1989-03-12), Tim Berners-Lee submitted a proposal with the dreary title “Information Management” to his superior at the European physics laboratory CERN."


History of the Web – World Wide Web Foundation

Tim Berners-Lee: world wide web inventor calls for 'fight' to protect internet on its 30th birthday - CNN

SQL Server Temporal Tables

Temporal Tables - SQL Server | Microsoft Docs

"SQL Server 2016 introduced support for temporal tables (also known as system-versioned temporal tables) as a database feature that brings built-in support for providing information about data stored in the table at any point in time rather than only the data that is correct at the current moment in time. Temporal is a database feature that was introduced in ANSI SQL 2011."
"How does temporal work?

System-versioning for a table is implemented as a pair of tables, a current table and a history table. Within each of these tables, the following two additional datetime2 columns are used to define the period of validity for each row: SysStartTime, SysEndTime "







PostgreSQL doesn’t support these features natively, but this temporal tables approximates them.

Friday, March 08, 2019

npm.js and the future of JavaScript

interesting presentation, by co-creator of npmjs

npm and the Future of JavaScript @ InfoQ

"npm is extremely popular... npm has more than 10 million users ... they download more than 8.1 billion packages every seven days... more than 90% of developers who use JavaScript's are currently using npm to put it together. And that's heading towards 100%...

JavaScript is the most popular programming language in the world right now. It has been the biggest language on GitHub for the last five years running. 70% of Stack Overflow developers report that they use JavaScript, at least some of the time,

all 50 of the Fortune 50 are using npm in production, all 50 of the 50 biggest financial companies, all 50 of the 50 biggest tech companies."
slides: npm and the future of JavaScript, QConf SF

npm - npm:

weekly downloads

1,595,213

Tuesday, March 05, 2019

RDF & Semantic Data


RDF Tutorial - An Introduction to the Resource Description Framework - YouTube

What is RDF? Making Data Triple Their Power (video)


Resource Description Framework - Wikipedia

Semantic Web - Wikipedia

Triplestore - Wikipedia

Notation3 - Wikipedia

RDF 101 @ cambridge semantics

Graph Data & RDF - WELCOME TO WEEK 5 | Coursera


Building Semantic Data Catalogs – Kurt Cagle – Medium

Semantic Modeling & The Power of Exemplars – Kurt Cagle – Medium

The Semantic Zoo - Smart Data Hubs, Knowledge Graphs and Data Catalogs

CSS Grid Layout vs. Flexbox

Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets | MDN

A simple question to ask yourself when deciding between grid or flexbox is:
  • do I only need to control the layout by row or column – use a flexbox
  • do I need to control the layout by row and column – use a grid
A Complete Guide to Flexbox | CSS-Tricks

A Complete Guide to Grid | CSS-Tricks

CSS Grid — Learn all about CSS Grid with Wes Bos in this free video series! (free)


The ultimate CSS battle: Grid vs Flexbox – Hacker Noon

Choose Between CSS Grid And Flexbox @Medium


CSS Flexbox (Flexible Box) @W3schools

CSS Grid Layout


CSS Grid Layout - CSS: Cascading Style Sheets | MDN

CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools | MDN


podcast: CSS Grid with Amy Kapernick @ .NET Rocks! vNext

Monday, March 04, 2019

AWS Step Functions Serverless Orchestration: Amazon States Language


      Workflow overview
    video: Serverless Orchestration with AWS Step Functions - AWS Online Tech Talks - YouTube

slides: Serverless Orchestration of AWS Step Functions - July 2017 AWS Online…

transcribed: Serverless Orchestration with AWS Step Functions - AWS Online Tech Talks Teaching | Unlock Campus


AWS Step Functions - Getting Started

Amazon States Language - AWS Step Functions

What Is AWS Step Functions? - AWS Step Functions

Continue as a New Execution - AWS Step Functions



aws-step-functions-developer-guide/concepts-amazon-states-language.md at master · awsdocs/aws-step-functions-developer-guide @GitHub:

airware/stepfunctions-local: Execute AWS Step Functions locally (node.js) @GitHub
"Stepfunctions-local provides a local AWS Step Functions server. This package only aims at replacing AWS Step Functions in a local context. Its API is totally compliant with AWS service..."

mikeparisstuff/stateslang-js: A JavaScript implementation of the AWS States Language @GitHub
A javascript implementation of the Amazon States Language


airware/asl-validator: A simple Amazon States Language validator based on JSON schemas.
A simple Amazon States Language validator based on JSON schemas. It also validates JSON paths syntax in InputPath, OutputPath and ResultPath.

oshikiri/fake-step-functions: A lightweight testing toolkit for Amazon States Language @GitHub
A lightweight testing toolkit for Amazon States Language.

examples:
Synchronizing Amazon S3 Buckets Using AWS Step Functions | AWS Compute Blog

sync-buckets-state-machine/sync_buckets_state_machine.yaml at master · aws-samples/sync-buckets-state-machine

AI: Alpha Go => AlphaGo Zero => AlphaZero (self-thought Chess & Go champion)

AlphaZero - Wikipedia

"AlphaZero (AZ) is a more generalized variant of the AlphaGo Zero (AGZ) algorithm, and is able to play shogi and chess as well as Go."

AlphaZero is a computer program or algorithm developed by the Alphabet-owned artificial intelligence research company DeepMind to master go, chess and shogi, by using an approach similar to AlphaGo Zero. On December 5, 2017 the DeepMind team released a preprint introducing AlphaZero, which, within 24 hours, achieved a superhuman level of play in these three games by defeating world-champion programs, Stockfish, elmo, and the 3-day version of AlphaGo Zero, in each case making use of custom tensor processing units(TPUs) that the Google programs were optimized to use.[1] AlphaZero was trained solely via "self-play" using 5,000 first-generation TPUs to generate the games and 64 second-generation TPUs to train the neural networks, all in parallel, with no access to opening books or endgame tables. After just four hours of training, DeepMind estimated AlphaZero was playing at a higher Elo rating than Stockfish 8; after 9 hours of training, the algorithm decisively defeated Stockfish 8 in a time-controlled 100-game tournament (28 wins, 0 losses, and 72 draws).[1][2][3] The trained algorithm played on a single machine with four TPUs

AlphaGo Zero - Wikipedia

AlphaGo - Wikipedia

AI versus AI: Self-Taught AlphaGo Zero Vanquishes Its Predecessor - Scientific American

mentioned in podcast:
Triangulation 387 Amy Webb: The Big Nine


This is not quite an AI except in name. Still an useful library

lhartikk/simple-chess-ai: A simple chess AI @GitHub

A step-by-step guide to building a simple chess AI – freeCodeCamp.org




Saturday, March 02, 2019

XY / XYO: Blockchain + IoT GeoLocation (vs. GPS)

imagexy.company
Join The Movement Disrupting The $11+ Trillion Location Market
"XY, the leading location hardware business powering the world's first people-powered location network called XYO"
XYO = XY "Oracle Network"

"Because of this, the XYO Network has developed location-based technologies that connect the digital world to the physical world. To achieve this, XYO has created a location-based consumer product business with the purpose of putting Bluetooth and GPS tracking beacons out into the world."


OpenWhisk: serverless cloud functions

Apache OpenWhisk is a serverless, open source cloud platform

"Apache OpenWhisk (Incubating) is an open source, distributed Serverless platform that executes functions (fx) in response to events at any scale. OpenWhisk manages the infrastructure, servers and scaling using Docker containers so you can focus on building amazing and efficient applications.
The OpenWhisk platform supports a programming model in which developers write functional logic (called Actions), in any supported programming language, that can be dynamically scheduled and run in response to associated events (via Triggers) from external sources ( Feeds) or from HTTP requests. The project includes a REST API-based Command Line Interface (CLI) along with other tooling to support packaging, catalog services and many popular container deployment options."

Wednesday, February 27, 2019

AWS IoT

a very informative podcast interview with VP of IoT with AWS

AWS Internet of Things with Dirk Didascalou - Software Engineering Daily


IoT Applications & Solutions | What is the Internet of Things (IoT)? | AWS

AWS IoT Software and Services

What is AWS IoT? 3 Min Overview - YouTube

RISC-V: Open-Source Hardware (OSH)


RISC-V - Wikipedia

"RISC-V (pronounced "risk-five") is an open-source hardware instruction set architecture (ISA) based on established reduced instruction set computer (RISC) principles.

In contrast to most ISAs, the RISC-V ISA is free and open-source and can be used royalty-free for any purpose, permitting anyone to design, manufacture and sell RISC-V chips and software. While not the first open-architecture[1] ISA, it is significant because it is designed to be useful in a wide range of devices. The instruction set also has a substantial body of supporting software, which avoids a usual weakness of new instruction sets.

The project began in 2010 at the University of California, Berkeley, but many contributors are volunteers and industry workers outside the university.[2]

The RISC-V ISA has been designed with small, fast, and low-power real-world implementations in mind,[3][4] but without over-architecting for a particular microarchitecture style"


@riscv
RISC-V @ GitHub


info from:
Amazon just acquired Eero because Wi-Fi is key to the smart home - Stacey on IoT | Internet of Things news and analysis

Tuesday, February 26, 2019

AWS > Amazon

AWS Drives More Than Half of Amazon's Operating Income | Light Reading

"Amazon Web Services comprised just 11% of the company's overall sales in 2018, but delivered more operating income than all other business units combined.

In financial results delivered Thursday, Amazon Web Services Inc. drove $7.43 billion sales for the quarter ending December 31, up 45% from $5.11 billion year-over-year. (See Amazon Reports Q4 Sales Up 20% to $72.4B.)"

React Native Rearchitecture

React Native Rearchitecture with G2i Team - Software Engineering Daily

React Native allows developers to build native applications for iOS and Android using components written in the React JavaScript framework. These ReactJS components render to native application code by going over a JavaScript bridge, a message bus that communicates between JavaScript code and native iOS or Android runtimes.

To address the performance issues of React Native, the core team working on React Native at Facebook is rearchitecting the React Native runtime within a project called Fabric. Fabric consists of changes to the threading model, the data handling system, and the JavaScript bridge.




"RN Fabric allows the UI thread (where UI is drawn) to be in sync with the JS thread (where the UI is programmed)"


this new engine may be more similar to NativeScript, a similar open source tool:

Sunday, February 24, 2019

Posgres as "Document DB" with JSONB

Postgres JSON: Unleash the Power of Storing JSON in Postgres | Codeship | via @codeship

CREATE TABLE cards ( id integer NOT NULL, board_id integer NOT NULL, data jsonb );

INSERT INTO cards VALUES (1, 1, '{"name": "Paint house", "tags": ["Improvements", "Office"], "finished": true}');

SELECT data->>'name' AS name FROM cards

SELECT * FROM cards WHERE data->>'finished' = 'true';

CREATE INDEX idxfinished ON cards ((data->>'finished'));

As of Postgres 9.4, along with the JSONB data type came GIN (Generalized Inverted Index) indexes. With GIN indexes, we can quickly query data using the JSON operators @>, ?, ?&, and ?

CREATE INDEX idxgindata ON cards USING gin (data); 

SELECT count(*) FROM cards WHERE data @> '{"tags": ["Clean", "Kitchen"]}';
How to query JSONB, beginner sheet cheat – Hacker Noon


PostgreSQL: Documentation: 10: 8.14. JSON Types

Fission: Serverless Functions for Kubernetes: FaaS

fission/fission: Fast Serverless Functions for Kubernetes @ GitHub, Apache 2 license

written in GoLang, supporting execution environments for
Go, JVM. .NET, NodeJS, Python, Ruby, PHP, and even Perl :)

trigger is something that maps an event to a function; Fission as of today supports HTTP requesttimed, and message queue triggers.

Performance: 100msec cold start
Fission maintains a pool of "warm" containers that each contain a small dynamic loader. When a function is first called, i.e. "cold-started", a running container is chosen and the function is loaded. This pool is what makes Fission fast: cold-start latencies are typically about 100msec.

Serverless Functions for Kubernetes - Fission

"What is Fission?
Fission is a framework for serverless functions on Kubernetes.

Write short-lived functions in any language, and map them to HTTP requests (or other event triggers).

Deploy functions instantly with one command. There are no containers to build, and no Docker registries to manage."