teleren/devto huggingface dataset:
Looking For Feedback
Tags: discuss, meta, beginners
Published: 2019-07-06 15:32:49

Recently, I've been writing a lot of content on Dev.to. Obviously I know how many people read each post, but it's not necessarily the best indicator of what content I should be making. 

Instead, I want to know what type of content you guys will appreciate seeing the most in the future. My skillset is pretty general, so don't feel obliged to suggest topics that I've already covered, anything is fair game!

This should also be considered an open forum to give me feedback about my writing (style, content, etc) including constructive criticism (don't hold back). 

I also want to just thank everyone for the support in the ~1.5 months I've been on Dev.to, this site has a really unique community.

TL;DR

What topics do you want to see more of?
What topics do you want to see less of?
How can my writing be improved?
How can I be improved?
Anything else?
How to be more productive when working on side project 💥💥.
Tags: software, developer, productive
Published: 2019-07-06 16:28:47

---
title: How to be more productive when working on side project 💥💥.
published: true
description: Quick tips on how to be more productive as a software developer
tags: software,developer,productive,
---

# I would like to know how you guys handle distraction when working on side project 🧐

### I really need to know. "cause something isn't working right here 🤷.
Keep It Simple
Tags: productivity
Published: 2019-07-06 16:15:48

#Introduction

If you can't keep yourself to buy a book, subscribe to a newsletter, add a ton of youtube videos in your "watch later" or even wonder at each second of your life if what you are doing is worse it, this short article is for you. 

So you recognize yourself in this introduction... Well. 

-Good news: You seem to be really motivated to learn and grow. 

-Bad news: That's not by overwhelming your mind with all that stuff that you gonna reach your goals. Worse, you're probably too much stressed and frustrated that you gonna destroy yourself and will be forced to give up. And, for sure, programming is a long-term path. So the idea is to love going through it otherwise you would sooner or later give up. 

That's my belief anyway. In that case, I often ask myself: "Would you be able to feel what you feel right now until the end of your life?". Or even more rough: "Do you WANT to repeatedly feel these sensations until you die? Would they make you happy?" If the answer is: "God if I feel like that everyday...", you should reconsider your workflow. 

Personally, I can handle a delimited time of huge stress if the goal behind is valuable enough for me. By the way, that kind of situation rarely happens because of a choice but rather of a need. I tend to avoid it because it's painfull (of course) but also because few of my most important goals are short-term goals. 

And I think that's the case for most of us. We might want to have the perfect shape for the summer but we would prefer to maintain this perfect shape for the life. Indeed this objective seem ambitious, but that's usually what we really want and that's a bad idea to neglect it. 

So ask yourself what really matter for you and if you end up with a long-term goal, consider managing the stress throughout the path.


#Conclusion

Enough digression,

The simple ideas I want to remind you are these: 

1) You can't learn all the things out there. 
2) Because you can't, you have to choose what matter the most for you.

Yes!!! What matter the most for you! 
That's why we need to "Keep it simple", because each thing, each kind of useless reflexion that we do is another barrier between us and our goals, or even between us and things that make us happy. We just lose time and energy (i.e our precious ressources that we consume in order to learn, create or achieve other tasks) to consider these kind of superfluous layers above our goals.

Be honest with yourself. Be aware of what you do.
You would be more efficient in your work, more happy and all of this for an extended period of time.



That's it for this article. I hope my thoughts will "resonate" with yours and please, give me a feedback. I'm really exciting about this topic so feel free to give your opinions.

