teleren/devto huggingface dataset:
GraphQL is for Everyone
Tags: graphql, learntocode, webdev
Published: 2019-04-22 17:13:19

---
title: GraphQL is for Everyone
published: true
description: everyone!
tags: graphql, learntocode, webdev
---

_This article was originally published on [Moon Highway](https://moonhighway.com/graphql-is-for-everyone)._

Before I ever wrote a line of code, I worked as a product manager. I created wireframes, wrote technical specs, worked with developers, and trained people on how to work with the internal tools that we built. A lot of the data for those projects would come from REST APIs, and in order to get my job done, I had to find out what the data looked like. Sometimes, finding out would take forever.

Years later, I was introduced to GraphQL as a JavaScript developer. I followed the law of GraphQL that states that the first thing you must do with GraphQL is to send a query to the [SWAPI (Star Wars) API](https://graphql.org/swapi-graphql/) using the GraphiQL Explorer. It was very cool, but also it made me think about my past product manager life.

How much faster could I have done my work back then? How amazing would it have been to have GraphiQL back then?

[GraphiQL](https://github.com/graphql/graphiql) is an in-browser IDE for sending queries to and getting data from GraphQL APIs. You can write a query with the GraphQL query language, click Play, and get data returned to you as JSON. The tool was introduced at React Rally in 2015 and was one of the smartest things that the GraphQL team ever did. Not everyone is a developer. Not everyone needs to build a GraphQL server. Anyone working on a project that involves data needs to be able to get that data, and GraphiQL made that experience accessible to everyone.

GraphiQL also makes it possible to look at all of the queries and types that were part of the schema, so you don't have to spend all day pinging REST APIs. You can introspect a schema. You can write queries right in the browser.

The community often talks about the GraphQL developer experience because it's obviously critically important to the future of GraphQL. We must make tools that developers want to work with. I think we need to think bigger than that though. There is a huge audience of designers, managers, UX specialists, QA people who need to be brought in to discussions about data and about GraphQL.

If you need data from an API to do your job, it's time to learn about GraphQL. No matter your background, your title, or your programming experience, getting acquainted with the GraphQL query language is useful and fun.

GraphQL is for you. GraphQL is for everyone.

If you'd like some resources for how to get started with GraphQL, [check out this repo](https://github.com/moonhighway/graphql-query-language).
The painful truth I need to admit to you
Tags: dailywriting
Published: 2019-04-23 16:36:37

---
title: The painful truth I need to admit to you
published: true
tags: daily-writing
canonical_url: https://marcusblankenship.com/the-painful-truth-i-need-to-admit-to-you/
---

Most people feel the leader’s #1 job is to get people to follow them.

After all, they might think, a leader without followers is… just a dude (or dudette) standing out in a field, all alone.

**Thus, most leadership ideas relate to the acquisition and use of power, influence, and manipulation.**

At one extreme you have dictators who ‘lead’ through threats, intimidation, and fear. And, that works sometimes.

It’s possible to scare people into taking action, in the same way, you can get a dog to move by kicking it across the room.

But I’ve become aware of another pattern in my own work, which looks different, but I fear it has the same goal.

See, I’ve long believed that I should build good relationships, and [a few years ago I found a leadership theory that played out the positive impact of good relationships with the people who work for you.](https://marcusblankenship.com/wrong-section-of-the-bookstore/)

But, lately, I’ve been wondering **why** good relationships were important to me. Is it because I wanted to be liked? Or, didn’t want to be a jerk?

**As I search my heart, I have to admit that at least some of the time, those good relationships were built so I could ask more of people.**

So that I could “inspire” them to get more done.

Or, so they would accept the orders I gave.

Or maybe, so I would feel like a “good boss.”

All of that sounds a lot like ‘manipulation through kindness’, which might be more pleasant than threats and intimidation, but is still manipulation none the less.

I’m not saying this was always my intention, but I’m not sure I trust my assessment of my intentions at this point.

About two months ago I stumbled on the term ‘Relational Leadership’, which has been challenging to me in very positive ways. I’ll be telling you about it more soon, and working through the ideas in public.

In the meantime, I wonder: _have you seen yourself taking this approach?_

And, how do you feel when others take it with you?

Looking forward to hearing back from ya,

Marcus

The post [The painful truth I need to admit to you](https://marcusblankenship.com/the-painful-truth-i-need-to-admit-to-you/) appeared first on [Marcus Blankenship](https://marcusblankenship.com).
WeasyPrint impossible to install via PIP3
Tags: help
Published: 2019-04-22 16:04:41

---
title: WeasyPrint impossible to install via PIP3 
published: true
tags: help
---

These days I was asking for help to deploy an ultra simple Django app, in the end I could not solve any of the paths that some friends suggested, so I decided to install the same OS that I have on the laptop in a virtual machine on the server waiting so that WeasyPrint did not give me problems.
But the sad reality was again I could not install it, pip3 remains freezed although I executed the command with administrative permissions.
This is a new package VM, just install python3-pip and all its dependencies (which are many).
I find it curious that same thing happened to me with the Debian 9 container.
What am I not doing? This already has me very badly the truth, it is something very simple that I have not been able to do. And the last thing I have left is to remove the functionality to my app to be able to export to PDF but that makes no sense. :(
can anybody help me?

I know it's something very basic and absurd but I do not know how to do it, sorry ...

Here is the verbose:
https://thepracticaldev.s3.amazonaws.com/i/uzpbxcvarp7odvajqoyt.png
What Does Good Code Look Like 👀?
Tags: beginners, tutorial, gettingstarted, programming
Published: 2019-04-22 16:01:46

---
title: What Does Good Code Look Like 👀?
published: true
description: When I was an instructor, I would often receive questions about how to know what does good code looks like. In my opinion, programming is a highly creative art form so there are multiple ways to write good code.
tags: beginners, tutorial, getting-started, programming
---

When I was an instructor, I would often receive questions about how to know what does good code looks like. In my opinion, programming is a highly creative art form so there are multiple ways to write good code. Quantifying good code will often be dependent on the people you work with and the practices your team follows.

In general, I believe in good programming philosophies rather than dogmatic ways to write good code.

Here are some philosophies I like to keep in mind -- 

> Art is expression with an intent

## What is code?

Code expresses an intention to two audiences -- (1) a fellow developer 👩‍💻👨‍💻 and (2) a computer 🤖💻. It is about communication and can take on different forms in different programming languages. It can also take on different forms between different audiences!

## Top Priority 👩‍💻👨‍💻

A primary priority in writing code is communicating clearly to your fellow developers about what your code does and how the different parts fit together. This is essential, as we usually develop software in collaboration with other developers. If others cannot understand your code, then they are unable to help contribute. This hinders creativity and productivity in building something awesome.

## Secondary Priority 🤖💻

A secondary priority is writing code to effectively communicate to a computer. This means you are writing code that is working as intended and is efficient. Optimal performance is necessary for good user experience because no one likes slow applications. However, optimally-performant code is not always readable, so there needs to be a trade-off here. As a developer, you may have to find creative ways to optimize your code without making your code more difficult to read. Using other tools such as load balancing, caching, or CDNs might help with this.

## Conclusion

I'm sorry if I didn't tell you how to write "good code" as it is something that needs to be defined with and tuned to the people you work with. You'll find that from working with many different teams, you will run into different programming practices and styles. The most important thing is to write code that communicates well...to people!
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2019-04-22 15:37:55

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
Every Monday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️


#1. Save Countless Hours

After years of struggling with poorly structured NodeJS apps, Santiago put together a thorough guide on how to approaching everything from folder structure to to dependency injection to configuration and secrets!

{% link https://dev.to/santypk4/bulletproof-node-js-project-architecture-4epf %}

#2. Read More Code

Jacque shares lots of tips for refactoring by walking us through an example of code they wrote on their first dev job! 

{% link https://dev.to/jnschrag/refactoring-the-worst-code-i-ve-ever-written-42c7 %}

#3. Developer+

Molly explains what it means to be an SRE at the company they work at, how they got the role, and why they love it.

{% link https://dev.to/molly_struve/what-it-means-to-be-a-site-reliability-engineer-32ki %}

#4. Building Empathy

Cubicle Buddha shares their reactions to a meme which led to a big community discussion about what it means to be a 'full stack dev.'

{% link https://dev.to/cubiclebuddha/i-m-sorry-but-this-full-stack-meme-makes-me-really-mad-sad-35hi %}

#5. Save Your Sanity

Do your future self a favor and write good commit messages! Rachel shares three rules to follow.

{% link https://dev.to/rachelsoderberg/writing-good-source-control-commit-messages-2j2m %}

#6. Growing "Horizontally" _And_ "Vertically"

Andrew explains the many benefits of contributing to OSS and provides a detailed approach to contributing.

{% link https://dev.to/agoldis/learn-by-contributing-27g6 %}

#7. The Ultimate Guide

Brandon shares their book "How To Get Any Job You Want," in its entirety in this post. This is a long guide on how to approach the job application process -- a good read for anyone looking to level up.

{% link https://dev.to/brandonskerritt/how-to-get-any-job-you-want-a-guide-to-employability-skills-1i3m %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
Coding and Cannabis
Tags: cannabis, discuss, healthydebate
Published: 2019-04-22 15:13:32

---
title: Coding and Cannabis
published: true
description: 
tags: cannabis, discuss, healthydebate
---

# Cannabis and coding

I just watched a documentary called Grass is Greener on Netflix. It talks about may things surrounding cannabis. How politicians demonised it despite scientific evidences, how minorities were targeted by anti-cannabis laws... 

However, throughout the documentary, we hear a lot of testimonies from various artists such as jazz musicians, hip-hop and rap performers and songwriters. Different generations of artists find themselves more creative when they are high. Obviously, the question has to be asked: 

> Have you ever coded while being high? What was the result?


*Note:* Please do not get political on this topic. My question concerns the effect on cannabis on your productivity as a developer. Your views about whether cannabis should be legalised or not are irrelevant here. Thank you :)
assertionFailure and Optimization Level in iOS
Tags: swift, ios, assert, optimization
Published: 2019-04-22 14:58:02

---
title: assertionFailure and Optimization Level in iOS
published: true
description: 
tags: swift,ios,assert,optimization
---

We used to use `assertionFailure` to mark programmer error or something that shouldn't happen. 

From [assertionFailure](https://developer.apple.com/reference/swift/1539616-assertionfailure)

> Indicates that an internal sanity check failed.

> Use this function to stop the program, without impacting the performance of shipping code, when control flow is not expected to reach the call—for example, in the default case of a switch where you have knowledge that one of the other cases must be satisfied. To protect code from invalid usage in Release builds, see preconditionFailure(_:file:line:).
- In playgrounds and -Onone builds (the default for Xcode’s Debug configuration), stop program execution in a debuggable state after printing message.
- In -O builds, has no effect.
- In -Ounchecked builds, the optimizer may assume that this function is never called. Failure to satisfy that assumption is a serious programming error.

So go to your target settings, and check `Optimization Level`, make sure it is not `-Onone` for release configuration. 

The difference between debug and release is this `SWIFT_OPTIMIZATION_LEVEL`. If `-Onone` then your configuration is considered debug, and `assertionFailure` will crash your apps

Read more
- http://blog.krzyzanowskim.com/2015/03/09/swift-asserts-the-missing-manual/

Original post https://github.com/onmyway133/blog/issues/39
Larger Implications of Continuous Integration 
Tags: git, ci
Published: 2019-04-22 14:45:21

---
title: Larger Implications of Continuous Integration 
published: true
description: We've lost the mean of Continuous Integration.
tags: git, ci
---

I'm noticing a pattern and it has to do with the overloaded process of continuous integration. This has become a reference to executing tests on every commit. I'm not saying this isn't important. 

I am seeing articles about long lived branches and trunk based development. These articles are all about continuous integration, but they can't reference this age old solution because it is no longer about integration.

Now that we understand trunk based development is just continuous integration for the git era of version control let me talk to you about micro services and sharing code through package managers. 

The explanation behind them is that they help decoupling and independent development. But independent from what? These usually are consumed by software which may wish to work with multiple services together.

Are you the consumer of these service or providing them to others? It does not really matter your just building one part of an integrated system, as a provider you will still want continuous integration with your changes and as a consumer you don't want to get left behind on old deprecated APIs.

No matter how you organize your application don't forget the lessons which lead to continuous integration.
Array.filter() Is Awesome
Tags: javascript, beginners, webdev, react
Published: 2019-04-22 14:05:13

---
title: Array.filter() Is Awesome 
published: true
description: I've come to appreciate this array method.
tags: #javascript #beginner #webdev #react
---

This weekend I was working on my React project and in one of my components I needed to delete from a list. The data from the list was stored in state with an array. 

I learned multiple ways to manipulate arrays in my studies. You have .pop(), .unshift(), .slice(), .splice() and... .filter(). My first decision when picking the best method was to think about React. State is immutable. That meant that I couldn't effect it directly. Fine, no problem--that meant I could discard a few of these options. 

It left me with .slice() and .filter().

My instinct was to reach for .slice(). But, I decided to really look at .filter() as I had seen other people use it in React in examples. 

After pouring over the documentation on MDN, it clicked to me why it's such a nice method for something like deleting from an array.

I'm already using .map() to iterate over the array to render the list. That gives me the index as one of the arguments. I figured I could then pass that as a prop alongside the state to my component. Inside the component I need only create a handleDelete function that triggers onClick.

Inside the deleteItem the .filter() takes a callback function that returns a boolean based on a condition. Once the entire array has been evaluated, it spits out a new array with of those indexes that were determined as true.

To veteran javascript devs this is probably a no brainer, but I'm glad I realized how useful .filter() can be. 

Here's an example of my component:

```javascript
const ItemList = ({ inventory }) => {
  const [list, setList] = inventory;
  const deleteItem = index => {
    const newInventory = list.filter(
      (item, itemIndex) => index !== itemIndex
    );
    return setList([...newInventory]);
  };
  return (
    <tbody>
      {list.length > 0 ? (
        list.map((item, index) => {
          return (
            <tr key={index}>
              <td>
                {item}{" "}
                <div className="is-pulled-right">
                  <button
                    className="delete is-small"
                    onClick={e => deleteItem(index)}
                  />
                </div>
              </td>
            </tr>
          );
        })
      ) : (
        <tr>
          <td>
            <em>Empty.</em>
          </td>
        </tr>
      )}
    </tbody>
  );
};

export default ItemList;
```
dbForge Studio for Oracle Now Has A New Look & Oracle 19c Support
Tags: oraclesoftware, oracleadministration, oraclemanagement, oracledatecomparison
Published: 2019-04-22 13:17:53

---
title: dbForge Studio for Oracle Now Has A New Look & Oracle 19c Support
published: true
description: Devart has introduced a significant update to one of its key tools — dbForge Studio for Oracle. The new version now supports Oracle 19c and has a bunch of useful features aimed to make database development process smoother.
tags: oracle software, oracle administration, oracle management, oracle date comparison
---

Devart has rolled out a new version of **dbForge Studio for Oracle v.4.1**. The release received a set of solid updates. The updated tool supports Oracle 19c, has an AutoCommit Mode, improved Schema Comparison performance, Transaction Reminder, and Execution Notifications. Alongside the overall design renovation, also the schema comparison performance was significantly improved. 

Here’s a full list of features implemented in the updated version of the product:

**Oracle 19c Support** — enables the work with the most recent Oracle database; 
**AutoCommit Mode** —  provides the automatic commit of recent changes in the documents;
**Improved Schema Comparison Performance** — makes the work with the tool more efficient and enjoyable;
**Transaction Reminder and Execution Notifications** — allow users to get fresh info about the status of the recently performed queries and uncommitted transactions;
**New Skin** — makes the work with the Studio even more visually pleasing and provides improved user experience.

Other tools from the dbForge for Oracle product line, such as dbForge Data Compare for Oracle, dbForge Schema Compare for Oracle, dbForge Compare Bundle for Oracle, dbForge Data Generator for Oracle, and dbForge Documenter for Oracle, were also updated with Oracle Database 19c support. 

Learn more about current and previous features that are available in dbForge Studio for Oracle at https://www.devart.com/dbforge/oracle/studio/ 

**About Devart**

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
Devart .NET Connectivity Solutions Now Support Visual Studio 2019
Tags: dotconnect, databasetools, database, visualstudio
Published: 2019-04-22 13:13:49

---
title: Devart .NET Connectivity Solutions Now Support Visual Studio 2019
published: true
description: Devart has recently introduced a significant update for the range of its products. dotConnect ADO.NET data providers, LinqConnect, Entity Developer now offer the support for Visual Studio 2019.
tags: dotconnect, database tools, database, visual studio
---



Devart, a recognized vendor of professional database management software for developers and DBAs, has released a much-needed update for its highly demanded products. From now on dotConnect ADO.NET data providers, LinqConnect and Entity Developer are fully compatible with the latest version of the IDE from Microsoft. 

The outlined tools will be even more useful as they support Visual Studio 2019, which already provides users with such features as improved performance, better search, Visual Studio Live Share, etc.

The above represents the latest highlight only. Check out the complete list of other useful features of dotConnect ADO.NET data providers  — the enhanced data connectivity solution, LinqConnect — the LINQ to SQL-compatible ORM solution, and Entity Developer — the top-notch visual designer for ORM models.

About Devart

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.

Learn more at: https://blog.devart.com/visual-studio-2019-support-in-devart-net-connectivity-solutions.html
Day 15 - Display Random Reddit posts - 100 days 100 python scripts
Tags: python, productivity, beginners, career
Published: 2019-04-22 12:47:12

---
title: Day 15 - Display Random Reddit posts - 100 days 100 python scripts
published: true
description: Day 15 - Display Random Reddit posts
tags: python, productivity, beginners, career
cover_image: https://cdn-images-1.medium.com/max/1600/0*GEsDQGQ1BucUNW1g
series: 100 days 100 python scripts
---

##Day 15: notify_random_reddit 

This script will randomly pick a sub_reddit from the list of your favs and randomly pick one of the top posts and notify it. You can add it to cron and get random posts hourly.

```python
import json,requests
from random import randint,choice
import os,constants

subreddit_list= constants.fav_subreddit_list # List of favorite sub reddit name

subreddit=choice(subreddit_list)

url=r"https://json.reddit.com/r/"+subreddit+r"/top/?sort=top&t=day"

headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
data=json.loads(requests.get(url,headers=headers).text)

response_data=data["data"]
count= int(response_data["dist"])


random_post=(response_data["children"][randint(0,count)]["data"])

text=random_post["selftext"]
subreddit=random_post["subreddit"].title()

os.system('notify-send "'+subreddit+'" "'+text+'"')
```

Please Visit my Git Repo to check out all the previous day challenges.

[https://github.com/ganeshraja10/automated-python-scripts](https://github.com/ganeshraja10/automated-python-scripts)