teleren/devto huggingface dataset:
Networks to watch in 2022: Polkadot
Tags: blockchain, web3
Published: 2022-03-29 00:52:43

Have you heard about the Polkadot Blockchain Network?

In short it is

- A platform that fosters a multi-chain ecosystem
- A meta protocol, which works at a lower level then Ethereum (smart contract level)

Polkadot is a cryptocurrency network that wants to help weave all the disparate blockchains together.

Currently, blockchains operate in silos, separately.

But Polkadot promises to fix this by creating an internet of interoperable blockchains.

## What is Polkadot?

Polkadot is referred to as a 'multi-chain network', because it can join networks together.

Its aim is to be a framework that blockchains use, similar to how sites use HTML. 

This enables devs to focus on creating apps and writing smart contracts, while leaving the specifics of  security and validation to the protocol.

## Why is it important?

Developer time, talent, and resources are diverted into building competing networks.

Polkadot aims to create a way for developers to build value on top of all blockchains, rather than just one.

## How does Polkadot work?

Blockchains can connect to Polkadot and get access to its PoS validation and security through, 'para-chains'.

The central chain is called the 'Relay Chain' and it is where all transactions are standardized.

 While using Polkadot, blockchains are still free to use their own PoS, update schedules, and what tokens and dapps to use.

Essentially integration with Polkadot is layered, allowing for progressive integration.

## What problems does it solve?

Polkadot solves two significant issues for blockchains:

- Scalability: num of transactions the network can handle
- Governance: How the community manages protocol upgrades and changes 

## Does Polkadot have a cryptocurrency?

Enter DOT.

Holders of DOT are allowed to vote on potential code changes.
Once a consensus is reached, updates are propagated across the network.

## Polkadots Mission

Polkadot wants to become the bedrock upon which all blockchains will build.

They believe by being a common platform, companies will be encouraged to innovate knowing the foundations are taken care of. 

## History

Polkadot launched in May 2020

In a year it accomplished:

- 4th largest token with an $18b market cap
- Increasing supply from 10 million to 1 billion by splitting old DOT 100 ways into new DOT 
- Over 340 projects being developed

## What is Polkastarter?

Polkastarter is a Polkadot-based dex that you can use to create cross-chain pools and auctions

Its powered by the POLS token, which covers:

- Governance paying
- Transaction fees
- Access to platform token pools

## Closing

The future for Polkadot looks promising, given it's successful launch which placed DOT among the top asset on most exchanges to this day

Thanks for following along, this thread is my personal notes summarizing this article

https://decrypt.co/resources/what-is-polkadot-how-to-buy-it
Launching the Job Board - New Years Resolution - Dev Log 26
Tags: webdev, beginners, programming, startup
Published: 2022-03-29 02:35:31

IT'S FINALLY TIME! consolejob.com

I have completed the MVP for the job board I have been working on for the last three months. Everything is live, and I am both excited and terrified. Excited that I have created and published my largest project ever. Terrified because I am sure things will go wrong. But also, c'est la vie!

I have never had to market a website before in my life. So now is as good of a time as any to learn how. If anyone has any tips I would appreciate that. I guess I am gonna send emails to companies asking them if they would be inclined to use my site. I did not know how much to charge for a listing so after looking around, I figure that 75 dollars is a reasonable price for a 60-day listing.

The truth is that I am pretty worried I will not be able to get this website off the ground. I know that for most developers, making this site would not have taken more than a month, but for me, this was a huge undertaking. I feel that if I approach the marketing with the same zest that I took to the development, then hopefully I can actually turn this into a profitable venture.

My goal of making enough money from my own websites to live on is slightly more tangible now. I know that the grind must continue and I should start on my next project which will probably be a SaaS company, but I think for right now, I am gonna chill on the coding for a minute. I went ahead and made a YouTube video showcasing my site, youtube.com/watch?v=daSLAntjGuM . Feel free to check it out.

I am one step closer to my goal, because of that I am proud, but I still have a long way to go.
The Gist: What Is Cache?
Tags: cache, thegist
Published: 2022-03-29 02:32:53

---
title: The Gist: What Is Cache?
published: true
description: Many of us encountered the term cache, especially when designers work in hand with engineers and engineers say to clear the cache. What is cache?
tags: #cache #thegist
//cover_image: https://direct_url_to_image.jpg
---

