teleren/devto huggingface dataset:
Introducing Notastic - Because notes have emotions too! | MongoDB Atlas Hackathon 2022 on DEV
Tags: atlashackathon22, webdev, javascript, react
Published: 2022-11-26 03:46:15

## What I built

I've built an on the go notes web app that helps you keep track of your notes while you're on the go. It's easy to use and you can access your notes from anywhere.

### Category Submission:
Choose Your Own Adventure

### App Link
https://notastic.web.app/

### Screenshots

![home page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/60rhwl15nampxob7sgrr.png)
![login page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6fs6fnqnav3d93ljl79.png)
![signup page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qyu4a6n8k0hr25g8pqb9.png)

### Description

Notes are secured with a JSON Web Token (JWT) authentication. User has unlimited notes per account.

The notes are colored according to tags or what I call emotions. Such as red for love, blue for work, yellow for notes and so on.

### Link to Source Code

[Github](https://github.com/Anas-Dew/Cloud-Notebook)

### Permissive License
MIT

## Background
I was fascinated by the MERN stack's capabilities while learning about it, and I wanted to know more. So I had the inspiration to make a notes app, and as I was working on it, I considered adding an emotion function.


### How I built it
(How did you utilize MongoDB Atlas? Did you learn something new along the way? Pick up a new skill?)


### Additional Resources/Info
Null

Finally, i want to thank Devto and MongoDB who've organized this amazing hackathon.
7 Steps to Become an Automation Tester || (Step by Step way to switch from Manual to Automation)
Tags: beginners, tutorial, programming, webdev
Published: 2022-11-26 03:35:22

Join The Testing Academy -: https://thetestingacademy.com
Automation Courses -: https://testautomation.teachable.com/
Where we help you to become a better Test Automation engineer.

In this video, I have given 7 step process to a Better Automation testing.

1. Technical Programming Skills
2. Know Your Applications Well
3. Learn about the Automation Testing Tools
4. Understand the ATLC
5. Work on Your Test Automation Strategy
6. Master Manual Testing
7. Keep your self Ready for Opportunity and Updated with Latest Testing Trends

Mindmap used  : https://mm.tt/1355062804?t=2b7HmzsnDU

Join Facebook Group :  http://bit.ly/learntesting2019
Website:   https://scrolltest.com
Website:   https://thetestingacademy.com
Twitter: https://twitter.com/itstechmode

{% embed https://youtu.be/i1Fv5cW3s0c %}

#automationtesting #manualtesting #testautomation #thetestingacademy #scrolltest
🚀 Tools and services I recommend:
Some of the courses that I recommend to become better Automation Tester 🙌🙌

✅Selenium Training and Certification -
https://scrolltest.com/go/edureka

✅Learn Jenkins for QA -
https://bit.ly/learnjenkins-p1

✅Programming Java -
https://bit.ly/learnjava2020-p1

✅Test Automation - 
https://bit.ly/learnautomation2020

✅API Testing - 
https://www.learnapitesting.com

✅Cypress Tutorial with LIVE Projects -
http://cypresstutorial.com
Piers Morgan blasts Prince Harry, Meghan for 'attacking' monarchy, says 'shame on Kerry Kennedy'
Published: 2022-11-26 03:23:51

<div>
<p class=""><a href="https://pknews.online/piers-morgan-slams-meghan-markle-as-little-grifter-two-bit-mediocre-actress/" target="_blank" rel="noopener">Piers Morgan</a> has slammed Prince Harry, Meghan Markle and Kerry Kennedy and called it "outrageous" that the Sussexes would be given a prestigious award for standing up to royal family 'racism'.</p>
<p class="">The former Good Morning Britain (GMB) host joined "Fox &amp; Friends" Monday to discuss why he believes it is "absolutely disgusting" the Duke and Duchess of Sussex received the high honour.</p>
<p class="">Morgan said: "I think it's absolutely disgusting and shame on Kerry Kennedy, frankly, for besmirching the name and memory of her father in this way."</p>
<p class="">The 57-year-old added: "The idea that these two little grifters, who quit royal duty, quit Britain… exploited and fleeced their royal titles for hundreds of millions of dollars straight in their back pocket…the idea that they're being lauded as some kind of heroes in America by your own sort of royal family, if you like, the Kennedys, it really sticks in my gullet."</p>
<p class="">He continued: "And I think they should rethink this, because I think it just to me, it epitomizes the malaise of modern celebrity when you have two people going out of their way to trash their families on national television."</p>
<p class="">Morgan also shared his thoughts on the Duke's upcoming memoir, saying: "<a href="https://pknews.online/piers-morgan-reacts-as-meghan-markle-prince-harry-set-to-receive-award-for-heroic-stance/" target="_blank" rel="noopener">Harry</a> has this book coming out, and he's going to do it all over again to his father who's now the king, who's still mourning, of course, the death of his mother."</p>
<p class="">He went on: "You've got Meghan Markle, who was a sort of two-bit mediocre actress who married into a family, took our favorite prince, took him to America, and is now spending her entire time trying to attack the monarchy."</p>
<p style="text-align: center;"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7308143216198856" crossorigin="anonymous"></script>

[READ MORE](https://pknews.online/piers-morgan-blasts-prince-harry-meghan-for-attacking-monarchy-says-shame-on-kerry-kennedy/)
CQRS
Tags: systems, beginners, tutorial, architecture
Published: 2022-11-26 02:55:09

The term CQRS was first explained by Greg Young as “Command and Query Responsibility Segregation”. A formal definition of CQRS would be an architectural pattern to divide each action of the system into commands and queries. A command act as an instruction, a directive to perform a specific task. It is specially designated to change something and doesn’t return a value but only gives an indication of the change — succeeded or failed. Likewise, a query requests information but does not affect the system — no state changes.

CQRS goes on with a theory of separating commands and queries that performs different roles in the system and keeping them separate keeps them optimized which can be a big asset to [distributed systems](https://dev.to/pragyasapkota/distributed-system-the-definition-nkh).

## CQRS with Event Sourcing

We can see CQRS walking alongside the [Event Sourcing](https://dev.to/pragyasapkota/event-sourcing-1ml4) pattern where the source of events is the write model and is the official source of information. As per the read model, it materializes the views of the data. These are usually highly [denormalized](https://dev.to/pragyasapkota/denormalization-417p) views.

## Advantages of CQRS

- Scaling is easy — can be done independently on read-and-write workloads.

- Effortless architectural changes

- Smooth optimizations

- Loose coupling leads to closer business logic

- Complex joins can be avoided when queries are made

- The system behavior has clear boundaries between them

## Disadvantages of CQRS

- Application design is complex

- System maintenance efforts should be increased

- There is a risk of message failures and duplicate messages

- We might face difficulty while we face eventual consistency

## Use cases of CQRS

There are some use cases where CQRS might be the best option to go for. Let’s see some of them.

- If your system requires better security so that only the right domain entities can perform a write operation on data.

- If the system has the chance to evolve somehow. There can be multiple versions of the model or the business rules change regularly in the system.

- If you are sure to integrate your system with others when working with [event sourcing](https://dev.to/pragyasapkota/event-sourcing-1ml4). In this case, the failure of one subsystem has no impact on the availability of others.

- If the data reads performance and data writes performance needs to be adjusted separately.

**_I hope this article was helpful to you._**

**_Please don’t forget to follow me!!!_**

**_Any kind of feedback or comment is welcome!!!_**

**_Thank you for your time and support!!!!_**

**_Keep Reading!! Keep Learning!!!_**
Tech Blogging
Published: 2022-11-26 01:21:54

I was writing some Python code the other day to read some stats on covid-19, and while doing so I came across a blogging site geared towards developers. The site has hundreds of blogs on programming, development, cloud computing, frameworks, and really anything that has anything to do with writing code. 

The site is called _**HashNode**_ and it is free. I would recommend it to any developer, no matter what level experience, as there is something for everyone. 

Please excuse me if you have already come across the site!

https://www.hashnode.com

My Blog - (Nothing there yet) https://techdudeNYC.hashnode.dev

Happy Coding, 
Joseph AKA "TechDude"

`**H = HashNode
     if H = 'HashNode'
          Print(H)
        else
            Go blog yourself `**
Panic on change of Request!
Tags: webdev, javascript, beginners, programming
Published: 2022-11-26 00:56:06

The rate at which **programmers** are needed is becoming **pretty much higher** every day. But it is said that 

> JavaScript and Python are the most demanding of all..
what if I decided to learn both language and in **_2024_**, another language becomes the most needed!. The question now is 

```
"What do I do?"
```
Software Release Via NPM
Tags: opensource, npm, programming, javascript
Published: 2022-11-26 00:31:03

For this lab, I have chosen to release my tool via the use of NPM.


#### Preparation before publishing

Create a package.json file if you don't have in the root directory.
Use this npm init to create the new package.json file.

A package.json file:
- Lists the packages your project depends on
- Specifies versions of a package that your project can use using semantic versioning rules
- Makes your build reproducible, and therefore easier to share with other developers
- Make sure to add the name, version and author in your package.json file.

ADD a README.md file to a package:
- In a text editor, in your package root directory, create a file called README.md.
- In the README.md file, add useful information about your package.
- Save the README.md file.

Publish your release:
-Make sure you have created the account npm and verified it.
- Use the `npm login` on your terminal. Login with your username and password.
- Use `npm publish --access public` to create and publish scoped public packages.

**Note: Update types**
Each digit in the version has it's own meaning:
1) First digit means major release.(resetting two later digit to zero)
2) Second digit means minor change in the software(resetting last digit to zero)
3) Last digit means a patch release.

#### [Installing](https://www.npmjs.com/package/button-ssg)
After releasing my static site to install it locally on your device you can use `npm i button-ssg` to download my program.

#### Feedback
It's important to avoid taking feedback as personal criticism. When people provide us with feedback, we should be grateful because they are actually pointing out areas in which we need to improve.

#### Thoughts
This lab was a welcome one, that allowed us to contribute more to the community if anything. It was a first for me when publishing to npm, but this is useful information. I have always wondered how people were publishing their programs and now here I am, doing just that.
Use vscode web editor in Azure DevOps or Github repositories
Tags: azure, devops, vscode, github
Published: 2022-11-29 08:06:57

---
title: Use vscode web editor in Azure DevOps or Github repositories
published: true
date: 2022-11-26 00:00:00 UTC
tags: Azure,devops,vscode,Github
canonical_url: https://robvanpamel.github.io/2022/11/26/vscodewebeditor.html
---

I am already a fan of visual studio code, but recently I discovered some features which made it only better.

This blog on github is created mainly using visual studio code. But actually I don’t have visual studio code installed. I’m editing it in my browser on my iPad from the kitchen! I love the “new” web editor in github. Actually I really love the fact that you can start editing now from anywhere anytime, almost no prerequisites. <!--more-->You can launch vscode in your browser by pressing the dot `.` on your keyboard, and a new environment will be created, where your complete repository is cloned and ready to change. How great is that?!

The best part, is that you can not only do this with Github but also on Azure Devops! Go to your repository in the browser and press the dot `.` and the magic happens. For big changes, it might not be the ideal environment, but if you want to create a small change or file a PR, it might just suit your needs.  
If you want an overview of the other options, press the question mark `?` and you get the overview. It is something small but I found so usefull, I needed it to share with you!

If you have any questions or comments (including typos ;) ) please leave them over [here](https://github.com/robvanpamel/robvanpamel.github.io/issues/new)

Thanks for reading and learning along! See you next time!

### References about vscode web

[https://code.visualstudio.com/docs/editor/vscode-web](https://code.visualstudio.com/docs/editor/vscode-web) ( here, it still mentions readonly for Azure Repos, but this is outdated )
SpringPortal #5 - Optimizing APIs in Spring Boot
Published: 2022-11-27 17:23:16

---
title: SpringPortal #5 - Optimizing APIs in Spring Boot
published: true
date: 2022-11-25 21:28:58 UTC
tags: 
canonical_url: https://24naman.hashnode.dev/springportal-5-optimizing-apis-in-spring-boot
---

# MongoDB Indexes

MongoDB provides indexes to support efficient querying. Without indexes, all the documents are scanned for the required query, resulting in high resource usage.

[Indexes are special data structures that store a small portion of the collection's data set in an easy-to-traverse form. The index stores the value of a specific field or set of fields, ordered by the value of the field.](https://www.mongodb.com/docs/manual/indexes/#indexes)

These indexes can be used to optimize our APIs.

### Normal Index

- MongoDB query without the index

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1669408248747/-JLxdupuD.png)

- MongoDB query with the index

- An ascending index on price has reduced the load on MongoDB and will vastly improve the API response time.

### Text Index

- While working with text like searching for a substring on a field, searches become complicated and time-consuming.
- We can add a simple field index like in the earlier example.
- Searching using regex: ![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1669409320936/BsxIVJ6rT.png)
  - This query has taken 3 ms to complete.
  - But if we have several records, then this will be very slow, taking up to even several minutes.
- If we create a simple index on the field, ![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1669409562030/D3cwCOPU5.png)
- This index will speed up the query.
- But as soon as we racked up to some millions of records, this index will also start to fail to give us desired results.
- For this kind of situation where we dealing with a String field in MongoDB, we have the `$text` index.

## Conclusion

There is a lot to do when trying to optimize an API and optimizing the database calls is one part of it. MongoDB indexes are great to come closer to our goal.

* * *

## GitLab

[Code Repository](https://gitlab.com/spring-hashnode/hello-spring-mongodb)

[Article-specific commit](https://gitlab.com/spring-hashnode/hello-spring-mongodb/-/commit/4dce3495d7aafc985852eb20c16aac2b516ba6b6)

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2104033689576056"
     crossorigin="anonymous"></script>
How to use Timer for calculation in React JS
Tags: react
Published: 2022-11-25 23:24:43

I was working on a React project that I need the system to
 do a calculation e.g If the user supply a value of Bomb to
 be 10 and Energy to be 5. it means the number of bomb the 
 system is going to generate is 10 at every one minute in 5
 times(the number of energy) which is equal to 50... so, at
 every one one minute I need the system to keep doing the 
 addition i.e The number of bomb generated at one minute is 10,
 the number of bomb generated at two minute is 20, the number
 of bomb generated at three minute is 30 e.t.c until five 
 minute(which is the value of energy supplied) and after that
 five minute the timer will stop. Any help on this please  guys!
How to Take Screenshot from Android Emulator?
Tags: android, beginners
Published: 2022-11-25 23:00:00

**You can take screenshot either from the Android Emulator controls menu or Android Studio Logcat menu**

I was so stupid, I have been taking screenshot manually (using the Windows **Snipping Tool**) from Android emulator without knowing there is already **"Screen Capture"** feature in Android Studio.

These are 2 ways to take screenshot from your Android Emulator:

## Android Emulator Controls Menu

Click on the camera icon
![How_to_Take_Screenshot_from_Android_Emulator_01.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659069825501/flP8NzP19.png)

You can capture with frame

![How_to_Take_Screenshot_from_Android_Emulator_02.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659070039930/gzQLsPO1P.png)

or without frame
![How_to_Take_Screenshot_from_Android_Emulator_03.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659069851972/NQvLQN_sp.png)

Click **Save** and select the location where you want to save.

## Android Studio Logcat

You can do the same in Android Studio Logcat

![How_to_Take_Screenshot_from_Android_Emulator_04.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659070559430/8UWM8fOvB.png)

It brings out the same window, except it has this **"Generic Phone"** or **"Generic Tablet"** to choose from.

![How_to_Take_Screenshot_from_Android_Emulator_05.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659070580568/38fJTJpUb.png)

As you can see above, the frame is a generic frame which is slightly different from the actual frame in your emulator.  That's the only difference in this method.  There are also additional **Rotate Left** and **Rotate Right** buttons, which you can so do it easily from the emulator controls.

## Conclusion
Honestly, why give more than one way to do a same thing? This is my general feeling on Android development. We always have more than one way to do a same thing in all aspects, including coding and implementation.

---

*Originally published at [https://vtsen.hashnode.dev](https://vtsen.hashnode.dev/how-to-take-screenshot-from-android-emulator)*.
Adding my SSG to PyPi
Tags: python
Published: 2022-11-25 22:35:21

This week i had my first experience releasing an open source project and Creating a package on pypi. This allows anyone to install my package with the pip install command.

# How Did I do this

using [Poetry](https://python-poetry.org/) I was able to build and deploy my code into pypi into the page [pdrozd-ssg](https://pypi.org/project/pdrozd-ssg/). With this i can use `pip install pdrozd-ssg`. Simple enough right? 

# :(

# How many Iterations did i need
15 15 versions it took me to finally get it working. I had many issues from my script not passing correctly or Having to change how my program started or finding an error that I saw after.

Finally I think i have my SSG in a workable state and allows you to run the script with the command `pdrozd [whatever command you want]`

# What I Did

First I needed to add a main attribute to my code and even make my main code into a callable function so I can specify an entry point.

Also i needed to make my .toml file specify the entry point of the script so i could directly call it from the command line.

Finally I wanted to attempt to automatically publish any new versions when their is a PR merged into the main. This was pretty interesting and I learned their are certain parts that are hard to automate because I need to manually change the version

# How did testing go

Testing with someone else taught me a bunch of things from making sure to add the upgrade command because you cant just install again you need to upgrade it so it can uninstall and reinstall the new version. 

# What Next

Overall this was a cool experience i wouldn't think i would be able to make a python package especially because I only started 11 weeks ago. Now I want to continue to improve my SSG but also make a new package that might get used by new people on python.
Gamification in UX Design - An Approach to drive and boost user engagement
Tags: gamification
Published: 2022-11-25 22:23:31

With millions of distractions everywhere online, you might need more than a functional and usable design to hook your audience and boost their engagement. 

One way to achieve this is a concept called gamification- An approach to make products simple, enjoyable and fun while simultaneously boosting user engagement. 



## **What is Gamification?**

Sometimes people mistake gamification for game design which is not so. The terms are hardly related to each other, rather Gamification is a technique that allows designer  to insert game elements and  mechanics into a non-game environment such as mobile applications and websites

This technique helps design to become lively, fun and more interesting to users making them remember to interact with your applications and complete some tasks effortlessly.

This can be done by adding a game element such as a challenge to a product to encourage users to interact more with your application. For instance, a game element such as a challenge to check in to the applications every day and be rewarded when doing so. Such element help stimulates and motivates users to perform a certain action, Thereby imbibing them with the behaviour.

## **Why is gamification in UX design?**

📌Boost engagement and learning
📌Fun and interactive way of completing a task
📌Evoke emotion and encourage competition 
📌Faster assimilation
📌better understanding 
📌 Real-time feedback

## **Types of game mechanics in UX design **

UX designers use different types of game mechanics to boost users’ experiences which leads to an increase in user engagement. 
Here are the most popular types of game mechanics.

**Challenge
Stickers and Badges
Points
Leaderboards
Journey
**

## **Final thought **

In conclusion, the role of gamification in UX design can significantly help improve users’ engagement and overall experience with the products. This can make a product become remarkable and stand out.