teleren/devto huggingface dataset:
Write how much work is required, not the work itself
Tags: agile, productivity, writing
Published: 2022-06-24 15:56:57

The format for outlining what work needs to be done to achieve an outcome varies from company to company.

It can be challenging to convey a sense of scope when writing what work needs to be completed, and the result can sometimes amount to ‘do X so a user can do Y’ with the hope that the developer doing the work understands what the writer is getting at or to have a sense of who to ask follow up questions to if they’re unsure.

Writing as a skill has always been important, but as workplaces become increasingly distributed, it’s even more crucial.

Misunderstood Github issues, Jira tickets, or however work is tracked, often leads to wasted time and effort. It also makes onboarding new developers difficult as they won’t have a sense of where pieces of functionality live within a codebase.

Some companies use templates for outlining different types of work such as features, bugs, and chore work (e.g: data migrations), but at others - particularly smaller companies with no formalized process - the format used depends on the individual writer.

A senior developer[^1] on a team I previously worked on proposed during a estimation session that instead of writing what the work itself is (“do X so a user can do Y”), we should instead focus on writing how much work is required.

For example, this change needs to apply to X amount of files, and some of these are frequently used code paths with no test coverage so manual testing will be required.

By focusing on how much work is required when writing what work needs to be completed, we can get a better sense of the scope of changes needed to accomplish a desired outcome.

While there will still be gaps in knowledge and work missed when following this format, this tended to give a better sense of scope of the work, which in turn helped feed into better estimations for project planning purposes, and improved the onboarding experience for newer developers on the team.

