teleren/devto huggingface dataset:
Software Architecture Patterns: Space-based Architecture
Tags: architecture, programming, computerscience, performance
Published: 2023-01-20 22:00:51

### Join Me

Follow me on [Twitter](https://twitter.com/alexrashkov) and [Linkedin](https://www.linkedin.com/in/alexrashkov) for more Career, Leadership and Growth advice. 

<a href="https://engineeringbolt.substack.com/embed" target="_blank" title="Subscribe to Engineering Bolt ⚡ Newsletter">![Subscribe to Engineering Bolt ⚡ Newsletter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u2srkrj6arwrs0nclfs.png)</a>

### Intro

Space-based architecture (SBA) is a software design approach that organizes the system around the concept of "spaces", which are essentially isolated and autonomous units of functionality. Each space has its own data, logic, and interface, and they communicate with each other through message passing.

![Software Architecture Patterns (Mark Richards)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n55s602ruimym3oyloh0.png)*Source: Software Architecture Patterns (Mark Richards)*

### Advantages

The main advantage of using a space-based architecture is that it promotes high degree of isolation and autonomy, making it easier to test, deploy, and evolve the system. Because each space is independent, it can be developed, tested and deployed separately, allowing developers to work on different spaces concurrently. Additionally, it allows for easy handling of complex business logic.

Another advantage of SBA is that it allows for easy handling of scalability and performance. Because each space is isolated and can be scaled separately, it allows for better control of the resources used by the system.

### Disadvantages

The main disadvantage of using SBA is that it can add complexity to the system. Because the spaces are independent, communication between them can be challenging, and it requires careful planning and coordination. Additionally, it can be difficult to design the spaces in a way that ensures that they are loosely coupled and don't end up creating dependencies between them.

### Wrap up

In conclusion, Space-based architecture is a powerful tool for building systems that require isolation, autonomy, and scalability. It allows for easy handling of complex business logic and better control of resources used by the system. However, it also requires careful planning and coordination and can add complexity to the system. SBA is suitable for systems that require isolation, autonomy, and scalability, such as financial systems, IoT systems, and systems that process high volumes of data.

### Join Me

Follow me on [Twitter](https://twitter.com/alexrashkov) and [Linkedin](https://www.linkedin.com/in/alexrashkov) for more Career, Leadership and Growth advice.

<a href="https://engineeringbolt.substack.com/embed" target="_blank" title="Subscribe to Engineering Bolt ⚡ Newsletter">![Subscribe to Engineering Bolt ⚡ Newsletter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u2srkrj6arwrs0nclfs.png)</a>
Usando o useEffect de modo assincrono
Tags: javascript, react, reactnative, android
Published: 2023-01-20 21:55:40

Eu recebi uns warnings do expo quando implementei os useEffects assincronos do projeto de [Aplicativo de Repositórios](https://github.com/narradorww/react-native-api) do curso [React Native: utilizando Web API](https://cursos.alura.com.br/course/react-native-utilizando-web-api) e resolvi que não ia deixá-los no meu projeto rs.

Pesquisando pela documentação do React e alguns sites, encontrei uma recomendação a respeito e vou deixar uma sugestão de como eu fiz no meu código:

O useEffect espera que a função passada para ele retorne uma função de limpeza ou null, mas uma função async não retorna uma dessas coisas. Isso pode causar problemas na hora de lidar com os efeitos colaterais.

Se você chama uma função async dentro do useEffect, ela será executada imediatamente e não será cancelada quando o componente deixar de ser exibido, o que pode causar problemas de desempenho.



Se você chama uma função async dentro do useEffect sem passar um array vazio como segundo argumento, essa função será chamada sempre que o componente for atualizado, o que pode causar problemas de desempenho e resultar em chamadas desnecessárias à API.

Uma maneira mais correta de lidar com seria colocar a lógica de busca de dados em uma função separada e chamá-la dentro do useEffect. E você deve passar o array de dependencias corretamente, para evitar chamadas desnecessárias:

    

```
useEffect(() => {
        async function pegarRepos(){
            const resultados = await pegarRepositorioDoUsuarios(route.params.id);
            setRepo(resultados);
        }
        pegarRepos();
    }, [estaNaTela]);COPIAR CÓDIGO
```


Foi essa maneira que fiz. Como você faria?
hw-manager: Canvas assignments and todo list application.
Tags: python, flask, webdev
Published: 2023-01-20 21:55:17

## About
[hw-manager](https://stingray-app-ayu4b.ondigitalocean.app/) is a Flask application that helps organize class assignments and has a basic todo list feature.  It uses the [Canvas API](https://canvas.instructure.com/doc/api/).

## Usage

The API token and URL for your school's Canvas page can be entered on the [setup](https://stingray-app-ayu4b.ondigitalocean.app/setup) page.

{% embed https://github.com/gbafana25/hw-manager %}
Disabling TRACE method requests with Spring
Tags: springboot
Published: 2023-01-20 21:51:31

---
title: Disabling TRACE method requests with Spring
published: true
description: 
tags: [springboot]
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-20 20:45 +0000
---
*Originally posted on [My Blog](https://ellisonalves.github.io/posts/disabling-trace-method-requests-with-spring/)*

## Introduction
Recently I got a request for disabling TRACE method calls in the application for security reasons because an attacker could have access to some information that would allow them to find a breach.

## Solution
Considering the application is using spring boot, there are some steps to follow.

### Change application.properties
The following line should be added in the `application.properties` file:

```
spring.mvc.dispatch-trace-request=true
```

This change is required to tell spring that the TRACE requests should go now through the FrameworkServlet doService method just as other methods. So we will be able to intercept it.

### Configuration Spring MVC
In order to configure Spring MVC, we just need to create a configuration class extending `WebMvcConfigurer`. Here you can see an example in kotlin.

```kotlin
@Configuration
class WebConfig : WebMvcConfigurer {

    override fun addInterceptors(registry: InterceptorRegistry) {
        registry.addInterceptor(TraceMethodInterceptor()).addPathPatterns("/**")
    }

    private class TraceMethodInterceptor : HandlerInterceptor {
        override fun preHandle(
            request: HttpServletRequest,
            response: HttpServletResponse,
            handler: Any,
        ): Boolean {
            if (HttpMethod.TRACE.matches(request.method)) {
                response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED)
                return false
            }
            return true
        }
    }
}
```

In the example we are doing the following:
1. Creating a new interceptor called `TraceMethodInterceptor` which will always responds as METHOD_NOT_ALLOWED when any TRACE request is executed againist our application
2. Adding the interceptor in spring
3. Adding the pattern that will be intercepted with `addPathPatterns("/**")`

## Conclusion
That's should be enough for disabling incoming TRACE requests in our application. I also created a repository in [github](https://github.com/ellisonalves/my-spring-things/tree/master/disable-http-trace) so you can have all the details of the application such as tests for verifying that the implementation works.

Hope it helps! :)
The only best shortcut every beginner developer should remember when using VS Code on macOs
Tags: vscode, beginners, tutorial
Published: 2023-01-20 21:36:39

This shortcut could help to discover faster usage of VS Code.

#The magic shortcut is 

```
⌘K ⌘S
```

When you write this shortcut in VS Code on you Mac a new window called Keyboard Shortcuts opens. 

![Screenshot of Keyboard Shortcuts table in VS Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d22b4gb87i37p0kkf78p.png)

You can find a lot of very useful shortcuts that can streamline your everyday workflow with VS Code.

One of the could be 


```
⇧⌘L
```
This shortcut selects all occurrences of current selection. So for example when you are in a file where you want to replace : with = on all 10 places within the file you can select the first : then hit the shortcut and it will select all of :. Then you can edit it with =. Lovely, isn't it? 

![Screenshot of Keyboard Shortcuts table in VS Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d22b4gb87i37p0kkf78p.png)

In the first column called **Command** you have the description of the command. You can search within the commands with the search bar above the table. The keyboard shortcut combination is right to the **Command** column in the **Keybinding** column.

On the right side within the search bar there are 3 icons:
1. The first icon enables you to record keys you hit on you keyboard and if the combination is valid shortcut it will search it in the list. 

2. You can change the alphabetical order of the shortcuts

3. When you write something in the search bar and you want to delete it you can hit the last third icon. It will clean the search bar. 


#Changing the shortcut according to your preferences

On the left side within each line of the table there is a small pencil which enables you to edit the shortcut. 

![Showing where to edit the keyboard shortcut in VS Code Keyboard Shortcuts table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ilq7g3jz7xgudyapmir.png)

You can write your own preferable combination and after hitting enter you can use it. When there is a match between your new combination and any of the combinations within the table it will give you a hint. 


#Other sources of shortcuts

Of course there are lot of videos and articles about the shortcuts for VS Code and macOs. For those who prefer to have the shortcuts within one PDF there is a one right from VS Code. You can find it here [Keyboard shortcuts macOs](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf)

What is your favourite shortcut when using VS Code on macOs?
Inspire us all in comments :)

FOLLOW [tellitwithcode on Instagram](https://www.instagram.com/tellitwithcode/)

Photo by <a href="https://unsplash.com/@nosoylasonia?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Juan Gomez</a> on <a href="https://unsplash.com/s/photos/shortcuts?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Les Dates En Java 8 : API Date/Time
Published: 2023-01-20 21:31:51

L’API date/time est un sujet très détaillé et important en Java. En particulier pour les applications dont les utilisateurs se trouvent à différents endroits, il est très important d’utiliser cette API de manière efficace et d’effectuer les opérations de conversion correctement.
Dans cet article, nous allons examiner les classes et les fonctionnalités qui ont été introduites dans Java 8 et examiner quelques exemples.

[Les Dates En Java 8 : API Date/Time](https://kotlin-java.fr/date-time-api-java/)
Joining the Open Source Development Course
Published: 2023-01-20 21:26:52

I recently got to know [Gabor Szabo](https://github.com/szabgab) through a shared colleague. Luckily, he invited me to join his [Open Source Development Course] (https://github.com/OSDC-Code-Maven/osdc-2023-01-public).

I am currently researcher and lecturer at the Azrieli College of Engineering, teaching several courses including "introduction to computer science", "introduction to data science" and "computational biology".

I'd love to contribute to the open source community so I am excited to take this course. As a computational biology researcher and a Python developer I often use open-source python packages, as well as develop such packages for biology and bioinformatics researches (published in my [github account] (https://github.com/cohenoa)).

Python is the main programming language I use nowadays. In particular [numpy](https://numpy.org/) and [pandas] (https://pandas.pydata.org/) are of course extremely useful. I also use [biopython](https://biopython.org/) package - a collection of software tools for biological computation written in Python by an international group of researchers and developers.

During the course I would like to continue working on a specific open-source package that I develop as part of my research. 

P.S. My avatar is an origami model that I folded may years ago, using the instructions by [Jo Nakashima] (https://www.youtube.com/watch?v=zbXG4XugaYM&ab_channel=OrigamiwithJoNakashima).
Pin Save - decentalized Pinterest Canto Update
Tags: video, nextjs, javascript, react
Published: 2023-01-20 21:04:47

The idea for Pin Save was inspired by our experience using monolithic online applications where users had limited control over their data and content. We saw an opportunity to use decentralized technologies to create a platform that would give users full control over their data and content, and that would also provide a secure and open platform for users to discover, share, and monetize their content.

{% embed https://www.youtube.com/watch?v=u_JoQ_7Nc8E %}

Four Key Elements:

1. The decentralized feed reinforces the discovery of content and feedback.

2. Decentralized Identity (ERC-725), which provides anonymity and data protection.

3. Upgradeable, resilient, and more open decentralized storage.

4. Smart contracts to securely serve web experiences directly to users.

PinSave is available at [https://evm.pinsave.app](https://evm.pinsave.app)

[GitHub repository](https://github.com/dspytdao/PinSave-EVM/)

[Twitter](https://twitter.com/PinSav3)

Check out our [Data Science with Python blog](https://dspyt.com) as well.
Top 8 Free AI Writing Assistants for Effortless Content Creation
Tags: gpt3, openai, webdev, productivity
Published: 2023-01-20 20:56:42

## [Rytr](https://rytr.me/use-cases/social-media-bio)

Rytr is a free writing tool that creates blog ideas and outlines, offers 40+ templates and use cases, and has full formatting options to help you write better. 


![Rytr.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rkdt2fr8oknj056gzh29.gif)


## [Quillbot](https://quillbot.com/?utm_medium=paid_search&utm_source=microsoft&utm_campaign=Paraphrase_Premium_Brand&campaign_type=search&msclkid=f2c77078b17617fc79f113b2401b4d7d)

Quillbot is an AI writing assistant that helps you to identify and fix grammar, punctuation, and spelling mistakes. It can also help you to choose the right words to use in your writing and make your writing more effective. 

![Quillbot.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9izscgihjyr11767crt.gif)


## [Grammarly](https://www.grammarly.com/) 

Grammarly is a free AI-powered writing assistant that checks your grammar, punctuation, spelling, and other writing mistakes. It can also make suggestions to help you improve your writing while saving you time.

![Grammarly.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/31exc9gir6l4bfzglc2x.gif)

## [Hemingway](https://hemingwayapp.com/)

Hemingway is a free AI-powered assistant that highlights complex sentences and suggests alternatives to help enhance the readability and conciseness of your writing.

![Hemingway.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vievfi641jfhcqw80y6.gif)

## [Copy.ai](https://www.copy.ai/?via=start)

Copy.ai is an AI-powered writing tool that can help you with everything from writing blog posts and product descriptions to making social media posts and email campaigns.

![Copy.ai](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rpdndae41tvgrn58e5b7.gif)


## [Writefull](https://www.writefull.com/)

A free AI-powered tool that helps to improve your writing by providing feedback on word choice, style, and grammar.

![Writeful.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vj0x7ey2memjxfou9qjw.gif)

## [Autocrit](https://www.autocrit.com/)

Autocrit: A free AI-powered tool that helps you write better by providing feedback on pacing, dialogue, and character development.

![autocrit.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7z0iirgz2yslryoq6zr.gif)

## [ProWritingAid ](https://prowritingaid.com/)

ProWritingAid is a free writing tool that helps to identify flaws points in your writing and suggests ways to improve it. It can also generate reports to help you evaluate your writing.

![ProWritingAid.gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t2w0bzp87faznoi8434c.gif)

## Thank you for reading! 👨‍🚀

And remember to share this post 👇
All About the Aesthetic-Usability Effect
Tags: devfasttt, designcrazybydevfasttt, ux, uiweekly
Published: 2023-01-20 20:53:02

> Design Crazy: S1 E2: The Crazy Design Blog by the humans @ Devfasttt!

Hello again to another mind-numbing explanation of the Aesthetic-Usability Effect 🤩

Ok, flashback-story time📆: I once spent a total of 3 days obsessing over how difficult-to-use and not at all fitting into design principles my UI design and after a complete feeling of worthlessness and continued imposter syndrom, decided to send it to the client anyways, and when I asked them about their feedback, all *my so, very, extremely,* critical client, could talk about was how great my site's color scheme was!!

Ok back to the Aesthetic-Usability Effect:

*A little backstory everybody: Human-computer interaction researchers first delved into the aesthetic-usability effect in 1995. 26 different revisions of an ATM user interface were examined by Masaaki Kurosu and Kaori Kashimura of the Hitachi Design Center. The 252 study participants were asked to evaluate each design's efficiency and aesthetic appeal. They revealed a stronger correlation between the participants' impressions of ease of use and visual appeal than between actual ease of use and those evaluations. Kurosu and Kashimura arrived at the conclusion that even though users attempt to assess the system's fundamental functionality, they are still significantly influenced by the aesthetic pleasantness of any given interface.*

***So coming back to our original question: What is the Aesthetic-Usability Effect? and why should I give a damn? According to the Aesthetic-Usability Effect, users almost always perceive aesthetically pleasing designs as those more superior, usability wise. Even if something isn't more productive or efficient, people often conclude that it will operate better if it looks better.***

## So the Key takeaways for you:

🥲 A design's attractiveness might successfully conceal usability concerns and keep them from coming to light during usability testing. (phew!)

👆 works because 👇

🎭 People's minds react positively to attractive💃 designs, which leads them to believe that the design truly functions😶‍🌫️ better.

🔭 As a rule of the (hidden) thumb: When a product or service has an appealing design, users generally, unconsciously put up with small usability flaws.

❤️ Interfaces that are aesthetically appealing are worth the investment. Appealing visual designs have the unintended consequence of making your site appear orderly, well-designed, and professional. Users are more likely to try a visually appealing site, and they are more forgiving of minor issues.
How did we get from legacy to microservices?
Published: 2023-01-20 20:22:31




Ever wonder why a microservices based architecture came to exist? I often find it useful to understand the evolution of how technology came to be. In doing so, there is great understanding.

![Legacy to Microservices](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fptm1q21amevuqt9u6xs.png)

If we go back to the before times then we will find that application architecture was relatively simple. Most applications used a 3 tier design that would consist of a client, server and database. You had the client that the user used to connect to the server and display information. You had the database that contained all of the information that needed to be stored. Finally, you had the server that contained the logic for both backend and frontend calls. 

We created multiple environments in order to have a level of redundancy and keep some semblance of uptime. A load-balancer would front-end these servers and send traffic to the different environments. 

This was an okay solution when applications were updated quarterly and there was a lot of time to plan and test. Times have changed and needs have shifted. We now live in world ruled by SaaS (Software As A Service). The rules of engagement have changed. Consumers of applications need the latest features ASAP in order to push out their new widget and track that widget and ascertain the full lifecycle of that widget. I digress. But, You get the point.

Application design and architecture has changed to. At one time all calls were internal to the server and very little communicated to outside services. Now we live in a API centric world in which we consume most services through them. Smart developers are also looking to get the job done the easiest and quickest so APIs allow that to happen.

Developers are now having an easier time implementing APIs because of standards like OpenAPI spec. Developers started to think about loosely coupling their apps and deconstructing them like a trendy entree. What used to be libraries that were called from a single monolithic app are now designed to be micro-services and are split out by function. This allows developers to work on a single component of an application and  they can update that piece, by itself, without effecting other components. 

We can now decide where services should run and how they should communicate now that the services are split out by function. Additionally services can be scaled out so that they can handle additional load and traffic. We can now introduce services slowly and quickly phase them out if they are functioning improperly. 

Hopefully this article highlights some of the core aspects of the shifts that occurred that led to micro-services based architecture.

Now that you a little bit of the history here is an article with some great information on how to determine the resource limits for a new microservice.
https://dev.to/ciscoemerge/determine-resource-limits-for-a-new-microservice-471

Check out some of our open-source solutions:
https://eti.cisco.com/open-source
What was your win this week?
Tags: discuss, weeklyretro
Published: 2023-01-20 19:50:23

Hey my peeps! 👋

Hope y'all all enjoy your weekends!

Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Spending time out in nature 🌷

---

![Bob Ross petting a deer in front of a pine tree. He looks up into the camera and through it into our eyes... into our souls. He smiles and puts all your worries at ease.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/toiu675rexlayo1jkgxc.gif)