teleren/devto huggingface dataset:
C# For Beginners - Introduction
Tags: csharp, dotnet, beginners, programming
Published: 2021-07-11 11:59:31

Hi there! This tutorial is a gentle introduction to the C\# programming language. 

You'll be learning the basics of C\# and programming by following along with the tutorial.

## What is programming?

Programming is a way to tell computers to do things. 

Computers are very fast at doing things - whether it's calculating complex formulas or finding duplicates in a list with a thousand entries. 

But a computer can't do these things by itself. To instruct it to solve a problem, someone else needs to come in, tell the computer to solve the problem and also, **how** to solve it.

This "someone" is called a _programmer_. A programmer writes instructions for a computer so that it can solve the problem. But a computer - a machine - can't understand human language. In fact, a computer can only understand _machine language_ - a language that uses only 1s and 0s.

It's possible to write a set of instructions in 1s and 0s, but as humans, this will get really complicated quickly. Not to mention, doing it this way would probably take a human programmer a very long time.

_High-level_ _programming languages_ were created to solve this issue. These programming languages use human-readable elements, but these elements have special meaning as well. They can be translated, either by an _interpreter_ or a _compiler_ into machine code, which the computer can now understand.

C\# is one example of a _high-level programming language_. It was created by Microsoft in 2000 and is one of the top 5 programming languages in use today.

## Why C\#?

C\# is a modern, general-purpose programming language. It's a versatile language that is used to build different types of applications.

Desktop apps, mobile apps, websites, and games are some of the things that are currently being built using C\#. Once you've learnt the basics of C\#, you can move on to building all kinds of programs!

C\# syntax \(the structure of the language\) is easy to read. It's part of the C family of languages, so learning it will mean you can easily pick up languages like C, Java, JavaScript, and Swift.

C\# is a powerful language and allows you to build both simple and complex programs.

Lastly, C\# is a popular language, especially in the enterprise sector. Learning C\# means you've got a skill that is highly sought by many industries.


## Credits