[View Original](https://nocap.wtf/the-gist/what-is-cache)

Many of us encountered the term cache, especially when designers work in hand with engineers and engineers say to clear the cache. What is cache?

Cache is an optimization technique used in computers designed to expedite the process of opening files, performing repeat expensive calculations, etc.

At the moment, the best analogy I can come up with is muscle memory. The human brain is capable of keeping around 4-7 ideas on its mind—short-term memory. Likewise, the computer's can temporary by the amount of RAM(Random Access Memory) the computer has—which it is constrained to.

In the supply chain its a temporary/emergency reserve of assets—its extremely volatile, it acts as a buffer for the worse case scenarios—stress on resources. In the case of computers, computing calculations may be expensive and cache acts as a buffer to reduce expensive computation, which may be capital constrained—cloud computing—or it's a user interface and rendering without any lags is crucial for an operating system to appear stable and usable in today's day and age given the standards modern computing devices have established—smartphones, smartwatches, etc.

What's the purpose of calculating everything when only a small subset may need to be recalculated/readjusted—it's extremely useful when simulating because now you can simulate more complex environments with fewer resources. It's the same in production, you can produce with fewer resources on hand and replenish the cache/storage inventory as supplies become depleted.
Taking Grammarly for a Test-Drive
Tags: programming, react, webrtc, writing
Published: 2022-03-29 02:28:54

_I signed up for [Grammarly](https://app.grammarly.com) to improve my writing skills and am testing it on the [Speaker.app](https://github.com/zenOSmosis/speaker.app) verbiage, a project I have notoriously gone overboard with trying to describe._

----


Speaker.app is a batteries-included, quasi-decentralized, alternative free speech audio platform compatible with any device that supports a modern web browser.



## A Virtual Server in your Browser
Speaker.app utilizes virtual server technology to route group calls and form virtual networks.



To host a call, one participant's device acts as the network host, to which all of the other callers connect directly.



## Ephemeral Networks
Messages and other media will pass through this host participant's device. If the device goes offline, the network and its history are gone.



## No User Accounts
No user accounts or passwords are required to join a public network. User identities are generated using Ethereum, with a randomized user profile, by default. Users can change their description to their liking, while their profile information is stored locally via local storage.



## Inspiration to Create this Project
I was faced with building a WebRTC bridge between two third-party services in the virtual healthcare industry. After some initial experimentation, I discovered that using a headless Chrome server was the path of least resistance. Fewer bugs were present at the expense of it not being exceptionally efficient.



However, the idea was compelling enough for me to continue exploring and scale it out as efficiently as possible with limited resources. The idea to use the client browser as a virtual server was born.
Telescope. 3.0-alpha
Published: 2022-03-29 02:23:01

We successfully landed the 2.9 release, and now we focus on the alpha-3.0 release. I am glad to share that our small team fixed all the bugs for Eslint and created additional enhancements for eslint inside our monorepo tools. 

For this week, I will focus on the Docker file best practices issue to finish my part in the web repo. 

It's almost the end of the school year, and we are all focused on peacefully landing our Telescope 3.0  release.

### Conclusion

⚠️ Computer Architecture Blog Post: Link

### Links

🖇 Follow me on [GitHub](https://github.com/aserputov) 

🖇 Follow me on [Twitter](https://twitter.com/aserputov)

_p.s This post was made for Telescope.
What does DeFi Mean in 2022?
Tags: defi, web3, blockchain
Published: 2022-03-29 00:57:25

Ever heard the term DeFi(Decentralized Finance)?

Let's go over what it means now!

## What is DeFi?

DeFi refers to financial applications that use blockchains instead of banks.

The main idea is that anyone can lend, borrow, and bank without using middlemen.

More advanced applications cover

- Derivatives trading
- Asset swaps
- Decentralized exchanges

## Who invented DeFi?

There's no one single innovator, however DeFi tools first started appearing on Ethereum.

Now DeFi spans a variety of networks, such as
- Solana
- Binance Smart Chain
- Avalanche

## 3 Big Features of DeFi

1. It's 'Open' - you can use the applications with only a digital-wallet
2. You can move funds near-instantaneously
3. Rates are currently much better than trad banks
4. "money legos" - composability allows for apps to be built on top of apps


3 basic uses for DeFi are:

- Lending/Borrowing
- Trading
- Derivatives

We'll go through into those now 

## DeFi Lending/Borrowing

Certain protocols allow you to loan them crypto for rewards/interest, or borrow assets (useful for trading)

"yield farming" is the process of profiting off rewards earned through locking up funds(loaning) in a variety of assets

## DeFi Trading

Decentralized exchanges(DEXes) allow for people to trade with one another, with using middlemen who take custody of your assets.

Some DEXes like Uniswap or PancakeSwap allow you to list new tokens for sale (a popular option to crowdfund projects)

## DeFi Derivatives

The ability to take out leveraged positions also exists in the DeFi space! 

You can also create 'synthetic' assets that mimic trad stocks and commodities

## How to make DeFi Dapps?

If you can write smart contracts, you can start building in DeFi.
For testing/deploying you have truffle hardhat, and waffle.

Different standards
We have 

- ERC20 on Ethereum
- SPL on Solana
- BEP20 on Binance Smart chain

Defining a token allows your protocol to interact directly with a Layer-1 blockchain.
You can use these tokens to promote your ecosystem and push decentralization

You can use most DeFi apps by visiting their website and connecting with a crypto-wallet for the appropriate blockchain.

Also for most interactions, you have to pay some sort of transaction fee (gas in Ethereum) using the token of the network.

However, there are still security and regulatory challenges to overcome.

It's estimated that users lost ~$10.5billion over the last 2 years.

Headlines like the above are why many financial institutions want to pass regulations on crypto.

## Closing

I hope I got your interest in DeFi piqued with this thread. Thanks for reading along.

This thread is my personal notes on the concepts discussed in this article https://decrypt.co/resources/defi-decentralized-finance-explained-guide-learn
Seriously, stop using List<T> in APIs
Tags: csharp, dotnet
Published: 2022-03-29 00:55:59

`List<T>` is to collections what `StringBuilder` is to strings. It's a mechanism for imperatively building a collection. `List<T>` is designed for things like
```csharp
IReadOnlyList<Element> GetElements(IReadOnlyCollection<Element> inputElement) 
{
    var list = new List<Element>();
    foreach(var inputElem in inputElements)
    {
        if (...) 
        {
            list.Add(inputElem);
        }
    }
    return list;
}
```

Notice that `List<T>` does not appear in the function signature, our API: it is an implementation detail, a mechanism. What the API says is give me any sort of [finite](https://dev.to/asik/why-you-probably-shouldnt-use-ienumerableseq-3g6g) collection, and I'll give you back another finite, indexed collection. The caller does not need to read the implementation to understand this.

Let's see what happens if we replace the input element with `List<T>`.
```csharp
IReadOnlyList<Element> GetElements(List<Element> inputElement) 
```
This is now a confusing and restrictive function signature. It returns a collection, but it can also add, remove or change elements in the input collection. Does it? The caller doesn't know. He'd have to read the code, meaning that our API is no longer a clear abstraction. Furthermore the caller cannot pass in an `Array`, an `ImmutableArray` or any other collection, when these would in fact work perfectly fine for our purposes.

Don't take `List<T>` as an input argument unless you mean to modify that input argument. In that case, your function should probably then return `void` (or `Task`, if it's async).

```csharp
void AddElements(List<T> collection); // this does make sense
```

Now let's look at the other case, the return type. What would this mean?
```csharp
List<Element> GetElements(IReadOnlyCollection<Element> inputElement) 
```
This is not restrictive, but it's equally confusing. The function returns a collection which may then be modified by the caller. Why? Does the function store a reference to it somewhere so it can observe the changes later? Or worse, does it modify it while it's being used? Again, this is just strange API design that prompts me to read the implementation when I shouldn't have to.

I have a hard time coming up with a good reason to return `List<T>`: if you have an internal mutable collection, surely it's a bad idea to share it with the outside world where it may be modified unexpectedly. Mutable state is best kept local.

Note that strictly speaking, returning `IReadOnlyList<T>` does not guarantee immutability either, but it does send a strong message in that direction. Strictly speaking, the correct return type would be `ImmutableArray<T>` or `ImmutableList<T>`. I'm still on the fence; libraries seem to gravitate towards the `IReadOnly` interfaces more than `System.Collections.Immutable`, for whatever reason.
The Pandemic Story of Workers
Tags: covid, work, experience
Published: 2022-03-29 00:34:30

Life was not fair to working people even before the pandemic. We worked multiple jobs to feed and pay rent; though, food and shelter was basic human rights. As a frontline employee, I paid my dues while billionaires were going to space and laugh at us on their way back. Our capitalist leaders were protecting the big corporations while people were dying of disease that was manufactured through greed, ignorance and cruelty to humanity.

In 2020, I lost my livelihood and then had my family evicted from home but I fought back to inspire, change and build a better future for next generation. My community guarded me at the most difficult time and now I am privileged to lead the change that we all want to see changed. Join the conversation, let us be the change makers. We can break free from the capitalism induced materialism to build better community and preserve our planet. All workers face the same struggles. Let us unite and fight for better world.  

No one shall be left behind. We can tell the truth and be revolutionary. Subscribe/ follow to stay connected, share the articles with everyone. Contribute to the conversation, be the unicorn in your social circle. We do not have to agree on everything but we got to protect each other from the evils of capitalism, imperialism and colonialism. Be engaged, you are a divine being, that is all what matters.
Resumo da 4º Semana de Jornada DEV 4/52
Tags: javascript, beginners, html, css
Published: 2022-03-29 00:27:25

Essa semana eu me dediquei a criar uma página com todos os desafios do módulo 01, do curso em vídeo. A maioria dos desafios já estava concluída ou quase finalizada. O que facilitou na hora de colocar todos na mesma página e estilizar.
Por mais que tenha sido algo simples, foi bom rever os primeiros desafios e até corrigir pequenas coisas.
Este é o repositório com todos só desafios:[ Clique aqui.](https://github.com/HelloGraci/html-css/tree/main/desafios/modulo01)
Encode and decode FourCC codes, in Python
Tags: python, video, opencv
Published: 2022-03-28 23:37:33

Convert the string "H264" to an integer code:

    sum([ord(c) << (i * 8) for i, c in enumerate("H264")])

Convert the integer code (0x34363248) back to a string:

    ''.join([chr((0x34363248 >> (i * 8)) & 0xff) for i in range(4)])

See this gist: https://gist.github.com/eliteraspberries/b017f998c97c395881f0d2f05a08ec60
Ng-News: Issue 22/12
Tags: angular, javascript, programming, webdev
Published: 2022-03-28 23:29:05

This is a weekly posting, covering the latest updates from the Angular community.

{% youtube QKs0A3EA9Dk %}

## Updated Angular Roadmap

We saw an update of the official Angular Roadmap. As the name says, it lists all the Angular team's past, current, and future tasks. 

In the area of "Optional NgModules" or "Standalone Components", it looks like the primary tasks are more or less done, and the work shifts to secondary user stories.
For example, even with Standalone components, the routing configuration needs the RouterModule. The Angular teams works on possibilities to get rid of these types of modules.

We find a very similar situation in typed forms. At the moment, this feature is rolled out to the Angular applications at Google. We are speaking here of a total amount of 2,500+ applications.
The learnings of this process will probably find their way into the migration script. So it looks like we get typed forms for free without touching our code.

[Angular Roadmap](https://angular.io/guide/roadmap)

## Video Recordings

Last week, quite a bunch of video recordings were published.

ng-conf kicked off with three talks from Preston Lamb about RxJs' `combineLatest`, Brandon Roberts, maintainer of NgRx about "NgRx at Scale", and Jeff Whelpley, who is the co-creator of Angular Universal, about improving the initial loading of an Angular application.

{% youtube 31-PcUn_0Xc %}

AngularNation had two sessions with Igor Minar and Jessica Janiuk. Jessica is a member of the Angular team, and Igor is a former member.

{% youtube n2akCKAMNTE %}

{% youtube p8b3BGc6hn0 %}

## Miscellaneous

We had a major update of Transloco, which didn't bring any new features, but requires now Angular 13.

https://github.com/ngneat/transloco/blob/transloco-4.0.0/libs/transloco/CHANGELOG.md
Requests for Go or Terraform Content?
Tags: requestforpost, go, terraform
Published: 2022-03-28 23:00:37

I have found myself completely immersed in the [Go](https://go.dev/) and [Terraform](https://www.terraform.io/) ecosystems lately. Most of my time is focused on learning both of these technologies. I'm learning new things all the time and would love to share them. I've written a couple posts ([Write Terraform Files in Go with hclwrite
](https://dev.to/pdcommunity/write-terraform-files-in-go-with-hclwrite-2e1j) & [Create Terraform Resource References in Go with hclwrite](https://dev.to/pdcommunity/create-terraform-resource-references-in-go-with-hclwrite-2bl6)) on the [hclwrite](https://pkg.go.dev/github.com/hashicorp/hcl/v2/hclwrite) Go library for creating HashiCorp Configuration Language (HCL) and would love to write more on Go!  

Are there any posts on either Go or Terraform that you would like to see?
GAS の UrlFetchApp で Slack API の conversations.list で全てのチャンネルリストを取得する
Tags: gas, slackapi, javascript
Published: 2022-03-28 22:59:14

## GAS プロジェクト作成

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l202cx7ogc4yqeng6ujz.png)

getSlackChByName と言うプロジェクト名で作成

## Slack API 公式 Doc からコピペ

api.slack.com の Slack API 公式ドキュメントを読む 

https://api.slack.com/messaging/retrieving#finding_conversation

このメッセージを見つけるコードは

```ts
const { WebClient, LogLevel } = require("@slack/web-api");
```

GAS が npm モジュールを使えないことにより断念

## チャンネルリストを conversations.list で確認する

https://api.slack.com/methods/conversations.list

公式のここによれば

GET で

https://slack.com/api/conversations.list

を叩けば手に入るらしい

## API リクエストのラッパーを導入する

https://qiita.com/seratch/items/2158cb0abed5b8e12809

この記事を参考に作る。 payload は省略した。

```ts
function callWebApi(token, apiMethod) {
  const response = UrlFetchApp.fetch(
    `https://www.slack.com/api/${apiMethod}`,
    {
      method: "post",
      contentType: "application/x-www-form-urlencoded",
      headers: { "Authorization": `Bearer ${token}` },
    }
  );
  console.log(`Web API (${apiMethod}) response: ${response}`)
  return response;
}
```

UrlFetchApp と言う　GAS の組み込み関数で　fetch する。

apiMethod は GET/POST ではなく、Slack の　API Method のこと。 
Slack Workspace のトークンと Slack API Method を引数で受け取るようにする。

```ts
const token = "xoxp-1234"
const apiResponse = callWebApi(token, "conversations.list");
```

これに Slack のトークンを入れて　conversations.list　の Slack API Method で呼ぶ。

これを GAS で実行すると

```ts
Web API (conversations.list) 
response: {
  "ok":true,"channels":[
  {"id":"C0385KDLRD5","name":"making-bot",... },
  {"id":"C038L782V3M","name":"random",... },
  {"id":"C038NHHFN3E","name":"general",...},
  "response_metadata":{"next_cursor":""},
}
```

レスポンスでチャンネルのリストが json で取れた。


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h83mi4wgozxs9xxkprp8.png)

デフォルトの　random と general, 自分で作った　making-bot,
これらのチャンネル名と、チャンネル情報がとれた。

making-bot の詳細を見ていく

```ts
"name":"making-bot",
"is_channel":true,
"is_group":false,
"is_im":false,
"is_mpim":false,
"is_private":false,
"created":1648155092,
"is_archived":false,
"is_general":false,
"unlinked":0,
"name_normalized":"making-bot",
"is_shared":false,
"is_org_shared":false,
"is_pending_ext_shared":false,
"pending_shared":[],
"parent_conversation":null,
"creator":"U038DHKP87Q",
"is_ext_shared":false,
"shared_team_ids":["T038NHHEJJY"],
"pending_connected_team_ids":[],
"is_member":true,
```

チャンネル名、チャンネルかグループか、プライベートか、アーカイブされいているか、共有されているか、誰に作られたか、このリクエストのトークンの人間がこのチャンネルに入っているか、これらが確認できた。

他のチャンネルも同じデータ構造。

## 今後

これでは各チャンネルの肝心のチャットの中身が見れないので
次は単一チャンネルの中身を取り出す Slack API メソッドを試す
メンバーリストや DM リストも試してみる。

Slack とは別に DogAPI や Twitter API など他も試してみる
I need suggestions for my web game
Tags: typescript, heroku, webdev, help
Published: 2022-03-28 22:48:20

I'm making a web game in typescript and deploying to Heroku, should I compile my code before I deploy it? 
I feel like that would make collaboration harder (because git would only have the compiled code). 
 
(Edit) 
If I have 2 branches (one for development and one for production), is there an easy way to automatically compile and minify code in development and push to production?