teleren/devto huggingface dataset:
The concepts of microkernel
Tags: gnuhurd, opensource, selfmotivation
Published: 2021-10-15 01:10:03

As a new contributor to the project of the GNU Hurd, I'd like to make clear many of the concepts like `kernel` `microkernel`, and there are so many concepts I need to cover. And I will show them below:

# What's the kernel?

* provides essential resources of the hardware of computers and other programs
* run all time
* remains resident in main memory


# The implements of the kernel:

* UNIX
* microkernel


## The concepts of UNIX

> UNIX is a kernel implementation and I'd like talk more detail on the UNIX article

* file descriptor
* process
* signal
* sys-call(system call)

In UNIX, `sys-call` is used to request all kind of functionality from operating system kernel, but in microkernel-based system typically won't offer a lot of `sys-calls`, apart from one central one, and that is send message but instead `RPCs` will be used instead.

In the GNU Hurd, a lot of what is traditionally considered to be a UNIX system call is implemented(primarily by means of RPC) inside `glibc`.


## The concepts of microkernel

> A microkernel is one kind of a kernel implementation.


### The architecture benefits of microkernel

* A microkernel attempts to minimize the mandatory part of the operating system, by providing the minimal number of `mechanisms`.

* Maximise the flexibility of implementation(by imposing minimal `policy`), allowing the efficient implementation of the remainder of system.

On `UNIX`, a process is associated with a `UID`, the `UID` determines what the process is authorised to do. But on a microkernel, the policy that controls what resources the process may access are relied separately.

And this may achieved though the use of UIDs, however need not. So, the process mechanism on such microkernel impose less policy on UNIX.


### What's the policy?

* A policy is a rule that define what may or may not happens.


### What's the mean of the mechanisms?

From Collaborative International Dictionary of English V.0.48 defines:

a mechanism as the series of causal relations that operate to produce an effect in any system; as, the mechanism of chemical reaction(how it happens)

* A mechanism is a function that produces some result, they necessarily impose some policy(rules)


### Why the process is not policy free?

* A process is not policy free as it is possible to use other mechanisms to encapsulate a program instance


## Summary

We already know `kernel` and the relationships between it to  `UNIX` and `microkernel`, and the definition of concepts of `microkernel` like `policy`, `mechanisms`, `policy free` and the mistakes of the article will be fixed in as depth as we learning.


## Reference articles:

https://www.gnu.org/software/hurd/kernel.html
https://www.gnu.org/software/hurd/microkernel.html
https://www.gnu.org/software/hurd/hurd/what_is_the_gnu_hurd.html
https://www.gnu.org/software/hurd/unix.html
https://www.gnu.org/software/hurd/system_call.html
Nobody Wants to Read Your Sh*t
Published: 2021-10-15 01:03:43

# Nobody Wants to Read Your Sh\*t

#### Especially the Next Person to Have to Fix Your Code

A big fan of Steven Pressfield’s _The War of Art: Winning the Inner Creative Battle_ — a fast book I read in a single sitting — I picked up _Nobody Wants to Read Your Sh_\*_t: Why That Is And What You Can Do About It_ last night. Again I finished it in a sitting. Well, ok, two. But still within 24 hours.

Both books could only, very loosely, be described as self-help. In fact towards the end of _Nobody_ he embraces, ambivalently, the genre, but only insomuch as a genre of writing that is guided by the same principles as fiction. Non-fiction and memoir are determined by fiction’s need for a story, and for that story to need a reason to be told.

