teleren/devto huggingface dataset:
Next Steps in Building a Software Solution
Tags: software, it, informationtechnology, rapinnotech
Published: 2020-06-25 05:48:03

Creating a software solution tends to be a complex process that requires adequate amounts of planning. It is common among teams to miss or overlook certain procedures, which cause significant problems in the future. Given below are six steps you need to follow when building a software solution for your use case:

Identify the feasibility and requirements of the project

As you already know why you need a software solution, the first step is to understand the feasibility of the project. The development team should understand the goal of your venture. At the same time, you should know the tasks, level of involvement, resources, and time it will take to complete the project. It also helps calculate the Return on Investment (ROI) and risks involved in undertaking the venture.

Define communication lines

From the day you start the project, everyone on the team should know the roles of all the members. Every individual will place requests from clarifications and external system access. Knowing who to contact for a given task will reduce the chances of miscommunication while ensuring the operations continue smoothly.

Focus on design

In the design phase, you need to create a visual prototype of the software solution. You will be using this as a model in all the other stages of development. When focusing on the design, it will give you an idea of the processes you need to follow to achieve your objectives and requirements. It also highlights software and hardware components and functionality of the solution along with the tools you need for future development.

Start coding

During this stage, your team starts the process of converting the design blueprint into the software solution you need for your business. Always make sure the code conforms to your specifications and requirements. It will go through several stages from alpha to release model before you can deploy it.

Test with integration

Once your team builds the software solution, you need to start testing its functionality and capability. During this phase, you can take a look at user acceptance rates and identify bugs.

Deployment and maintenance

The final phase of building a software solution is deploying it. If it is a simple project, you can go for a complete release. However, if the solution is complex, you need to opt for releasing it in stages. As the users use your software solution, you need to continue maintaining it. You should fine-tune and upgrade the product from the feedback you receive.

Use these steps to create the foundation for your development team to start building your software solution!
Starting a new React JS Project, Any suggestions?
Published: 2020-06-25 05:43:26

