teleren/devto huggingface dataset:
Speedup event driven projects
Tags: eventdriven, eventbridge, cookiecutter, speedup
Published: 2023-01-23 09:22:32

Use our [sam-eventbridge-project](https://github.com/binxio/sam-eventbridge-project) [cookiecutter](http://cookiecutter.io/) project. Get an event driven project up and running in a few steps. On the 3rd of October the [AWS Community Day NL](https://awscommunityday.nl) was held in Amersfoort. I gave a talk about CodeCommit and how you could use events to make your life easier.

![Conclusion: Recognize a problem, find a trigger, and automate the wanted result!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ngl37kllaxaxbdoh2jmf.png)

The "hidden" message of the presentation was that you need to find a trigger. This trigger could be an event send to [EventBridge](https://aws.amazon.com/eventbridge/).

Most of the times when I start something new. I copy an other project and then change it to my likings. After I gave my presentation at the Community Day. I realized that that was a "problem"! So, I automated the wanted result.

Now, when I want to start a new project I execute: (as a trigger)

```bash
cookiecutter gh:binxio/sam-eventbridge-project
```

Cookiecutter will then create the project structure for me. It contains the following things:

* [AWS SAM](https://aws.amazon.com/serverless/sam/), used to build and deploy the CloudFormation stack.
* Sample implementation of a `CloudFormation Stack` event's.
* Unit tests, validates the sample implementation.
* Linting and formatting, keeps your code clean and follows style guides.
* Complexity scanning, prevents your code to become to complex.
* [Makefile](https://binx.io/2021/09/27/make-your-life-easier-using-makefiles/) to simplify the usage of the project.

By using the [sam-eventbridge-project](https://github.com/binxio/sam-eventbridge-project) [cookiecutter](http://cookiecutter.io/) project you will speedup your event driven projects!

Read [speedup python cli projects](https://binx.io/2022/10/27/speedup-python-cli-projects/) to learn more...

Photo by [Pixabay](https://www.pexels.com/photo/people-throwing-pins-433452/)
A Humongous Article on the Hick’s Law
Tags: uiweekly, ux, designcrazybydevfasttt, devfasttt
Published: 2023-01-23 09:21:25

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

Hello People to yet another, boring explanation of the Hick’s Law. 🙃

_Backstory everybody: William Edmund Hick and Ray Hyman, a British and American psychology duo, are the creators of Hick's Law (also known as the Hick-Hyman Law). These researchers set out to examine the connection between the quantity of inputs present and a person's response time to each input in 1952. It seems logical that the more stimuli a user has to pick from, the more time it takes for them to decide which one to select. Users that are presented with numerous alternatives must take the time to comprehend and make decisions, which results in them having to do work they don't want to do._

**So, getting back to the question we began with: What is the Hick’s Law?
_The more options there are and the more complicated they are, the more time it takes for the user to decide._**

> >Decision-making time will rise logarithmically as the number of options increases.


## So the Key takeaways for you: 

⚡Avoid overwhelming the user by providing an overwhelming number of  choices.

🦄Break complex tasks into smaller steps in order to decrease cognitive load. 

🐎Providing such smaller choices reduces immediate mental load, as well as makes the product "easy to use".

❤️Try providing Recommended picks to avoid overloading consumers. 

🍪Don't simplify things to the point of abstraction.


Did we miss out something? Share your 💭💭 in the comments 🤩 below! 👇 We'll be waiting for your thoughts!
ASP.NET CORE REACT APP: System.InvalidOperationException: SPA default page middleware failed to return default page /index.html
Tags: react, core
Published: 2023-01-23 08:57:42

**UI PROJECT ENVIRONMENT:** ASP.NET CORE MVC
**UI PROJECT TYPE:** ASP.NET CORE + REACT APPLICATION
**ERROR NAME/ FORUM TITLE:**
ASP.NET CORE MVC REACT PROJECT: System.InvalidOperationException: SPA default page middleware failed to return default page '/index.html' because it was not found and no other middleware was processing the request
**ERROR DETAIL:**
I have a React project created with ASP.NET CORE MVC template.
This React UI project takes data from a separate ASP.NET CORE MVC based WEB API project and projects customer data to the screen.
Authentication, Authorization and Data retrieval operations are provided via API.
While connecting to a user UI page, LDAP authorizations are checked from the relevant API. UI page opens if LDAP authorization is available.
If the user does not have LDAP authorization, the screen will display You Are Not Authorized.
These React-based Web UI and Web API pages run on IIS on Windows server.
In addition, both UI and API are installed on three servers named S1, S2 and S3 and work over Load Balancer.
90% of users have direct access to the relevant UI. Some can log in from S1, some from S2, some from S3 server with Load Balancer management.
However, some users encounter the following error when opening the relevant UI page.
We detected this error on Dynatrace.
Error :
**REACT The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request. Your application is running in Production mode, so make sure it has been published, or that you have built your SPA manually. Alternatively you may wish to switch to the Development environment.**

We couldn't figure out why some users are getting this error even though most users access the same page.
What do you think could be the reasons for the access problem?
#TestCulture 🦅 Episode 22 – Manual testing VS Automated testing
Tags: testing, agile, beginners, devops
Published: 2023-01-23 08:40:25

Nowadays, we tend to advocate test automation. But, is it really good to automate everything? What are the benefits of test automation? How to choose which tests to automate?

𝐌𝐚𝐧𝐮𝐚𝐥 𝐓𝐞𝐬𝐭𝐢𝐧𝐠: when test cases are executed by a human tester and software.
𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐞𝐝 𝐓𝐞𝐬𝐭𝐢𝐧𝐠: when test cases are executed by automation tools.

Testing Time with 𝗺𝗮𝗻𝘂𝗮𝗹 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
❌ Execution time takes long 
❌ Testers are limited by the time available to work
Testing Time with 𝗮𝘂𝘁𝗼𝗺𝗮𝘁𝗲𝗱 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
✅ Execution time is optimized
✅ Automation works 24/7

User interface with 𝗺𝗮𝗻𝘂𝗮𝗹 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
✅ The tester can give feedback on the application's user-friendliness to provide ideas
User interface with 𝗮𝘂𝘁𝗼𝗺𝗮𝘁𝗲𝗱 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
✅ Automation does not allow for objective opinions but gives more time to testers to provide feedback

UX testing with 𝗺𝗮𝗻𝘂𝗮𝗹 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
✅ Allows you to test your product's UX: the correct display of text, links, images…
UX testing with 𝗮𝘂𝘁𝗼𝗺𝗮𝘁𝗲𝗱 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
❌ Can’t judge the user experience

Investement with 𝗺𝗮𝗻𝘂𝗮𝗹 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
❌ Requires a lot of protocol implementation time, protocol testing time and execution time
❌ A tester may encounter difficulties if he is out of his comfort zone
❌ If there are too many errors, the deadlines are not respected
Investement with 𝗮𝘂𝘁𝗼𝗺𝗮𝘁𝗲𝗱 𝘁𝗲𝘀𝘁𝗶𝗻𝗴
✅ Human time to implement, but reduced protocol testing time because automated, and autonomous test execution
✅ Automation follows its program, regardless of the context. Adapts to any type of system...
✅ Automation speeds up the verification process and allows more time to correct anomalies.


We have created an infographic that compares automated and manual testing on several topics: testing time, types of tasks, process impact, teams state of mind…

[Read more about it.](https://www.agilitest.com/blog/manual-vs-automated-tests)

[A thread on Twitter.](https://twitter.com/agilitest/status/1572963791721177088?s=20&t=3cYUBLlW7g-riAD4Umnnlg)
Whats the best way to branch code repo?
Tags: github, git, githunt, javascript
Published: 2023-01-23 08:38:44

Currently, we are in a process of restructuring our branching. The main requirement is that, features should be tested in isolation and can be released one by one. 

We have 2 branches, develop and main, and 3 deployment environments. DEV, STAGE and PROD. 

We do feature branches out of DEV and do peer QA on these branches. Once the code is merged to develop we do a QA on the features merged on DEV env. And then to STAGE and to PROD.

But for us its really hard to release the features one by one. For now we are planning to block merge to develop until we merge the develop to main.

Any better strategy we can follow?
Enjoy Programming-Themed Humor? Here's today's daily developer joke!
Tags: jokes, dailydeveloperjokes
Published: 2023-01-23 08:00:24

---
title: "Enjoy Programming-Themed Humor? Here's today's daily developer joke!"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258d5a93a0.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What do you get when you cross a computer with an elephant?

___A:___ Lots of memory!
 -->
The Hidden Costs of Ignoring Software Bugs
Tags: programming, coding, developers, beginners
Published: 2023-01-23 02:50:00

Have you ever wondered about the cost of software bugs in different stages of development?

Bugs are an inevitable part of the software development. However, what you may not realize is the impact of these bugs on the success of the project. These bugs cause delays, increase costs, and harm the reputation of the company.

The key is to identify and address bugs as early in your development cycle as possible, before they have a chance to escalate and cause more damage.

Bugs are:

♦ most expensive in production

♦ expensive in QA

♦ cheaper to fix in development

♦ least expensive to avoid in the design phase

![Software Bugs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ftlo34zk1vjhqhz1g0zu.png)

Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more in DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
Top List of UX Research Methods and Uses to Choose the Best
Tags: beginners, ux, userexperience, product
Published: 2023-01-23 07:56:47

User experience (UX) involves developing products that are useful, easy and enjoyable to use. A product’s entire experience is about enhancing people’s interactions with it. The company makes sure that its customers are delighted. UX designers achieve this goal by employing various UX research methods. UX research is a critical component of UX design yet is often misunderstood. User research and testing are often treated as afterthoughts or as an unaffordable luxury. In the real world, everything designers create in their safe, comfortable offices must endure and prosper. Thousands of people will interact with creations in an uncontrollable manner. UX research helps ground ideas in reality and improve their chances of success. Many people think there isn’t enough money, time, and expertise to solve problems.

Understanding why users behave in a certain way is essential to conducting effective UX research. Product teams and user experience designers should conduct regular user research. It is better to dive deeper if they have the time, resources, and budget.


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

## What Are UX Research Methods?
A UX research method generates information about users’ behavior, motivations, and needs. The user experience can improve by utilizing various user research methods. The process involves user interviews, surveys, focus groups, and card sorting.

## Benefits of UX Research Methods
Ultimately, user experience is about one thing. We aim to design products that enhance user interaction and make an impression. When the product meets users’ needs, they are happy and satisfied. The benefits of user research are numerous:

- Develops human-centered products based on the needs and goals of your users

- Analyzes the behaviors and usage patterns of users;

- When you approach development and design correctly, you can avoid unnecessary costs;

- Defines the end goal of the whole process;

- Encourages team collaboration;

- Replaces assumptions with data to address specific user issues;

- Designing with usability in mind is possible to drive a better return on investment.

## How Do You Select The Right UX Research Methods?
Selecting the right research approach isn’t always easy. Each user experience method has its benefits based on the project at hand. In defining your ux research method, you will need to take a few factors into account. The following are some of them:

- Development type (app, website, software, etc.)

- Client type

- Phases of a project

- Environment

- Planned timeline

- Resources

Check out the entire blog: [](https://www.westagilelabs.com/blog/list-of-ux-research-methods-and-uses-to-choose-the-best/?utm_source=WAL&utm_medium=DEV&utm_campaign=Aggregators)
Creating a scam / spam detector with GPT-3
Published: 2023-01-23 07:55:34

Hi everyone! Just thought i'd do a writeup for a hackathon project I recently worked on.

The hackathon was a mini hackathon (half day) so we didn't really have that much time to actually develop something. I've done quite a lot of work on discord chatbots and recently have been working quite a lot with OpenAI so we decided to see how well GPT-3 performed at giving a user a quick sanity check of emails to tell them if they are likely to be a scam, and if so how the scam worked.

I already have a chat bot I use for rapid prototyping of ideas hooked up to OpenAI text-davinci-003. We weren't really expected to actually build anything but they didn't have anything against us using existing code so we decided we'd give it a shot anyway.

OpenAI is really meant for text completion. For every message a user sends, it uses the following format:
.prompt 

 promptmessage = ".prompt You are an AI chatbot designed to scan incoming messages and assess if they are likely to be spam or a scam. Your job is to alert the user of the probability, as well as provide an explanation of how the scam works. You should give advice on how to proceed."
 content = f"{promptmessage} {content}"

If you are an admin, you can set the promptmessage by using the command .prompt. This replaced the promptmessage which is really useful for rapid prototyping without having to restart the program.

For initial testing, I went to my spam box and grabbed text from a bunch of obvious scam emails as well as trying a few of the classic well known email scams. Here are some examples.


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

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

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

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

As you can see, with scam emails it generally performs pretty well. I also tried a few real non-spam emails to give it some negative tests.

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

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

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

Great! So it also seems to perform pretty well in negative tests. With the given prompt, it also gives general advice on how to proceed even if it is not a scam.

We didn't really have that much time to flesh out the idea, but we were the only team to actually have a project to demo and won the hackathon!

Obviously it is pretty limited in scope, but I definitely feel like GPT-3 has great potential in detecting (as well as generating) spam emails. I can see the possibility of a plugin for outlook / gmail that adds a little header to the top of every email giving a TLDR description as well as advice on if / how to respond.
Arrays and Objects in JS
Tags: javascript, webdev, beginners
Published: 2023-01-23 07:31:39

Given an input array which stores names and respective age as an object, how can one group these objects into respective age groups.

Problem Statement
```
//Example Input : 
let people = [
  { name: "sumit", age: 17 },
  { name: "rajesh", age: 24 },
  { name: "akbar", age: 44 },
  { name: "ali", age: 44 },
];
//Expected Output:
[
  { '17': [ { name: "sumit", age: 17 } ] },
  { '24': [ { name: "rajesh", age: 24 } ] },
  { '44': [ { name: "akbar", age: 44 }, 
            { name: "ali", age: 44 }, ] }
] 
```

Highlights / Explanation: 

- First task here is to identify the structural pattern of the result set - Clearly these Objects are enclosed in an array for every age group and the age group is an object enclosed in the resultant array.

- Secondly, we need to loop through the objects in the input array to group individuals by age group by looking up the result array 

```
let people = [
  { name: "sumit", age: 17 },
  { name: "rajesh", age: 24 },
  { name: "akbar", age: 44 },
  { name: "ali", age: 44 },
];

let index = -1,
  age;

let result = people.reduce((acc, ele) => {
  age = ele.age;
  index = acc.findIndex((ele) => Object.keys(ele).toString() == age);
  if (index == -1) {
    acc.push({ [age]: [].concat(ele) });
  } else {
    acc[index][age].push(ele);
  }
  return acc;
}, []);

console.log(result);

```
997. Leetcode Solution in CPP
Tags: cpp
Published: 2023-01-23 07:27:16

==============================================================
Description:
==============================================================
In a town, there are n people labeled from 1 to n. There is a rumor that one of these people is secretly the town judge.

If the town judge exists, then:

The town judge trusts nobody.
Everybody (except for the town judge) trusts the town judge.
There is exactly one person that satisfies properties 1 and 2.
You are given an array trust where trust[i] = [ai, bi] representing that the person labeled ai trusts the person labeled bi.

Return the label of the town judge if the town judge exists and can be identified, or return -1 otherwise.

 

Example 1:

Input: n = 2, trust = [[1,2]]
Output: 2
Example 2:

Input: n = 3, trust = [[1,3],[2,3]]
Output: 3
Example 3:

Input: n = 3, trust = [[1,3],[2,3],[3,1]]
Output: -1
 

Constraints:

1 <= n <= 1000
0 <= trust.length <= 104
trust[i].length == 2
All the pairs of trust are unique.
ai != bi
1 <= ai, bi <= n

==============================================================
Solution:
==============================================================
```cpp
class Solution {
 public:
  int findJudge(int n, vector<vector<int>>& trust) {
    vector<int> count(n + 1);

    for (vector<int>& t : trust) {
      --count[t[0]];
      ++count[t[1]];
    }

    for (int i = 1; i < n + 1; ++i)
      if (count[i] == n - 1)
        return i;

    return -1;
  }
};
```
=================================================================
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/find-the-town-judge/
Choosing my way in Starchart
Tags: opensource
Published: 2023-01-23 07:18:27

## Overview 
This week I had to choose my role in Starchart, and what part of the project I want to work on. I find front-end development using Remix, React, and Charka UI as the best field where I could apply my skills and competence. 

## Background
I have pretty strong front-end/mobile development experience as a student. I have been working on commercial projects for the last 4 years where I was using majorly React, Next.js, React Native and many other side technologies. 

## Why I find this interesting 
The Remix is something that I have never worked with before, even tho I have seen some videos about its potential and power. I have worked with Next.js before which is very close to Remix in terms of what problem it resolves. I see Remix as a technology that might become a replacement for the Next.js if maintainer develops it properly. 

## Typescript
Another thing that made me excited about the Startchart development is the fact that it is going to use Typescript, instead of Javascript. I have been using typescript for last year in all projects that I worked on and it is just so much better to have static types in your code, instead of getting numerous undefined exceptions when developing with javascript. 

## Conclusion 
I will be happy to work on the Start chat front-end side, even tho I want to participate in other parts of the project to, at least understand how these technologies work on the basic level.
Flutter UI Kit
Published: 2023-01-23 07:16:33


ProKit is the Biggest Flutter UI kit. For Android and iOS developers, it is the ultimate UI Kit For Flutter apps.

The Prokit – **[Best Selling Flutter UI Kit](https://prokit.iqonic.design/)** is a work of art that revolutionizes app development with convenience, empowering developers to create a fancy, stylish look for the apps.

With a bundle of app templates catering to different designs for mobile apps, and various layouts suitable for all multi-purpose app projects, this Best Flutter UI Templates – UI kit is a masterpiece for the Flutter development community.
Environment files are back with Angular v15.1
Tags: angular, environment, tutorial
Published: 2023-01-23 07:09:14

As we all know, when creating a new project in Angular v15, environment files were no longer included. To bring back the environment files, you had to create the files manually, edit the angular.json, and replace the files when switching to production mode.

The **Angular v15.1 update** comes with a great command for this. Now, you can automatically create your environment files and set the fileReplacement settings with the

```
ng generate environment [--project-name]
```

command.

---

[Check out my website for more…](https://cagkanmert.com)
How To Configure PgAdmin To Run SQL Queries
Published: 2023-01-23 07:02:53

Here we will be using **Parch And Posey Database**

1. Download and install pgAdmin on your computer.

2. Open pgAdmin and connect to your PostgreSQL server by providing the necessary credentials (e.g. host, port, username, and password).

3. Once connected, you should see the server listed under the "Servers" tree in the sidebar.

4. Create a new database in pgAdmin by right-clicking on the server, selecting "New" and then "Database".

5. Open the pgAdmin Query Tool by right-clicking on the server and selecting "Query Tool".

6. Copy and paste the SQL queries for creating the "Porch" and "Post" tables into the editor

7. After the database is created, you can expand it and see the tables, views, and other objects within it.

8. To run an SQL query, right-click on the database and select "Query Tool".

9. Type your query in the editor and press the execute button or use the shortcut key (F5) to run the query.

10. The results of the query will be displayed in the tab below the editor.