teleren/devto huggingface dataset:
I Want to Delight my Customers! ✴️
Tags: career
Published: 2022-11-03 00:16:36

The modern day enterprise Developer is wrapped in bodies of thick insulation, literally bodies as you churn through tickets from up high, your manager, seniors and lead are taking the flack and deflecting the pain onto themselves and you have to think... I'm glad it's not me, let me fix this bug.

It wasn't forefilling, I measure my success on promotion and I wasn't really getting promoted.. I'm starting to see why, it's clear to me now that I tried too hard and I didn't care about the customer it wasn't my job, you might be like me, saying "I care about UX" not realising this is actually a way of saying I care that this product doesn't annoy *me*

I moved away from being a traditional developer for this reason, no more insulation, no more not understanding the motivations from on high, endless ceramony adding complexity, cognitive load and stress, I have been a consultant for 2 years, here's what I learned.

## One shot
⭐ When you meet with a customer you have one shot to hear what they have to say, so open your ears, it's handy to know some tricks to defer responces but you won't get another chance to hear the brief, so ask questions and take notes as you talk, it's okay to say I'm taking notes.

⭐ Bring a glass of water, it's kind of like a job interview after all.

⭐ As the expert on the subject of the product, you become the defacto product lead on this specific subject so act like it and lead.

⭐ It's okay to say no

⭐ Tripple your estimates and have a personal goal to achieve it in 20% of the time

⭐ Never give a precise answer to the question how long will it take! Only a breakdown of how to get to that point

⭐ I care about the customer, but I also want to see them succeed, I need to know thier plans and recommend approaches that might be contrary to Thier suggestions

Where do I go from here? Soon I'm going back to development with the confidence that I can lead, I will be looking into this type of role in the future, but can I just say, this wasn't a linear path, a career like this taught me a lot about the entire company I work for and I wonder maybe your trying to go in straight lines and maybe you need to wobble?
Cryptopals challenge #38: purpose clarification
Tags: cryptopals, srp
Published: 2022-11-03 00:01:55

This text focus not on the solution for the challenge, but on the point of the challenge itself.

As soon as I completed #38 I checked others solutions, as I didn't feel like I grasped everything this challenge offered. It turned out that I went very close to others path: confusion, modular math, seeking the point of the challenge. And when I was out of things to squeeze out it, tried to find a more reasonable solutions...

This time without examples, since people could be quite defensive regarding their solutions. But let's get to the questions: what are we really asked to do in this one. 

So in the end of the day I concluded that I mostly miss the point of the challenge.

I was puzzled why was it proposed to play with _b_ value, as it's private. And then found a very suitable [link](http://srp.stanford.edu/ndss.html#SECTION00032300000000000000) which makes things very explicit. (Kudos to [the one who left this link in his solution.](https://github.com/rjpdasilva/cryptopals/blob/d322930cc94cfde28239b9738e8cd36e304532ea/src/cp_test_c38_attacker.py#L23))

Most of my solution was based on "simplifications" using modular arithmetic. But... It doesn't make sense to play with the parameters, as dictionary attack doesn't rely on it at all. (The confusion that is found in many solutions...)

After reading the linked section it turns out that it's expected not to _simplify_ calculations with parameters, but to pass the server validity check ([an example]), without which the dictionary attack would be **plainly impossible,** since the client would reject guesses!
[an example]: https://docs.rs/srp/0.6.0/srp/client/struct.SrpClientVerifier.html#method.verify_server