Good code is like that. Code is written by people for people. If all we cared about was writing instructions for machines we’d have no need for any of the high-level languages we use today. Don’t believe me? Quick, tell me what this does:[1](#footnote-1UN0)

```python
reduce((lambda r,x: r-set(range(x**2,n,x)) if (x in r) else r), range(2,int(n**0.5)), set(range(2,n)))
```

_Yea_. How about if we wrote it like this:[2](#footnote-2UN0)

```python
def SieveOfEratosthenes(n):
    prime = [True for i in range(n + 1)]
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p ** 2, n + 1, p):
                prime[i] = False
        p += 1
    prime[0]= False
    prime[1]= False
    for p in range(n + 1):
        if prime[p]:
            print(p),
 
if __name__=='__main__':
    n = 30
    print("Following are the prime numbers smaller")
    print("than or equal to", n)
    SieveOfEratosthenes(n)
```

So why don’t we ever think of writing good stories when we write code?

For one, good programmers generally program for a living. And programming for a living means more than writing code. It means getting things done. It’s factory work. Maybe we shouldn’t think ourselves creatives.

But, I think Pressfield would disagree. While he doesn’t write much about programming, _per se_, he does briefly mention that code is a creative process. And he devotes the first full quarter of the book to talking about his time writing ad copy and writing screenplays, two professions where business needs and artistic desire clash.

I don’t know that there needs to be a choice between writing code that _just works_ quickly to solve real world problems, and choosing to write that code in a way that feels like a story.

I also don’t know what that looks like, but I think I’m going to start writing it that way and see what sticks.

---

1. [https://wiki.python.org/moin/Powerful%20Python%20One-Liners](https://wiki.python.org/moin/Powerful%20Python%20One-Liners). This one-liner needs its own slider. I think that helps prove my point, no?[↩︎](#ref-1UN0)
2. [https://www.geeksforgeeks.org/python-program-for-sieve-of-eratosthenes/](https://www.geeksforgeeks.org/python-program-for-sieve-of-eratosthenes/), edited out some comments as it messed with pages markdown, and updated to python 3 prints[↩︎](#ref-2UN0)
Setting up your first Spring Boot app
Tags: java, spring, springboot
Published: 2021-10-15 00:30:48

Link to the story: https://mmafrar.medium.com/setting-up-your-first-spring-boot-app-e3a42362677f

Spring Boot being one of the popular choices for building micro-services, I’ll be covering how to set it up on this tutorial. You need to have a basic understanding of Java terminologies to get started.

Cover Image: Photo by [Sarvenaz Sorour](https://unsplash.com/@sarvenazsorour) on [Unsplash](https://unsplash.com)
October 14th, 2021: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2021-10-15 00:26:09

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

<center>

![Image of the brain](https://media.giphy.com/media/ojmB7lOn3VUU8/giphy.gif)
</center>

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}
<!--
And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{%link https://dev.to/devteam/what-was-your-win-this-week-4h3g %}

<center>

![Little kid making a fist as if to say "Yes!"](https://media.giphy.com/media/6brH8dM3zeMyA/giphy.gif)
</center>
-->
Photo by <a href="https://unsplash.com/@qmikola?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Mikołaj</a> on <a href="https://unsplash.com/s/photos/book?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
SPO600 Week 4  String & Char reflection
Published: 2021-10-15 00:20:17

Hello everyone, welcome back to the 4th week of SPO600(Software Portability and Optimization) reflection and extra exploration blog! In this blog, I'm going to share some thoughts and dig more about the character, string in assembly language. 

##Characters##
First of all, let's see an example!
```
define		SCREEN	  $F000 		;Set the Screen
	 	LDY #$00			

DRAW_1_CHAR: 	LDA STRING, Y			;Load the String starts from y = 0
		BEQ DONE			;If the character equal to zero, then jump to done	
		STA SCREEN, Y			;Load character onto the screen 	
		INY				;Increase Y to read next char
		BNE DRAW_1_CHAR			;If the STRING is not over, go back to the start
DONE:		BRK	
		
STRING:
dcb "H", "e", "l", "l", "o", $0D		;The string to print
```
In this little program, I am going to read each character from the STRING below then print them on the screen. 
First, we need to set up the start location to be  $F000.
```
define		SCREEN	  $F000 	
```
Next, We set the register to be 0 for the next loop.
In this loop, all we want to do is read a character from the string and store it into the screen memory. After it, we increase the Y value and run the loop to access the next character in the STRING. when the STRING is empty, we jump out of the loop.
At the end, the result is:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sxsyk27amtpoblvhozku.png)
 
 
Now, Let's get one more thing.
```
define		SCINIT		$ff81 ; initialize/clear screen
define		CHRIN		$ffcf ; input character from keyboard
define		CHROUT		$ffd2 ; output character to screen
define		SCREEN		$ffed ; get screen size
define		PLOT		$fff0 ; get/set cursor coordinates

		JSR SCINIT 		;Reset the screen
PRINT_STRING: 	LDY #$00

DRAW_1_CHAR: 	LDA STRING, Y
		BEQ DONE
		JSR CHROUT		;Pass each of the characters to the character out routine
		INY			
		BNE DRAW_1_CHAR	
DONE:		JMP PRINT_STRING	
		
STRING:
dcb "H", "e", "l", "l", "o", $0D
dcb "W", "o", "r", "l", "d","!",13
dcb 13
```
In this new program, we add a new loop PRINT_STRINGS to keep printing the string on the screen. An the result is: 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iazasdpcx3obvabskbr4.png)

My reflection:
This week we learned how the string and character works in 6502 assembly language. The characters are encoded in binary by numeric reference to a character in a character set. For example, It uses 32 to represent space, 48 represents 0, etc. In 6502 assembly language, string in assembler is stored as sequences of bytes like the example above, it also requires the programmer to deal with the memory as usual.
Lab3 Math Lab
Published: 2021-10-15 00:19:57

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o33uwjzlniv7ayclpgz8.jpg)
Hello, My friend. This blog is about the third lab for SPO666. In this lab, we are going in to create a pong game by using 6502 assembly language.
This is our work so far, I will uploaded when we finished the lab.
```
define POINTER $10
define POINTER_H $11
define POSITION $30
define ROW $20 ; current row
define COL $21 ; current column

; constants
define DOT $01 ; dot colour
define PADDLE $01 ; paddle colour

setup: lda #$0f ; set initial ROW,COL
sta ROW
lda #$0F
sta COL
lda #$20
LDA #05
STA POSITION

draw: lda ROW ; ensure ROW is in range 031
and #$1f
sta ROW

lda COL ; ensure COL is in range 031
and #$1f
sta COL

ldy ROW ; load POINTER with start-of-row
lda table_low,y
sta POINTER
lda table_high,y
sta POINTER_H

ldy COL ; store CURSOR at POINTER plus COL
lda #DOT
sta (POINTER),y




;SET A PROINTER TO THE BOTTOM-LEFT CORNER
LDA #$EC
STA POINTER
LDA #$05
STA POINTER_H

; STORE THE POSITION TO THE POINTER
LDA POINTER
CLC
ADC POSITION
STA POINTER

LDA #$01
LDY #$00
loop:
STA (POINTER),Y
INY
CPY #$07
BNE loop

getkey:lda $ff ; get a keystroke

ldx #$00 ; clear out the key buffer
stx $ff

cmp #$43 ; handle C or c
beq clear
cmp #$63
beq clear

cmp #$80 ; if not a cursor key, ignore
bmi getkey
cmp #$84
bpl getkey

;pha ; save A

;lda #POSITION ; set current position to POINTER
;sta (POINTER),y

;pla ; restore A

cmp #$81 ; check key == RIGHT
bne checkL

inc POSITION ; ... if yes, increment POSITION
jmp done



checkL: cmp #$83 ; check key == left
bne done

dec POSITION ; ... if yes, decrement POSITION
clc
bcc done

clear: lda table_low ; clear the screen
sta POINTER
lda table_high
sta POINTER_H

ldy #$00
tya




c_loop: sta (POINTER),y
iny
bne c_loop

inc POINTER_H
ldx POINTER_H
cpx #$06
bne c_loop



done: clc ; repeat
jmp draw

; these two tables contain the high and low bytes
; of the addresses of the start of each row
table_high:
dcb $02,$02,$02,$02,$02,$02,$02,$02
dcb $03,$03,$03,$03,$03,$03,$03,$03
dcb $04,$04,$04,$04,$04,$04,$04,$04
dcb $05,$05,$05,$05,$05,$05,$05,$05,

table_low:
dcb $00,$20,$40,$60,$80,$a0,$c0,$e0
dcb $00,$20,$40,$60,$80,$a0,$c0,$e0
dcb $00,$20,$40,$60,$80,$a0,$c0,$e0
dcb $00,$20,$40,$60,$80,$a0,$c0,$e0
```
Week2 SPO600 von Neumann architecture
Published: 2021-10-15 00:18:37

Hello everyone, welcome back to the second week of SPO600(Software Portability and Optimization) reflection and extra exploration blog! In this blog, I'm going to share some thoughts and dig more about von Neumann architecture.
##von Neumann architecture##
![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Von_Neumann_Architecture.svg/1200px-Von_Neumann_Architecture.svg.png)
##How it works##
The von Neumann architecture is a [computer architecture](https://en.wikipedia.org/wiki/Computer_architecture) which was described by [John von Neumann](https://en.wikipedia.org/wiki/John_von_Neumann). The von Neumann model is designed for electronic [digital computer](https://en.wikipedia.org/wiki/Computer#Digital_computers) with 5 units.
1. A processing unit which contains an [arithmetic logic unit](https://en.wikipedia.org/wiki/Arithmetic_logic_unit) and [processor register](https://en.wikipedia.org/wiki/Processor_register). The processing unit is used to process calculation and logical operation, then temporarily store them into a register.

2. A [control unit](https://en.wikipedia.org/wiki/Control_unit) that contains [instruction register](https://en.wikipedia.org/wiki/Instruction_register) and [program counter](https://en.wikipedia.org/wiki/Program_counter). Control unit is used to control and direct the procedure of a program then process the result of processing.

3.Input mechanisms, such as keyboard, mouse.

4.Output mechanisms, such as monitor, printer. 

5.Memory which stores data and instructions.

The instruction and data of von Neumann architecture uses a binary system, they are stored in the same register that could be accessed by using an address. The instruction is a composition of [opcode](https://en.wikipedia.org/wiki/Opcode) and address code. The opcode is used to represent the type of the operation, and the address code is used to represent the location of the operands in the memory. Usually, instructions are stored in order in the memory. For a certain situation, the execution order can be changed according to the operation results or the set conditions. The machine takes the [arithmetic logic unit](https://en.wikipedia.org/wiki/Arithmetic_logic_unit) as the center, the data transmission between input and output devices passes the arithmetic logic unit.

Because the arithmetic unit and control unit are closely intertwined in logic and circuit structure. Usually, they are collectively referred as the [central processor unit](https://en.wikipedia.org/wiki/Central_processing_unit), the input and output devices known as I/O devices, so the modern computers can think to be a composition of three parts: CPU and the main memory can be referred to as the host, I/O devices are usually called external devices.
When VSCode/OmniSharp Stop Working
Tags: c, visualstudiocode, vscode
Published: 2021-10-15 00:14:40

---
title: When VSCode/OmniSharp Stop Working
published: true
date: 2021-10-15 00:06:36 UTC
tags: C,VisualStudioCode,vscode
canonical_url: https://jamienordmeyer.net/2021/10/14/when-vscode-omnisharp-stop-working/
---

I’ve run into issues a couple of times now when working in Visual Studio Code where OmniSharp seems to lose itself. Intellisense isn’t working, nor are the CTRL+. operations working. I’ve tried restarting OmniSharp, restarting VSCode, and even restarting my computer, but nothing seems to get it working again.

There are two issues that I’ve found that will cause this behavior. The first happens when you’re working with a .sln file at the root of your project. You’ll likely notice that SOME of your projects are working fine with OmniSharp. Intellisense is working, you can “Goto definition” without any issues, and so forth. However, there are one or more projects that simply refuse to work. In this case, the first thing to check is whether or not your project has been added to the .sln file. Visual Studio “proper” does this for you. However, VSCode requires an extension, or that you use the `dotnet` CLI directly. You can add a missing project to your .sln file with the following command from the same directory where the .sln file exists:

`dotnet sln add <<relative_path_to_csproj>>`

The second issue was more frustrating to figure out, and when I did, I had a _forehead slap_ moment. Even though I had added the project to my .sln file, OmniSharp still wasn’t working with it. And it had previously been working fine. It had stopped working all of a sudden for no apparent reason.

In the bottom left-ish of VSCode you’ll see a flame button (this represents OmniSharps status), and just to the right of that is a label that shows the root project OR solution that OmniSharp is currently paying attention to.

![](https://jamienordmeyer.net/wp-content/uploads/2021/10/image-1.png)

I’d accidentally set this to one of my projects under the solution, rather than on the solution file itself. When that happened, only that project was working with OmniSharp. Once I reset it back to the solution file, BOOM, everything began working correctly again.

So, in summary, if your OmniSharp isn’t working correctly:

1. Verify that your .csproj files are all included in the .sln file (if you’re using a .sln file)
2. Verify that OmniSharp is configured to be rooted on your .sln file, and not one of the .csproj files

Happy coding!
Estrutura de um Projeto React
Tags: react, javascript, beginners, programming
Published: 2021-10-15 00:01:03

Quem nunca teve um pouco de dificuldade para entender cada pasta e arquivo de um projeto? Então, meu objetivo aqui é esclarecer um pouco qual a funcionalidade de alguns diretórios.

## Package.json

É aqui onde encontramos as principais informações do projeto, como:

- Nome
- Versão
- Arquivo de inicialização
- Licença
- Dependências

## Node Modules

Assim como o package.json, está presente em todos os projetos javascript. É nessa pasta que fica armazenado todos os códigos das dependências que instalamos em nossa aplicação.

Inicialmente podemos estranhar o tamanho da pasta se comparado ao que está sendo declarado no package.json, mas isso ocorre pois as dependencias do nosso projeto também possuem dependencias e isso vai causando um efeito cascata, um depende de outro e assim por diante.

O comum é deixar o node_modules dentro do .gitignore, pois as dependencias já estão declaradas dentro do package.json, logo não é necessário que a pasta seja traqueada 

## SRC

Todo o código criado por nós deve ficar nessa pasta source
Onde encontramos o código bruto

## Public

Aqui fica os aquivos públicos,arquivos que precisam ser acessados pelo meio externo, como os assets e o index.html


## Babel

Ferramenta que converte o código para uma maneira que todos os browsers e todo ambiente da nossa aplicação consiga entender. Isso é necessário, pois o JS é uma linguagem que se atualiza muito e o React possui muitas funcionalidades que o navegadores ainda não consegue entender, então assim o babel compila para versão compatível com todos os navegadores.

## Webpack

Na maioria das vezes é utilizado juntamente do babel

Estipula uma series se configurações(Loaders) que ensinam a aplicação a tratar cada tipo de arquivo(.png, .sass, .jpg, js) que pode ser importado e assim os converte para arquivos entendíveis pelo browser.

## Source Maps

Forma de conseguir visualizar o código da aplicação mesmo quando o código está tofo bagunçando do bundle.js

## Sass

Pré processador de css que nos permite ter mais funcionalidades, como:

- Encadeamento
- Clarear
- Escurecer
Can we parallelize agile?
Tags: agile, scaledagile
Published: 2021-10-22 10:08:06

---
title: Can we parallelize agile?
published: true
date: 2021-10-15 00:00:00 UTC
tags: agile,scaledagile
canonical_url: https://jhall.io/archive/2021/10/15/can-we-parallelize-agile/
---

Yesterday I [made the case](https://jhall.io/archive/2021/10/14/can-we-scale-agile/) that agile software development cannot grow to large scales. But obviously we have many companies with multiple agile teams. What gives?

While it may not be possible to _scale_ agile, it’s certainly possible to run multiple agile teams in _parallel_.

Each team must have its own autonomy (i.e. be self-organized). Each team should talk to customers, etc. Each team should reflect on how it can improve, etc. Everything that the [agile manifesto](https://agilemanifesto.org/) talks about.

How is this different than scaling agile?

That’s a great question. And to some extent, it does boil down to semantics. But I think the semantics are important here, because they are so frequently (usually) lost entirely.

In my mind, “agility” boils down to two closely related things:

1. The ability to change quickly.
2. The ability to make decisions locally (which is really just the key enabler for #1).

Frameworks which seek to organize agile teams tend to (in my experience) inhibit both of these, and thus are failing to “scale” agile. That’s not to say all frameworks are bad, but by design, they seek to limit freedom (ideally, in a good way). The danger thus comes when a framework begins to limit, rather than enable, agility. It’s like the story of the [Goose that Laid the Golden Eggs](https://en.wikipedia.org/wiki/The_Goose_that_Laid_the_Golden_Eggs): the very attempt to replicate the object of desire destroys that which we desire.

Obvoiusly, there are large companies that are successfully achieving agility on many teams (or at least they purport to do so). What makes these companies successful?

I believe it’s the fact that each team, individually, is being agile. It’s agile in parallel, not agile at scale.

The book [_Team of Teams: New Rules of Engagement for a Complex World_](https://amzn.to/3oXNdRR) is a good case study of this sort of “agile in parallel” concept in practice, in the context of a number of large organizations, from the US Military to NASA.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Postmortem Debugging in pytest
Tags: python, pytest, debug
Published: 2021-12-03 18:38:54

---
title: Postmortem Debugging in pytest
published: true
date: 2021-10-15 00:00:00 UTC
tags: python, pytest, debug
canonical_url: https://tech.serhatteker.com/post/2021-10/postmortem-debugging-pytest/
---

If you'd like to debug your code/test if *only* it throws an *error* run:

```bash
$ pytest -x --pdb
```

This will put you into `pdb` on the **first** failure.

`-x` flag makes `pytest` stop on the first failure. If you want to invoke the `pdb` on every failure -I dont' think, run without `x` flag:

```bash
$ pytest --pdb
```

For more info you can look at: [pytest failures]


All done!




[pytest]: ttps://docs.pytest.org/en/latest/contents.html
[pytest failures]: https://docs.pytest.org/en/latest/how-to/failures.html