teleren/devto huggingface dataset:
Refactoring itself is worthless
Tags: refactoring
Published: 2022-08-13 11:40:57

---
title: Refactoring itself is worthless
published: true
date: 2022-02-25 00:00:00 UTC
tags: refactoring
canonical_url: https://jhall.io/archive/2022/02/25/refactoring-itself-is-worthless/
---

How often do you find yourself refactoring code?

Why?

Refactoring, [by definition](https://martinfowler.com/bliki/DefinitionOfRefactoring.html) makes no change to the behavior of your code.

This seems to bother some people in interesting ways. In particular, I see people treating code refactoring as if it had customer-facing value.

Have you ever seen a “user story” about refactoring?

Have you ever thought or said “If this code needs to be refactored, QA will let me know”?

Has anyone ever said “We have a bug, refactoring will fix it”?

These are all examples of conflating refactoring with user-facing value.

If the change your making has _direct_ customer impact, it’s not a refactoring. If it adds functionality or improves performance, then it’s not a refactor. If it is a refactor, it _only_ changes the code structure.

So why bother with refactoring if it provides no direct customer value?

We refactor code to “to make it easier to understand and cheaper to modify”.

In other words, from an end-user standpoint, refactoring is _always_ about the secondary effects. It’s about what it enables us to do later, not about what the refactoring itself does.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Azure Functions University - Durable Functions Advanced Patterns (TypeScript)
Tags: azure, serverless, programming
Published: 2022-03-16 20:12:43

---
title: Azure Functions University - Durable Functions Advanced Patterns (TypeScript)
published: true
date: 2022-02-25 00:00:00 UTC
tags: azure, serverless, programming
canonical_url: https://blog.marcduiker.nl/2022/02/25/azfuncuni-durablefunctions-lesson-typescript.html
series: Azure Functions University
---

![Durable Functions Lesson 2 TypeScript](https://blog.marcduiker.nl/assets/2022/02/25/AzureFunctionsUniversity_DurableFunctions_Lesson2_typescript.png)

Hi serverless friends, we have a new Azure Functions University lesson for you! In this lesson we will learn how to use some advanced Durable Functions patterns in Azure Functions written in TypeScript.

<!--more-->
## Lesson

You can find the lesson on GitHub: [Durable Functions - Advanced Patterns (TypeScript)](https://github.com/marcduiker/azure-functions-university/tree/main/lessons/typescript/durable-functions/advanced/README.md).

And you can watch the video on YouTube:
{% youtube iYij7Mf7_dE %}

The lesson consists of the following exercises:

| Nr | Exercise |
| --- | --- |
| 0 | Prerequisites |
| 1 | Scenario |
| 2 | Fan-Out/Fan-In |
| 3 | Sub-Orchestration |
| 4 | External Events - Human Interaction |
| 5 | Homework |
MT4 Deposit Protection 24/7 with Equity Sentry EA
Published: 2022-02-24 23:54:08

Equity Sentry EA has to deal with some MT4 limitations. Note that the speed of closing Forex positions depends on the speed of your Internet connection and the broker you are using. MT4 works in a way that any EA can perform only one trading action at a time, which means all trades get closed one by one. While ESEA is closing trades one by one, it is evident that the other open trades are floating in loss or profit until closed. It means while the ESEA finishes closing all trades, the total loss on your account might be bigger or smaller than what you have configured in the EA settings.**[Now Click here](https://tinyurl.com/vbndnba2)**
How Learning React Improved My Skills in JS.
Published: 2022-02-24 22:18:12

For me, this phase has been a whole journey and a massive learning experience. 
There were a lot of topics I wanted to write about... 

It was a lot easier to understand and use ReactJS than it was JS.  As a beginner developer with a JavaScript experience, it took some time to learn React and start building web apps in a matter of days. It's the V(view part) of the MVC (Model-View-Controller) model, and it's also known as a JavaScript framework. Although, React isn't completely featured, but it benefited me from the open-source JavaScript User Interface(UI) module, which aids in task execution. 
The most difficult part for me was figuring out how to locate and render a single review. 

At first, it was difficult to construct a dynamic web application with HTML strings since it required extensive coding, but React JS eliminated that problem and made it so much easier which made fall in love with the language. It requires less coding while providing more features which is every developers' dream, let's be honest ;). First thing that I learned that React uses the JSX (JavaScript Extension) syntax, which is a special grammar that allows HTML quotes and HTML tag syntax to render certain subcomponents. It also allows you to create machine-readable codes.


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


A ReactJS web application consists of several components, each with its own logic and controls which was the part I liked the most and took the longest to have that "aha" moment. These components are in charge of producing a short, reusable piece of HTML code that you may use anywhere you need it. As I progressed and moved forward, it clicked to me that reusable code makes it easy to develop and maintain my apps. These Components can be stacked with one other to create sophisticated applications from simple building blocks. Moreover, I figured that in order to populate data in the HTML DOM, ReactJS uses a virtual DOM-based technique which was very interesting to learn. The virtual DOM is quick because it simply modifies individual DOM elements rather than reloading the entire DOM every time: 


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

Lastly, as I understood, the majority of web developers are now using ReactJS because of its benefits that make our tasks easier to divide to its own thing but also connect them with functionalities and UI engagement because it comes with a large JavaScript library. Web developers like ourselves have more freedom with the JavaScript library since we can use it in whatever way we wish. In addition, testing ReactJS applications is a breeze. It provides a platform for developers to test and debug their programs using native tools. At the end,I was very happy that I was able to tackle the fundamentals of React and even more eager to dive in deeper to create awesome projects.
CSSBattle | #1 Simply Square
Tags: css, cssbattle, challenge, simplysquare
Published: 2022-02-24 22:14:14

Welcome to CSSBattle Challenges!

In this short article, I go through my solution for [CSSBattle - #1 Simply Square](https://cssbattle.dev/play/1) challenge. Please refer to the code snippet below to get a better insight into my thought processes and the implementation detail.

---

> #### Challenge:

![Simply Square Challenge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6flkuttcsija8az343v.png)

---

> #### Solution:

```html
<div class="container">
  <div class="block"></div>
</div>

<style>
  * {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
  .container {
    background: #5d3a3a;
    width: 100%;
    height: 100%;
  }
  .block {
    background: #b5e0ba;
    width: 200px;
    height: 200px;
  }
</style>
```

As always, I welcome any feedback or questions regarding the implementation detail of the challenge. Otherwise, I hope this was useful!
API REST - typeScript, nodejs, express
Tags: node, typescript, jwt, javascript
Published: 2022-02-24 22:08:22


- **Crear al package.json**

     `npm init -y`
- **Instalar typescript**

     `npm i typescript -D`
- **instalar compilador TS**

     `npx tsc --init`
- **configurar _tsconfig.json_**
     
    descomentar estas lineas
    ```
    "baseUrl": "./src",  
    "outDir": "./build",
    "allowSyntheticDefaultImports": true, 
    ```
- **Creamos nuestra carpeta src**
  dentro de esa carpeta creamos el *index.ts* y de ejemplo creamos una función suma.

    ```
    const add = (a:number,b:number)=>{
        return a+b;
    }

    console.log(add(2,3));
    ```
- **Ejecutamos el programa**
    `npx tsc src/index.ts`
- **Agregando script para ejecutar en el archivo package.json**
    

     ```
     "scripts": {
       "test": "echo \"Error: no test specified\" && exit 1",
       "start": "tsc src/index.ts"
     },
     ```
- **Ahora solo ejecutamos**
    `npm start`
- **instalamos ts-node**
    `npm i ts-node`
- **instalamos express y sus tipos**
    `npm i express`
    `npm i --save-dev @types/express`
- **instalamos para que el servidor actualize solo**
    `npm i ts-node-dev`         
- **cambiando la configuración en el archivo package.json**
     ```
     "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1",
        "start": "ts-node-dev src/index.ts"
     },
     ```

- **Creando el servidor en el archivo index.ts**
   
    ```
    import express, { Request, Response } from 'express';

    const app=express();

    app.get('/', (req:Request, res:Response)=>{
        res.status(200).send('Hola este es mi server')
    });

    app.listen(3000, ()=>console.log('Server started'));
    ```
    RESULTADO:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gempib0xcu9jqhcxqnvt.png)
Log 2 - Building my first SaaS
Tags: saas, startup, community
Published: 2022-02-24 21:49:07

---
title: Log 2 - Building my first SaaS
published: true
description: 
tags: saas, startup, community
series: Building my first SaaS
---

Yesterday I decided to build a web app for seniors. Today I'm thinking about product ideas.

Seniors like to talk about the past. They seem to enjoy remembering times when they were younger and back to when they were in their primes.

I believe that there are many untold stories from the past, stories that could tell us more about our communities and our ancestors.
I know that there are many content sharing platforms, but I have something more suitable in mind for this type of content.

Social networks are great for sharing content, but the price you pay for using them (private data) is high, and there is the fact that you lose control and ownership of shared content as soon you post.

Now I know that this is ambitious, and I don't stand a chance to do this globally, so maybe it would be better to start locally. My first goal is to find a local community (think: small village) and talk about this idea to see if they are interested.

Wikipedia can tell you all the facts about any place, but could it tell you about their customs when they celebrate a wedding or when a baby is born? What about exciting stories that are not historically important but fun, engaging, and can tell a lot about that community?

Not sure how this sounds to you but try to imagine a website where you can select the year from the past and see pictures, text, video or any form of media that tells stories from that year.

Or you can select a family that has lived in this place for generations and see their stories through history. Content could be in categories. So, for example, you can see how wedding ceremonies developed through time.

This is my side project, and it should be relatively easy to develop this product. I'm also thinking about open sourcing it so anyone can use it to create something similar for their local community.

I have a lot more to think about, for example, how to monetize and motivate seniors to share their stories, but these problems are for some next log! :)

I would love to hear what others think about this idea. It would help me a lot to get some input from others!
How I use JavaScript for full-stack web development.
Published: 2022-02-24 21:18:32

Full-stack web development is has a broad definition that has become a widely used term over the years.
Unlike "devops" which can be defined in it's most basic format as the eternal development, staging, production cycle. Is a technique used to cut down time for developing and deploying new features, Full-stack development seeem to involve knowledge in areas listed.

- Knowledge in frontend frameworks like React, Svelte, Vue.js, Angular or any other framework.

- Backend with nodejs, java/Scala, C++, PHP, python, Golang and working with multiple programming languages.

- Understanding Json and how to work with deeply nested data.

- Building ios native and Android apps and hosting applications on their app store.

- Working with SQL and NOSQL databases like MySQL, Postgress SQL, MongoDB, Firebase, Hadoop, cassandra, Apache spark and other types of databases.

- Test driven development.
The list goes on to roles of a full-stack developer but let's see how Javascript could make life easy for full-stack development.

## Using Javascript stack for full-stack development.
The evolution of technologies is intended to make development easier and Javascript has been successful since the past decades with frameworks like Nodejs which is a runtime environment for Javascript applications outside the browser.
Modern web-development arcitecture based on client-side, Javasript, APis and reuseable markups "JAMstack" is a new stack based off Javasript on it's core. 
Javascript frontend frameworks like React, Svelte, VueJs, Angular shines in developing scalable and secure frontend.
With Nodejs it's easy to build out API features in Javascript which could be hosted on various app platforms.

## pros
Using Javascript makes it easier to develop fullstack applications where a developer focuses on one programming language for both Frontend features and backend as well.
This makes maintaining the entire app when the codebase becomes big and easier task.

## cons
Being a full-stack developer takes time to master even while trying to use one language.

since you've sticked to the end I have a bonus for you.

## Bonus
Learning Javascript at it's core would increase your experience but co-pilot coulded be used for solving complex algorithms as long as you understand the logic to be implemented.

You can as well learn core javascript concepts from the repo below.[You-Dont-Know-JS](https://github.com/getify/You-Dont-Know-JS)
GitHub Markdown now Supports Mermaid Diagrams
Tags: github, git, todayilearned
Published: 2022-02-24 20:51:20

---
canonical_url: https://waylonwalker.com/til/github-supports-mermaid/
published: true
tags:
- GitHub
- git
- til
series: til
title: GitHub Markdown now Supports Mermaid Diagrams
---

Mermaid diagrams provide a way to display graphs defined as plain text. Some markdown renderers support this as a plugin.  GitHub now supports it.

## example

You can define nodes like this in mermaid, and GitHub will now render them as a pretty graph diagram.  Its rendered in svg, so its searchable with `control f` and everything.

```mermaid
  graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D-->OUT;
      E-->F-->G-->OUT
```

![Here is what the example looks like on GitHub](https://images.waylonwalker.com/example-gh-mermaid.png)

## Links

* [GitHub support announcement](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/)
* [mermaid docs](https://mermaid-js.github.io/mermaid/#/)
Section 2.4 - AWS Certified Cloud Practitioner Study Guide
Tags: aws, cloudskills, examprep, cloud
Published: 2022-02-24 20:20:47

**This series is intended to be a personal study guide. Information may not be comprehensive or accurate. I am sharing it in case others find it useful. Please feel free to comment if any information is inaccurate.**

[Return to Exam Guide](https://dev.to/aidutcher/aws-certified-cloud-practitioner-study-guide-exam-guide-outline-233o)

**<u>2.4 Identify resources for security support</u>**

**Recognize there are different network security capabilities**

- _Native AWS services (for example, security groups, Network ACLs, AWS WAF)_
     - [Security groups](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) - virtual firewall for a VPC instance (instance level, not subnet)
     - [Network ACLs](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) - Access Control List, firewall for one or more subnets
     - [WAF](https://aws.amazon.com/waf/) - Web Application Firewall, monitor HTTP(S) requests and control access to content to protect against web attacks, cross-site scripting, and SQL injection
- _3rd party security products from the [AWS Marketplace](https://aws.amazon.com/marketplace)_

**Recognize there is documentation and where to find it (for example, best practices, whitepapers, official documents)**

- _AWS Knowledge Center, Security Center, security forum, and security blogs_
     - [Knowledge Center](https://aws.amazon.com/premiumsupport/knowledge-center/)
     - [Security Center](https://aws.amazon.com/security/)
     - [Security blogs](https://aws.amazon.com/blogs/security/?nc=sn&loc=7)
- Partner [Systems Integrators](https://www.easydeploy.io/blog/aws-system-integrator-role-and-responsibilities/)
     - Security products and services pre-qualified by the Partner Competency Program

**Know that security checks are a component of AWS Trusted Advisor**

- [AWS Trusted Advisor](https://aws.amazon.com/premiumsupport/technology/trusted-advisor/)
- Checks against account to identify ways to optimize
- Security checks are available to Basic, Developer, Business, and Enterprise Support customers

[Return to Exam Guide](https://dev.to/aidutcher/aws-certified-cloud-practitioner-study-guide-exam-guide-outline-233o)
Kotlin Functions
Tags: kotlin, programming, function
Published: 2022-02-24 19:44:47

Kotlin Functions
Kotlin functions are very easy if you understand all the pieces. Looking up instructions give some very complicated explanations. Without having experience or knowledge of the various pieces of code Kotlin has, it is nearly impossible to translate.
Starting as basic as it gets, here is an example.
fun add (n, i){return n+ i}
First we have the "fun" code. All lowercase and this never changes, it's required to signify to the compiler that the following pieces are a function.
"add" is the function name. This can be whatever you want it to be, but try to keep it appropriate so you can remember what it does.
(n, i) are each also made up. They are basically place holders for when you ask the function to be completed. If we sent a "1" and a "2" to the function, it would actually read (1,2). You separate your values, as many as you need, by a comma. 
{return n + i} is the actual operation. It will take the user input you have, and calculate.
Later you can add more to the code, like types or more inputs or even more calculations.
To send information to the function, you can call it up by the function name and a parenthesis around your input.
add(1,2)
A collection of the best HTTP clients for various languages
Tags: programming, javascript, webdev, github
Published: 2022-02-24 19:31:08

Hello fellow developers! We're making an _Awesome *_ list of the best HTTP clients for different languages and frameworks.

[The list is `awesome-http` and can be seen here](https://github.com/easybase/awesome-http).

**Please contribute any of your ideas**. We've already had some great contributions!
A Must-Have Tool For Developers.
Tags: inkedin, 100wordsaday, asdf, programming
Published: 2022-02-24 19:25:22

## [ASDF](https://asdf-vm.com/) => Is A CLI - Command Line Interface tool That allow us to manage multiple runtime versions of a language packages and plugins.

>Once you install `asdf` and set it up with the shell configuration, some plugins are installed to help us manage multiples tools. 

>A cool Feature of `asdf` is that all the tool version definitions are managed and contained in one single file named `.tool-versions`.  That you can add to a project file directory and check it in  to the project Git Repository to ensure everyone is using the same tool version. 

## Using Existing Tool Version Files - "Copied from The Docs"

`asdf` supports the migration from existing version files from other version managers. Eg: `.ruby-version` for the case of `rbenv`. This is supported on a per-plugin basis.

[`asdf-nodejs`](https://github.com/asdf-vm/asdf-nodejs/) supports this via both `.nvmrc` and `.node-version` files. To enable this, add the following to your `asdf` configuration file `$HOME/.asdfrc`:

```
legacy_version_file = yes
```

See the [configuration](https://asdf-vm.com/manage/configuration.html) reference page for more config options.

This mean that if we have old projects we are currently working on we do not need to add the `.tool-versions` file to our project, the tool will automatically read and detect current versions files from the project. 

### [Link to All The Commands](https://asdf-vm.com/manage/commands.html)
### Make sure To ⭐️ the Project on [GitHub](https://github.com/asdf-vm/asdf) and contribute if you can. 

## Ballad of asdf => Ballad is a Poem of asdf Copied from the readme on GitHub.

> Once upon a time there was a programming language  
> There were many versions of it  
> So people wrote a version manager for it  
> To switch between versions for projects  
> Different, old, new.

> Then there came more programming languages  
> So there came more version managers  
> And many commands for them

> I installed a lot of them  
> I learnt a lot of commands

> Then I said, just one more version manager  
> Which I will write instead

> So, there came another version manager  
> **asdf version manager** - [https://github.com/asdf-vm/asdf](https://github.com/asdf-vm/asdf)

> A version manager so extendable  
> for which anyone can create a plugin  
> To support their favourite language  
> No more installing more version managers  
> Or learning more commands


- Note: This is a Quick blog written  to improve my Technical writing skill after finding an amazing community of Dev and Technical Writer Called Inked-In Founded By the ⭐️ React Developer [@Elixir_js](https://twitter.com/Elixir_Js) go give him a follow. 

- Feel Free to Follow me on Twitter as Well [@eulis01](https://twitter.com/Eulis01)I be Tweeting later  #100WordsADay & #inkedIn Tags Thanks For Reading, See You Hacking around the Terminal.
Day 02/100 - 03/100
Tags: 100daysofcode, beginners, node, programming
Published: 2022-02-24 19:04:59

Hello Everyone!!!! 
Hope you're doing fantastic, a couple of rough days for me but still managed to pull through. 

**1. Backend**

- Some more basics of **Node.js**

- **Npm** (Node Package Manager), learnt about external dependencies

- **Express.js** 
What is Express ? Why express ? Middlewares, Handling different routes