My previous solution already traveled this path: for zero-key challenge I was required to comment out [safeguards](https://docs.rs/srp/0.6.0/src/srp/client.rs.html#193) in the lib. 

So in a more realistic setting most of _simplifications_ would just lead to kind of "SrpAuthError::IllegalParameter". 

PS
Good passwords are still able to save the day in many cases. From the first of SRP challenges I used a random password, which boiled down this one to brute force, keeping client pretty secure even with MITM.
Specify Geolocation for Cypress tests - LambdaTest
Tags: cypress, testing, e2e, lambdatest
Published: 2022-11-03 00:00:07

If you're using a tool like [LambdaTest Cypress Automation](https://www.lambdatest.com/cypress-testing) to execute your Cypress tests as part of your pipelines, you may eventually require the environment your tests are running on to mock certain Geolocations which your tests are dependent on.

Luckily, with LambdaTest, [this is possible](https://www.lambdatest.com/list-of-geolocation) however it is not clear in their documentation on how to turn this on!

After consulting with their handy tech support, the following is how we can specify Australia as the Geolocation of the machine LambdaTest runs our Cypress tests on:

Inside `lambdatest-config.json`:
```
"run_settings": {
	...
	"geo_location": "AU",
	...
}
```

It is unclear what ISO standard that LambdaTest uses for their `geo_location` field, but [ISO 3166-1 (Alpha-2)](https://gist.github.com/tadast/8827699) is a good bet.
Can I stop forgetting to update my OpenAPI docs?
Tags: javascript, openapi
Published: 2022-11-02 23:54:56

"Did you remember to update the OpenAPI docs for that API endpoint you modified earlier today?", says my brain at three in the morning. I decide to put a book on the floor so when I get up I'll see it and remember. Then, when I wake up: "What the heck is this book here for?"

I have been using OpenAPI (Swagger) docs for my Node.js APIs for quite some time. All that time I have been using [JSDoc](https://www.npmjs.com/package/swagger-jsdoc) to define the swagger specs for my endpoints and the schemas that they accept and return. This has worked very well except for the fact that whenever I add a new field to a model in my API I tend to forget to add it to the docs.

Earlier this week I discovered the [Joi npm package](https://joi.dev/) while reading through the [ArangoDB docs](https://www.arangodb.com/docs/stable/foxx-getting-started.html). A light bulb immediately went off in my head. Can I use Joi to validate inputs AND generate OpenAPI specs?  Fortunately the answer is yes, and the setup is very simple.  See the code setup here : [https://github.com/aaronblondeau/joi-swagger-express/blob/main/index.js](https://github.com/aaronblondeau/joi-swagger-express/blob/main/index.js)
OSD600 Lab 6
Published: 2022-11-02 23:50:16

For our 6th lab we were asked to take a look at Docusaurus, and try to implement one of its features. 

Docusaurus is essentially a tool that developers can use to create aesthetically pleasing documentation, without worrying too much about building a website from scratch. 

In their own words, one of their goals was "_To put the focus on writing good documentation instead of worrying about the infrastructure of a website_".

Honestly, it was relatively easy to get a Docusaurus site built up from scratch. Mine can be found [here](https://rokaicker.github.io/SSGDocs/).

I decided to implement the "Sidebar"/ table of contents feature. Admittedly, I got a little busy in my personal life and wasn't able to dedicate too much time to this, so it's more of a proof of concept right now. But I did manage to get it working, in that my tool is able to generate a complete working table of contents based on the input folder that is selected. 

The commit for this feature can be found [here](https://github.com/rokaicker/StaticSiteGenerator/commit/940e4bf9c5161554d3d4f9a4c6e76ffa31c50da5).

I definitely haven't been able to make this tool as good I want to, but I think I'll be able to improve it in the upcoming weeks.
Prettier & ESlint
Tags: vscode, javascript, opensource, github
Published: 2022-11-02 23:34:03

This is the first week after coming back from the study week. And we have our Lab 7 in this week. Lab 7 is not about coding new stuff or contributing on other people's repository. Lab 7 is about formatting the code we have from the SSG or in layman's terms making it look better.

### Main Extensions
There are two main extensions that I chose to use in Lab 7. First is prettier, which is an opinionated code formatter. Second is ESLint which is a static code analysis tool for identifying problematic patterns found in JavaScript code.

### Process
The lab itself was simple, though it did take time. I started to watch the video that our professor provided. I learned how effective prettier and ESLint would be for any programmers. With prettier, it can help us keep a same formatting when we coding with a huge team project. With ESLint it would save us a lot of time since they are very good at finding those tiny mistakes.

#### Setting Up
I installed prettier first using:
`npm install --save-dev --save-exact prettier`
and created a `.prettierignore` to ignore files that don't need modification, and to run prettiere in the commandline type `npx prettier --write .`

I then installed ESLint using:
`npm init @eslint/config`
to run ESLint type in the command line `npx eslint yourfile.js` or `yarn run eslint yourfile.js`

My main issues were when I just finished downloading ESLint and use the command in  the command-line. Some errors popped up but my program was working as intended. So I had to do some digging around and find out what those issues were. though I couldn't for one of the issues so I set it to ignore only that line. It took a while to fix all the issues that were brought up. 

Another issue that arose was when I ran lint on a single file. Commit the issues and push them but forget to run prettier after all the ESLint modifications. Though this was easily fixed by committing a second time, with the modifications.

### Integration
In VS Code there are multiple extensions that can be downloaded, two of which included ESLint and Prettier. One particular extension runs both of these being this app [here](https://marketplace.visualstudio.com/items?itemName=rvest.vs-code-prettier-eslint)
### Thoughts

In a sense this lab is not exactly complicated when it comes to the steps. But it does get tricky depending on the code, due to the differences in everybody's. It's strict around the smaller issues and a single issue could take quite a bit of time to fix. Sometimes even a difference between a single quote or a double quote can be an issue.
Should Open Source be a rite of passage for developers?
Tags: opensource, programming, devops, agile
Published: 2022-11-02 22:53:16

{% youtube x4pujqPvM08 %}

Open source is a vast resource that many developers are turning to, but what is the best way to get into it? John Coghlan, Sr. Manager of Developer Evangelism at GitLab, joins Dev Interrupted to discuss how to get started contributing to open source projects and why that matters in today's world. Watch the full episode with host Dan Lines here ► https://www.youtube.com/watch?v=aMFheaDFzjg

### *Engineering Insights before anyone else....*
*The Weekly Interruption is a newsletter designed for engineering leaders, by engineering leaders.*

*We get it. You're busy. So are we. That's why our newsletter is light, informative and oftentimes irreverent. No BS or fluff. Each week we deliver actionable advice to help make you - whether you're a CTO, VP of Engineering, team lead or IC  - a better leader.*

*It's also the best way to stay up-to-date on all things Dev Interrupted - from our podcast, to trending articles, [Interact](https://devinterrupted.com/event/interact/) & our [community Discord.](https://discord.com/invite/devinterrupted)*

[***Get interrupted.***](https://devinterrupted.com/subscribe/)

![Subscribe to the Weekly Interruption](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/81b4hu463juqwf1bixfe.png)
CPU-Simulator Portfolio Project CS104: Computer Architecture!
Published: 2022-11-02 22:51:56

This is the last steps to complete the Codacademy's module CS104: Computer Architecture.

The idea of this project is to design and implement a working Python program that simulates the inner workings of a CPU.

Project Objetives:

- Create classes that mimic the functionalities of a CPU, cache, and memory bus.
- Fetch and parse instructions from an input file.
- Fetch and parse initialization values for the Memory Bus from a separate input file.
- Send CPU instructions and initial Memory Bus values to the CPU and Memory Bus, respectively.
- Provide console output to the user documenting the stages of input processing.


Of course it can be improved, and I will continue adding more instructions to the program.

https://github.com/Othamae/CPU-Simulator

Thanks!!
How to invert color with bootstrap 5.2
Tags: tutorial, html, bootstrap, webdev
Published: 2022-11-02 22:41:07

Just use the `.btn-close-white` class in the component that you want to invert the color.

Bootstrap's docs says that "This class uses the filter property to invert the background-image".

Note that it also adds two more filters, grayscale and brightness, so it may be not suitable in all cases.

##### SASS
```
$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
```

Source: [https://getbootstrap.com/docs/5.2/components/close-button/#white-variant](https://getbootstrap.com/docs/5.2/components/close-button/#white-variant)
Git has 157 commands
Tags: git, ux
Published: 2022-11-02 22:18:51

Git has no fewer than 157 built-in commands. No wonder it's considered hard to learn.

I've been using Git for > 10 years and there are total surprises for me here.

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

Did you know that `git instaweb` opens a bare-bones repo viewer in your browser?
Strategies for beginners in open-source contribution
Tags: discuss, beginners
Published: 2022-11-02 22:12:31

---
title: Strategies for beginners in open-source contribution
published: true
description: 
tags: discuss, beginners
# cover_image: 
# Use a ratio of 100:42 for best results.
# published_at: 2022-11-02 12:14 +0000
---

### How do we choose a project?
The chances of encountering a bug in the library are too low.
What motivates you to commit to a project?

### How to find a relatively easy issue?
I'm often told to start by fixing typos, but can you find such a thing?
Is it a good way to find something that looks easy from an already existing issue?
[Conceito] - Funções Puras vs Determinísticas
Published: 2022-11-02 22:08:57

> Conteúdo original em https://twitter.com/zanfranceschi/status/1587928641291227136

---

Ei dev,

Uns dias atrás, vi alguns comentários por aqui sobre a diferença de FUNÇÃO PURA e FUNÇÃO DETERMINÍSTICA.

São a mesma coisa? Você sabe definir esses dois conceitos?

cc @sseraphini

bcc @otaviolemos @coproduto

↓

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

---

FUNÇÃO DETERMINÍSTICA:

É uma função que, dada certa entrada, SEMPRE vai produzir o mesmo resultado. Simples assim.

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

---

Antes de definir função pura, é necessário entender o que é EFEITO COLATERAL ("side effect" in english).

EFEITO COLATERAL, em ciências da computação, é alguma mudança (efeito) observável fora (colateral) do escopo ou ambiente da execução de um programa.

---

Ou seja, por exemplo, qualquer operação de I/O (rede, arquivo, stdin, stdout, etc.) causa um efeito colateral em um programa. Ler a data/hora do sistema, um número aleatório, modificar ou ler uma variável global também são considerados efeitos colaterais, blz?

---

É muito comum a gente ver a definição de efeito colateral como algo que CAUSA uma mudança externa da perspectiva de quem executa. Mas é válido a gente pensar também da perspectiva de quem SOFRE com a mudança (leitura dum valor aleatório, p.ex.). Suave?

---

Então vamos lá...

FUNÇÃO PURA:

É uma função DETERMINÍSTICA que NÃO CAUSA (OU SOFRE COM) EFEITOS COLATERAIS.

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

---

"Pô, mas vc colocou o mesmo exemplo da função determinística, seu baiter safado?!?!" 🤭

Sim! Uma função pura é determinística e sem efeitos colaterais, mas uma função determinística PODE não ser pura. Ou seja, ela PODE causar ou sofrer com efeitos colaterais.

---

Olha esse outro exemplo de uma função determinística. Ela sempre vai retornar o mesmo resultado dadas as mesmas entradas, mas escrever no stdout é considerado um efeito colateral, pois altera um estado externo.

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

---

Uma informação legal:

Uma forma de validar a pureza duma função é verificando se ela é transparente referencialmente. Se for, é pura.

Dá uma olhada nessa thread se tiver dúvida sobre o que é transparência referencial.

https://twitter.com/zanfranceschi/status/1586379168719073281

---

Resumindo todo esse rolê:

- Função determinística sempre retorna o mesmo resultado dadas as mesmas entradas, mas ela PODE causar ou sofrer com efeitos colaterais.

- Função pura é uma função determinística SEM efeitos colaterais ─ é uma função referencialmente transparente.

---

É isso!

Queria mandar um abraço especial ao @otaviolemos e ao @coproduto pela discussão inicial sobre o assunto! 💕

E obrigado a você também que leu até aqui!

Bjs e abraços. 😗 🤗
Please stop using create react app.
Tags: react, webdev, vite
Published: 2022-11-02 22:07:12

Instead, use vite.

### You probably heard: "*create react app sucks*".

##### But why? Let's start from zero.

#### You can create a react app in different ways:
* **create-react-app** and **vite**

### But why not use **create react app**?
#### Bruh, because it's simply deprecated. Like nobody uses that thing in 2022.
##### Well, yes, millennials do that.

#### Now seriously:
* **Slower loading speeds**
* **Bad optimized SEO**
* **No ability for staging production builds**
* **Hard to configure if you dislike the default configuration**

![that sucks dude - kyle broflovski](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8cixh4iqhxks3gnyryv.gif)

### What to use instead?
Some tools like **Vite**. I use that thing. It just... **works**. I love it.

#### But why?
Vite has **templates** and **plugins** that you can install as project dependencies or use them. You can find a list of that and more [here](https://github.com/vitejs/awesome-vite).

![clapping leonardo dicaprio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2wntvc7lp3j64a3qn97h.gif)

### Conclusion
Don't waste your time using that thing called  "create-react-app", get rid of that, and use **Vite** 🎉!

![okay i like that](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/on6bwr2txqaqlbx38xqj.gif)

#### You can help me if you follow me in
* [Github](https://github.com/RotrixLOL)
* [Twitter](https://github.com/RotrixLOL)

Seriously. It's free. Please star some repos.

#### And that's it, if you liked it, give a reaction or comment.

##### Follow me here if you liked this.

#### ✨Have a nice day!
Testing console input and output in .NET with xUnit and Fluent Assertions
Published: 2022-11-02 22:05:19

Testing is one of the most effective ways to deliver quality in software.

Recently, I've been asked to create and test console apps. However, there is not much material on the web (at least, I haven't found much) about testing console applications in .NET.

So, in order to maybe help someone out there, I decided to write some things I've learned.

First, we have a project that greets an user:

![Source code in C# that shows a method that greets an user](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1y5tevjojyh4rjdsge5o.png)

Very simple, right? But how can we test it? They're void methods, so we can't assign them to variables. How do we circumvent it?

There is an object called StringWriter on System.IO, and that's what we will use as a variable for comparison.

The test for the first method would be something like this (with xUnit and FluentAssertions):

![Source code for the test](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvl6wf0ge0kzaojy4y7c.png)

What about user input? For that, we can use the StringReader object:


![Source code for the test](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qzauf1j2uje9vt20cew.png)

Thanks for reading!
Simple Mortal Kombat
Published: 2022-11-02 22:04:37

Just made a little class coding game inspired from Mortal Kombat that does basic user number input to select characters, final kill moves, enhancements, attack moves, and if they want to block when fighting. I think Mortal Kombat is really cool so just wanted to create a little code at my level inpired by Mortal Kombat. 
In this code attatched, I have two classes that interact with each other and a couple functions that go about the basic moves and functions of Mortal Kombat. My class Character has some important attributes including a list of 9 characters, a dictionary of character attack moves as well as final kill moves; then three functions that allow users to select their character, final kill move, and their characters enhancement of extra strength or health. My other class Fight allows users to fight using attributes selected from Character and using three functions; attack_other_player where they select their attack move and decrease the other players health, attack_and_block allowing a user to select an attack move but not affect their health since the other player blocked, and block_attack that will just print that both players blocked. In the user input area used a while loop to allow users to attack and block until one or both user's health is at or below 30 points and allows the user with higher health to use their final kill move and win the game. Let me know any notes or comments about the code and if I should make any changes, hope y'all like it. :) [](https://hannahpenado.github.io/python_projects/)
Day 649 : America
Tags: hiphop, code, coding, lifelongdev
Published: 2022-11-02 22:01:41

_liner notes_:
- Professional : Had a couple of meetings. Applied some changes to the UI of a demo application based on feedback. Pretty much spent the rest of the day working on my hackathon project. Got a pretty big part functional and working on another part.

- Personal : Last night, I basically did some research for my hackathon project and finalized my healthcare plan. Why is healthcare so complex and confusing in America.

![Aerial view of a mountain range in Brecon, United Kingdom](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eicwigtb45m1sz9heh7a.png)

Almost forgot that it's a whole new month and I need to pay my bills. haha Going to do that and then work back on my hackathon project. May watch some anime as well.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube owfqxB31roU %}
Best Mastodon servers...go 🦣
Tags: socialmedia, mastodon, fediverse, discuss
Published: 2022-11-02 21:37:53

The social networking site [Mastodon](https://joinmastodon.org/) has seen a huge boost in popularity this week due to the high-profile change in Twitter leadership. Since Mastodon is federated, there are various servers to be joined and engaged with, each with their own topics and vibes. 

[mastodon.social](https://mastodon.social/home), the only server (I think?) actually run and moderated by the folks behind Mastodon, has been a little laggy and overrun as an influx of Twitter defectors arrived this week. It's also a very generalized space, with nearly each local post in my feed addressing a different topic.

So, devs! I want to know what your favorite Mastodon servers are for programming, development, and tech-related topics. Drop your thoughts in the comments and help us all out. 🦣