teleren/devto huggingface dataset:
Interesting resources
Published: 2022-11-19 15:50:31

This post is intended as an entry point to resources I find interesting.

These were in my Twitter bookmarks. But it does not seem the best place to keep these resources anymore.

- [General](#general)
- [Architecture](#architecture)
- [Testing](#testing)
- [Tooling](#tooling)
- [Design](#design)
- [Management](#management)
- [Misc](#misc)

---

## General

- Clean Code rules summary with JavaScript examples:
https://github.com/ryanmcdermott/clean-code-javascript

- Programming principles summary: https://github.com/webpro/programming-principles

---

## Architecture

- Using an hexagonal architecture to limit coupling of the business logic with the framework: https://dev.to/drouianm/hexagonal-architecture-as-a-solution-to-the-obsolescence-of-ui-frameworks-ej2

- Guide for JavaScript library build: https://github.com/frehner/modern-guide-to-packaging-js-library

- Thoughts about microservices vs monolith: https://dev.to/semaphore/when-microservices-are-a-bad-idea-2p7h %}

---

## Testing

- Testing best practices (for JavaScript app): https://github.com/goldbergyoni/javascript-testing-best-practices

---

## Tooling

- A great articles about using the devtools: https://dev.to/lissy93/awesome-dev-tool-tips-32oo

---

## Design

- Checklist for interface design: https://www.smashingmagazine.com/2022/09/ux-checklists-for-interface-designers/

---

## Management

- A framework for evaluation: https://github.com/jorgef/engineeringladders

---

## Misc

- Privacy and security focused softwares: https://github.com/lissy93/awesome-privacy

- Personal security best practices: https://security-list.js.org/#/

- Article about knowledge sharing in teams: https://leaddev.com/communication-relationships/want-promote-knowledge-sharing-your-teams-standardize-way-you-take

- Tips to promote knowledge sharing: https://dev.to/codingchili/tips-for-boosting-knowledge-sharing-1f93
Difference Between Markup Language and Programming language
Tags: webdev, javascript, react, programming
Published: 2022-11-19 15:42:31

- **Difference Between Markup Language and Programming Language**
    - **Definition**
        - markup language is a system for annotating a document in a way that is syntactically distinguishable from the text
        - programming language is a formal language that contains a set of instructions used to produce various kinds of output
    - **Functionality**
        
        - markup language is interpreted by the browser while a 
        
        - programming language is compiled by a compiler or interpreted by an interpreter.
        
    - **Examples**
        
        - HTML, XML, and XHTML are some examples for markup languages. 
        - C, C++, Java, Python, and Assembly are some examples for programming languages.
        
    - **Usage**
        
        - the markup language is used to present information
        
        - programming language is used to give instructions to a computer to perform a particular task.
        
    - **Conclusion**
        
        - markup language defines a set of rules for encoding documents in a format that is both human-readable and machine-readable
        
        - programming language provides a set of commands and syntax that can be used to write computer programs which are understood by the computer.

      - **Reference**
       
          - “Markup Language.” P2P (Peer To Peer) Definition
    
          - “Programming Language.” Wikipedia, Wikimedia Foundation, 26 Sept. 2018
Understanding Microservices using the Scale Cube Model
Tags: microservices, webdev, programming, beginners
Published: 2022-11-19 14:33:12

### Scale Cube Model
The Art of Scalability (Martin Abbot and Michael Fisher) describes a 3-D scalability model called as the Scale Cube model. The model defines three ways to scale an application:

1. X-axis scaling
2. Y-axis scaling
3. Z-axis scaling

We shall look at them in the following sequence - X-axis, Z-axis, and Y-axis building up context, finally reaching at a high-level definition of Microservices.

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

#### X-axis Scaling, a.k.a., Horizontal Duplication - Scale by cloning
* Common way to scale a monolithic application.
* The requests are load-balanced among all the duplicate identical instances of an application.
* A great way to improve the Capacity and Availability of the application.

#### Z-axis Scaling, a.k.a., Data Partitioning - Scale by splitting things that are similar based on an attribute of the request
* In Z-axis scaling also multiple instances of the monolith application run, but
* unlike X-axis scaling each instance is responsible for only a subset of the data.
* The requests are routed based on a request attribute, for e.g. - userId, so that each instance is responsible for a subset of users.
* The request router uses the userId specified in the Authorization header to select one of the identical instances of the application.
* A great way to scale an application to handle increasing transaction and data volumes.

#### Y-axis Scaling, a.k.a., Functional Decomposition - Scale by splitting things that are different functionally
* X- and Z-axis scaling improve the capacity and availability of an application, but
* neither solves the problem of increasing development and application complexity.
* To address this, Y-axis scaling or functional decomposition needs to be applied - splitting monolith into a set of services.
* From the entire application's point of view:
    * A service is a mini application that implements narrowly focussed functionality, such as Billing, Payment Gateway, Tax, and so forth.
    * A service is scaled using X-axis scaling, although Z-axis scaling might also make sense for some services

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

### High-level definition of Microservices based on the Scale Cube Model
* Microservice Architecture (or simply, Microservices) is an architectural style that functionally decomposes an application into a set of services (Y-axis scaling).
* This definition does not say anything about the size of services - what matters is that each has a focussed, cohesive set of responsibilities.
Conferences = Good vibes
Tags: conferences, community, devrel, webdev
Published: 2022-11-19 14:29:12

After two days of conference I'm waiting for the flight to go home and I thought to share with you my vibes and thoughts.

---

They have been intense days and it was very nice to be able to share my experience with my talk.
The even more beautiful thing is that I met a lot of beautiful people and I take something home from each of them.

### Sharing

Sharing in general is at the basis of events like this, with talks in the first place, but not only, because it is thanks to the dialogue between participants that the best conversations can arise, the ones that remain in your mind for a long time.

### Topics

The main topic of discussion is certainly the one that unites all of us, technology, but it can happen to talk about our life in general and it's precisely when certain topics are touched upon, that our human side comes out.
It's from these kind of discussions that emerges that in the end we are people even before developers, with our lives and with our problems.

### In-person events

After years of pandemic, I'm happy that in-person conferences have resumed because I think that the emotional part is difficult to recreate in a online event.

---

Now it's time to get on the plane and I have to say you goodbye....

You can [follow me on Twitter](https://twitter.com/giorgio_boa), where I'm posting or retweeting interesting articles.

I enjoyed organizing my ideas by writing this article and I hope you enjoyed it too.
Bye 👋

{% embed https://dev.to/gioboa %}
Para escuelas de programación: Grupo Codesi
Published: 2022-11-19 14:28:33

En mi experiencia con cursos y recursos sobre programación desde 2017 intenté adquirir conocimientos que me permitieran ir aprendiendo.

![Curso de Java POO](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23ubnvfdxn78tj4btwwp.jpg)

A pesar de que tomé cursé la carrera en Ingeniería en Desarrollo de Software, también tuve la oportunidad de capacitarme en el IPN y en la UNAM, en ambas instituciones en cursos de programación.

En la UNAM utilizamos raptor para aprender lógica, en el IPN en UPICSA trabajamos con C# y una serie de conceptos como variables, clases, herencia, polimorfismo y un largo etc de conceptos que parecían imposibles de comprender, o al menos cuando los escuchas por primera vez literal que parecen de otra galaxia. 

El punto de esta publicación es hacer énfasis que ya compartí tres instituciones educativas en donde se supone que el aprendizaje o la educación está garantizada, aunque solo en la UNAM y el IPN se podría hablar de garantía o calidad. 

De la UNADM lo único que podría aportar rápidamente es que te obliga a convertirte en autodidacta (ya podré describir mis experiencias como alumno de esa institución de la SEP). 

De cierta forma, desde 2017 a 2019 agregué conceptos en mi cerebro, sabía a qué se referían las variables,las constantes y las clases, pero en [Grupo Codesi](https://www.grupocodesi.com/) fue el lugar en donde esos conocimientos hicieron match con el código. Fue como ver la luz al final del túnel y llegara otro nivel.

En realidad ir a clases presenciales da la oportunidad de disipar dudas al momento, y también sin duda la presencia y la conexión cara a cara con el maestro es un aliciente, y lo digo hoy que la educación ha mutado a su modalidad a distancia, pero esa experiencia de un curso de Programación Orientada a Objetos con Java es valiosa y la considero el mejor curso que he tomado, porque a partir de ahí pude darme cuenta que programación es programación aquí y en China y en la mayoría de los casos también aplica para los lenguajes de programación con el paradigma de los objetos.




Esto es para dejar plasmada mi recomendación, pues si quieren aprender programación claro que existen buenísimas opciones (Platzi, EdTeam, Código Facilito, Youtube, etc) pero si hay un lugar en donde se aprende con calidad y que además dan garantía de ese aprendizaje justo es en Grupo Codesi. 

Lo hago porque también creo que un buen plan de Marketing los elevaría a niveles insospechadas porque el nicho de negocio que tienen realmente es inmenso y considero que la calidad de educación que brindan es de primer nivel.
Git refusing to merge unrelated histories on rebase
Tags: github, git
Published: 2022-11-19 14:22:44

In my case, the error was just fatal: refusing to merge unrelated histories on every try, especially the first pull request after remotely adding a Git repository.


![error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16s6dmaxzcbk6quz9x2l.png)



**Using the --allow-unrelated-histories flag worked with a pull request in this way:**

`git pull origin <branchname> --allow-unrelated-histories`
Learn Android Dev with java #1 - Saga 1
Tags: android, java
Published: 2022-11-19 14:22:33

In this part (#1), we will see the pre-requisites need to get started to learn android development.

The pre-requisites are:

1. Programming Language
2. Android studio

## 1. Programming Language
To develop an android app you have to write code in Java or Kotlin. You have to learn any of these languages to communicate with android studio and make an app.

> Personal Opinion: No doubt Kotlin is the best language for android development there is nothing to argue about. If you started android development with java, you have to shift it to Kotlin one day. But In my opinion, If anyone can understand an object-orientated programming language properly, It’s very easy for his/her to learn another language. Coding and start learning with java may be harder than Kotlin but with java, one can learn the core concepts more deeply and also can get more resources than Kotlin and If one can learn the main concepts properly then learning Kotlin and started development in Kotlin is a very easy task for him/her. In the end, language is just a way to execute ideas.

The FREE resource I used to learn JAVA:

Option a) From my college lecturer:
This Playlist covers more than everything that you wants to learn. But it can be little dry as this was recorded during class hours.

[Satish C J - Java Programming](https://www.youtube.com/playlist?list=PLqfPEK2RTgCgcdrn6QZh3s--3AaejoHX4)

Option b) Programming with Mosh:
Spend 3hrs of your life and learn every basic think you need to get started with android dev

[Java Tutorial for Beginners by Programming with Mosh](https://www.youtube.com/watch?v=eIrMbAQSU34&t=3s)

## 2. Android Studio:

Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA. On top of IntelliJ’s powerful code editor and developer tools, Android Studio offers even more features that enhance your productivity when building Android apps.
The best place to learn the basics about Android studio is through its official documents.

A resource to set up android studio ( Hardest step in learning android dev😒) :
https://www.geeksforgeeks.org/guide-to-install-and-set-up-android-studio/

About SAGA 1:
It going to have more parts on android development using JAVA ( only Java).In this SAGA, I will add everything that you would need to get good at android dev.

> Planning to make SAGA 2 with Kotlin

⚠️ Caution: This is all from what I did to get 3 Internships in my junior yrs of collage, Btw I love to help so contact me if you need any help(MY TWITTER PROFILE IS CONNECTED).
Best Practice #2 : Parses the desired LocalDateTime format
Tags: java, android, formating, dateconvert
Published: 2022-11-19 14:09:37

### Disclaimer
Pada suatu ketika kita menghadapi sebuah `case` dimana, kita harus mengolah datetime format `LocalDateTime` dimana outputnya kurang lebih seperti berikut 

```php
2022-11-19T20:35:34.149849
```

kodingan tersebut berasal dari class `LocalDateTime`

```java
LocalDateTime now = LocalDateTime.now();
```

permasalahannya adalah, bagaimana kita ingin mengubah ke format time yang kita inginkan? dari case tersebut kita dapat menangani masalah diatas dengan class `DateTimeFormatter`, untuk sample nya adalah misal kita ingin buat output seperti `19 June 2022 18:26:10`

### Actions
Untuk memproses parsingan LocalDateTime ke DateTimeFormatter kita akan melakukan prosesnya seperti berikut, Pertama kita buat terlebih dahulu main programnya 

```java
@Test
public void bestPractice2() {
    LocalDateTime now = LocalDateTime.now();
    System.out.println("Sebelum diparsing : " + now + "\nSetelah di Parsing : " + parsingDateTimeFormatter(now));
}
```

Jika diperhatikan dari output diatas `parsingDateTimeFormatter` merupakan function yang mengembalikan nilai hasil parsing tanggal `LocalDateTime`, selanjutnya kita hanya perlu membuat sebuah function yang memproses format yang ingin kita buat dengan harapan output seperti `Saturday, 19 November 2022 20:54:05`

```java
public String parsingDateTimeFormatter(LocalDateTime now) {
    /*
     * Dokumentasi Tambahan :
     * EEEE : Merupakan format nama Hari lengkap, jika ingin 3 huruf cukup EEE
     * dd : Merupakan tanggal dalam format angka 01-31
     * MMMM : Merupakan format nama bulan lengkap dengan 4 huruf MMMM, 3 huruf nama bulan MM
     *        sedang untuk dalam format angka cukup MM
     * yyyy : Sama seperti bulan untuk format tahun lengkap 2022 : yyyy, jika ingin 2 angka cukup yy
     * HH:mm:ss : Adalah parsing waktu HH : Jam, mm : Menit, ss : Detik
     * */
    DateTimeFormatter dtf = DateTimeFormatter.ofPattern("EEEE, dd MMMM yyyy HH:mm:ss");
    return dtf.format(now);
}
```

Dan berikut merupakan hasil eksekusi kita tadi

```php
Sebelum diparsing : 2022-11-19T20:54:05.804686
Setelah di Parsing : Saturday, 19 November 2022 20:54:05
```

Case finished.
How to become a developer in 2023?
Tags: webdev, beginners, programming, javascript
Published: 2022-11-19 13:50:34

{% embed https://www.youtube.com/watch?v=aXwBjWRe0Q4&feature=emb_title&ab_channel=CodewithGuillaume %}

Four month ago I launched my YouTube channel to teach how to code. And I have been surprised to discover that many of my viewers were asking me: how to become a developer?

After 10 years of experience as a freelance developer, I have a clear view on how a junior can start his career.

I’ve summarize these points:

- Try different langages, frameworks and pick one you like,
- Dive deep into programming concepts – also into your framework,
- Your goal is to become a master of your framework/langage,
- Create a LinkedIn / GitHub profile, synthetic and professional as much as possible (your profile picture has to be serious),
- Multiply personal projects on your GitHub profile (at least 2–3),
- Contribute if you can to open source projects,
- Apply only to jobs that fits with your skills and wishes – that’s the most important condition,
- If you got interviews for jobs you really want, my best advice is to create a clone project and to present it during your interview.
- I got several others points but they are in the video I made this weekend.

At the end I even share my own story and how I became a developer/CTO.

Best,

Guillaume Duhan
Singly Linked List Series: Node and Singly Linked List Classes with JavaScript
Published: 2022-11-19 13:45:10

While currently studying data structures and algorithms, I thought this would be a good place to "think out loud" and possibly help others along the way.  I have been working on understanding Singly Linked Lists and here is what I have learned when it comes to building a Node class and a Singly Linked List class.  Feel free to share your corrections if I get anything incorrect.

A Singly Linked List is a linear data structure.  It is composed of nodes; each node points to the next node while the last node points to null.  Unlike arrays, Singly Linked Lists are non-contiguous in memory, so new nodes can be added wherever there is space in memory.  Arrays are contiguous in memory so the elements must be stored right next to each other.  Arrays have a fixed size.  In order to add elements to an array, you must copy all the elements into another place in memory with more space.  Also, Singly Linked Lists are good at insertion and deletion at the beginning (the head), and insertion at the end (the tail).  It takes fewer operations to do this, so the time complexity is O(1) constant time.  However unlike arrays, Singly Linked Lists do not have indices, and random access of a node is not allowed.

My understanding of the Node class is that it builds the node's structure.  A node is basically an object with a key/value pair: {value: value, next: null}.  Nodes are connected via their next values.  The next value points to the next node.  Here is an example of a node pointing to the next node:

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

Here is an example of code for a Node class that constructs the node:


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

A Singly Linked List class builds the list's structure with the head, tail, and length.  Here is an example of code for a Singly Linked List class that constructs the list:

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

Using these two classes, a Singly Linked List can be instantiated and built with nodes using the Node class.  Within the Singly Linked List, various methods can be written to access and manipulate the list.

In the next part of this series, I will share what I have learned about adding nodes to the end of a list and removing nodes from the end of a list.
How to delete a Git branch
Tags: git
Published: 2022-11-29 08:59:36

---
title: How to delete a Git branch
date: 2022-11-19 00:00:00 UTC
published: true
tags: 
  - git
canonical_url: https://www.mikestreety.co.uk/blog/how-to-delete-a-git-branch/
---

Deleting branches is important to ensure old code doesn't hang around or the wrong thing doesn't get merged

**Note:** In the examples below `pow` will be used for the branch name

## Delete a local branch

If you have a local branch you want to delete you can run

```
git branch -d pow
```

If your branch **has not been merged** into your **current branch** you need to change the `-d` to a capital:

```
git branch -D pow
```

## Delete a remote branch

If you wish to delete the branch via command line, you have to "push" it with a colon (`:`) preceding the name

```
git push origin :pow
```

## Updating your local branch data

If you deleted your remote branch from another computer (or via the website if on Github/Gitlab), you might find it is still listed when running a `git branch -a`. This means your local Git repository thinks the branch still exits and could cause conflicts if you try to create a branch of the same name.

To remove these, you can fetch with an additional `--prune` parameter

```
git fetch origin --prune
```

**Tip:** If you want it to always prune when you do a `git fetch origin`, you can set this as a global setting:

```
git config --global fetch.prune true
```

**Read time:** 1 mins

**Tags:** Git
How to Factorialise a Number (and not end up in a spiralling void of zeros)
Tags: javascript, beginners, tutorial
Published: 2022-11-19 12:52:13


Hey! So we want our code to do this: `5! = 1 * 2 * 3 * 4 * 5 = 120`. 

This is how: 

```
function factorialise(num) {
  let result = 1; 
  for (let i = num; i > 0; i--) {
    result *= i;
  }
  return result;
}
factorialise(5);
```

This is how (I think) it works: 

- We start with a function that takes the number we want to factorialise as its argument.

- Next, we need somewhere to store our result so we create a `result` variable and initialise it to 1. It's 1 because we want to start all factorialising from there, if it were 0 we would end up in a spiralling void of nothingness because we'd be multiplying our values by 0 :(  

- Next we make a for loop. 1) set `i` as `num`. 2) the condition is that if `i` is greater than `0` then we will 3) decrease the value of `i` (which has the same value as num in the first iteration) by 1 so that we can cycle through all the numbers until (but not including) 0. 

- Now if we console.log we get this:

```
5
4
3
2
1
```
Great. So our loop is working. First it passes in the the original input number, then it decreases until 1. Now we need to find a way to multiply each value passed in. 

- So we do this: `result *= i; `. Remember that result is initialised to 1 so in the first iteration it's doing `1 * 5 = 5`. In the next iteration our `result` variable is now `5` and `i` has undergone one negative iteration resulting in its value now being `4`. So it's doing `5 * 4 = 20` (new result * corresponding decreased interation of `i`). If we `console.log()` here we can see how it works its way through. 

```
5
20
60
120
120
```
Note how the total is repeated twice. I think this is because the last iteration is 1, so it's essentially doing `120 * 1 = 120`. This does't really matter or affect the result, but it's still an unnecessary iteration. If we wanted to get rid of it we could go back to the for loop and change the condition to `i > 1`.

- Ok, so now we have our result stored in our er.. `result` variable. Next we just need to return our result. 

This is an explanation for myself really, but if you found it useful then all the better. If you see a mistake somewhere be sure to let me know, I'd appreciate that very much!

Love,
Mac shortcuts
Published: 2022-11-19 12:50:58

写一个设置新苹果电脑的备忘录
command + `: 同一程序的多个窗口间切换
control + command + f: zoom
cut and place it in a new place: control + option + sencondary click 

Chrome
switch tabs: Ctrl + ⇧ Shift + Tab ↹
dev tool: command + option + i/j

You can type open . on MacOS or start . on Windows to open the current directory in your Finder/File Explorer.
Spotlight Search: Command + Space
whole line: command+shift+arrow keys
Option + Cmd + Shift + V to paste without formatting