1604386771
Learn about the new JavaScript and TypeScript runtime called Deno, which aims to solve some flaws in Node.js and introduce a few different concepts.
JavaScript is the best language for those who want to learn to program, and it really has made a huge impact on people’s lives.
On the other side, Node.js has helped JavaScript take over the world of web development. It has introduced a lot of new developers to the programming world and made it easier to build modern applications, spend less time figuring out how to work with JavaScript properly and build better and more robust applications.
Since the release of Node.js back in 2009, it has really come a long way. With new features and concepts implemented inside Node.js, it’s improved the way we work with JavaScript. But, like any project, it has some things that we wish were better and we could improve.
Ryan Dahl, the creator of Node.js, gave a talk in 2018 called “10 Things I Regret About Node.js.” In this talk he explained what he wished he’d done differently. For those who want to learn more about the initial concepts of Node.js, this is a great talk.
The essential idea behind the creation of Node.js was to focus on programming event-driven HTTP servers. Here are some the things that Ryan Dahl regrets about Node.js:
Promises were introduced as part of the ES6 (ES2015) and landed in Node.js only in February 2015. They’re very important, especially due to the async/await primitives that came up in Node.js in February 2017.
The possible usage of Promises when Node.js was developed would contribute to the eventual standardization of async/await. They’re a necessary abstraction for async/await.
This is an important and highly discussed point about Node.js. It was built on Chrome’s V8 JavaScript engine, which is a very good security sandbox. But we still have some problems with security in Node.js, especially with giving access to packages that shouldn’t have access to our computer and network.
The _node_modules
_ folder contains libraries downloaded from npm. Every time we start a new project, we need to install new dependencies, and by doing that, our _node_modules
_ folder gets heavier and heavier.
Unfortunately, there’s no way to undo this in Node.js. Dahl said that “it’s impossible to undo now.”
The package.json file is a common file created at the root directory of a Node.js module by running a command. There are a few things that he regrets about package.json, and one of the things is that the package.json file doesn’t allow relative files and URLs to be used when importing—the path defines the version. By doing that, there would be no need to list dependencies.
He also listed as regrets: the Node.js Build System (GYP), index.js (when you include a directory, it looks for a file called index.js) and the point where you don’t need to include the “.js” extension to require a module, which turns into a mistake because this is not how browser JavaScript works.
After realizing all the points that he wished could be better in Node.js, Dahl revealed in his 2018 talk that he was creating a new secure JavaScript runtime called Deno.
Deno is a new secure JavaScript and TypeScript runtime released this May 13. It brings a lot of functionalities and JavaScript features, with a more secure and powerful core.
Here’s how Deno is different from Node.js:
One of the programming languages that has been trending in the development community lately is Rust. This language has been very popular for a lot of factors, such as ensuring that our programs are free from undefined behavior and data races, more memory safety, etc. Rust is a very safe and fast language.
Node.js is based on the V8 engine to execute JavaScript, and the V8 is based on C++. The difference here is that Deno also is based on the V8 engine to execute JavaScript, but is also based on Rust.
A safer and faster language makes a big difference for Deno—delivering a good performance, without any memory safety issues, undefined behavior, data races, etc.
One of the issues a lot of developers complain about in Node.js is security. The choice of using Rust was not only right for allowing the runtime to be faster and bug-free, but also to improve the security. After an app starts running, it can easily access your file system or your network—this is a very serious security flaw.
Deno solves the security by executing the code in a sandbox. The runtime has no access to your file system or network. Unless you specify that you want to enable or disable access, a module has no file, network or environment access. Instead, you can use command-line arguments to enable or disable different security features or do so programmatically.
For example, if we want to grant read-only access for a file, we could do the following:
deno run --allow-read test.ts
Deno is a JavaScript and TypeScript runtime, which means that it brings TypeScript support by default. We can easily use TypeScript anywhere in our code without having to install or transpile anything.
Deno only requires qualified modules names, which means that we should include the extension of the file when importing it. Imported modules are specified as files in Deno.
import main from "./main.ts";
Deno includes a built-in package manager for resource fetching, so there’s no need to use npm (Node Package Manager).
This can be a huge change in the way we build modern JavaScript applications. Instead of downloading packages from the npm repository, we just pass a URL, and Deno loads for us the dependencies, similar to browsers.
Deno uses the official ECMAScript module standard rather than the CommonJS. Deno uses the import
syntax from ES6 instead of the require()
standard.
Another nice thing about Deno is that you cache all the modules that you download. So, if you download a module, Deno will automatically cache it, and not download it again, only if specified with the reload flag.
#deno #javascript #typescript #node #developer
1596336480
ML is type of AI
AI is a discipline , Machine Learning is tool set to achieve AI. DL is type of ML when data is unstructured like image, speech , video etc.
AI & ML was daunting and with high barrier to entry until cloud become more robust and natural AI platform. Entry barrier to AI & ML has fallen significantly due to
#ml-guide-on-gcp #ml-for-beginners-on-gcp #beginner-ml-guide-on-gcp #machine-learning #machine-learning-gcp #deep learning
1624226400
Bitcoin Cash was created as a result of a hard fork in the Bitcoin network. The Bitcoin Cash network supports a larger block size than Bitcoin (currently 32mb as opposed to Bitcoin’s 1mb).
Later on, Bitcoin Cash forked into Bitcoin SV due to differences in how to carry on its developments.
That’s Bitcoin Cash in a nutshell. If you want a more detailed review watch the complete video. Here’s what I’ll cover:
0:50 - Bitcoin forks
2:06 - Bitcoin’s block size debate
3:35 - Big blocks camp
4:26 - Small blocks camp
5:16 - Small blocks vs. big blocks arguments
7:05 - How decisions are made in the Bitcoin network
10:14 - Block size debate resolution
11:06 - Bitcoin cash intro
11:28 - BTC vs. BCH
12:13 - Bitcoin Cash (ABC) vs. Bitcoin SV
13:09 - Conclusion
📺 The video in this post was made by 99Bitcoins
The origin of the article: https://www.youtube.com/watch?v=ONhbb4YVRLM
🔺 DISCLAIMER: The article is for information sharing. The content of this video is solely the opinions of the speaker who is not a licensed financial advisor or registered investment advisor. Not investment advice or legal advice.
Cryptocurrency trading is VERY risky. Make sure you understand these risks and that you are responsible for what you do with your money
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!
#bitcoin #blockchain #bitcoin cash #what is bitcoin cash? - a beginner’s guide #what is bitcoin cash #a beginner’s guide
1599135540
Web applications are types of software applications that run on remote servers (source). Examples of web applications can range from word processors, to file scanners, video editing tools, shopping carts, and more. Web applications can be great additions to any website; they can even function as websites themselves (Facebook, Gmail, and Udacity’s classroom are all examples of popular web applications), so understanding how to set up and implement a web application is a fantastic skill to have.
For this guide, I am assuming that you already have a basic knowledge of npm
, node
and whatExpress Requests and Responses
are (or that you at least know what they are used for in their basic sense). Also, I assume that you know what the npm install
and mkdir
commands do. You have to know basic Typescript to implement — or at least know basic JavaScript to read and understand — the code below. Finally, this is the base for the backend of a web application. You still need to create a frontend application using a framework like Angular or an HTML/CSS file to make requests and display responses.
Before you start, it’s important that you create a folder in your favorite place on your computer. This can be anywhere as long as you have a sense of how you are going to find it later when you come up with an awesome project to start developing.
#web-development #backend #software-development #beginners-guide #beginner
1598286933
The Ultimate React Guide For Beginners In 2020. By Caspar Camille Rubin on Unsplash. React is a JavaScript library created by Facebook and is a great tool for building UI components.
#programming #javascript #guides-and-tutorials #tech #beginners-guide
1598446500
SQL is a standard language for storing, manipulating, and retrieving data in databases. In this article, I’ll teach you the very basic fundamentals of the SQL language and hope you will be able to write your own database queries at the end.
SQL stands for Structured Query Language and lets you access and manipulate databases.
Most of the actions you need to perform on a database are done with SQL statements. The following SQL statement selects all the records in the “Users” table:
SELECT * FROM Users;
The select statement is used to retrieve data from a database. The requested data is returned in a results table.
SELECT column1 FROM table_name;
The Select Distinct statement is used to return only distinct (different) values.
SELECT DISTINCT * FROM table_name;
Count
The following SQL statement lists the number of different customer countries:
SELECT COUNT(DISTINCT Country) FROM Customers;
The Where clause is used to filter records.
SELECT column1
FROM table_name
WHERE condition;
For example:
SELECT * FROM Users
WHERE Country='Netherlands';
The Where clause can be combined with AND, OR, and NOT operators. The AND and OR operators are used to filter records based on more than one condition:
The NOT operator displays a record if the condition(s) is NOT TRUE.
AND
SELECT column1, column2, ...
FROM table_name
WHERE condition1 AND condition2 AND condition3 ...;
OR
SELECT column1, column2, ...
FROM table_name
WHERE condition1 OR condition2 OR condition3 ...;
NOT
SELECT column1, column2, ...
FROM table_name
WHERE NOT condition;
#tech #guides-and-tutorials #sql #beginners-guide #programming