teleren/devto huggingface dataset:
Elixir: 次期バージョンv 1.8に加えられた新機能
Tags: elixir, webdev, tutorial, programming
Published: 2018-11-20 06:31:03

---
title: Elixir: 次期バージョンv 1.8に加えられた新機能
published: true
description: 2019年1月に予定されているElixir v1.8のリリースに先立ってPlataformatec社のblogに2018年11月16日付で「What’s new in Elixir – Nov/18」が公開されました。その記事にもとづいて、すでに加えられているおもな新機能をご紹介します。
tags: #elixir, #webdev, #tutorial, #programming
---

Elixir v1.8のリリースが2019年1月に予定されています。それに先立ってPlataformatec社のblogに2018年11月16日付で「[What’s new in Elixir – Nov/18](http://blog.plataformatec.com.br/2018/11/whats-new-in-elixir-nov-18/)」と題して、すでに加えられたおもな新機能が紹介されました。本稿はPlataformatec社の許諾を得て、この記事の内容にGitHubのコミット情報も加え、整理してご説明します。

- `mix test`のタスクに`--max-failures`のフラグが加わります。
    - コミット「[Introduce ExUnit --max-failures feature](https://github.com/elixir-lang/elixir/commit/8c373044dcde1654670d8da10448e4b8fecf0b93)」
    - 指定したn回の失敗に達すると、スイートは中止されます。そして、返されるのは、それまでに終えたテストの回数です。モジュールが無効のときは、その旨を報告する一方で、そのテストはすべて失敗に数えられます。

- `Inspect`プロトコルが簡単に引き出せるようになります。この仕組みが役立つのは、検査やログから、とくにセキュリティ関連について、特定のフィールドを除けることです。
    - コミット「[Allow Inspect protocol to be derivable with the only/except options](https://github.com/elixir-lang/elixir/commit/10ceadb448ba6a913f3070c3cc51c9c7be1f280b)」
    - `Inspect`プロトコルで構造体から特定のフィールドを隠して、検査やログなどに表示しないようにできます。個人情報を含むフィールドなどに有用です。`@derive`に`:only`や`:except`オプションで表示する、あるいはしないフィールドが定められます。

- `:extra_applications`の設定により、Mixは自動的にオプションの依存関係を開始します。
    - コミット「[Include optional dependencies in extra_applications](https://github.com/elixir-lang/elixir/commit/53ebafb8a4bc2fe73caefd24b49c95cc2943a340)」
    - これまではオプションの依存関係は、`compile.app`が自動的には`extra_applications`に含めませんでした。

- Elixirはタイムゾーンデータベースの公式サポートを受けます。デフォルトで扱うのはUTCのみです。けれど、別のデータベースにより、他のタイムゾーンで`DateTime` APIが使えます。
    - コミット「[Add TimeZoneDatabase behaviour for time zone data.](https://github.com/elixir-lang/elixir/commit/b8b1a4ba8af8256567f00e6d9f7fa056881a8ec1)」
    - 他のタイムゾーンデータベース(パッケージによるものも含む)は、`config`でデフォルトに定めるか、`Calendar.put_time_zone_database/1`を呼び出して使います。

- その他の追加として、たとえばつぎのような関数があります。
    - [`List.myers_difference/3`](https://github.com/elixir-lang/elixir/commit/2d7bd055ed0f8ee9fdb130bbd969033b705b4943)
    - [`String.bag_distance/2`](https://github.com/elixir-lang/elixir/commit/76c144aa26301018b39a7b4d70be226034faac43)

加えられた変更について詳しくは、「[CHANGELOG](https://github.com/elixir-lang/elixir/blob/master/CHANGELOG.md)」をご参照ください。今後の変更や機能の追加は、Elixirの「[Issues](https://github.com/elixir-lang/elixir/issues)」でご覧いただけます。
How new entry could start bitcoin
Tags: cryptocurrency, bitcoinexchange, exchangeplatform
Published: 2018-11-20 06:04:13

---
title: How new entry could start bitcoin
published: true
description: The article about the opportunities of the newer to earn business in crypto exchange business
tags: cryptocurrency, bitcoinexchange, bitcoin-exchange, exchange-platform
---

Bitcoin gave a start to fintech industry. From its start bitcoin price rose more that 10 thousand per cent. To earn a lot of money investing in Bitcoin one should have some insider resources of information. It’s not an easy thing for a new entry to invest money and receive a good income. There is also another way to have income in this brunch. It lies in creation bitcoin business. At this case you’d receive devidends from all the users’ transactions. 
Crypto trading exchanges take the lead in cryptocurrency business. Thinking over how to start bitcoin, follow http://merehead.com/blog/how-create-bitcoin-cryptocurrency-trading-exchange-platform/ . At this web-page you could gather useful information and pieces of advice from people engaged into cryptocurrency trading exchange business. The volatility in 2018 and the fact that some regions of some countries have really bigger demand than markets could propose give chances to earn a lot of money. So, if you successful choose such regions not even countries but regions you could succeed in it. 
One core point in this is the type of cryptocurrency exchanges. There are lots of types and each of them has its advantages the investor should only make the most suitable choice for himself.  
If you meet lack of experience you could choose the Administrator-user type. Simple interface no stop limits orders and the direct cooperation between users and administration is good for newers. 
So, be confident in your strength. Make the analysis and begin your start-up. It is worthwhile and perspective, but be considered and think everything over.
Understanding the JavaScript For...of Loop
Tags: javascript, es6, react
Published: 2018-11-20 05:19:48

---
title: Understanding the JavaScript For...of Loop
published: true
description: Understanding the JavaScript For...of Loop
tags: #javascript #es6 #react #js
---

Post Link : <a href="https://www.skptricks.com/2018/11/understanding-javascript-forof-loop.html" >Understanding the JavaScript For...of Loop </a>


This tutorial explains how to use For...of loop in javascript programming language. The for...of statement creates a loop iterating over iterable objects, including: built-in String, Array, Array-like objects (e.g., arguments or NodeList), TypedArray, Map, Set, and user-defined iterables. It invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object.

Syntax:
for (variable of iterable) {
  statement
}

variable - For every iteration the value of the property is assigned to the the variable.
iterable - An object which has enumerable properties and can be iterated upon.

<a href="https://www.skptricks.com/2018/11/understanding-javascript-forof-loop.html" >Understanding the JavaScript For...of Loop </a>

<img src="https://3.bp.blogspot.com/-grqYmn-3hqQ/W_OXepT1KQI/AAAAAAAACKM/7NAjmM-Ts5UvuXgGZRKwGkgH-o3IhFrSQCLcBGAs/s400/forof.png" />
How do you like to learn? 
Tags: discuss, career
Published: 2018-11-17 14:44:15

---
title: How do you like to learn? 
published: true
description: Wondering if I should incorporate some new tactics into my mentoring
tags: ["discuss","career"]
---

Wondering if I should incorporate some new tactics into my mentoring. And if so, what those would be. 

I recently created [GetADevJob.com](https://getadevjob.com) to help answer common questions I get when mentoring people in the midst of a career switch. Things like "Can I teach myself to code and get a job?", "What do I need to do to get hired without a degree?" and most of all, "How did you/others do it?”. When I first started applying to jobs I was a total mess. Tip lists and checklists were good, but I got the most value out of someone sharing their personal experience. It helped me see the big picture and gave purpose to my actions. This is what I created GetADevJob.com around, but I realize not everyone is like me.

I'm wondering if I should use some new tactics in my mentoring and the new site. So, when _you_ learn something new, do you prefer having a guide that tells you to do X-Y-Z or do you prefer more of an observational approach? Perhaps watching someone do it first and then giving it a shot yourself?
Wireframing Discussion! 
Tags: beginners, design, uiux, discuss
Published: 2018-11-20 03:30:57

---
title: Wireframing Discussion! 
published: true
description: I'm brand new to wireframing, what are the best tools?
tags: beginner, design, UI/UX, discuss
---

A project came up at work, and got delegated to yours truly. If I've never built any wireframes before, where should I start? What apps or tools should I use? Any primers on philosophy of design and processes to it? 

I'll start a few comment threads with Apps/Tools, Philosophy/Process. If you have another idea, start a new thread!
PHP to Node Js
Published: 2018-11-20 02:57:26

---
title: PHP to Node Js
published: true
description: 
tags: 
---

Is it possible to covert a php website with MySQL database to node js?
The site will have a lot of request for signing up and login and and posting of form data to MySQL DB. Someone suggested that its better i use Node js As my backend to avoid delays in data process? Your comments and suggestions will be highly appreciated.
What does it mean for a system to be not partition-tolerant? 
Tags: help, explainlikeimfive, distributedsystems
Published: 2018-11-20 02:33:25

---
title: What does it mean for a system to be not partition-tolerant? 
published: true
description: 
tags: help, explainlikeimfive, distributed-systems
---

When reading about distributed databases, the CAP theorem is often discussed, where a system can only choose 2 out of the following three properties

- consistency
- availability
- partition tolerance

It is usually then stated that network partitions are rare but unavoidable,so most databases chose CP or AP. But what would it mean for an application to not be partition tolerant? It seems that not being partition tolerant would sacrifice either availability (by shutting down when a partition is detected), or consistency (by letting each partition manage its own state). So can a system ever really be A%C and only sacrifice partition tolerance?
Writing GraphQL queries in native Ruby = Love ❤️
Published: 2018-12-07 12:48:03

---
title: Writing GraphQL queries in native Ruby = Love ❤️
published: true
tags: 
canonical_url: https://www.contentful.com/blog/2018/11/20/graphql-ruby-love-backend-developer/
---

GraphQL has made waves with front end developers, but if you’re a backend developer, chances are it hasn’t infiltrated your world –– you might not even know what it is. And it’s not your fault. There has been a limited amount of blog posts, talks and information around using GraphQL APIs on languages that don’t have an official Apollo client.
Dynamically Set Footer Copyright Date
Tags: javascript, webdev, beginners, codenewbie
Published: 2020-02-09 19:39:24

---
title: Dynamically Set Footer Copyright Date
published: true
date: 2018-11-20 00:00:00 UTC
tags: javascript, webdev, beginners, codenewbie
canonical_url: https://chrisotto.dev/javascript-copyright-date/
---

With 2018 winding down I found myself thinking that I will need to leave a note to update the footer on my site to change the year to 2019. Having to come back year after year to statically change the copyright year in my footer is something I will no longer do. So why not have it set dynamically?

```html
<script>
  document.write(new Date().getFullYear())
</script>
```

Instead of just adding the year I also included a copyright character and my name wrapping the new script.

```html
©
<script>
  document.write(new Date().getFullYear())
</script>
Chris Otto
```
TIL: You can configure the logged error stack trace length in certain environments
Tags: javascript
Published: 2018-11-20 20:31:46

---
title: TIL: You can configure the logged error stack trace length in certain environments
published: true
tags: javascript
canonical_url: https://www.stefanjudis.com/today-i-learned/configure-the-logged-error-stack-trace-length/
---

Debugging JavaScript apps can be hard. Today I was reading an article about [debugging functional JavaScript](https://itnext.io/debugging-functional-javascript-545b6ea59660) and found a handy tiny detail.

Let's assume an error is thrown deep inside your app.

```
main();

function main() {
  one();
}

function one() {
  two();
}

function two() {
  three();
}

// you get the idea :)

function ten () {
  eleven()
}

function eleven () {
  throw new Error("I can't see the whole stack strace")
}
```

When you execute this in Chrome or Node.js you get the following stack trace printed to the console.

```
Uncaught Error: I can't see the whole stack strace
    at eleven (<anonymous>:49:9)
    at ten (<anonymous>:45:3)
    at nine (<anonymous>:41:3)
    at eight (<anonymous>:37:3)
    at seven (<anonymous>:33:3)
    at six (<anonymous>:29:3)
    at five (<anonymous>:25:3)
    at four (<anonymous>:21:3)
    at three (<anonymous>:17:3)
    at two (<anonymous>:13:3)
```

As you see the first two function calls (`main` and `one`) of the stack trace are omitted. It turns out that you can configure the length of the printed stack trace using `Error.stackTraceLimit`. This configuration enables you to enrich the logging when you're facing a bug buried deep in your application.

```
Error.stackTraceLimit = 20;
```

When you increase this value, you will see the whole trace logged.

```
Uncaught Error: I can't see the whole stack strace
    at eleven (<anonymous>:50:9)
    at ten (<anonymous>:46:3)
    at nine (<anonymous>:42:3)
    at eight (<anonymous>:38:3)
    at seven (<anonymous>:34:3)
    at six (<anonymous>:30:3)
    at five (<anonymous>:26:3)
    at four (<anonymous>:22:3)
    at three (<anonymous>:18:3)
    at two (<anonymous>:14:3)
    at one (<anonymous>:10:3)
    at main (<anonymous>:6:3)
    at <anonymous>:2:1
```

If you use `Error.stackTraceLimit` you have to be aware of the fact that it is [a non-standard according to MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Error.stackTraceLimit) and a quick check reveals that is also not supported in Firefox. I didn't check Edge.

Also, Chrome and Safari support it but use different default values. Chrome goes with `10` and Safari with `100`. When you look around you'll also see that [CodeSandbox](https://codesandbox.io) increases the limit to `50`.

In my opinion, this configuration is nothing ground-breaking, but it might become handy someday when I'll debug a large JS app in the browser or a Node.js application. It won't replace the debugger though. :)
Women in Computer Science: How bad can it be?
Tags: discuss, women, career
Published: 2018-11-19 22:40:51

---
title: Women in Computer Science: How bad can it be?
published: true
description: Let's have a quick discussion about womanhood in CS.
tags: discuss, women, career
---

As a girl whose in the middle of getting her degree in Computer Science, it seems to me that there's a common topic that's always discussed in talks about empowering women in tech: The struggles of women in tech.

What should I expect when I eventually start on the professional world?
Scraping DEV with Common Lisp
Tags: lisp, scraper
Published: 2018-11-19 22:08:39

Since scrapers seem to be trending in [DEV](https://dev.to), a friend challenge me to make a web scraper using Common Lisp (yeah, I'm a Lisper, you people should `(with-it :deal)`). Knowing that he was under the impression that "Lisp is outdated and makes everything harder and more verbose" I decided to accept the challenge and wrote this. It took me 1 minute. My network is slow and Emacs takes forever to open in Windows 10.

```common-lisp
;;; Just eval this in your favorite Lisp IDE.
;;; Get the libs
(ql:quickload '(:dexador :plump :lquery))
;;; Get the page
(defvar *front-page* (dex:get "https://dev.to"))
;;; Parse the page
(defvar *data* (plump:parse *front-page*))
;; Get the posts!
(lquery:$ *data* "div.single-article h3" (text))
```

> Update: My thanks to [@RainerJoswig](https://twitter.com/RainerJoswig) for catching some typos in the code!!!
Game Off 2018 (7)
Tags: lua, gamedev, gameoff2018, pixelart
Published: 2018-11-19 21:15:29

---
title: Game Off 2018 (7)
published: true
description: Discord Rich Presence and EndGame
tags: lua, gamedev, gameoff2018, pixelart
---

Hi!
A new fantastic devlog is here! (Yeah!)
Today (and last day), I work on the hybrid mecanics (to add all the flower). I've add to a sign with the information about hybrid. And I've add a rake to finish the game.

![World](https://thepracticaldev.s3.amazonaws.com/i/6l76e5oqvlio5lwt3luk.gif)

And an other little feature is the Discord Rich Presence integration! It's not very usefull but it's fun to add and I love this!

![Discord Rich Presence](https://thepracticaldev.s3.amazonaws.com/i/0pvuyc37q6x3dh57sllz.PNG)

And the game have now a name! It's **Hybrid Power**! I'm not sure on it, so if you have better name, please send it to me!

It's all for now! Thanks for your feedback and for following my developpement!

Have a nice day!
Leave Loudly this holiday! 
Tags: career, selfcare, culture
Published: 2018-11-19 21:11:43

---
title: Leave Loudly this holiday! 
published: true
description: This holiday break is a good time to remember to leave loudly
tags: career, self-care, culture
---

![man eating popcorn in the stands](https://media.giphy.com/media/WFsGRpN7EekEt6ULha/giphy.gif)

Hey folks!

With the holiday season coming around for many DEV-ers, let's all remember to Leave Loudly!

## What does this mean?

[Leaving loudly was originally developed by the CEO of Pepsi](https://www.news.com.au/finance/work/leaders/why-pepsico-ceo-asks-his-team-to-leave-loudly/news-story/5467b3ffff387c3a5dd79ac3a245c868) as a way to spread a culture of acceptance to working good hours. He encouraged executive to tell everyone when they were leaving the office - and the reason they were leaving. This helped normalize a culture of taking care of yourself and your family.

It means when you leave the office, be sure you are actually leaving - and make sure other people know too. It also means reducing the amount of work you are doing outside of work. Pepsi encourages sending only required emails out of work hours and on weekends.

## What this means for us developers?

There are a lot of times we as developers have a tendency to work long hours or to work on "vacations" - often under the guise of "I just need to fix this one bug" or "If I don't fix this, everyone will be upset with me." Often times one more bug leads to another and there is someone else available to fix the things that need fixed. 

It means the more senior developers should spend time promoting a culture of going home, of spending time with family and friends, and of taking care of themselves. This will trickle to more junior developers and others. 

## This holiday

There are lots of vacation days coming up soon for many of us! I encourage you to "sign off" everyday at the office - make a quick slack post about where you are going, when you will be back in office (this helps people plan around your time), and what you are going to do during the break! Then, shut down your computer, actually leave, and don't sign on during your vacation (unless absolutely required).

I'll be leaving loudly tomorrow and taking an extra day on Wednesday to take care of myself and some other obligations. Then I'll be out until next Monday, ready for a new week (and probably a few mashed potatoes heavier)!

Cheers, friends! Have a good one!
BigCommerce Marketing Banners Adding Extra Commas
Tags: bigcommerce, handlebars, stencil
Published: 2018-11-19 19:35:07

---
title: BigCommerce Marketing Banners Adding Extra Commas
published: true
description: Are your BigCommerce Marketing Banners adding extra commas to your pages? Find out how to fix it!
tags: bigcommerce, handlebars, stencil
canonical_url: https://harnerdesigns.com/blog/bigcommerce-marketing-banners-adding-extra-commas/
---

Slightly annoying little bug I found using BigCommerce's Stencil Framework. When you have multiple Marketing banners set to the same location in your theme, the standard way to display them all is just `{{{banners.bottom}}}` (the newest version of Cornerstone uses `{{{limit banners.bottom 1}}}` to display one of the banners). The dumb bug is that this outputs all the different Banner HTML as a comma seperated list.

## The Issue

If you have three banners set to show in the bottom location of a specific page (in my case, the home page), `{{{banners.bottom}}}` outputs as:
```
<<BANNER CONTENT>>
,
<<BANNER CONTENT>>
,
<<BANNER CONTENT>>
```

## The Fix
Instead of just outputting the banners with `{{{banners.bottom}}}` we're going to iterate through them and output them on their own. Check it out: 
```
{{#each banners.bottom}}
    <div class="banner--bottom">
        {{{this}}}
    </div>
{{/each}}
```
which would output as:
```
<div class="banner--bottom">
    <<BANNER CONTENT>>
</div>
<div class="banner--bottom">
    <<BANNER CONTENT>>
</div>
<div class="banner--bottom">
    <<BANNER CONTENT>>
</div>
```

Ta-Daaa! Clean, comma-free banners. Let me know if this helped you at all. There's a lot of customization stuff that I feel like is lacking from the Stencil framework, and a lot of things that should be included with BigCommerce that isn't. Any weird bugs you've come across? Let me know in the comments.
Introducing Pico Redux - The faster smaller Redux!
Tags: javascript, functional, es6, redux
Published: 2018-11-19 18:26:14

---
title: Introducing Pico Redux - The faster smaller Redux!
published: true
description: 
tags: javascript, functional, es6, redux
---

Out of necessity and curiosity, I have created the smallest possible implementation of Redux which comes in at only 95 bytes (minified).

I frequently have needed a stripped down bare bones Redux without all those bells and whistles.

Redux itself is already a pretty small library at 1.6k (gzipped) but I was really looking for something that only had the weight of a single function. Thus Pico Redux was born.

The core Redux functionality itself is very minimal. This is all you need to recreate `createStore`:

```javascript
const createStore = (reducer, state = reducer(void 0, { type: '@@init' })) => ({
  dispatch: action => (state = reducer(state, action), action),
  getState: () => state
})
```

I typically don't need middleware (unless I am in React-land). I also rarely need the subscribe functionality. Just the basic store is usually good enough.

But because I do occasionally use these features, I created Pico Redux with a modular design so these features can still be added... but only when necessary so you only pay (in bytes) for what you use.

```javascript
// basic store
const store = createStore(reducer)

// store with subscribe
const store = withSubscribe(createStore)(reducer)

// store with middleware
const store = withMiddleware(createStore)(reducer)

// kitchen sink
const store = withMiddleware(withSubscribe(createStore))(reducer)
```

The interface is kept the same as Redux so you should already be familiar with how to use it:

```javascript
import { createStore } from 'pico-redux'
 
const init = 0
 
const reducer = (state = init, { type, value }) =>
  type === 'INC' ? state + value : state
 
const store = createStore(reducer)
 
store.dispatch({ type: 'INC', value: 100 })
store.getState() //=> 100
```

Try it out, give it a spin, let me know what you think!

Github: [https://github.com/joelnet/pico-redux](https://github.com/joelnet/pico-redux)

Inspired by: [Redux: Implementing Store from Scratch - Dan Abramov](https://egghead.io/lessons/react-redux-implementing-store-from-scratch)

I'm currently available for part time contract work (C#, JavaScript, React). Hit me up on [Twitter](https://twitter.com/joelnet) or [linkedin](https://www.linkedin.com/in/joel-thoms) to get ahold of me.

My articles show massive Functional JavaScript love. If you need more FP, follow me here or on Twitter [@joelnet](https://twitter.com/joelnet)!

![Cheers!](https://thepracticaldev.s3.amazonaws.com/i/6jsy3a866frzp3u5oda0.jpg)