[^1]: [Deon Groenewald](https://www.linkedin.com/in/deon/)
194. Leetcode solution in bash
Tags: bash
Published: 2022-06-24 15:54:44

```
# NF represents the number of fields in the current record, that is, how many columns are there
# NR indicates the number of records that have been read, which is the line number
awk '{
    for (i = 1; i <= NF; ++i) {
        if (NR == 1) s[i] = $i;
        else s[i] = s[i] " " $i;
    }
} END {
    for (i = 1; s[i] != ""; ++i) {
        print s[i];
    }
}' file.txt
```
193. leetcode Solution in Bash
Tags: bash
Published: 2022-06-24 15:51:08

```
while read line; do
    if [[ "$line" =~ ^((\([0-9]{3}\) )|[0-9]{3}-)[0-9]{3}-[0-9]{4}$ ]]; then
        echo $line
    fi
done < "file.txt"
```
192. Leetcode solution in Bash
Tags: bash
Published: 2022-06-24 15:49:18

```
# tr command is mainly used for character replacement or case replacement
# -s parameter means that if consecutive characters are found, reduce them to 1
# ‘ ’ And ‘\n’ are spaces and carriage returns, which means to replace all spaces with '\n'
cat words.txt | tr -s ' ' '\n' | sort | uniq -c | sort -r | awk '{ print $2, $1 }'

```
724. Leetcode solution in CPP
Tags: cpp
Published: 2022-06-24 15:40:21

```
class Solution {
 public:
  int pivotIndex(vector<int>& nums) {
    const int sum = accumulate(begin(nums), end(nums), 0);
    int prefix = 0;

    for (int i = 0; i < nums.size(); ++i) {
      if (prefix == sum - prefix - nums[i])
        return i;
      prefix += nums[i];
    }

    return -1;
  }
};
`
```
1480. leetcode solution in JavaScript
Tags: javascript
Published: 2022-06-24 15:38:05

```
var runningSum = function(nums) {
    let ans = new Array(nums.length)
    ans[0] = nums[0]
    for (let i = 1; i < nums.length; i++)
        ans[i] = ans[i-1] + nums[i]
    return ans
};

```
Javasc-ordle, making a JS function guessing game with React
Tags: react, javascript, tutorial, gamedev
Published: 2022-06-24 15:35:04

Maybe we’re a bit late to the trend, but this week we had fun developing a wordle-esque game for guessing the output of hidden Javascript functions!


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

We’ve deployed it on Codesphere so that you can play it yourself [here](https://37929-3000.codesphere.com/)

###How it works

Javasc-ordle(Working title) works by taking a github gist of a function, and blurring out the contents of the function.
The player then can guess different words to release them in the function.

Once the player believes they know how the function works, they can guess the output for the given parameter.

---

###Let’s actually build it!
We built the game with React, you can check out the code here:

https://gist.github.com/LiorB-D/ef0f39e706be39c02e488058df6f02a5

As you can see, we start by pulling the gist and creating a version with redacted terms. Then we add functions to allow the player to guess both terms and the output, and perform the correct actions whenever they make a correct guess

---

###Next Steps
Now we could probably do a lot more with this, including:
* Adding a whole schedule of gists
* Adding compatibility for multiple languages
* Score-keeping

But this was a fun way to get started! Let us know if you want us to build this out more!


What’s your favorite wordle spin-off? Let us know down below!

Until then, happy coding from your friends at [Codesphere](https://link.codesphere.com/NL), the swiss-army-knife every development team needs!
Symfony, Elasticsearch - indexer command - Part 6 Tutorial
Published: 2022-06-24 15:29:25

Hi, the 6th article devoted to the theme: “How to work with ElasticSearch using Symfony PHP framework” already ready for reading. We will speak about symfony command which would be used for indexing some initial test data to ElasticSearch index. All details are here: "[Symfony, elasticsearch - indexer command](https://sergiiblog.com/symfony-elasticsearch-indexer-command/)". Have a pleasant reading.
Designing microservices with shared databases
Tags: microservices, database, devops
Published: 2022-06-24 15:21:36

Context:

We are designing a new (micro)service and a suggestion was raised to use a separate database for the new service. What follows is my point of view with regards to sharing a single database VS having a dedicated database for each service.

Internal memo:

Schemas are fine(ish), splitting databases is not. By adding a second database:

- You lose the ability to perform ACID transactions.
- You lose referential integrity.
- You lose PITR.

These are major downsides. If someone suggested you to use a database for your new project that does not support even one of these, you would (hopefully) dismiss their advice (https://www.youtube.com/watch?v=b2F-DItXtZs).

To make things worse, it adds a ton of complexity:

- deployment & permission management is twice as complicated
- keeping database schemas in sync is a challenge
- comparing database states is time consuming

A non-technical problem that emerges over time:

- different databases / schemas adopt different conventions because they are seen as separate projects
- every project gets a new database because “clean start is easier”, which compounds all of the above

Microservice advocates might say:

> first rule of microservice - every service has its own database

To that I say: the benefits of complete separation are a myth. Unless you are a separate business, it is an anti-pattern that leads to [network-layer proxies](https://www.cybertec-postgresql.com/en/joining-data-from-multiple-postgres-databases/) that merge multiple databases or a ton of data duplication, e.g. payments system will need to access information about user's account, currencies, etc.

It also not the "first rule of microservices" that each service must have a separate database. In fact, shared database design and its pros are discussed in https://microservices.io/patterns/data/shared-database.html.

The intent behind the suggestion is good: separating databases ensures that other applications cannot perform side-effects that may change the behavior of microservices in unpredictable way. However, we can already achieve this with a well-defined access perimeter, which is achieved by being very explicit about what each (micro)service user can access.

I don’t support using separate schemas either, because it encourages lazy naming conventions, but since it does not break any of the 3 major downsides I mention, this is more of a preference than a technical guidance. With schemas, you end up with tables named like `foo.project` and `bar.project`, which isn't great DX. A single namespace forces to be thoughtful about it.

In short, setting up a separate database for a new project always sounds nice in theory, but in practice leads to a ton of overhead down the road. Keep things simple by using 1 database and give every user narrow permissions to make the changes to the database predictable.
Appwrite Community Report #11
Published: 2022-06-24 15:18:40

Greetings from team Appwrite!👋

Hope you had a wonderful week! If you ask us, it has been a fun ride for us as well. 🎉

**TLDR;** Looks like the 0.15 release is just around the corner. This report covers some spoilers, some resources, few projects and more. Stay tuned till the end!

---

## 📢  What’s new 

- We just released our monthly newsletter! Have you read it yet? 🤩
If not, get hold of our monthly goodness [here](http://digests.appwrite.io/).
- We are going to announce our first maintainer we sponsor for the OSS Fund 📢
{% embed https://appwrite.io/oss-fund %} 
Share it with your maintainer friends, who would like some 💲

---

## ✅ Issues solved

Here’s to making Appwrite better everyday! Issues we have worked on this week:

- Update web SDK examples, since the syntax is now refactored
🔗[Link to PR](https://github.com/appwrite/sdk-generator/pull/464)
🔗[Link to PR](https://github.com/appwrite/appwrite/pull/3413)

- Allow the usage `$id`, `$createdAt`, `$updatedAt` when making compound index
🔗[Link to PR](https://github.com/utopia-php/database/pull/141)
- Bug fixes around databases, cache, UI and real-time
🔗[Link to PR](https://github.com/appwrite/appwrite/pull/3417)
- Fixed permission related to user at `$createdAt` in `updateDocument`
🔗[Link to PR](https://github.com/appwrite/appwrite/pull/3421)
- Query limit increased from 128 to 4096
🔗[Link to PR](https://github.com/appwrite/appwrite/pull/3381)

---

## ⚒️ What we’re currently working on

- Improving Hashing API
- Adding Autodesk as OAuth provider
- Fixing OAuth provider tutorial with new up-to-date code example
- Improving docs generator to support new swagger schema, will be used by Hashing API

---

## 🗣 Discussions
What’s your take on having Appwrite Messaging API?
🔗 [Join the discussion here](https://github.com/appwrite/appwrite/discussions/905)

---

## 📘 Resources

- Read more about Appwrite [Zoom OAuth Integration](https://dev.to/appwrite/appwrite-zoom-oauth-integration-3gao)
- Learn about Flutter and Stripe Integration
{% embed https://dev.to/appwrite/stripe-payment-with-flutter-and-appwrite-2c68 %}
- Did you check out Appwrite on [YouTube](https://www.youtube.com/watch?v=QvJ3_CVeZmk)? 
- Take up the 30 days learning challenge to get started with Appwrite
{% embed https://30days.appwrite.io/ %}
- Here’s an introductory video about Appwrite by [Watch and Learn](https://www.youtube.com/watch?v=v88GewKLZFU)
Python and Qt for Industrial Applications
Tags: python, qt, embedded, application
Published: 2022-06-24 15:03:11

{% youtube drXV0vYEhEg %}

Is building your industrial processes with Python a good idea? Watch the video about the powerful technology combination for an industry – Python and Qt by our Head of Embedded Systems Department, Jarek.

Enjoy! You can also read the article at [Frontend House](https://frontendhouse.com/experts-zone/python-and-qt-for-industrial-applications-experts-zone-26).
Haha.me | Made with Next JS
Published: 2022-06-24 15:00:15

![Haha.me | Made with Javascript | Next JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1655734471/large_haha_me_made_with_next_js_3b0c021e26.png "Haha.me | Made with Javascript | Next JS")


### Be a Smarter Investor, Know exactly how much your portfolio is worth

> Forget spreadsheets. See all your crypto assets in one mobile app. We auto-sync with your exchanges and wallets to provide free portfolio tracking and average cost basis calculations.
> 
> ### Track all your crypto in one location
> 
> ### Be a Smarter Investor
> - Know exactly how much your portfolio is worth
> - Figure out cost basis of each coin
> - Forget spreadsheets and entering things manually - We import new transactions automatically
> - Check coin prices
> 
> ### Import from Exchanges
> - Coinbase and Coinbase Pro
> - Binance
> - Binance US
> - FTX
> - FTX US
> 
> ### Safe and Secure
> - HaHa only requests read permissions. We do not ask for your crypto keys.
> - Data is encrypted in transit and at rest.
> - Built by alumni from top tech companies including Microsoft, Amazon, and Intel.

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Haha.me on Twitter](https://twitter.com/withjavascript/status/1540347722133274624?s=20&t=Ct1iWRrdhDlsch1ndgTUsw)
 |
| Medium | [Haha.me on Medium](https://medium.com/@madewithjavascript/haha-me-made-with-next-js-1ce54bb19700)
 |
| Facebook | [Haha.me on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid0d14o9EiJGMDKCSQhi6Hf6dobi33xdmEUhU1ZwjAtJ539zCcqurnLwD8LQKefzGULl)
 |
| Tumblr | [Haha.me on Tumblr](https://www.tumblr.com/blog/view/madewithjavascript/687952594020220929?source=share)
 |
| LinkedIn | [Haha.me on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6946113603548692480)
 |
| Pinterest | [Haha.me on Pinterest](https://pin.it/6QEB1p3)
 |


Filled Under:


 - [Made with Javascript](https://madewithjavascript.club)
 - [Made with Next JS](https://madewithjavascript.club/categories/next-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
First post for DEV Community.
Published: 2022-06-24 14:57:41

Hi!
I'm Atsushi from Tokyo,Japan.
I love dancing, music, traveling, also drinking beer🍺

I've been breakin for over 10 years.
If there is a B-boy, let me know.lol

About my career, It is a little strange.

After graduation, I became a professional dancer.
Also I lived in Australia for one year and I was working as an event manager & stuff after go back to Japan, and then Covid-19 happened.
All the events were gone.

Pretty much I lost the job.

Luckily, I have been learning Engineering for few years in my free time.
And I joined IT company.

I'm engaged in system operations.
I have been interested about technology, so I try to expand my knowledge.

Currently, I have been developing mobile apps using Flutter, and I love it.
There is Flutter community in Japan where I'm in.
Community is always helps many things.
I want to help those who are in trouble one day.

Thanks,
InboxPro | Made with Angular JS
Published: 2022-06-24 14:50:22

![InboxPro | Made with Javascript | Angular JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1655612495/large_inbox_pro_made_with_angular_js_29ca864851.png "InboxPro | Made with Javascript | Angular JS")


### Boost your productivity in Gmail

> Suite of tools for gmail: AI-powered email assistant, Calendar scheduling, Email Tracking, Templates, Auto-Followups, Email analytics.
> 
> We'll provide you a suite of tools for gmail: AI-powered email assistant, Calendar scheduling, Tracking, Templates, Followups, Email analytics...
> 
> Turn Gmail into a powerful automated machine
> 
> ### InboxPro will turn into your AI-powered email assistant generating professional emails with its magic compose feature and summarizing your emails in one click.
> 
> - AI-powered email assistant
> - Generates professional emails
> - TLDR. Summarises your emails
> - Get through all of your emails 5x faster
> 
> ### Calendar scheduling
> Let other people schedule meetings with you by showing them your availability into email.
> 
> - Share your availability as simple as share a link
> - As many event types as you need
> - Automated calendar management to avoid overlaps
> - Configure the meeting location (Google Meeet, Zoom, Phone, ...)
> - Get booking reminders
> - Conected to your Google Calendar

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [InboxPro on Twitter](https://twitter.com/withjavascript/status/1540345325151408128?s=20&t=g9mkfzb9rzNibGUzqqwLOQ)
 |
| Medium | [InboxPro on Medium](https://medium.com/@madewithjavascript/inboxpro-made-with-angular-js-7034a06228ee)
 |
| Facebook | [InboxPro on Facebook](facebook.com/madewithjavascript/posts/pfbid02h3eZwLz2yCUVEPXmjHsZcMbHFmTq8fqjx1Gnfzt56H97UL64epy5CbJv75adw1Lol)
 |
| Tumblr | [InboxPro on Tumblr](https://www.tumblr.com/blog/view/madewithjavascript/687951921656545280?source=share)
 |
| LinkedIn | [InboxPro on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6946111760265359360)
 |
| Pinterest | [InboxPro on Pinterest](https://pin.it/6tio9T8)
 |


Filled Under:

 - [Made with Javascript](https://madewithjavascript.club)
 - [Made with Angular JS](https://madewithjavascript.club/categories/angular-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
Simple Homemade Loading Screen in React
Tags: react, gsap, beginners, javascript
Published: 2022-06-24 14:40:53

## Reference tutorial
In my last blog, I mentioned this [tutorial](https://www.youtube.com/watch?v=SR8755C0bME) by Tony Heimark that is super easy to follow. I'll be going off of that, but making the animation instead. He uses the package, [react-spinners](https://www.npmjs.com/package/react-spinners). Instead of that, I'll be using the flower icon I found off of flaticon.com. 

## Finding an image
I went into google and typed in "flower icon". I went to [flaticon.com](https://www.flaticon.com/free-icon/flower_346167?term=flower&page=1&position=1&page=1&position=1&related_id=346167&origin=tag). I just right clicked the image for the image address. This gives an image with no background.

## App.js
In App.js, I made a useEffect with a setTimeout inside. This will be how long the screen is loading for. This will load for 5 seconds.

```
  const [loading, setLoading] = useState(false);
  useEffect(() =>
  {
    setLoading(true)
    setTimeout(() =>
    {
      setLoading(false)
    }, 5000)
  }, [])
```

Under return, I made a ternary statement with the loading state. If loading is true, show the loading screen. If loading is false, show the homepage. 

```
  return (
    <div class="App">
      {loading ? 
        <Flower />
      :
      <div class="homePage">
```

I made a separate component for the loading screen called, "Flower".

## Flower.js
In Flower.js, I made a useEffect with the animation inside it.

```
  useEffect(() =>
  {
     gsap.to("#flower", 1.75, 
     {
        y: 75,
        yoyo: true,
        repeat: -1, 
        ease: "power1",
     });
 }, [])
```

This animation makes the flower float up and down. 1.75 is the amount of time for the animation. The "y" makes it move up 75 pixels. The yoyo being true means the flower will yoyo up and down 75 pixels. The repeat being -1 means it will repeat forever. The ease is the kind of style it is moving. 

Under return, I added the image and a tag that says it's loading.

```
  return (
    <div class="loadingScreen">
        <img className="bus" src="https://t4.ftcdn.net/jpg/01/76/26/25/360_F_176262588_5UBYLDB9mqLxdqavixo0d4XF4g6ydFpZ.jpg" />
        <h1 id="loadingText">Loading...</h1>
    </div>
  )
```

I was playing around with it, and another animation idea would be for the flower to spin. 

```
gsap.to("#flower", 2, 
{
    rotation: 360,
    repeat: -1, 
    ease: "slow",
 });
```

This just rotates the flower 360 degrees forever with a "slow" style.
Reng Player and how it's different
Tags: wordpress, webdev, javascript
Published: 2022-06-24 14:32:24

A year ago, I was trying to post a podcast on my WordPress blog and at that time, I used default player of the WordPress. It was pretty fast and useful and it got the job done. 
But I thought maybe we can get a another player which satisifies me just a little more. 
There are a lot of tutorials out there to work with [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API) which is a very powerful one. 
So I decided to bring some more functionalities and maybe a better design to the audio player in WordPress. This is how it looks like on Gutenberg: 

![Reng Player admin area](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eil8d6g9idut1m5j6by7.png)

This little block player shows a nice bar, audio title and artist and also the cover. I tried to apply the main color of the cover image somehow in the player and I think the details bar at the bottom of the player was a good choice. This is how it looks like on the front area: 

![Reng Player front area](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcsif215ugluclmwrgkh.png)
It's very lightweight and responsive and I think adding playlists to it in the future would be a good idea. 

Like this player? It's already available as a [block plugin on WordPress repository](https://wordpress.org/plugins/reng-player/). You can install it on your website and give me feedback. 
Think this worth your contribution? Then make one [on Github](https://github.com/amirition/reng-player).
Hosting static site on Google Cloud
Published: 2022-06-24 14:20:10

This document is just a reference for myself.

Create a new project
- https://console.cloud.google.com/
- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5b82uobqz4v1vhcnzxb.png)
- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pv1vopclh43u1dfqxfrr.png)

Setup project
- Select the new project
- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtix5bxji8kc6uj60pqj.png)
- Search for "Cloud Storage"
- Create a new bucket
- Verify domain ownership
- Add permissions to the bucket
- ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ary0n4q5rsyhfrhmllm9.png)
User Office Hours: Building secure application in VS Code with Snyk
Tags: snyk, security, officehours
Published: 2022-06-24 14:06:57

Visual Studio Code (VS Code) is a code editor redefined and optimized for building and debugging modern web and cloud applications. The Snyk integration for VS Code can help you create secure applications from the beginning.

Join us to learn more about Snyk VS Code capabilities. During this session, we’ll take a look at:
 - How to install the Snyk VS Code plugin
 - Different types of security scanning in your editor IDE
 - Streamlining security information in your editor
 - Detecting and fixing security vulnerabilities in your code, dependencies, and more.

Throughout the session you can ask us anything! Bring all of your Snyk questions and we’ll do our very best to answer them.

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