teleren/devto huggingface dataset:
GraphQL, are we there yet?
Tags: rest, graphql, api, decision
Published: 2019-05-27 04:58:51

---
title: GraphQL, are we there yet?
published: true
description: When to migrate from REST to GraphQL
tags: rest, graphql, api, decision
---

Shopify is an E-commerce platform with cool APIs (much better than others). Their GraphQL has passed the Beta version and is now stable, and they are still maintaining REST.  

Our app works with Shopify REST API and lately, we have been thinking about migrating to GraphQL. Why? GraphQL is newer, cooler and would *supposedly* solve performance issues due to REST API restrictions.

I started digging into their docs, which is still work in progress but good enough. 

### Summary of GraphQL
Per its namesake, you can imagine a graph with *nodes*, *edges* and *connections*. I will not get into this more but you can check this good [article](https://blog.apollographql.com/explaining-graphql-connections-c48b7c3d6976) to know more about GraphQL.

1. GraphQL doesn't have call limit per-say but *cost* rate exists. The cost normally depends on how many fields and connections cost, which is really well-explained in the article mentioned above. The cost rate is to avoid the server from crashing due to overload or attacks.

2. Pagination exists also for GraphQL called [*cursor pagination*](https://blog.apollographql.com/understanding-pagination-rest-graphql-and-relay-b10f835549e7), a little different from what I have experienced with REST's. ~~Although GraphQL's pagination can be implemented in REST APIs, I haven't seen one yet. Please let me know if you know any!~~ (Slack & Django do, thanks @rhymes!)
                 -------- Update 8/11/2019 --------
Shopify just released they're moving from page-based pagination to cursor-based pagination. 
                          ------------


### Decision-making step
From my findings and based on some others' reviews, I was skeptical about migrating from REST to GraphQL. I read some reviews saying GraphQL is powerful for some processes but is still weak for other processes. 

Mixing both APIs on our app would get the best of both APIs, but adds more complexity to the codebase. I would rather avoid complexity and be limited by either APIs. 

I felt Shopify's GraphQL was built upon their REST API design restricting GraphQL's advantages. My skepticism was growing and eventually, I stumbled upon this [article](https://medium.com/@francoisz/test-is-graphql-right-for-you-21a7a4858769). Based on a simple Q&A, you can see if it's worth migrating from REST to GraphQL. Of course, the decision, in the end, is up to you but it was quite affirmative to me that I was skeptical for a good reason.

### Conclusion
Eventually, we decided to hold on the migration for a while and see what Shopify GraphQL might introduce to us in the future. 
As a side-note, I believe in order to make a good GraphQL API, the API design should be thought of as a graph (with edges & nodes) to make it more efficient.
How is the global software dev ecosystem changing with remote work becoming more mainstream?
Tags: discuss, career
Published: 2019-05-27 03:25:59

As remote practices become more common and the tech becomes better at supporting it, what changes are you observing, and what’s the future?

It seems like there is a shift that is a bit different from “outsourcing” practices of prior eras.

How would you describe these changes? And where do you fit in with the changes?
Just Make That App
Tags: apps, ideas, creativity, webdev
Published: 2019-05-27 02:07:31

---
title: Just Make That App
published: true
description: Like questions, there are no dumb ideas. Every single idea you have leads to a learning experience.
tags: apps, ideas, creativity, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/2tlg9fup9m4gzcnqyybg.jpg
---

As someone who's new to the web dev game, I find it hard to accept all my ideas as good ones. Yes, you read that right, *all* ideas are good ideas. Ideas are similar to questions, it's all about the timing. Every single idea you have leads to a learning experience.

{% link ashleemboyer/don-t-be-afraid-to-ask-questions-5g99 %}

There's a lot of pressure to make something *cool* or *super useful* and *profitable*. You don't have to do that right now, especially if you're learning a new framework. You can make any app you want to, for whatever reason you want to. If no one is getting hurt, just do it!

There are no dumb ideas. Some ideas are better than others obviously, but all ideas keep our creative juices flowing. Once you get started, it'll be hard to stop. Eventually, you'll find the best idea to suit your current situation. All you have to do is sit and listen to your thoughts without judgment. Let them all pour out freely.

Now, let's hear those app ideas! Maybe you'll find someone with a similar idea. Maybe get in touch and think about collabing. :)

---

Did you know I have a newsletter? 📬

If you want to get notified when I publish new blog posts or make major project announcements, head over to [https://ashleemboyer.com/newsletter](https://ashleemboyer.com/newsletter).

---

*[Image](https://unsplash.com/photos/hfueW9tLWtc) by [Benjamin Voros](https://unsplash.com/@vorosbenisop) on [Unsplash](https://unsplash.com).*
OMFG... Dependabot is free now. Close your security vulnerabilities faster than ever!
Tags: javascript, node, webdev, opensource
Published: 2019-05-27 01:06:50

---
title: OMFG... Dependabot is free now. Close your security vulnerabilities faster than ever!
published: true 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/jvc1m23dtfl1k0jvqcvi.jpeg
tags: javascript, node, webdev, opensource
---

If you want to be a productive programmer you likely want to take advantage of libraries, plugins, and frameworks that other people have made. Why not stand on the shoulders of giants, _right?_ Libraries like lodash and redux have been pounded on for years, so it generally makes sense to take advantage of quality that’s been built up over years of commits. But unfortunately there’s a dark side-effect of all of this sharing... security vulnerabilities.

It’s not as common as haters of NodeJS/NPM would like you to believe, but vulnerabilities do crop up in popular libraries. But thanks to the [bounty prizes](https://hackerone.com/nodejs) that NPM makes available, payers of NPM Enterprise find out about exploits sooner than the general public. But you say, “wait— I don’t pay for NPM Enterprise... so what about me?” That’s when Dependabot comes in.

Dependabot will automatically PR your github repository and attempt to merge the PR if the unit tests pass. That means that as soon as a fix for a vulnerability is published... your code is going to get the fix.

I’m all about living in the present but still protecting the future. In fact, that’s one of the core topics at [CubicleBuddha.com](http://CubicleBuddha.com). So that’s why I use Dependabot to help me do the minimum amount of work to stay vigilant. I’ve heard it said that **the best programmers are the laziest ones—** because those are the programmers who will find a creative way to do less work. Jokes aside: time is precious and why not spend more time creating [features that help your users.](dev.to/cubiclebuddha/samsara-5-agile-techniques-to-end-suffering-and-increase-learning-4a76)

Other reasons you should care to use Dependabot:
- your favorite UI widget library fixes an accessibility issue and now you can get free help out quickly
- you work at a big company and you want to make sure all of your teams stay on a consistent version of a private library. Dependabot can save you tons of meetings and governance

So now that Dependabot is free (thanks Github and Microsoft!), go [integrate it into your repo](https://dependabot.com) and enjoy getting back to your life. :)
Adding Content to a Gatsby Project
Tags: gatsby, react, webpack, beginners
Published: 2019-05-27 14:09:35

---
title: Adding Content to a Gatsby Project
description: In this video, we explore a few ways we can add content to a Gatsby project and discuss the advantages and disadvantages of each approach.
canonical_url: https://michaeluloth.com/gatsby-adding-content/
tags: gatsby, react, webpack, beginners
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/5g8pjyk0yfg4zb6sw0ya.png
series: Up & Running with Gatsby
published: true
---

This is the ninth video in our [beginner series](https://www.youtube.com/watch?v=jAa1wh5ATm0&list=PLHBEcHVSROXQQhXpNhmiVKKcw72Cc0V-U) exploring GatsbyJS and how to use it to easily build performant apps and websites.

In this video, we explore a few ways we can add content to a Gatsby project and discuss the advantages and disadvantages of each approach.

Check out the video below or [view the entire playlist](https://www.youtube.com/watch?v=jAa1wh5ATm0&list=PLHBEcHVSROXQQhXpNhmiVKKcw72Cc0V-U) on YouTube. 

Enjoy! 🎉📺

{% youtube MPqEU9ywgW8 %}
Disable VScode TypeScript alias in rename refactoring
Tags: tips, vscode
Published: 2019-05-27 15:23:44

---
title: Disable VScode TypeScript alias in rename refactoring
published: true
tags: tips,vscode
canonical_url: https://jagascript.com/disable-vscode-rename-typescript-alias/
---

Since TypeScript 3.4 a setting has been implemented into tsserver that makes _refactoring > rename_ create an alias in the local scope insted of change the original name

![rename](https://jagascript.com/rename-27218f90fe8175b126c9b51345d0de35.gif)

this abomination was enabled by default on VScode and after months of pain I found a way to disable it.

🎉🎉🎉🎉🎉🎉🎉

The configuration is called `typescript.preferences.renameShorthandProperties`

[![rename-alias-ts-vscode-setting.png](https://jagascript.com/static/266dd9c7562743db1e99b13bef49a94a/8cbec/rename-alias-ts-vscode-setting.png)](/static/266dd9c7562743db1e99b13bef49a94a/8cbec/rename-alias-ts-vscode-setting.png)
No real plan, no prep, just launching quickly: Random Elon
Tags: funproject, sideprojects, elonmusk
Published: 2019-06-16 15:13:30

---
title: No real plan, no prep, just launching quickly: Random Elon
published: true
tags:
  - fun project
  - side projects
  - Elon Musk
canonical_url: https://peterthaleikis.com/posts/no-real-plan-no-prep-just-launching-quickly:-random-elon/
---

Sometimes all the planning and thinking about a project is too much. You just got to jump in and build something. That's what [Jess](https://jesswallace.co/) and I did last night. We spontaneously decided to roll out a random, unplanned side-project: [Random Elon](https://randomelon.peterthaleikis.com/).

Random Elon returns you a randomly selected Elon Musk quote. You can then share it directly on Twitter to show your love for Elon. Powered by TailwindCSS, plain PHP7 and Laravel Forge the built took less than an hour to build. We started talking and while we were still talking Jess actually put a page together already. I set up some hosting quickly. Forge makes hosting it incredibly easy. Data was quickly collected using [spider](https://spider.amie-chen.com/). Social media images are sponsored by [imageee](https://imageee.com/). Makers collaboration 💪️

## Open source for the win!

If you want to build something similar you can actually just fork our [repo on GitHub](https://github.com/thecookiemonsters/RandomElon) and get started straight away. It's mostly HTML. The project literally has only two lines of functional code. No need to think about it much 🤣️ Create your Random Quote selector today and win a cookie 🍪️

## Missing your favorite Elon words?

If you think a great Elon quote is missing please send a pull request at the Github repo mentioned above. We are happy to update the quotes to include it 🙏️

## Disclaimer

Otherwise, I have to say, no animals were harmed in the development of this project. Tasty cookies have been eaten. 🍪️
A Sample From My Upcoming Course Hello Rails – Seeding Data
Tags: rails, ruby, tutorial
Published: 2019-06-02 13:17:21

---
title: A Sample From My Upcoming Course Hello Rails – Seeding Data
published: true
tags:  Rails, Ruby, Tutorial
canonical_url: https://web-crunch.com/sample-hello-rails-seeding-data/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1rvo4vq34yl2h08608se.jpg
---

Hey all, enjoy this free (short) taste of a bonus module in my upcoming course Hello Rails. You can find a ton more about the course at [hellorails.io](http://hellorails.io).

My _guestimate_ as to when I get this thing launched is in early June. That is just a couple of weeks away. Those who have subscribed to get notified at hellorails.io will get first dibs on it the day it is live!

I hope you enjoy this quick but super useful feature of Rails known as seeding. You can create an app as well as fill it with dummy data to hit the ground running in no time flat.

{% youtube l2QjimksGw8 %}

The post [A Sample From My Upcoming Course Hello Rails – Seeding Data](https://web-crunch.com/sample-hello-rails-seeding-data/) appeared first on [Web-Crunch](https://web-crunch.com).
100 Days of Code day 5 (except I skipped one because I was sick)
Tags: challenge, 100daysofcode, accountability
Published: 2019-05-26 23:11:51

---
title: 100 Days of Code day 5 (except I skipped one because I was sick)
published: true
description: 
tags: challenge, 100 days of code, accountability
---

I accidentally skipped a day because I was sick and it was only the third day so now I am an accidental liar D: 

I've focused on working with Python and will probably mostly continue to do so, but I need to brush up on Java before school starts. I've mostly been building things from the Python web dev course I'm following.

I also emailed my friends' dad who wants a website and maybe I can help with that next week. 

It will be so hard to go back to work on Tuesday!! Trying to teach yourself everything you want to know plus everything you think you need to know before you start school while working a 40-but-really-more-like-50 hour a week job is honestly pretty brutal and it's no wonder I'm burnt out.

But! Tomorrow is a day for grilled pineapple and nothing else really matters.
Tallying Your Github Repo Views
Tags: bash, github
Published: 2019-05-25 16:44:21

You: are a data scientist harvesting Github visitor traffic stats for analysis. 
I: am thirsty and insecure. 
We are both interested in tallying Github's unique-visitor logs for all of our repos.


### Collecting traffic data

Github offers a [REST endpoint](https://developer.github.com/v3/repos/traffic/) to query referrers, most-popular files, views (total or unique) and clone traffic, and most well-appointed Linux hosts offer the `curl` and `jq` utilities for polling and parsing the returned JSON. 


```bash
#!/bin/bash

BUFF=$(mktemp)

# Query the Github `user` endpoint to get a list of the user's repos. 
# This is neater than hard-coding a username or URL into this script.
#
MYREPOS=$(curl -sn https://api.github.com/user | jq .repos_url | tr -d '"')

# Query $MYREPOS for a list of repository URLs and mutate them into 
# `https://api.github.com/$user/$repo/traffic/views` 
#
curl -sn $MYREPOS | jq .[].url | tr -d '"' | while read URL
do
    curl -sn "$URL/traffic/views" | jq -c .views[] | while read view;
    do
        # Query the repo's `views` URL and parse returned JSON 
        # for unique-visitor counts by date

        VIEWDATE=$(echo "$view" | jq .timestamp | awk -F"T" '{ print $1 }')
        VIEWERS=$(echo "$view" | jq .uniques)

        echo "$VIEWDATE, $VIEWERS, $URL" | tr -d '"'
    done
done > $BUFF

# Now we should have a temp file that looks like:
#
# 2019-05-11, 1, https://api.github.com/repos/lbonanomi/go
# 2019-05-12, 1, https://api.github.com/repos/lbonanomi/go
# 2019-05-13, 1, https://api.github.com/repos/lbonanomi/go
#

# Let's leverage `seq` and GNU `date` to make a list of dates for the 
# last 10 days and build a CSV

seq 0 9 | tac | while read SINCE
do
    # datestamp
    date -d "$SINCE days ago" +%Y-%m-%d | tr "\n" "\t"

    # If there's no-data report a '0'
    grep -q $(date -d "$SINCE days ago" +%Y-%m-%d) $BUFF || printf "0"

    # Normally grep-before-awk makes me psychotic, but I think this is clearer.
    grep $(date -d "$SINCE days ago" +%Y-%m-%d) $BUFF|awk -F"," '{t=t+$2} END{print t}'
done

# Give a hoot and delete temp files when they're done.
rm $BUFF
```

Running our script should give us a tsv-formatted count of unique visitors to our personal Github presence in the last 10 days:

```
2019-05-16	5
2019-05-17	9
2019-05-18	1
2019-05-19	2
2019-05-20	0
2019-05-21	2
2019-05-22	2
2019-05-23	8
2019-05-24	3
2019-05-25	4
```

Wouldn't this look handsome with [spark](https://github.com/holman/spark) graph or a [line graph](https://github.com/lbonanomi/scripts/blob/master/braille_chart.sh)?
How to use API-Platform
Tags: javascript, docker, react, swagger
Published: 2019-05-26 22:00:03

---
title: How to use API-Platform
published: true
description: We will look into using API-Platform a turn-key solution to create applications upon a docker swarm using swagger, react, symphony and doctrine.
tags: JavaScript, docker, react, swagger
---

{% youtube W5UfZ9tWSLI %}
What are your non-tech hobbies
Tags: discuss
Published: 2019-05-26 21:26:45

Following the [great post "Yes, You should have hobbies outside of code by Ashlee Boyer](https://dev.to/ashleemboyer/yes-you-should-have-hobbies-outside-of-code-4ao9), I'd like to know what your hobbies outside the tech bubble really are. 

I go first: I'm a hobby musician and actor in an amateur open air theatre (german speaking folks can [check out our website](https://waldbuehne-heessen.de)) and that's a great counterpart to being an SRE/DevOps Engineer. 

Btw, that cover picture is from our current production of "Madagascar" 😉

Now you!
GoodBrief - A random generator for design briefs
Tags: showdev, design, sideprojects
Published: 2019-05-26 21:18:17

Hi dev.to,

I'm a little new here, and I wanted to show you guys this side project I've been working on-and-off for a while now. I'd really appreciate your feedback!

I went to an art and design school, so from talking to my classmates and from personal experience, I know that design students are always looking for ways to add to their portfolio. The problem is that it can often be hard to get professional work without already having experience. And just coming up with an idea in your head just isn't the same as trying to meet someone else's requirements.

![](https://thepracticaldev.s3.amazonaws.com/i/0lxx2le8k64znn5s57s5.jpg)

That’s why I made [goodbrief](http://goodbrief.io/). It generates random design briefs—the document with all the specifications for the design that a hypothetical client would give you. You can choose from many different types of design work and industries so that you always have fresh briefs to practice on.

## Version 1.0

Like, I said, I have been semi-working on this project for a while. I made the initial version (called /Brief) in 2016 and I was surprised at how well it was received! It's been used all around the world, and I love getting emails from people telling me how they've found the site useful. It's even been used in some schools to teach design, and featured on websites like [UCreative](http://www.ucreative.com/articles/designer-creates-website-for-randomly-generated-design-briefs/). I love the designs I've seen people make based on my sites brief, and in 2018 I decided to redesign the website from the ground up. The original version is still available [here](http://goodbrief.io/v1).

## Version 2.0

While the original site was just built with client-side Javascript and jQuery, I decided to use Node.js and Express.js for the redesign. This will allowed me to lay the foundation for other features that I have planned. For now, this update adds several new job types and industries, as well as a better sentence generation system and a refreshed design. If you have any suggestions for future updates, feel free to reach out.

![](https://thepracticaldev.s3.amazonaws.com/i/hiytqg4vqs1scm4fmekh.jpg)

Today marks an important milestone: GoodBrief has been officially launched on Product Hunt! At the time of writing it's sitting at the [#2 Product of the Day spot](https://www.producthunt.com/posts/goodbrief), and the feedback has been amazing. If you're into that kind of thing, please [check it out.](https://www.producthunt.com/posts/goodbrief)

That's it! I just wanted to share this project with the community. If you decide to check it out, please let me know if you end up making anything with it. Seeing designs based on these briefs is my favorite part of the whole project 😊
Students in web dev: what has been your best learning experience, and why was it effective?
Tags: discuss, webdev, teaching, beginners
Published: 2019-05-26 21:10:57

---
title: Students in web dev: what has been your best learning experience, and why was it effective?
published: true
description: Teacher-in-training looking to create the best web dev bootcamp around
tags: discuss, webdev, teaching, beginner
---

I ask this question as someone **completely** new to teaching, but with a ton of excitement 😃

For context, I'm a member of the Bits of Good student organization that builds websites from nonprofits. We are creating a semester-long (4 month) bootcamp for web development with separate frontend and backend tracks, using in person and online components.

I won't get into many specifics on the curriculum or what our ideas are. Just want some insight from the dev community on what teaching methods, mediums, delivery, etc. best helped you learn! Doesn't matter if you're a new learner, a teacher, participated through some YouTube tutorials or in-person workshops... all perspectives are welcome 😊 

Also open to direct recommendations for courses and teachers that you found awesome. Reference material is great to have.
Does your team conduct tech interviews as collaborative coding sessions? If so, what software/techniques are you using?
Tags: discuss
Published: 2019-05-26 20:53:40

---
title: Does your team conduct tech interviews as collaborative coding sessions? If so, what software/techniques are you using?
published: true
description: 
tags: discuss
---

I’ve noticed a trend amongst development teams to adopt an technical interview format that looks more like a pair programming/code review session between the interviewer and candidate. Among other things, this has the potential benefit of providing a more collaborative, real-world, “day-in-the-life” discussion, as compared to a "traditional" whiteboard/logic puzzle style interviews. 

I’d love to learn more from folks that are doing this already (or are planning/aspiring to soon!), and in particular:

1. What software do you use to collaborate/code along with candidates during the interview? (e.g. Zoom/Teams/Slack for screen sharing?, online IDEs such as Codesandbox?) Do you rely on a separate service/tool for audio and/or video for communication?
 
1. What is the scope of the task the candidate typically performs? (e.g. are they writing tests, doing a code review, fixing a bug?). 

1. Are candidates working against a real codebase, a test/evaluation project, or building a new app from scratch?

If you’ve already written about this before, feel free to just share the link. In general, I’m very keen to learn more about collaborative tech interviews in-the-wild, so I appreciate any and all details. I suspect others in the community will be interested as well, since this an area that deserves continuous improvement and knowledge sharing 🙌
What Would You Do If You Had a Million Dollars?
Published: 2019-05-26 20:29:43

---
title: What Would You Do If You Had a Million Dollars?
published: true
description: 
tags: 
---
Last week I was on vacation so no newsletter but here's this week's edition to #BytesAndBits!  Talking about....

🤓 What I learned from the TogetherDigital Meetup.  Ask yourself "What would you do if you had a million dollars?"
🤓 My role as only 1 of 3 persons in Ohio who are part of Amazon Web Services Cloud Ambassador program
🤓 Fun #computerscience activities happening this Summer at Hocking College

Read about it at https://cdn2.hubspot.net/hubfs/2446169/Computer%20Science/Bytes%20and%20Bits%205.26.2019%20.pdf?utm_campaign=Admissions&utm_source=email!  

#whatwouldyoudoifyouhadamilliondollars