(I hope also that my english was not too bad. If some phrases sound horrible, I'm deeply sorry and I would really enjoy getting some tips ;) )

Thanks for your time and attention.
Azure Roles
Tags: azure, azuresecurity
Published: 2019-07-06 16:07:20

---
title: Azure Roles
published: true
description: Azure Roles
tags: Azure, Azure Security
---
Azure Roles
1. Using a web browser, open the Azure portal. Select All services.
2. Select any resource, and the select it again.
3. Select Access control (IAM).
4. Select Roles.
![](https://thepracticaldev.s3.amazonaws.com/i/3zyfkbfvmqjbupkerjfc.jpg)
5. Review the list of built-in roles. Note that you can also create custom roles.
![](https://thepracticaldev.s3.amazonaws.com/i/gkwlqduovt9tnbgjfogg.png)

Here are four RBAC roles in Azure that apply to resource types:

- Owner. Has full access to all resources, including the right to delegate access to others.
- Contributor. Can create and manage all types of Azure resources but can’t grant access to others.
- Reader. Can view existing Azure resources.
- User access administrator. Can remove access to resources.

The rest of the RBAC roles in Azure allow for managing specific Azure resources. For example, the Virtual Machine Contributor role allows the user to create and manage virtual machines. It does not grant access to the virtual network or the subnet that the virtual machine connects to.

As a best practice when deploying Azure RBAC, consider creating new resource groups instead of new subscriptions for newly onboarded teams.

Resource groups allow you to implement RBAC so that users can contribute to services but not own them.

To manage access by using RBAC and Azure PowerShell, review the documentation page at https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-powershell. It has examples of how to:

- List roles
- List access
- Grant access
- Remove access
Fetching Dynamic Data with Gatsby.js
Tags: react, gatsby, javascript
Published: 2019-07-06 15:58:39

---
title: Fetching Dynamic Data with Gatsby.js
published: true
description: Gatsby.js is more than just an awesome static site generator, it can also fetch data dynamically like you would with Create React App. We explore what that dynamic data fetching looks like.
tags: react, gatsby, javascript
---

Gatsby.js is more than just an awesome static site generator, it can also fetch data dynamically like you would with Create React App. We explore what that dynamic data fetching looks like and peak at the compiled code to see the difference between the dynamic and static data in Gatsby.

The next time you start a project, before reaching for Create React App try reaching for Gatsby instead! You can do all the same things (like hooks!) but it comes with amazing performance and SEO benefits!

{% youtube hC9vVZKLKaw %}

YouTube:
https://www.youtube.com/channel/UCS6lPt9btmTG3GkU82ELygA

Follow Me On:
https://twitter.com/HuntaroSan
Using Badges in iTerm2
Tags: iterm2, terminal, beginners, tutorial
Published: 2019-07-06 15:50:29

---
title: Using Badges in iTerm2
published: true
description: A short tutorial on adding badges in iTerm2
tags: iterm2, terminal, beginner, tutorial
---

Update: 1-Aug-2019: The example mentioned in this post is now redundant. Use iTerm's [status bar](https://www.iterm2.com/3.3/documentation-status-bar.html) instead.

[iTerm2](https://www.iterm2.com/) is a very powerful replacement to the built-in terminal. You can read more about why [here](https://dev.to/t/iterm2).

This post will focus on one specific functionality I recently explored and found useful: [Badges](https://www.iterm2.com/documentation-badges.html) and is meant for beginners unfamiliar with iTerm2

## Hello World
Let's start with a "Hello World" example.

* Go to "iTerm2 > Preferences > Profiles"
* Add the text "HelloWorld" to the input "General -> Basics -> Badge"

![](https://thepracticaldev.s3.amazonaws.com/i/eq9aqg7hq9kc1b1wd2yx.png)

* If you open up a new iTerm2 window, you should now see this:

![](https://thepracticaldev.s3.amazonaws.com/i/ed2k3dszfevxp027n518.png)

* This badge will be displayed in each tab. Split the window into two tabs and this is what you'll see. 
![](https://thepracticaldev.s3.amazonaws.com/i/nr1ed7ftfuh1l3paklrm.png)

* Now lets make the badge display something useful like the name of the user and the machine. To do this, we'll first need to install [Shell Integration](https://www.iterm2.com/documentation-shell-integration.html) 
![](https://thepracticaldev.s3.amazonaws.com/i/821n34edtiwshkirpqbw.png)

* Now, go back to the Preferences panel and change the Badge to `\(session.username)@\(session.hostname)`
![](https://thepracticaldev.s3.amazonaws.com/i/zgu3vhz1cosxlwoaa492.png)

* iTerm will now display a more useful badge 
![](https://thepracticaldev.s3.amazonaws.com/i/gand5geomo796lk6pxqi.png)

*Important*: The "Install Shell Integration" step will have to be done on *each* host you ssh into before you'll see the correct label.

Enjoy,
Vivek.

P.S: Badges also support more advanced features like user-defined variables. Experiment with them to get the look-and-feel you need. All you need to know is some basic bash scripting

### References
* [iTerm2](https://www.iterm2.com/)
* [iTerm2 Badges](https://www.iterm2.com/documentation-badges.html)
* [iTerm2 Shell Integration](https://www.iterm2.com/documentation-shell-integration.html)
Daily Challenge #9 - What's Your Number?
Tags: challenge
Published: 2019-07-06 15:12:04

---
title: Daily Challenge #9 - What's Your Number?
published: true
series: Daily Challenge
description: 
tags: challenge
---

Can I have your number?

> Write a function that accepts an array of 10 integers (between 0 and 9), that returns a string of those numbers in the form of a phone number.

> The returned format must be correct in order to complete this challenge. 
Don't forget the space after the closing parentheses!

[Today's challenge comes from user xDranik](https://www.codewars.com/kata/create-phone-number) on Codewars

_Thank you to [CodeWars](https://codewars.com/), who has licensed redistribution of this challenge under the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause)!_

_Want to propose a challenge for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Code the future and now
Tags: webdev, tutorial, beginners, javascript
Published: 2019-07-06 15:00:38

We know how to write code to do something now. What about code to do something tomorrow, or next year? Sometimes we use batch jobs. But as business grows, our "overnight" batch job starts finishing around lunch time. As we expand to new regions, we realise there is no "night". And it's only a matter of time before we make a change and break a batch job we forgot existed. What if tomorrow's code could live in the same place as today's code? What if it all looked the same? What if we could scale it all the same way?

Join Adam and discover how to embrace the future in the code we write now. Learn how to capture requirements as first class business logic, and avoid relegating them as second class citizens of the batch job world. Take a deep dive into techniques which combine off the shelf products with fundamental computer science.

Where we're going... we don't need batch jobs.

{% youtube ymMrbvNIGog %}

**Thanks for reading** ❤
If you liked this post, share it with all of your programming buddies!
Follow us on **[Facebook]( https://www.facebook.com/moriohdotcom)** | **[Twitter]( https://twitter.com/moriohdotcom)**

### Further reading
☞ [Complete Python Bootcamp: Go from zero to hero in Python](http://learnstartup.net/p/rkbzrt_Sl "Complete Python Bootcamp: Go from zero to hero in Python")
☞ [Best JavaScript Frameworks, Libraries and Tools to Use in 2019](https://morioh.com/p/cbc777be0440)
☞ [Best 50 React Interview Questions for Frontend Developers in 2019](https://morioh.com/p/694af034a6ba "")
☞ [Best 50 Angular Interview Questions for Frontend Developers in 2019](https://morioh.com/p/3ab4f8d941e2 "")
☞ [100+ Java Interview Questions and Answers In 2019](https://morioh.com/p/36f761f75128 "")
I don't know who needs to hear this, but that Udemy course will be on sale next week, too
Tags: jokes, courses
Published: 2019-07-06 14:59:32

---
title: I don't know who needs to hear this, but that Udemy course will be on sale next week, too
published: true
description: 
tags: jokes, courses
---

🙃 Be free 🙃
How DEV's job listings changed my perspective on hiring
Tags: hiring, joblistings, listings
Published: 2019-07-06 14:54:21

---
title: How DEV's job listings changed my perspective on hiring
published: true
description: DEV's job listing changed my perspective on the location and experience needed for positions
tags: hiring, job listings, listings
---

I recently used DEV's listings to help make a hire. We'd been struggling to get candidates for a mid-level position located near our main company locations in the DC area. I remembered that DEV created a new Listings section and decided to look there for possible candidates. The process opened my eyes to a few new perspectives: 

- **DEV members already pass my first level of vetting**
DEV is a wonderful community. In my opinion, members already have a desire to continually learn and realize the value of others in their learning/career growth. Those that contribute by blogging themselves also show good organizational and communication skills. 


- **Junior is OK**
We were originally looking for a mid-level developer. But, as a consulting company, ICF is very dynamic environment with a wide variety of projects and opportunities for junior devs to learn on the job. I checked with our PMs to make sure they'd be able to use a junior dev before moving to far. Even if her first project isn't using the latest, cutting-edge technology, a junior dev could learn a lot about software development, real-world projects and challenges, and the soft skills required to work in a team.


- **Starting remote is OK**
ICF has always been remote friendly, but usually with experienced developers that had previously worked in one of the main offices (including myself!). I've always thought that being in a local office provided some comfort to new hires. Even though your colleagues might be ecologists, cancer researchers, or social workers, they could still help a new hire navigate the company organization and processes. While that could be helpful, I don't think it's required any more.    

Overall, it was a good experience and I'm glad DEV has this new capability. I'm really like that the [Contact via Connect](https://github.com/thepracticaldev/dev.to/issues/3088) is checked by default now to make it easier for people to connect.



Happy Coding!
I'm looking for a new position as PHP/Laravel/ReactJS developer
Tags: php, laravel, react, career
Published: 2019-07-06 14:40:42

I'm a full stack developer from Bangladesh and actively looking for a new position as php/laravel/reactjs developer. If you know someone is looking for a full stack developer, please mention the name. 

Here's my resume: https://rkit.me/resume 

and Email address: iftekhersunny@gmail.com
Looking for direction - Web Dashboard 
Tags: advice
Published: 2019-07-06 14:39:19

---
title: Looking for direction - Web Dashboard 
published: true
description: web dashboard 
tags: #advice
---

Hi all, I am looking to build a web dashboard for my company. Was wondering what the community has used to build such things.

I currently mostly code in C# but open to anything, also it would just be an intranet type dashboard.
Let us be coding Djinnis 🧞‍♂️🧞‍♀️
Tags: learning, app, beginners, discuss
Published: 2019-07-06 14:27:50

---
title: Let us be coding Djinnis 🧞‍♂️🧞‍♀️
published: true
description: A place to share productive app ideas
tags: learning, app, beginner, discuss 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mg5jy9pksvh8llfo9vex.jpg
---

Imagine you are searching through an old drawers. Somewhere you find an old coffee mug ☕️. It looks nice and you like it. You think for yourself: "Mh... after a lot of hard work, a coffee and a few dev.to post would be nice to relax!" You take the mug, clear it from the dust of the decades, put it under the coffee machine and the coffee starts running. As soon as the first drop hits the bottom of the mug a djinni appears 🧞‍♂️🧞‍♀️. At first it looks confused, but its gets conscious fast. "I'm am your personal coding djinni! I will code one app for you. What should it be?!" You start thinking... "Write your answer down in the comments!"

---

Every developer knows this feeling: "I have a lot of cool technologies I want to test and improve my skills in" but somehow you want to do something productive, not just the "Hello World"s, Calculators and Tik-Tak-Toes. You have ideas, but sometimes there are completely out of scope to do. Something simple and still productive? Nope... nothing on mind. 

And I have the same problem right now. I started to learn react-native a few days ago and published my first app. [Take a look if you like! \(HexToDec - iOS AppStore\)](https://apps.apple.com/us/app/hextodec/id1471429873) But I'm somewhat out of idea, what to do next. 

So I ask you: What are your problems which have not yet been solved? What App, Website (or even blog) are you missing? Post it in the comments and maybe someone will take care of it, to practice this stylish new framework or just to expand the portfolio. 

Let us crowdsource our needs, ideas and skills, so everybody can benefit! To easily skim the comments I would suggest some simple markup, like:

Platform: e.g. iOS
Problem: Short description of the problem
Explanations: An in-depth discussion of the problem/app.

Share your ideas, have fun building, learn something and most of all: Don't forget the self-care!
AppArmor with Python
Tags: python, linux, security
Published: 2019-07-06 14:22:36

---
title: AppArmor with Python
published: true
description: python apparmor
tags: python, linux, security
cover_image: https://cdn.pixabay.com/photo/2016/08/13/09/43/data-1590455__340.jpg
---
AppArmor is a Linux kernel security module that allows the system administrator to restrict programs' capabilities with per-program profiles.

It runs on Ubuntu Linux and Suse Linux by default. Other Linux distributions often have other solutions.

AppArmor lets you confine processes. Every program has a profile. A profile defines what a program can do.

It can set options like:

* allow/deny capabilities like network access
* allow/deny raw socket access
* permission to read, write, or execute files

<img src="https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F10WT1xxLoFcFc4%2Fgiphy.gif&f=1">

### Python Interface

You can interact with AppArmor using Python. I've setup a very basic program that interacts with apparmor. 

My idea was to just use subprocess to capture the data:

    #!/usr/bin/python3
    import subprocess
    import json
    import os
    
    def profiles():
        result = subprocess.run(['apparmor_status', '--json'], stdout=subprocess.PIPE)    
        data = result.stdout.decode('utf-8')
        aa_status = json.loads(data)
        return aa_status

This will run the command apparmor_status and parse its json output. The rest of the program is made in a similar fashion.


    #!/usr/bin/python3
    # apparmor interface
    
    import subprocess
    import json
    import os
    
    def profiles():
        result = subprocess.run(['apparmor_status', '--json'], stdout=subprocess.PIPE)    
        data = result.stdout.decode('utf-8')
        aa_status = json.loads(data)
        return aa_status
    
    def unconfined():
        result = subprocess.run(['aa-unconfined', '--paranoid'], stdout=subprocess.PIPE)
        data = result.stdout.decode('utf-8')
        lines = data.split("\n")
        apps = []

        for line in lines:
            app = line.split(" ")
            if len(app) > 1:
                apps.append( (app[0],app[1]) )
        
        return apps
    
    def complain(profile):
        os.system("sudo aa-complain " + profile)
        
    def enforce(profile):
        os.system("sudo aa-enforce  " + profile)

    def disable(profile):
        os.system("sudo ln -s " + profile + " /etc/apparmor.d/disable/")
       
    
    # List all profiles
    aa_status = profiles()
    print('version: ' + aa_status['version'])
        
    for profile in aa_status['profiles']:
       status = aa_status["profiles"][profile]
       print(status + " " + profile)
    
    # Get unconfined profiles
    apps = unconfined()
    for app in apps:
        print(app[1])

It simply interacts with the command line interface. Still very experimental, but seems to work.

<img src="https://media.giphy.com/media/12OIWdzFhisgww/giphy.gif">


Learn more:
* https://www.udemy.com/apparmor-linux-security/
* https://wiki.ubuntu.com/AppArmor
* https://pythonprogramminglanguage.com
* https://pythonbasics.org
Execution context and hoisting ? 
Tags: javascript, beginners, tutorial, frontend
Published: 2019-07-06 14:19:44

---
title: Execution context and hoisting ? 
published: true
description: 
tags: #javascript #beginners #tutorial #frontend
---

I have found the easiest read on how javascript is executed. 
Here is the link - https://overflowjs.com/posts/Javascript-Execution-Context-and-Hoisting

Hope this will help to clear most of your doubts around it.

Happy coding :)
Understanding brittle and non-brittle tests in react
Tags: react, testing
Published: 2019-07-06 13:37:53

Brittle tests test the implementation of the logic, while the non-brittle tests test the functionality. In the context of React, brittle tests usually test the change of state, or spy on some function to check if it is called. 

Let us see the code to understand the brittle and non-brittle tests in React application.

```
class App extends Component{
    state = {
        no: 0
    }

    incrementNo = () => {
        const { no } = this.state;
        this.setState({
            no: no+1
        })
    }

    render(){
        const { no } = this.state;
        return(
            <div>
                <div data-testid="no">
                    {no}
                </div>
                <button data-testid="increment-button" onClick={this.incrementNo}>
                    Increment Number
                </button>
            </div>
        )
    }
}
```

Brittle test for the above React component

```
it('should increment no - implementation test', () => {
    const wrapper = shallow(<App />);
    wrapper.instance().incrementNo();
    expect(wrapper.state('no')).toEqual(1);
})
```

Non-brittle test for the above React component

```
it('should increment number - functionality test', () => {
    const wrapper = shallow(<Brittle />);
    expect(wrapper.find('[data-testid="increment-no"]').text()).toEqual('0')
    wrapper.find('[data-testid="increment-button"]').simulate('click');
    expect(wrapper.find('[data-testid="increment-no"]').text()).toEqual('1')
})
```

## Libraries supporting non-brittle tests

There are many libraries that allow you to write tests in React. Some of the popular ones are [Enzyme](https://airbnb.io/enzyme/) and [React Testing Library](https://github.com/testing-library/react-testing-library). 
The [Enzyme](https://airbnb.io/enzyme/) library provides many APIs, which allow you to write tests the way you want. But [React Testing Library](https://github.com/testing-library/react-testing-library) forces you to write non-brittle tests. Want to know more? I wrote another blog about differences between [Enzyme and React testing library](https://techdoma.in/difference-between-react-test-utilities-and/)