teleren/devto huggingface dataset:
GraphQL these questions that we ask ourselves but that the tutos do not address
Tags: discuss, graphql, beginners
Published: 2018-06-19 11:13:17

---
title: GraphQL these questions that we ask ourselves but that the tutos do not address
published: true
description: 
tags: discuss, graphql, beginner
---

I was supposed to start a job today and all my schedule was done around that but for lack of any confirmation from the client and the team leader, I still looked on the internet.productivity level: 0, energy level: 0.it's when I remember that yesterday I was well surprised to know by doing a little waking that:

* WordPress can be converted to REST API which returns JSON responses and then
* GatsbyJS could recover them and with React in the background, transform all that into a static site or even a PWA.

Being a JAM Stack aspiring I was very quickly interested but having already tried to know what all the components of this Stack are for, I still block on a super powerful concept and tool that gives it a lot of charm I named: GraphQL

* So...what is GraphQL?
* What's the point?
* How does it work?

On the documentation you will find answers to these questions. I also advise you the post of: [Grigor Khachatryan](https://dev.to/grigorkh/what-is-graphql-4n9j)
There are many tutorials that also talk about it but which for me treats it badly because it launches itself all very quickly to the writing of GraphQL queries that to answer many rather important questions on which the novices stumble.
Personally here are the questions I ask myself:

* Why do I compare GraphQL to REST?
* Can't it be added to REST?
* one thing I like about REST is the way it allows us to write urls which is pretty sexy, so what about GraphQL?
* Using enough ExpressJS/HapiJS are there solutions to integrate GraphQL to these frameworks?
* At what level does GraphQL appear in an MVC architecture?(for example)

I just realized I've already found an answer to a question.
These stupid questions can be turning in the heads of many I'm sure unless I'm the only one (ohh shame!!!!)

On the documentation they give an excellent resource: [how to graphql](http://howtographql.com).I looked at the proposed route and it helps to answer some questions so I check it out.I'll get on it soon.

you can add the questions you ask yourself in comments
It's Time. Let's Rename "Soft Skills"!
Tags: softskills, coreskills, career
Published: 2018-06-19 10:24:57

---
title: It's Time. Let's Rename "Soft Skills"!
published: true
tags: soft skills, core skills, career
canonical_url: https://www.samjarman.co.nz/blog/core-skills
---

![Not soft skills, core skills](https://thepracticaldev.s3.amazonaws.com/i/32944y90imo67rivrqix.png)


Hi There,

As we know, our 'soft skills' are super important, and these skills include but are not limited to: verbal communication, written communication, influencing skills, empathy, personal skills, pitching, listening, delivering/accepting feedback and much more. 

However, the problem I and a lot of others have with the term _Soft Skills_ (compared to "Hard" skills, such as writing code or knowing a certain job-specific tool or technique) makes the term sound _secondary_ or _less important._ **This connotation couldn't be further than the truth.**  
  
So, **I believe that we should rename Soft Skills and Hard Skills to _Core Skills_ and _Tech Skills_** (for the IT field, other fields may go with other terms than "Tech"). To be clear, this isn't something I've invented, I've heard it around* and wanted to reiterate the point.   
  
Core is, well, just that...core! Its the solid inner part of you. The bit in which you build. The bit that has to be solid, really before anything else is to be done. The bit you work on, keep strong. The bit that can lose strength, get sore and that needs TLC from time to time. The bit that others naturally have stronger than others. Gosh I like this term.   
  
So that's it. Core Skills. Its not that I _hate_ the term soft skills, its just the name isn't really the point – I want you to work on these skills regardless of how you want to name them. They're just so important. But let's work on naming them with a sense of importance in the hopes that others agree – this is something we'll all benefit from.   
  
_Some quick links for Dev.To folks/anyone:_

- The BEST podcast for Core Skills for Engineers - [The Soft Skills Engineering Podcast](https://softskills.audio/)(ha)
- [How to Win Friends and Influence People](https://amzn.to/2t2v2f9). Classic book. Buy it, read it. Make notes and actions. It changed my career for the best about 24 months ago. 

Best of luck!  
Sam  
  
\*I can't remember where I first heard this, but I've now heard this multiple times. In an effort to find out more, I've asked the two people I heard this from most recently, and they had the same experience. A reader pointed out it might have been [this thread](https://twitter.com/aurynn/status/903107096857559040) by [Aurynn Shaw](https://www.samjarman.co.nz/blog/aurynn), who does a lot of great speaking and blogging around Core Skills. Its spread since then, so great job her! Credit is hard 😅.
No social media in the mornings - Day 7
Tags: career, productivity, mentalhealth
Published: 2018-04-30 23:52:16

---
title: No social media in the mornings - Day 7
published: true
description: Seventh day without checking social media in the morning.
tags: #career, #productivity, #mental health
---

The seventh and last entry on [what would your life be without social media in the morning](https://dev.to/josegonz321/what-would-your-life-be-without-social-media-in-the-morning-1g2l) adventure.

Before I begin today, **I want to thank you for reading**. I appreciate taking the time reading about my journey. 

I hope you learned a thing or two. Or at the very least, help you see things from a different angle. And why not, start this experiment yourself?

Let's finish the last entry, shall we?

## Day 7

1. **Turning off the alarm.** ⏰
    I got up to turned off the alarm and went back to bed. This is a recurring pattern, isn't it? 

    This time around I didn't get stay in bed to long because something was bothering me. That something was an indecision with my blog I have been dragging my feet on.

2. **Phone in pocket**
    I was so distracted I didn't properly said goodbye to my boys before heading to school. I logged in to my email and started handling business. My anxiety was rising by the minute.

    Tea was very little help today.🍵

    After my wife came back, I asked for her opinion on my indecision. She gave me some excellent feedback. All I had to do was execute. 
    
    I want to say my anxiety went down but it didn't go away. I didn't go up or down. 

3. **Drive to work** 🚗
    It was a cool and sunny morning. But I failed to enjoy it and take in nature today. 

    I decided to record my thoughts again. Maybe it would help me ease my anxiety. This is a technique I learned from one of my mentors many years ago.

    Unfortunately, it wasn't the case for me today. My anxiety continued and I had to carry it with me into work.

4. **Work, work** 👨‍💻
    My morning started a bit accelerated, or at least it felt that way. Thankfully, my team helped me cleared out some business domain questions for the story I'm currently working on. 

    My anxiety didn't get worst at least. What's worst is that I couldn't wake up either. Even after a few cups of tea, I was still feeling mellow in a bad way.

## First time checking social media

- Twitter: 12:15pm
- Email: 7:15am
- Dev.to: 12:30pm
- Crypto currency: 2:30pm

## Wrapping it all up

Thank you again for reading and joining this journey. But this is the first step towards making no social media in the mornings a habit. 

They say the first step is the hardest, so why throw away such hard work?

I believe story telling is the best way to convey ideas, thoughts and teachings. 

**What's next?**

You may be asking. I'll write a follow-up article on a few things I've learned along the way. It'll answer questions such as

- What's next? (in detail)
- Does this really work?
- What's the new challenge?

Thanks for reading. Till soon!
How do you manage Calendars in your company?
Tags: discuss
Published: 2018-06-19 09:36:01

---
title: How do you manage Calendars in your company?
published: true
description: 
tags: #discuss
---

At the company that I've been working for, since the biginning they have a shared iCloud calendar and it difficult to sync when we have new Android, Linux or Windows devices.

I would like to change it to a shared calendar that can be sync thought any platform, I know Google Apps is an option but we don't use it, we have an email provider.

Do you know any platform that can help to fix this problem?

Thanks.
Vue+Flask on DigitalOcean: how to proceed?
Tags: digitalocean, flask, vue, discuss
Published: 2018-06-19 06:14:02

---
title: Vue+Flask on DigitalOcean: how to proceed?
published: true
description: Can I use "localhost" for my API calls?    
tags: digitalocean, flask, vue, discuss
---

Hi!

Following my [earlier post](https://dev.to/danroc/ready-to-deploy-vue--flask-but-where-to-deploy-it-to-57o3), I am now trying to have my app running on a **single** Digital Ocean droplet.

But how should I approach it? 

Is it correct to have my Vue app being served to the outside world and the Flask API being served locally in the droplet, and have my Vue app access it via `localhost:port`?

Or do I need two server blocks, one for the Vue app and one for the Flask API? 

(the API is for internal use only, I do not intend to have a public endpoint to it)

Thanks for the help!
Daniel
Vue.js Events
Tags: javascript, vue
Published: 2018-06-19 09:10:40

---
title: Vue.js Events
published: true
tags: javascript, vue
canonical_url: https://flaviocopes.com/vue-events/
---

## What are Vue.js events

Vue.js allows us to intercept any DOM event by using the `v-on` directive on an element.

If we want to do something when a click event happens on this element:

```
<template>
  <a>Click me!</a>
</template>

```

we add a `v-on` directive:

```
<template>
  <a v-on:click="handleClick">Click me!</a>
</template>

```

Vue also offers a very convenient alternative syntax for this:

```
<template>
  <a @click="handleClick">Click me!</a>
</template>

```

You can choose to use the parentheses or not. `@click="handleClick"` is equivalent to `@click="handleClick()"`.

`handleClick` is a method attached to the component:

```
<script>
export default {
  methods: {
    handleClick: function(event) {
      console.log(event)
    }
  }
}
</script>

```

Methods are explained more in details in my [Vue Methods tutorial](https://flaviocopes.com/vue-methods/).

What you need to know here is that you can pass parameters from events: `@click="handleClick(param)"` and they will be received inside the method.

## Access the original event object

In many cases you will want to perform an action to the event object, or look up some property in it. How can you access it?

Use the special `$event` directive:

```
<template>
  <a @click="handleClick($event)">Click me!</a>
</template>

<script>
export default {
  methods: {
    handleClick: function(event) {
      console.log(event)
    }
  }
}
</script>

```

and if you already pass a variable:

```
<template>
  <a @click="handleClick('something', $event)">Click me!</a>
</template>

<script>
export default {
  methods: {
    handleClick: function(text, event) {
      console.log(text)
      console.log(event)
    }
  }
}
</script>

```

From there you could call `event.preventDefault()`, but there’s a better way: event modifiers

## Event modifiers

Instead of messing with DOM “things” in your methods, tell Vue to handle things for you:

- `@click.prevent` call `event.preventDefault()`
- `@click.stop` call `event.stopPropagation()`
- `@click.passive` makes use of the [passive option of addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters)
- `@click.capture` uses event capturing instead of event bubbling
- `@click.self` make sure the click event was not bubbled from a child event, but directly happened on that element
- `@click.once` the event will only be triggered exactly once

All those options can be combined by appending on modifier after the other.

For more on propagation, bubbling/capturing see my [JavaScript events guide](https://flaviocopes.com/javascript-events/).

> I'm working on a Vue.js course. If you're interested in learning Vue, [get on the list](https://flaviocopes.com/course/vue/) to get a free 100+ pages ebook about the Vue fundamentals next week!
CakePHPとLaravelの比較2018
Tags: php, laravel, cakephp
Published: 2018-04-30 13:33:16

---
title: CakePHPとLaravelの比較2018
published: true
description: 
tags: php,laravel,cakephp
canonical_url: https://crieit.net/posts/CakePHP-Laravel-2018
---

## 経緯

2016年にこんなCakePHPとLaravelの比較記事を書いた。

[CakePHPとLaravelの使い道](https://crieit.net/posts/CakePHP-Laravel)

また、こちらの記事もCakePHPのみの記事だが完全にLaravelとの比較を意識していた。

[CakePHP3の優位性を色々](https://crieit.net/posts/CakePHP3-5b0d18a432ff5)

この頃は正直CakePHPびいきだったが、時も流れ色々と状況や考え方も変わってきたので改めて考察してみた。（人によってはなんで今さらCakeとLaravelの比較なんてやってんだ、と思うかもしれないが）

## 情報量

> 検索にしても日本語の情報が非常に少ない気がするので本当に人気があるのかと思ってしまう。

当時Laravelについては上記のように書いていた。

今はどちらも十分。CakePHP3とか、Laravel5とかで検索すれば紛らわしい情報も減るし、困ったらドキュメント見れば大体分かったりする。

## ヘルパー

> LaravelのHtml, Formヘルパーはなんとなく不足している点が多いような気がする。 実際使ってない人もいるようだ。 radioボタン群すらメソッド一つで作れないとは。

当時上記のように書いていたとおり、FormヘルパーはやっぱCakeの方が楽な気がする。とはいえそんな細かく気にするところでもないかなという気はする。

## 設定

> Laravelは設定量が多い。 パーツを追加する度にCakeだったらこんな設定しなくてもすぐ動かせるのに…。 と思いながら設定をしなければならない。 自由度が高いといえばそうなのかもしれないが、そんな自由度を得てまで時間をかけて開発したいのか、という疑問が湧いてくる。

これ多分Facadeの事を言ってたような気がする。Facadeを自分で作るのは確かに面倒だが、これはテストのやりやすさにも繋がるように便利に作られてるものだし、今となってはそんな気にするようなものじゃないと思う。

でもまあCakeはヘルパーやコンポーネント追加していくだけだからほんとに楽ではある。

あとは

> ルーティングなんて設定しない

というのも書かれているが、正直ルーティングを設定するのはどのフレームワークでもあたりまえの事なのでこれも気にするようなことじゃないと思う。

とはいえ設定しなくても動くCakeはほんとに楽なのは楽。ただ、ルーティングを設定することでresourcesの恩恵を受けられコードもシンプルになるし、メリットも大きい。

CakePHPがまずいのは、bakeの自動生成がresources形式になっていないことだ。これがデフォルトでできたらかなり良い。

## DebugKit

これはCakeの圧勝に変わりはない。

## モデル

Cakeのモデルはほんとに便利。Laravelでも特に不満はないが、Queryがモデルに属しておらずメソッド追加などが出来ないのがちょっと不満。（一応設定すればできるみたいだが）

ただCakeのバリデーションはコードが非常に長い。これはなんとかならないかな。

モデルは一長一短な気がする。

## マイグレーション

これも自動生成してくれるCakePHPを褒めちぎってたが、マイグレーションを書くのも今や当たり前の事なので普通に自分で書いている。気にするほどのことでもない。

## 先進性

JavaScriptについてはCakePHPは遅れている。LaravelはデフォルトでVueとかBootstrapとか使えるのでそれだけでもだいぶ優位。CakePHPはまだjQueryでいいんじゃない？　みたいな空気を醸し出していて先進的じゃない。将来どうなるのか心配になる。

他にもLaravelは色々なものと連携できるようにオフィシャルパッケージも続々追加されている。HomesteadやLaradockなど、周辺の開発環境なども色々と考慮されてきている。Laravel本家と周辺共に、みんなが開発しやすい環境を作り上げていこうという活発な姿勢が見られ非常に好感が持て、将来性が期待できる。ここは完全にCakeが敗北しているところ。

というか、ここだけでも今後はLaravelだけでいいかな、という感じすらしてきてしまう。

## 今年の結論

趣味だったらLaravelを使うと知識や技術も広まりやすいのでおすすめ。

仕事だったら色んなフレームワーク使えた方が扱える案件や考え方の幅が広がる。ただし他言語も含め、composerのようなパッケージ管理は当たり前の様に使われている時代なので、composerを使っていないようなフレームワークはもう覚える意味はないように思う。（全て個人的な見解）
Byte Size: Changing Habits with the Command Line
Tags: beginners, commandline, terminal, codenewbie
Published: 2018-06-19 03:08:57

---
title: Byte Size: Changing Habits with the Command Line
published: true
description: 
tags: #beginners, #command line, #terminal, #CodeNewbie
---

I think one of the more tangible elements of tracking my progress while being a coding beginner is tracking how my habits have changed in the most basic ways as I use my computer. My experience interacting with the UI of my computer has completely shifted relatively quickly.

Previously, I, like many users, adhered to the user experience of manually clicking through folders, dragging and dropping documents and folders, right clicking for copying and deleting materials, double clicking to open files etc. etc. I stuck with the GUI.

![Dragging to the trash is now dumb](https://assets.rbl.ms/17266104/980x.gif)
######I don't have to do this anymore

Everything has shifted after discovering the terminal and learning some *very* basic bash commands.

Instead of clicking through folders and scrolling manually, I navigate through my file structures just using change directory command and using the "ls" bash command to see what files I'm looking for:

![basic bash navigation](https://thepracticaldev.s3.amazonaws.com/i/hkf7ddka0rlitwglifuk.png)

Using the command line for navigation has really streamlined my workflow. I end up memorizing file and path names (or at least what they start with), and I spend far less time navigating and resizing menus.

The bash shell seems to be a really powerful tool with a lot of capabilities I've barely begun to scratch the surface of - after all, it's not just for navigation.

[Lifehacker has a really beginner friendly guide on getting used to the command line.](https://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything)
What's a recent frustrating bug you've had with a crazy simple solution?
Tags: debugging, discuss, php
Published: 2018-06-19 02:44:17

---
title: What's a recent frustrating bug you've had with a crazy simple solution?
published: true
description: Spending an hour-plus on a bug that turns out to be something simple...
tags: debugging,discussion,php
---

Today I spent 1.5 - 2 hours trying to debug an issue I was having with PHPMailer -- or was it my `foreach` loop, or perhaps a misspelled variable, or maybe that method name was supposed to start with a capital letter...?

Just kidding. The issue is fixed at this point, and I *did* at least learn *something* new today.

But I'm sure that cycle of questions is familiar to you. Questions like those seem to always clot together in the mind when something that _is_ broken obviously shouldn't be -- or should it be? At that moment, who knows?

Today's problem -- **I thought** -- was caused by switching from PHP 5.3.x to 5.6.x for a specific codebase (see edit below).

What ended up being the culprit was the lack of the keyword `global` at the top of a function that was using global variables. These variables (two of them, it turned out) were not being set within the function.

### Lessons learned today

1. **Don't automatically trust your own code.** Even if it worked semi-recently, "semi-recently" isn't "now".

2. **Look into language upgrades more often.** Rare issues that occur between language versions do still happen, even if they *are* rare. Since not all projects use the exact same sets of features, looking for possible breaking changes between versions is definitely important.

3. **Lingering confusion is probably worth looking into.** After typing all of this, and knowing that the variables suddenly weren't accessible anymore - and looking into it for a little longer -- I'm still not 100% sure that the language upgrade is what caused this issue; it seems that the `global` keyword was available back in PHP 4 (maybe someone with more experience knows).

### Back to the question:

What have *you* been stuck on for some time that turned out to be unbelievably simply to fix?

______

P.S. I realize an upgrade from 5.3.x to 5.6.x is fairly "behind the times", but it happens to be where we are on a VPS we use. I do see that changing in the foreseeable future though.

Also, I apologize if my writing is all over the place. While I do look forward to being able to write more, this was only meant to be a quick little post anyway (and it may have even grown beyond that 😅).

Thanks for stopping by to read!

____

Edit: regarding #3 above, I'm definitely more confused now... A local dev who's used PHP since 5.2 told me without the `global` keyword, it will always error out.
How to implement a button loading state with CSS
Tags: css
Published: 2018-06-19 01:06:18

---
title: How to implement a button loading state with CSS
published: true
description: Learn how to implement a button loading state for your website or application with CSS.
tags: CSS
---
{% youtube lSokdRVHB-4 %}


Learn how to implement a button loading state for your website or application with CSS.

View the source files [here](https://github.com/alexcarpenter/screencasts/blob/master/16-loading-button/index.html).
Finding out how little you know about Git
Tags: git, learning
Published: 2018-06-18 18:22:30

---
title: Finding out how little you know about Git
published: true
tags: Git,Learning
canonical_url: http://christine-seeman.com/2018/06/finding-out-how-little-you-know-about-git/
---

I haven’t been a Git user for a long time, I have just been actively using it since January. That may not sound like a long time, but for a developer using a tool for over 5 months is almost as much as some projects take (if you are lucky) or as long as a contract is.  Since switching from Java to Ruby, and moving to a new company who knows much more about this, I have learned how unsophisticated we were using Git.

We were on GitLab, using it with bash in a modified GitHub flow with a master and develop branches, all features were branched off of the develop.  We did have merge commit messages, and had some CI/CD integration pulling in from a internet accessible GitLab to an internal GitLab.  The switch from Subversion was done fairly easily, with some reorganization needed to switch up some of the repo structure (we went for a one-to-one relationship with all project == new git repo, but that made waaaaaay too many repos).  So, I had been doing some Git, and now I have learned that I really don’t know how to do Git.

Did I know what a [Git alias](https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases) was? Nope. What about [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing), [pushing with options](https://developer.atlassian.com/blog/2015/04/force-with-lease/), or f[orking a repo](https://guides.github.com/activities/forking/)? Nope, nope and nope.

![](https://media.giphy.com/media/aH8oOOUfyrC8g/giphy.gif)

So I now I have a git alias (that I have to have pulled up in a notepad so I can remember all the commands) and have to be a lot more specific with my commit messages (they are a-ok for development but when you are ready for you pull request, squash those babies) and no more straight pull and pushing for me! I need to remember to rebase, rebase, rebase and for the love of all that is good don’t add in extraneous commit messages, make sure to [amend](https://www.atlassian.com/git/tutorials/rewriting-history). With all this changing of history I am doing, I am feeling like a time-traveler.

![](https://media.giphy.com/media/Vqvr9BGv1vhDi/giphy.gif)
A Case for GraphQL in Enterprise
Tags: graphql, enterprisetechnology, enterprisesoftware, enterprise
Published: 2019-12-03 11:56:25

---
title: A Case for GraphQL in Enterprise
published: true
date: 2018-06-19 00:00:00 UTC
tags: graphql, enterprise technology, enterprise software, enterprise
canonical_url: https://blog.hasura.io/a-case-for-graphql-in-enterprise-84b4d13c72b3/
---

![](https://blog.hasura.io/content/images/downloaded_images/a-case-for-graphql-in-enterprise-84b4d13c72b3/1-5lwuNFUXOyTa1eqK3QJvrw.png)

Originally released by Facebook in 2015, GraphQL has evolved into a battle-tested technology that has the potential to solve key challenges in the enterprise IT space, specifically in accelerating API/app development cycles. The [list of GraphQL users](https://graphql.github.io/users/) is ever increasing, and include companies such as Github, Twitter and Intuit.

In a nutshell, here’s how GraphQL contributes to API Lifecycle Management within enterprises:

- GraphQL supports dynamic queries and is type-safe. This reduces the number of APIs that need to be developed and allows enforcing compile-time checks on the data being requested by consumers.
- It was designed to be able to seamlessly front multiple sources of data, reducing the number of complex, cross-functional API dev iterations.
- It is backed by an active community that is constantly improving the tooling and simplifying GraphQL adoption.

You can find more from us about how GraphQL helps enterprises over at [Dzone](https://dzone.com/articles/a-case-for-graphql-in-enterprise).

If you work for an organisation that is considering using GraphQL, we would love to [talk to you](https://hasura.io/help)!