I am going to start a web based fantasy app in react js.  
As we are in 2020 ( :'( ), Any suggestion for any modules, tool, coding style etc.  
I have worked from 2 years, working with hooks as well. but I am getting bore to use same coding style, copy function from previous project.
Excited to join the DEV tag moderators community
Tags: meta, machinelearning, datascience, nlp
Published: 2020-06-25 05:18:43

Today morning I received mail from the DEV team that I have been made the tag moderator for the tags **#machinelearning** , **#datascience** and **#nlp**. I am extremely happy and excited to join the DEV tag moderators community. Also, I have been made the community moderator. I am happy to fulfill my duties and guide new members of the community to write posts.

I would like people to follow the tags {% tag machinelearning %} {% tag datascience %} {% tag nlp %}. I would be happy to see a bigger and better datascience community grow on DEV. I would try my level best to read all the posts written on these topics and provide feedback.

Thanks once again DEV team to provide me this opportunity.❤️❤️🎉🎉🎊
Flawed
Published: 2020-06-25 04:18:24

We see being Flawed as a strength. If you make a mistake, you learn from it. If you never make a mistake, you’re never the wiser”.

These so-called perfect leaders we have now had never made a mistake. How can they have learned what’s right and wrong, how could they have learned anything about themselves? About what they feel comfortable doing, about what they feel is beyond the scope of their character? The more mistake you have made, the more you have learned.

I just read this book and it’s stuck with me. It’s about a society where anyone deemed to be less than perfect gets branded as flawed and has to live as an outcast. It’s a brilliantly written book that’s left me feeling a bit unsettled, to be honest.
Celestine lives a perfect life as a model daughter and sister, she’s well-liked by her classmates and teacher’s and she’s dating the impossibly charming Art. But celestine encounters a situation in which she makes an instinctive decision, and then she faces the life-changing repercussions. After completing this book I realized when a young woman takes a stand that could cost her everything.

If there’s one message that I hope this book portrays, it’s this: None of us are perfect, let us not pretend that we’re. Let us not be afraid that we’re not. let us not label others and pretend we are not the same. Let us all know that to be human is to be “Flawed”, and let us learn from every mistake made so that we don’t make them again.

One of my favorite Quote from this book is:
“Never trust a man who sits, uninvited, at the head of the table in another man’s home.”

Thankyou for reading.
React Redux Video | Create Youtube Player -2
Tags: react, redux, webdev, showdev
Published: 2020-06-25 04:17:34

I had recently started my YouTube channel — The Web Dev. I had decided to start putting all my blogs into the YouTube channel.

We had earlier converted the YouTube player to use flux. I decided to convert it using Redux.
As redux is still very popular and used in enterprises a lot, decided to convert the simple app to use Redux.

And here is my second YouTube video.

[![alt text](https://res.cloudinary.com/dxkxvfo2o/image/upload/v1592971091/youtube-redux_mmap3q.png)](https://youtu.be/WaXnMYoaShg "Youtube Player Redux - 2")


Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.

You can also read the complete blog here -

https://thewebdev.tech/youtube-redux-2
React Redux Tutorial | Create Youtube Player -2
Tags: react, redux, javascript, webdev
Published: 2020-06-25 04:14:54

Welcome to part-2 of the series. Now we will add the **SearchBar** functionality. It is pretty much straight forward. First update the **App.js** to include **SearchBar** as below.

![App.js](https://ik.imagekit.io/thewebdev/Youtube-React/10/1_v8IF1H_uOx.png)*App.js*

You can read the complete blog from my site. The link for the same is -

https://thewebdev.tech/youtube-redux-2
Scale to 1000 concurrent users on a raspberry pi 4
Published: 2020-06-25 04:08:36

I have been investigating rust web frameworks and have to say this one is my favorite.  Not just because of its performance, but the features, design choice, and ecosystem.

Actix web is a web framework that uses the [actor model](https://en.wikipedia.org/wiki/Actor_model) to perform HTTP requests.  It has middlewares, SSL, HTTP/2, and many "extras".

My main reason for looking into this is because I think Rust can facilitate a future of fast, safe, concurrent software.  Coming from php, python, Java, ... the barrier to learning was really to learn Rust(a non object oriented language).  I've always wanted to write bare metal web services, but would prefer not to use C++ because of the mistakes we can make.

The results impressed me so much that I decided to publish them here and provide the [source code](https://github.com/chmoder/rust-practice-actix-web) for you as a sort of kicking off point.

This test is a lot like [my other one](https://dev.to/chmoder/my-first-rust-web-service-and-other-firsts-3mhi) except the redis pool is async via [deadpool](https://crates.io/crates/deadpool-redis) and obviously actix.

All this service does is use a thread pool in the HTTP handler to get a value from redis and print out some *hello world* type message.  This implementation is more than a 10X improvement in concurrency and 2X in latency compared to the aforementioned warp test.  In fact, I noticed redis may have been slowing the benchmark down because it needed so much CPU.

```
tcross@spongebob:~$ siege -c1000 -r 50 -H  'Content-Type: application/json' 'http://192.168.1.2:8080/tcross/1/index.html'
** SIEGE 4.0.4
** Preparing 1000 concurrent users for battle.
The server is now under siege...
Transactions:		       50000 hits
Availability:		      100.00 %
Elapsed time:		       26.41 secs
Data transferred:	        6.68 MB
Response time:		        0.52 secs
Transaction rate:	     1893.22 trans/sec
Throughput:		        0.25 MB/sec
Concurrency:		      990.76
Successful transactions:       50000
Failed transactions:	           0
Longest transaction:	        1.66
Shortest transaction:	        0.00
``` 

I hope you enjoyed reading this, find me on any channel and ask questions!  [Here is the source](https://github.com/chmoder/rust-practice-actix-web)!
What can i contribute?...
Tags: discuss
Published: 2020-06-25 03:53:50

Joining DEV has sparked my intrigue at creating content again. I just have 2 problems.

1) I feel like I have nothing novel to contribute. Any content I could create has been done 100 times over.

2) I'm not sure if I want to deal with the negative comments about the bad habits and antipatterns I'm sure I've baked in to my daily routine.

For those who generate content, especially regularly, how do you know what's worth posting? And how were your experiences with negativity or non-constructive criticism?

Thanks!

Ps. I'm a Staff SE with 8 years experience coding professionally... I don't think it's imposter syndrome. Could be though.
🛑🛑 What is TDD (Test Driven Development)? | How to do TDD with Example 🛑🛑
Tags: testing, tutorial, webdev, beginners
Published: 2020-06-25 03:37:14

✅ Join us - https://sendfox.com/thetestingacademy

In this video, We are going to learn What is TDD (Test Driven Development)? and How to do TDD with Example.

[![TDD (Test Driven Development) ](https://i.imgur.com/zw1phIC.png
)](https://youtu.be/h26wrTxF94k "TDD (Test Driven Development)") 

### 🚀 What is TDD?
- Iterative development process.
- Every iteration starts with a set of tests written for a new piece of functionality.
- Test cases are created before code is written
- TDD instructs developers to write new code only if an automated test has failed.

### 🚀 What are the main benefits of TDD?
 - Small Regression Suite
 - We are doing Test First, Reduction in Bugs
 - TDD is used to make the code clearer, simple and bug-free.
 - Avoids duplication of code
 - Refactoring improves the code
 - TDD drives the code design and approach
 - Unit test cases are covered early.

![](https://i.imgur.com/vRY6ZJq.png)

### Example fo TDD
- Create a Maven Project.
- Add Testcases in Test class.

```java
package com.thetestingacademy;

import static com.thetestingacademy.App.isValidUserName;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import com.thetestingacademy.App.*;
import org.junit.Test;

/**
 * Unit test for simple App.
 */
public class AppTest 
{
    /**
     * Rigorous Test :-)
     */
    @Test
    public void shouldAnswerWithTrue() {
        String userName = "PramodDutta";
        String userName1 = "Pramod Dutta";
        String userName2 = "Pramod@123";
        String userName3 = "Pramod_Dutta";
        String userName4 = "Pramod/Dutta";
        String userName5 = "Pramod#Dutta";
        assertTrue(isValidUserName(userName));
        assertFalse(isValidUserName(userName1));
        assertFalse(isValidUserName(userName2));
        assertFalse(isValidUserName(userName3));
        assertFalse(isValidUserName(userName4));
        assertFalse(isValidUserName(userName5));
    }
}

```
- Now Execute it, It will fail
- Fix them one by one
- Repeat 
```java
package com.thetestingacademy;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        String userName = "PramodDutta";
        String userName1 = "Pramod Dutta";
        isValidUserName(userName);
        // What is Valid UserName
    }

    static boolean isValidUserName(String name){
        if(name.contains("/") || name.contains("#") || name.contains(" ") ||  name.contains("@") || name.contains("_")){
            return false;
        }
        return true;
    }

}
```
--
Be sure to subscribe for more videos like this!

[![ TheTestingAcademy](https://dev-to-uploads.s3.amazonaws.com/i/r7vcy6wbvyjbk1y1uu0o.png
)](https://www.youtube.com/TheTestingAcademy?sub_confirmation=1 "TheTestingAcademy")
How to write more performant functional React Components
Tags: react, webperf, javascript, webdev
Published: 2020-06-25 03:09:30

#What are you on about?
When writing React with hooks, I've seen a lot of properties of functional components go un-memoized. In my opinion, this is almost always a no-no. 

This is generally not a good practice because of how React works. Anything that is not memoized is redefined on every re-render. So in general, my rule is to memoize everything defined in the functional component and move everything else out of the component into the global scope.

Not only does this speed up the performance of the thing that you defined, but not doing this has a compounding effect. If the thing you forgot to memoize is depended on (meaning in the dependency array of useMemo or useCallback) by another property, _that_ property will be redefined on every render as well. 

Variables that are defined globally do not get redefined when re-renders happen so they can be used without worrying about causing redefinitions.

#Say what?

Here is a nice before example from a personal project (ignore what is/isn't defined as far as imports):
```
const { Title } = Typography;

const UserScreen = () => {
  const db = firebaseApp.firestore();
  const { user, logout } = useContext(AuthContext);

  const onSubmit =
    async (newUserProperties) => {
      return await db
        .collection(DB.COLLECTIONS.USERS)
        .doc(user.uid)
        .update(newUserProperties);
    }

  return (...);
};
```

In this case, the `firebaseApp.firestore()` operation would be called on _every_ render. Not fun. And then even if we threw the `onSubmit` function in a useCallback with db in the dependency array, _that_ would be redefined on every render as well. So you don't even get credit for almost doing it right!

#Prove it

Here is a codesandbox that illustrates my point: https://codesandbox.io/s/relaxed-pasteur-7spqq?file=/src/App.js

<span>Photo by <a href="https://unsplash.com/@maximusfrajerus?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Max Frajer</a> on <a href="/s/photos/speed?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Day 24 - #100DaysofCode - Practicing CSS Grid and Emmet Shortcuts on VSCode
Tags: css, 100daysofcode, womenintech, codenewbie
Published: 2020-06-25 02:58:04

<h1><center> Today I coded along with this youtube video:</center></h1>


{% youtube moBhzSC455o%}

I wanted to practice creating a "Responsive Grid CSS Website Layout From Scratch." I enjoyed the lesson very much but was happy to learn little VSCode shortcuts that I had no idea about. 

<b> Did you know ``!`` gives you an "emmet" abbreviation for creating your HTML? </b> 

It returns the this: 

```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
```
<i> It's like magic hehe <i>

In addition, <b>did you know that you could get lorem ipsum by typing ``lorem`` + the number of words you want to display?</b>

For example, when I wrote ``lorem15`` vscode generated the following in my paragraph tag: 

```
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Sapiente, nulla facilis doloremque accusantium expedita eaque.</p>
```

<h3>
<center> This one was mind blowing for me as I watch the video. </center></h3>

<b> Did you know that you could write a ``tag`` + ``.`` + a class name to auto generate a tag with a class? </b> 

To clear up the confusion of that sentence, I wanted to create an ``a`` tag with a class name of button, I did that by typing ``a.btn`` and VSCode returned:

```
<a href="#" class="btn">  </a>  
```

Multiple classes? NO PROBLEM! 

INPUT

``div.one-box.two-box-a``

OUTPUT

```
<div class="one-box two-box-a"></div>
```

<b> Did you forget how to make a copyright sign? </b>

```<p> &copy; 2020</p>``

Pretty simple right?

Lastly, I learned how to generate a random picture when I need it using <a href="https://source.unsplash.com/random/201x200"> unsplash. </a>

As for the CSS, I enjoyed learning about CSS variables. The video creator explained CSS variables as global variables that are available throughout your CSS file. 

CSS variables are created with ``--name`` , with name being the name of your choice. Please see the example below. 

```
:root{
--primary: #ddd;
--dark: #333;
--light: #fff;
--shadow: 0 1px 5px rgba(104, 104,104, 0.8)
}
```

Now in order to reference the global variable you would have to use ``var(--name)`` like this:

```
body{
    color: var(--dark);
}
```

This tutorial was fantastic for reviewing grids and I recommend it for beginners. But, I highly recommend it for the the shortcuts I learned during the video, those are worth gold in my opinion.  

Song of the day

{% soundcloud https://soundcloud.com/adria-kain/unconditional %}
TypeScript Complete Guide
Tags: typescript, javascript, webdev, vscode
Published: 2020-06-25 02:36:56

TypeScript is a superset of JavaScript that compiles to plain JavaScript. TypeScript is pure object oriented with classes, interfaces, and module-statements just like in Java or C#.

Unlike JavaScript, which is a loosely-typed language,TypeScript supports static typing.

It is used by very tech giants to built robust apps. 
I have using it along for my Freelancing clients and will share my knowledge at my youtube playlist at:

https://www.youtube.com/playlist?list=PLgQxDWfScmGFgpMzbo34DlF5V1Q9a4QRj


You can consider subscribing i will keep posting great tech and just boring old school tech games.
Day 30 of #100DaysOfCode: Refresh JWT in the HttpOnly cookie
Tags: django, webdev, 100daysofcode, jwt
Published: 2020-06-25 02:35:11

## Introduction
**rest_framework_jwt.views** provides us **refresh_jwt_token** to get new token before the token expired. 

What do we have to so if we want to store refresh token in the HttpOnly token? This topic is the note for **Refreshing JWT in the HttpOnly cookie**  

### 1. Add an Endpoint for returning the Refresh JWT in the response body
* Edit the urls.py

```python
...
from rest_framework_jwt.views import refresh_jwt_token

urlpatterns = [
    ...,
    path('api/refresh-token-auth/', refresh_jwt_token, name='refresh-token-auth'),

]
```

### 2. Add an Endpoint to add Refresh JWT in the HttpOnly cookie
* Edit views.py

```python
...

class RefreshTokenView(generics.GenericAPIView):
    authentication_classes = []
    permission_classes = (permissions.AllowAny,)
    def get(self, request):
        token = request.COOKIES.get('token')
        data = {'token':token}
        scheme = request.is_secure() and "https" or "http"
        url = scheme + "://" + request.get_host() + '/api/refresh-token-auth/'
        res = requests.post(url, data = data)
        if res.status_code == status.HTTP_200_OK:
            print(json.loads(res.text)["token"])
            response = Response(status=status.HTTP_200_OK)
            response.set_cookie('token', json.loads(res.text)["token"], httponly=True)
            return response
        else:
            return Response(status=res.status_code)

renew_token= RefreshTokenView.as_view()   

```

* Edit the urls.py

```python
...
from .views import renew_token

urlpatterns = [
    ...,
    path('api/renew-token/', renew_token, name='renew-token')
]

```

That's it!

## Articles
There are some of my articles. Feel free to check if you like! 
* My blog-posts for software developing: https://medium.com/a-layman
* My web resume: https://jenhsuan.github.io/ALayman/cover.html
* Facebook page: https://www.facebook.com/imalayman
* My latest side project - Daily Learning: https://daily-learning.herokuapp.com/
Competitive Programming , Interviews 101 , Cracking Microsoft Interview
Tags: cpp, interview, beginners, vscode
Published: 2020-06-25 02:17:50

The first thing while preparing for an interview is to prepare for the coding rounds. 
Various coding round are conducted and they can be difficult if cannot choose good language and perfect place to start on. 
I used c++ and various resources to crack my interview at Microsoft.
I have created a playlist for learning C++ STL for learning it in simple and easy way and guides using it. 
Find it here : 

https://www.youtube.com/playlist?list=PLgQxDWfScmGEjxyaPVxo51d4MLegOunL9 


You can subscribe for more update i am preparing for more course that might help in interviews and coding stuffs. 
In the coming days i do talk about to the effectively tackle questions as well.
Questions about URLs, objects and storage
Tags: svelte, sapper, node, javascript
Published: 2020-06-25 01:03:13

I am working on an application where people can create item builds for a video game. I want people to be able to save and share the builds.

The item builds will be generated by the user selecting different items and then the item build will be turned into a JavaScript object and I need a way to save the object and make it a sharable URL.

I could use local storage for saving the object to the users browser and make it sharable by generating a base64 string that you can share with people but since I am using tools like Svelte, Sapper and Node I feel like that solution is too cheap.

Since I am fairly new to developing with Node modules I don't know about many packages that could help me in this case.

So I want to ask you, the DEV Community, if there is any other simple approaches I can make. I am trying to avoid using a back-end as I want it to be a front-end app.

If you need an example about what I am talking about, [here is a React app](https://www.dauntless-builder.com/) that does basically the same thing I want to do.
Best advice for big coding projects
Tags: productivity, codenewbie, codequality, architecture
Published: 2020-06-25 00:47:26

⁣The best advice I’ve gotten (and applied) for solving large/complex development tasks is to research and map out a solution BEFORE you start coding. 🗺⠀
⠀
— Do the research, explore, and weigh all the potential options. ⠀
— Does this task/project lend itself to some system design pattern? Explore that.⠀
— Don’t forget to explore existing tools and services/APIs. Don’t reinvent the wheel.⠀
— Write/type them in some organized form (document, diagram, etc.)⠀
— Determine the logic flow and data flow; how does data move through your solution?⠀
— Define and diagram the different components needed and how the will work together⠀
— Also get feedback from another dev(s) if possible. ⠀
⠀
![coding big projects](https://dev-to-uploads.s3.amazonaws.com/i/xz9j818ktk5w4wdaw4rz.png)
![coding big projects](https://dev-to-uploads.s3.amazonaws.com/i/ub8svdk41ghvfxvewm82.png)
![coding big projects](https://dev-to-uploads.s3.amazonaws.com/i/ej78d96o9tqwzrj88gm8.png)
![coding big projects](https://dev-to-uploads.s3.amazonaws.com/i/y6xe6g2c7tckkygpigzp.png)
⠀
This doesn’t have to take a long time or be a lot of writing, but even doing a little of this upfront can save a lot of time and produce better software.⠀
⠀
👉🏾 Curious; what is your advice for tackling large development projects/tasks?