A big thank you to [NodeGirls](https://www.nodegirls.com/)! This tutorial was heavily inspired by their [Beginners JavaScript](https://node-girls.gitbook.io/beginners-javascript/tutorial/step-1-hello-world) tutorial.

## About Me

Hi, I'm Coding Mama! I'm a Senior Software Engineer who loves to work with C\#, so I've made it a personal goal to introduce C\# to as many people as possible.

Whether you're an absolute beginner to programming, or a developer who wants to learn C\#, I'm here to help!

I hope you find my tutorials useful! If you do, please drop me a note on [Twitter](https://twitter.com/coding_mama) or [Dev.to](https://dev.to/coding_mama) - I'd love to hear from you!
Convert numbers to arabic words in javascript
Tags: npm, webdev, devops, tutorial
Published: 2021-07-11 11:40:47

![npm-tool-preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjloplfy1uvggv307wjh.png)

Npm tool will be useful when you need to use Arabic words in your website with only one function and please let me know about new features that can help you in your work  or any bugs to fix immediately 
The Tool 🔥⚒ : https://www.npmjs.com/package/number-to-arabic-words

report about any issue : https://github.com/mahmoudshahin1111/numbers-to-arabic-words/issues


Thanks 🙏
Eventually ,i learn how to learn to code
Tags: beginners, html, css, career
Published: 2021-07-11 11:34:34

"
Woooooops... where do we begin....
lets just begin..
have you ever just begun something..
will I really finish this thing...
i haven't finished anything i start
oh My i call my self a coder  and i still know nothing...
yes, ive done tutorials..
even java
(but don't you dare ask me anything....)

"

Well people.. i suffer from the above syndrome.. 
but I get the feeling that  I am healing. 
so this is what happened, i came up with a great idea and that idea wasn't python, Java, or lets hack something or someone ... no.. the idea was to solve my personal problem which was ... "i need a good resume". What followed is i found resume templates available online for purchase and sites that asked one to input credentials so that the resume is generated. i didn't believe in any of that(as usual).. long story short.. I did what was necessary.. googled code on how to create such a template for myself. luckily I found and forked this  a repo https://github.com/pattyleinn/resume-template
I coded bit by bit.. but meeeen.. i must have omitted a big <div> somewhere it didn't run...just as I decided to move on to another project like I've always done for years( I believe the reason as to why I still feel and I am code deficient).. i decided to be stubborn. I downloaded  the files to my editor.. input my credentials and it wasn't until I ran into an actual problem that my brain woke up. A crucial section in my template had its items allover place. I had added extra information apart from the initial coders and it was now jammed up . well,   staggering minutes of CSS, flexbox and div manipulations later. I succeeded in making a good resume. I feel proud to have solved my problem. to have coded and mostly to have learnt how to learn. What have learned is that it takes "needing something so badly, so so badly". All i need to do is feign this need whenever I pick on a project.
7 Programming Tips For Developers | Beginners
Tags: programming, beginners, motivation, developers
Published: 2021-07-11 11:17:38

What should you consider when coding for a project?

1. Code everyday.

                    "Practice makes perfect."

Practicing coding day by day will eliminates the fear on coding. It helps to improve our coding skills, and build the confidence step by step. Do not get demotivated at the initial stages.

During the initial stages of coding it takes more time to implement a function, takes many days to solve an error. It is totally fine. Every developer faced the same issue at the beginning, therefore you are not the first person to face this problem, and get stressed. Everything will be ok when you start coding continuously.

When you once start coding, you identify the mistakes, and solve the problem by searching through internet. You try to resolve the errors by yourself. When the problem is not solved, you can get help from other developers or from colleagues.

There are many resources to get help through internet. The most popular one is Stack Overflow

Tip:1 How to use Stack Overflow?
more at given link...
https://thavarajahpraveena.medium.com/7-programming-tips-an-d-tricks-for-developers-beginners-a9f375fe5eb8
How to display simple, symmetric status bar in tmux
Tags: bash, tmux
Published: 2021-07-11 11:20:21

If you spend a lot of time in [tmux](https://www.ocf.berkeley.edu/~ckuehl/tmux/) you will probably like to replace the default status bar:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a4ipmnirfi3paw5pq63v.png)

with something custom - for example something like this:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6p30pzi2job16po2ftlr.png)

# Configuration
To achieve this, you can copy to your `~/.tmux.conf` following configuration:
```
set-option -g status on    
set-option -g status-interval 2    
set-option -g status-justify "centre"    
set-option -g status-left-length 60    
set-option -g status-right-length 90    
    
set -g status-right '[#S]'    
```

# The result

With the configuration in place, the tmux status bar looks like:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zb2vwqz2gmdoi01sira0.png)

The color is more vibrant than in the example above - where I had `seebi/tmux-colors-solarized` applied. If you are interested in an article how to set it up, let me know in the comments.
Angular directive to add "Ripple effect"
Published: 2021-07-11 11:07:12

Hello, I created very small and lightweight directive for adding "Material ripple" effect to our app, it's very easy to integrate and install. I created it because I don't want to install all angular material to my project, so I created it for myself, and maybe I will also enjoy it, like me.

Github link: https://github.com/bmarvinb/bmb-ripple

Demo gif: https://media.giphy.com/media/IyuXb64EHkyge2kH3v/giphy.gif
Go versioning
Published: 2021-07-11 11:04:46

บางโปรเจคในภาษา Go เราอาจจะอยากเขียน lib ไว้แชร์ให้ทีมใช้ร่วมกัน
ในช่วงนี้ lib ตัวนี้ยังไม่คงที่ หรือยังคงมีของเติมเข้าไปอยู่เรื่อยๆ เนื่องจากเป็นช่วงตั้งไข่ หากเรากำหนด version ลงไปเลยตั้งแต่แรก เวลา upgrade ก็อาจจะยุ่งนิดหน่อย

โดยเฉพาะบางทีม รีบมากและอยากแยก repo เยอะๆ จะได้มีหลายๆทีมทำงานพร้อมๆกัน แต่ก็อยากใช้ lib ร่วมกันด้วย

สมมุติ ผมเริ่มด้วยการสร้าง lib กลางโง่ๆมาตัวหนึ่งแบบนี้

go.mod

```go
module github.com/pallat/versioning

go 1.16
```

versioning.go

```go
package versioning

var Number = 1
```

แล้วก็ commit ให้เรียบร้อยแล้ว push ขึ้นไปที่ github
จากนั้นก็ลองสร้างโปรเจ็คมาเรียกใช้ แบบนี้
main.go

```go
package main

import (
	"fmt"

	"github.com/pallat/versioning"
)

func main() {
	fmt.Println(versioning.Number)
}
```

เนื่องจากมี external dependencies ให้ใช้ go get

> go mod init github.com/pallat/multiver
> go get github.com/pallat/versioning

เราก็จะได้ไฟล์ go.mod หน้าตาประมาณนี้

go.mod

```go
module github.com/pallat/multiver

go 1.16

require github.com/pallat/versioning v0.0.0-20210711103217-5a8cada9b2f5 // indirect
```

ทีนี้ถ้าตัว lib กลางอยากเปลี่ยนค่า เป็นแบบนี้

```go
package versioning

var Number = 2
```

คนที่มาเรียกใช้ lib ตัวนี้ ก็อยากได้ค่าล่าสุดเหมือนกัน พอไป googling ดู เขาก็บอกว่า ลองแบบนี้ดูสิ

> go get github.com/pallat/versioning@latest

ซึ่งพอลองแล้ว ในกรณีนี้มันไม่เปลี่ยน ก็เลยต้องเปลี่ยนวิธี โดยใช้การระบุ version ซึ่งกรณีนี้ lib ของเรายังไม่ได้ทำ versioning จริงจัง ตอนนี้มันก็เลยใช้เลข commit  แทนไปก่อน เราก็เลยต้องทำแบบนี้

> go get github.com/pallat/versioning@ec81430

แล้วลองรันดู

> go run main.go
> 2

ได้ผลลัพธ์ที่เปลี่ยนไปโดยใช้ค่าใหม่จาก lib versioning ของเรา

โดย Go ใช้การบริหาร version แบบ SemVer เพราะฉะนั้นถ้า lib เริ่มนิ่งแล้วก็ควรเริ่มทำ version จริงจังได้แล้ว ถ้ามีการแก้ไขแล้วทำให้เกิด incompatible ก็ควร up major version ด้วยเหมือนกัน
Produce By Path - New JavaScript Design Pattern
Tags: javascript, designpattern, producebypath, opensource
Published: 2021-07-11 11:03:56

![ProduceByPath](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qor7bioyw63upovjqooc.png)


## Description
[Produce By Path](https://github.com/ruben-arushanyan/produce-by-path) is a design pattern, which is used to dynamically produce values by using the **path** to which it is applied.

## Installation
```bash
npm install produce-by-path
```

## Usage
```javascript
import ProduceByPath from "produce-by-path"
// CommonJS usage
// const ProduceByPath = require("produce-by-path")


// define producer instance to our liking :)
const instance = new ProduceByPath({
    call: (path, args) => {
        return ({
            path,
            args,
        })
    },
    toPrimitive: (path, hint) => {
        return path.join("--")
    }
})


//      Now we can apply the [[instance]] object with any properties
//      combination and call as a function and receive the desired
//      result as we defined in the [[call]] handler.
console.log( instance.I.love.you("arg1", "arg2") )  
//      {
//          path: ["I", "love", "you"],
//          args: ["arg1", "arg2"]
//      } 


//      We can also apply the [[instance]] object with any properties
//      combination and convert as a primitive value and receive
//      the desired result as we defined in [[toPrimitive]] handler.
console.log( String(instance.I.love.you) )
//      I--love--you

console.log( instance.I.love.you + '')
//      I--love--you
```

## Why should I use an ProduceByPath pattern?
Using that pattern in some cases we can build a simple and intuitive interface for my software.

For example, the [redux-cool](https://redux-cool.js.org) library use that pattern for making action objects.

```javascript
import {actionsCreator} from "redux-cool"


const first_action = actionsCreator.MY.FIRST.ACTION("arg1", "arg2")
console.log(first_action)
//      {
//          type: "MY/FIRST/ACTION",
//          args: ["arg1", "arg2"],
//          cb: f() identity,
//          _index: 1
//      } 

const second_action = actionsCreator.This.is.my.second.action(2021)
console.log(second_action)
//      {
//          type: "This/is/my/second/action",
//          args: [2021],
//          cb: f() identity,
//          _index: 2
//      } 



//      If we just need to generate an action type as a string,
//      we can do it easily
const type1 = String(actionsCreator.MY.FIRST.ACTION)
console.log(type1)
//      "MY/FIRST/ACTION"

//      or any string conversion
const type2 = actionsCreator.MY.FIRST.ACTION + ""
console.log(type2)
//      "MY/FIRST/ACTION"
```

## Links
[npm](https://www.npmjs.com/package/produce-by-path)
[github](https://github.com/ruben-arushanyan/produce-by-path)
[redux-cool actionsCreator](https://redux-cool.js.org/docs/concepts/actions-creator)
I am starting with GIT 
Tags: firstpost, git
Published: 2021-07-11 10:20:42

I am starting with GIT [czech articles] (https://www.itnetwork.cz/programovani/git) and finding out that ohmyzsh has its [own aliases] (https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet#git) for Git in CLI :)
Using `let.opt` in Rescript with latest Reason/OCaml
Tags: rescript, reason, melange, ocaml
Published: 2021-07-11 10:09:10

This is your Reason `(let.opt`) definition.

```reason
let (let.opt) = (x, f) =>
  switch (x) {
  | None => None
  | Some(x) => f(x)
  };
let (and.opt) = (a, b) =>
  switch (a, b) {
  | (Some(a), Some(b)) => Some((a, b))
  | _ => None
  };
let z = (a,b)=> {
  let.opt a = a
  and.opt b = b;
  Some(a + b);
};
```

This is your Rescript file on `ocaml@4.12.0`:

```rescript
//Demo.res
let a = Some(10);
let b = Some(3);

Js.log2("using ocaml 4.12 compiled reasonml let.opt in Rescript", Opts.z(a,b));
```

Here is a gist.
{% gist https://gist.github.com/idkjs/ad33256480e20600222ae6a57efb46ee %}

Here is a project you can run:
{% github https://github.com/idkjs/letop-rescript no-readme %}

Resources: https://github.com/ocaml/ocaml/pull/1947
Melange:https://github.com/melange-re/melange
Rescript:https://rescript-lang.org/
Discord:https://discord.gg/KAJBzYaf
This week in Flutter #11
Tags: dart, flutter, news
Published: 2021-07-11 09:51:56

A couple of weeks ago [Majid Hajian](<https://majidhajian.com>) started a [weekly video show](<https://www.youtube.com/playlist?list=PLCOnzDflrUcdGJPlI4oFmRPeca2R9847t>) about **Flutter news**. How did I miss it? It looks like I have a couple of videos to watch to catch up on.

I have noticed an **increase** in **content** about Flutter and Dart lately, both written and video. Even **bigger players**, like raywenderlich.com, are publishing more articles and **tutorials**.

It is good for the community to get more content, and, hopefully, one day we will get to the level of **quantity** and **quality** of other languages and frameworks. 🤞

<small>- Michele Volpato</small>

## 🧑‍💻 Development

### [Unlocking Your Flutter Widgets With Keys](<https://www.raywenderlich.com/22416843-unlocking-your-flutter-widgets-with-keys>)

Flutter uses [keys](<https://www.youtube.com/watch?v=kn0EOS-ZiIc>) to **preserve state** when you move around in your widget tree. In this article from raywenderlich.com, you will learn **what** keys are and **how** they work, **when** to use a key, and how to work with different types of keys.

---

## 🏛 Architecture

### [Cat and Mice – Part 2: Architecture](<https://bartvwezel.nl/flutter/cat-and-mice-part-2-architecture/>)

[Bart van Wezel](<https://twitter.com/bartvwezel>) keeps going with the [weekly series](<https://bartvwezel.nl/flutter/cat-and-mice-part-0-the-goal/>) about creating a new Flutter app. This week he discusses the **architecture** of the app, starting from the **navigation**. He wonders if this architecture will also support **authentication**: read the article and give your opinion about it.

---

## 🗄 Backend

### [Announcing Appwrite 0.9: The open source Firebase alternative](<https://dev.to/appwrite/announcing-appwrite-0-9-the-open-source-firebase-alternative-53ho>)

Appwrite released a new version with support for Flutter desktop. Now you can register **Linux**, **Windows,** and **Mac** apps. 🎉

---

## 🧑‍🎨 Design

### [Principles Of 3D Design For Flutter](<https://techblog.geekyants.com/principles-of-3d-design-for-flutter>)

In this article, [Manas Pratap Thakur](<https://github.com/manaspratap>) shows two things: how to use [Matrix4](<https://medium.com/flutter-community/advanced-flutter-matrix4-and-perspective-transformations-a79404a0d828>) to transform a widget to give a **3D perspective**, and how to fake a 3D image by changing the visible **frame** depending on the value of the **explicit animation**. The latter feels a bit clunky to me, but it can be a good starting point.

---

[...]

[Read the rest on ishouldgotosleep.com](https://ishouldgotosleep.com/this-week-in-flutter-11/)
Is it important to know how Javascript work under the hood?
Tags: javascript
Published: 2021-07-11 09:21:09

After using javascript for all kind of projects and doing it professionally for almost a year (Developing React Native apps) I asked myself how does javascript work and does it really matter ? When i asked my friend that is much more experienced than me, he told me : Look Toni, it works. I don't care what it does under the hood.

Then one day i stumbled upon medium article named "Master the JavaScript Interview" or something like that, with bunch of questions I've heard about but i could't really answer them. There  were bunch of questions like which paradigm javascript uses, difference between class and prototypal inheritance, pure functions, composition, call stack , callback queue...

Wait, maybe it does matter.

> “Yes, there are two paths you can go by, but in the long run, there's still time to change the road you're on.” - Led Zeppelin

This is when I've started to dig deeper.

This article of course can't explain all of it but something that stuck with me on my journey of understanding javascript and something that i think can help a lot of you understand javascript better is this youtube video:

<a href="http://www.youtube.com/watch?feature=player_embedded&v=8aGhZQkoFbQ
" target="_blank"><img src="http://img.youtube.com/vi/8aGhZQkoFbQ/0.jpg" alt="Event loop" width="240" height="180" border="10" /></a>

It is focused on explaining what the heck "event loop" is but it explains so much more. I can't recommend this talk enough that i had to write a dev.to post about it.

Finally, after researching a lot i think i've changed the way i think. If you want code great websites, apps or anything else you have to understand the background , you have to understand how it works under the hood. It can save you so much time no matter which framework you are using Angular, Vue or React they are all based on javascript.

I would like to hear your opinion.

Thanks for reading :)
Rustで自作OS 6日目
Tags: rust
Published: 2021-07-11 09:15:01

引き続き第3章 boot loaderを進める。
https://os.phil-opp.com/ja/minimal-rust-kernel/#kaneruwoshi-xing-suru
[bootloader](https://crates.io/crates/bootloader) crateというものがあるらしいけど、まずは自作を試みる。
でも参考にはする。

> 私達のカーネルをELFファイルにコンパイルする。
> 依存であるbootloaderをスタンドアロンの実行ファイルとしてコンパイルする。
> カーネルのELFファイルのバイト列をブートローダーにリンクする。

たぶんリンクはlld、それ以外はcargo(rustc)で進める。


まずはELF形式のカーネルをビルドする。
ビルド設定を`target.json`として作成する。
```json
{
  "llvm-target": "x86_64-unknown-none",
  "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
  "arch": "x86_64",
  "target-endian": "little",
  "target-pointer-width": "64",
  "target-c-int-width": "32",
  "os": "none",
  "executables": true,
  "linker-flavor": "ld.lld",
  "linker": "rust-lld",
  "panic-strategy": "abort",
  "disable-redzone": true,
  "features": "-mmx,-sse,+soft-float",
  "exe-suffix": ".elf"
}
```

コマンド `build --target target.json --package kernel --bin kernel` でビルドできる。
macOSの場合、binutilsの`greadelf`でバイナリを確認できる。
```
$ brew install binutils
$ /usr/local/Cellar/binutils/2.36.1/bin/greadelf -h ../target/target/debug/kernel.elf
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x201120
  Start of program headers:          64 (bytes into file)
  Start of section headers:          4472 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         4
  Size of section headers:           64 (bytes)
  Number of section headers:         15
  Section header string table index: 13
```
Entry point addressが自作OS本とは合っていないが、とりあえずboot loaderにカーネルを読み込む処理を実装する。

調べてたら先駆者を見つけた。
https://natsutan.hatenablog.com/entry/2021/04/14/190451
この人はCのUEFIアプリからRustのカーネルを読んでいるようだけど、自分は全部Rustでやってみたい。

上記ブログの参考ブログは全部Rustでやってた。
https://www.akiradeveloper.com/post/mikanos-rust/

> このカーネルファイルは、0x100000に配置されるようにビルドされているため、 UEFIによってアドレス指定方式でページをアロケートして、そこに書きます。

これが全てっぽい。

自作OS本と https://github.com/akiradeveloper/MikanOS.rs/blob/master/boot/src/main.rs を見ながら進める。

一通り書いた時点で起動してみると、QEMUがpanicした。

![Screen_Shot_2021-07-11_at_17_48_28](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkpjz1rq10tdcbbaroqx.png) 

ディレクトリ構成を修正すると、panicせず起動できたようだ。

![Screen Shot 2021-07-11 at 18.13.06](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2hao4jhe9j7x0rjt5hv.png)

![Screen Shot 2021-07-11 at 18.12.46](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2vhxfy00hnhcgfc5pugn.png)

今日の進捗 -> https://github.com/ytannai/kabos/tree/8e5091cbb471ca660dab44091051d79d692692c2