teleren/devto huggingface dataset:
Would you trade your project documentation for updated software architecture diagrams?
Tags: documentation, discuss
Published: 2020-02-20 22:20:11

In my previous company, there was a big focus on creating and maintaining documentation around the code, MAINTAINING specifically. It takes enormous amount of time and resources. And yet, it would take a few senior developers or, again, huge amount of time to understand the code. In my current company, mostly what we use is architectural diagrams. There is no time required to create these diagrams, done automatically within seconds. These diagrams updated automatically based on code changes. That takes minimal amount of time to create and maintain technical documentation.

I guess the question is would you prefer pages of written documentation (which most likely is outdated) or software architectural diagrams which you can navigate through. Each object on the diagram is clickable which allows you to drill down to the next level if needed?
Hello World!
Tags: hello, kami, komecafe
Published: 2020-02-20 21:54:36

Hoangdacviet Xin Chao!

[Kome](http://kome.top) [KAMI](http://kami.vn)
[Kome.Cafe](http://kome.cafe)
![Kome189.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1582233483097/J6X9UlLLj.png)
Redux and duplicate actions
Tags: react, redux, javascript
Published: 2020-02-20 21:51:49

---
title: Redux and duplicate actions
published: true
tags: React, Redux, Javascript
---

Hi all, 

A scenario I've found myself come across during scaling of React apps using Redux is scenarios where common actions within the app can end up firing multiple times. 

For example page load actions firing multiple times or a chain of actions that might fire in a kind of A => B => C => A pattern causing A to be duplicated when it potentially doesn't need to.

Such instances generally tend to have no functional impact on the app in question, but I'm curious to know if this is something other developers haver come across and consequently refactored out of the apps they work on, if so, how so?
Announcing Built-in Collection Indexes
Tags: fauna, serverless, functions
Published: 2020-02-20 21:28:39

Author: Ewan Edwards
Date: February 12, 2020
[Originally posted on the Fauna blog.](https://fauna.com/blog/announcing-built-in-collection-indexes)

----

We’re pleased to announce a new FQL capability that empowers users to write more concise and powerful FQL statements: built-in collection indexes, along with the Documents function!

#Built-in collection indexes (Documents function) *Preview*#

With built-in collection indexes, you no longer need to create your own “collection index” just to track all of the documents that exist within a collection.

For example, if you have a collection of documents called “widgets”, you would normally have created a collection index:

```
CreateIndex({
  name: "all_widgets",
  Source: Collection("widgets")
})
```
So that you could then retrieve all of the “widgets” documents with:
```
Paginate(Match(Index("all_widgets")))
```
Now, that “all_widgets” index is unnecessary. You can simply use this query:

```
Paginate(Documents(Collection("widgets")))
```

The advantages are:

* You no longer need to create one index per collection, just to track a collection’s documents.
* You can remove any existing collection indexes (provided that you update queries that involve them) to save on storage.

Note: As a [Preview function](https://fauna.com/blog/software-naming-releases), Documents is currently only supported in the JavaScript, Java, and Scala drivers for FaunaDB. Support for Documents in the C#, Go, and Python drivers will be available in a future release.

#Conclusion#

With our latest release, users now have access to built-in collection indexes, the new Documents function, and some internal bug fixes and improvements that increase stability and performance.

As the Documents function is in Preview, please [let us know](https://twitter.com/fauna) what you think so that we can incorporate feedback into the formal release. Visit our [documentation](https://docs.fauna.com/) to learn more.

What other functions would you like to see implemented in FaunaDB? Please reach out to me on our [Community Slack](https://community-invite.fauna.com/) and describe any other features that would make FaunaDB an obvious choice for your next project.
Video Creation Tips for Tech Profiles
Tags: career, entrylevel, jobsearch
Published: 2020-02-20 21:24:52

As of this writing, a select few people have been invited to the PopHire platform beta. I've been listening to feedback on the profile creation process and I'd like to offer an explanation for our use of video and give some tips for creating one for a tech profile.

### Why Video?

Part of the reason PopHire was built was to create new pathways into tech careers and bypass unnecessary gatekeeping. That said, we need to present a vetted and qualified talent pool for our hiring partners.

The video is a quick and engaging way to demonstrate your skill level and ability to communicate about your work. For software developers, we want to see a screencast of you walking through code and giving a demo.

### Use a helper

##### [Scrimba](https://scrimba.com)

You can record your screencast and demo alongside your code if you're a front-end developer. For the purposes of our tech profiles, you'll need to export your video to Youtube or Vimeo. So it will take a few more steps to get there.

[![Scrimba interface](https://dev-to-uploads.s3.amazonaws.com/i/jpe0nscwbj37mrss06jc.png)](https://scrimba.com)

Scrimba doesn't export video. You can use one of the following services to record your screen and audio.
#### Screen Recording

##### [Loom](https://loom.com)

Loom is a screen recording tool that allows you to record your screen and yourself at the same time. You can share these videos with a link and you have the option to download them to your own computer.

[![Loom homepage](https://dev-to-uploads.s3.amazonaws.com/i/5j1fl6gusyfkg2965sca.png)](https://loom.com)

##### [Zoom](https://zoom.us)

Zoom is a video conferencing app. With free accounts, you have the option to screen share and locally record video.

[![Zoom interface](https://dev-to-uploads.s3.amazonaws.com/i/9fey5wwjdqqis04v6lmh.png)](https://zoom.us)

### Pick a project you can talk about with confidence

Don't worry about being an expert. You don't have to know everything but be able to show what you learned from this project. Some ideas for what to include are:

- Talk about a bug you encountered and fixed.
- Talk about a bug that isn't fixed and how you would approach fixing it.
- Talk about something new you learned.
- Give examples of why you made the choices you made with the code.
- Shout yourself out for solving a tricky problem.

### See it as an opportunity 

Use your video as an opportunity to be impressive. 

You want potential employers to see you in your best light and you only have a few seconds of their time to hook them before they move on to the next profile.

You want your video along with the rest of your completed profile to sell your strengths. Give them every excuse **to hire you**. You're worth it.
How we launched a marketplace on the JAM stack for $10/mo 🤯
Tags: startup, jamstack, opensource, buildinpublic
Published: 2020-02-20 21:12:26

---
title: How we launched a marketplace on the JAM stack for $10/mo 🤯
published: true
description: A hack to lower the cost of building a startup
tags: Startup, JAMstack, opensource, BuildInPublic
---
*If you're based in the UK, we would love to hear what you think of https://myjam.co.uk/ 🙏.*

All founders want to pay as low as possible when they launch a new startup.

When we decided to build Myjam on the JAM stack, we didn't think of the cost that much. We got excited about the new technology and wanted to try our luck with it.

https://myjam.store/ is a marketplace for exotic food. We work with independent grocers and we want to have freedom in trying a new approach. There are 7,000 SKUs.

This graph explains the technologies we use

![Myjam structure](https://dev-to-uploads.s3.amazonaws.com/i/5v1099p2qvw3gt8gihq1.png)
You can check the code here 
https://github.com/my-jam-store/gatsby-myjam (we need to work on our open source skills 😅).

##How did we do it?
We started by utilizing the generous free package by Netlify and [Cloudinary](https://cloudinary.com/invites/lpov9zyyucivvxsnalc5/drak2wvtbofcgkpdf8q1)(we get extra credit when you signup 🤗). We have to give them a big shout out for their generosity 🙌. We knew that we will end up paying Airtable because their free package won't be enough for us. Here is a breakdown of our cost for the first month
![Monthly cost](https://dev-to-uploads.s3.amazonaws.com/i/zmsa0w3nvdtgaafpc7yd.png)

We signed up for YC Startup School. We find their weekly update a good hack and a reminder to focus on what matters. Startup School negotiate deals for the startups who join the program. That's how we got $1,000 credit from Algolia.

We came across Makerpad and noticed that they have deals as well. Airtable was one of the deals. We signed up and got $500 worth of credit.

We started to look for more deals and found Secret. You can get more deals from them. Here is a referral link https://www.joinsecret.com/?r=2dadc7cd927b 

I will keep looking for deals and will update this post if I find more deals.

{% youtube 2lUGPqsF0QE %}

We're documenting the process of building Myjam. We believe it's interesting to see how this journey evolves. It's full of uncertainty. We're sharing plans, metrics, sales and code #BuildInPublic.
If you want to watch the journey sign up here https://tinyletter.com/moeghashim
Terraform Enterprise Installation Bug
Tags: terraformenterprise
Published: 2020-02-20 20:42:55

---
title: Terraform Enterprise Installation Bug
published: true
description: Terraform Enterprise Encryption Passphrase bug
tags: terraform-enterprise
---

If anyone is ever dealing with Terraform Enterprise installation, don't add a symbol to the Encryption Password. And make it 16 chars. 

It may work for your primary. But when you restore to a DR VM it won't work.

HashiCorp has a symbol in the documentation at https://www.terraform.io/docs/enterprise/install/encryption-password.html, so I guess if this is common, it's a bug.
MUTATING HIGHLY DYNAMIC DATA using GraphQL (Shopify)
Tags: graphql, techtalks, webdev
Published: 2020-02-20 20:41:40

> This video is a talk from *Byteconf GraphQL 2020*, a free, live-streamed GraphQL conference that aired on January 31st, 2020. [Visit our website](https://www.bytesized.xyz/graphql-2020) to sign up for the Byteconf GraphQL "swag bag", a free downloadable resource with everything you need to get started with GraphQL, as well as info about future Byteconf events!

GraphQL currently provides polymorphic types to model complex objects but cannot allow the mutations for interface object types. Over the course of the talk, I will be discussing the problem in detail, illustrating my personal experiences with this problem when working in Shopify’s core monolith, and then providing some lessons learned from our implementations.

I will be talking about two main implementations of how we solved this problem at Shopify, exploring their benefits and drawbacks. Further, I’ll be illustrating how Shopify has been sharing our implementations with the greater GraphQL community by working with the GraphQL working group on creating a native solution in an upcoming GraphQL specification.

Thanks to [Jeff Hui](https://twitter.com/jeffreyhui) who presented this talk at [Byteconf GraphQL 2020](https://www.bytesized.xyz/graphql-2020)!

{% youtube BVcpji2yO2Y %}

If you enjoyed the video, give it a thumbs-up, and [subscribe to our channel](https://www.youtube.com/channel/UC046lFvJZhiwSRWsoH8SFjg?sub_confirmation=1) for more web dev content every week. We also have a newsletter where we send out what's new and cool in the web development world, every Tuesday – [join here](https://www.bytesized.xyz/newsletter)!
Launching a text recognition service for 1/3rd the cost of Google Cloud Vision, Amazon Textract
Tags: ocr, go, saas, javascript
Published: 2020-02-20 20:36:18

Hi everyone!

Founder here. Our startup [just launched a service](https://siftrics.com/) that lets you POST images & PDFs and returns recognized text as JSON. That's right, we're attempting to compete with Google (_ooh!_) and Amazon (_ahh!_). The service is a direct competitor to their respective products, Vision and Textract, but comes at a third of the cost.

I know, you're probably thinking, "There's a catch, right? The accuracy must be lower, the service must be slower, _something_ has got to be worse." But alas, none of that is true. Through lots of hard work and research, we have developed a __secret sauce__ that lets us provide the same, high-quality service (yes, it can accurately recognize human handwriting --- sometimes even cursive).

If you're still unconvinced about the quality of our service, you can try it yourself! Everyone gets 1,000 pages for free.

By the way, if you're an expert in computer vision, distributed systems, or just enjoy programming in Go, please message me! We're expanding!

In case you missed the link in the first paragraph, here's our service: [https://siftrics.com/](https://siftrics.com/)
How do APIs work? 
Tags: todayilearned
Published: 2020-02-20 20:06:44

TLDR;  This is a mental model of how APIs work and a brief overview of how the internet works.

Growing up in the '90s, I often heard the internet is referred to as the "information highway." I never truly understood what that meant until I started learning about until I started creating full-stack applications. The purpose of the World Wide Web is to retrieve and send information from one device to another.  A device can be a computer, cell phone, refrigerator anything that can connect to the internet. When you think about it the purpose of most apps is to organize and share information. 

**What is an API?**
An API allows you to interact with data from an application. 
That's it. That's all an API is used for. 

**Why use an API?**
We use an API because it gives your program a level of abstraction. (Learn more about abstraction in my [Object Oriented Programming article](https://dev.to/zaynaib/what-is-object-oriented-programming-5bl0)). Doing so protects your program data from users that might have malicious intentions. This also makes it easier for users to interact with your program.


*Terminology*:
Client  - The computer you are using to interact with an application
Server -  A computer or computer program which manages access to  data

*How it works*:
![Alt Text](https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Client-server_model.svg/512px-Client-server_model.svg.png)
[Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page)

1. The client sends a request to the API server
2. The API server interprets the request
3. The server performs the action in the request
4. The server formats the response and sends it back to the client
5. The client displays the response 

Think about it this way.

Real-World Analogy: 

Let's say that Cindy is at Burger King and wants to order a whopper meal. 
Cindy goes to the cashier and tells the food service worker her order. The food service worker fulfills Cindy's request and gives Cindy her meal.

In the scenario above Cindy is the "client". The food service worker is the "server" interpreting Cindy's request and checking if it can be fulfilled. The food service worker(server) responses to Cindy's(client) request by giving her food.

Now you have a high-level overview and mental model of how APIs work.
Designing Graphql Schemas: Connections
Tags: graphql, webdev
Published: 2020-02-20 19:59:09


As part of my [learning in public](https://www.swyx.io/writing/learn-in-public/) drive for the new year, I thought I'd write down some notes as I take in [Nik Graf's](https://twitter.com/nikgraf) egghead.io course on [Designing GraphQL Schemas](https://egghead.io/courses/designing-graphql-schemas-99db).

This will be a series of short posts based on my notes. I'm continuing here with some notes on pagination and connections.

## Pagination

Limiting the amount of data returned is best done by following the connections spec defined for Relay and now widely used by other (non-Relay) GraphQL solutions.

This means pagination is represented by a cursor-based connection, which looks something like this:

```graphql
{
  item(first: 10, after: "aCursor") {
    edges {
      cursor
      node {
        id
        name
      }
    }
    pageInfo {
      startCursor
      endCursor
      hasNextPage
      hasPreviousPage
    }
  }
}
```

In the example, `item` would return an `ItemConnection`. It would accept arguments for `first`, which is an integer limiting the number of results returned and analogous to `limit` in many pagination systems, and `after`, which is an opaque cursor. 

## Cursor

The first time I heard the words "opaque cursor" it sounded obscure and a bit complicated. 

A cursor is essentially something unique that points to a data item. This level of abstraction means you can store different information in a cursor and find slices of data in different ways. It might be that you need to slice the data by timestamp in one instance and by id in another. Or by some legacy information to adapt your existing rest api. A cursor allows for any of these options. 

These cursors are opaque because we normally encode them using base64 to make the data opaque. For example, we don't need to know that the cursor is defined from an id and a timestamp, we just need to know that it is a unique pointer to the data we are interested in.

[Take a look at the connection spec](https://facebook.github.io/relay/graphql/connections.htm) if you would like more of an explanation.

## Edges

The data is returned as an array of edge objects, which includes the cursor for the item and a node, which is the data item itself. 

## PageInfo

As well as the set of edges, a connection also includes a page information object, with the start and end cursors for the particular page and boolean values for whether there is a next or previous page. 

The page information object is flexible and can be extended as needed, depending on the pagination needs for the data you are querying. This might include data filtering, for example.
Open Source Creator Series, Part 5: Understanding "Distribution" in Open Source Licensing
Tags: opensource, distribution, licensing, diy
Published: 2020-02-20 19:51:45

This is Part 5 of our Open Source Creator Series on "Understanding ‘Distribution’ in Open Source Licensing" to help you – the open source technology creators – understand and bootstrap some of the essential non-technical elements of building a successful project.

_(See Part 1 – [Licensing Fundamentals](https://dev.to/coss-media/open-source-creator-series-part-1-licensing-fundamentals-4529); Part 2 – [Product Marketing](https://dev.to/coss-media/open-source-creator-series-part-2-product-marketing-56jn); Part 3 -- [How to Choose an Open Source License](https://dev.to/coss-media/open-source-creator-series-part-3-how-to-choose-an-open-source-license-2d5h); Part 4 -- [Documentation and Technical Writing 101](https://dev.to/coss-media/open-source-creator-series-part-4-documentation-and-technical-writing-101-2bl1))_

Once again, this post is based on an informative and concise video presentation (~7 minutes) by Heather Meeker, who is the preeminent open source licensing expert and is a [partner at OSS Capital](https://oss.capital/#team). (If licensing, as a topic, is completely new to you, I would recommend first watching Heather's video in Part 1 of this series on [Licensing Fundamentals](https://dev.to/coss-media/open-source-creator-series-part-1-licensing-fundamentals-4529) and Part 3 on [How to Choose an Open Source License](https://dev.to/coss-media/open-source-creator-series-part-3-how-to-choose-an-open-source-license-2d5h).)

“What is distribution?” is a question Heather gets frequently from open source creators and commercial open source software (COSS) founders. It’s directly connected to “share”, which is the most nuanced of the four freedoms of open source. The others: “run”, “study”, “improve”, are more straightforward.

Knowing what “distribution” means is important before it’s a common trigger for various open source licensing requirements. In short: distribution is triggered when a copy of something (in our case software) is transferred to another person. However, “distribution” as a term is actually not defined in the U.S. Copyright Act, thus at least when applied in the United States, it’s often up to legal analysis and interpretation.

Hope you find [Heather’s video](https://www.youtube.com/watch?v=-ym4mHWm4Pw) useful. And don’t hesitate to reach out via [Twitter](https://twitter.com/kevinsxu) or [LinkedIn](https://www.linkedin.com/in/kevinsxu/) if you have questions.

_Please note: This presentation does not constitute legal advice and does not create an attorney-client relationship. The principles presented here may not apply to the facts of your situation._

{% youtube -ym4mHWm4Pw %}

Resources:
  - Heather Meeker's Book, "Open Source for Business"
Memory size of Javascript Boolean
Tags: javascript, v8, architecture, research
Published: 2020-02-20 19:43:12

## Introduction

Javascript in the browser works a level above Javascript Engine ([V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)), [Rhino](https://en.wikipedia.org/wiki/Rhino_(JavaScript_engine)), [JavaScriptCore](https://en.wikipedia.org/wiki/WebKit#JavaScriptCore), [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey)). These engines follow the ECMAScript Standards. ECMAScript defines the standard for the scripting language. [1]

In this post, we will use V8 Engine by Google. The V8 Engine:

- The V8 Engine is written in C++ and used in Chrome & in Node.js, among others.
- It implements the ECMAScript Standard as specified in ECMA-262. [1]

More specific documentation of the V8 Engine is available at [docs](https://v8.dev/docs#about-v8).

The main scheme of compilation JavaScript code to Machine Code:

![Javascript to Machine Code scheme](https://dev-to-uploads.s3.amazonaws.com/i/6cb8bmkmlixrtdq507fe.png)

Each object takes a specific size in memory and C++ or ECMAScript specify on this size.

## Boolean

Size: **4** bytes or **1** byte

A `boolean` is actually `1 byte`. But alignment may cause 4 bytes to be used on a 32-bit platform or 8 bytes on a 64-bit platform. This old trick comes from the observation that allocated memory takes up at least 4 or 8 bytes, and are aligned in the way that the least significant bit or three will be zero.

In C++, the size of the type `boolean` is implementation-defined ([expr.sizeof[p1]](http://eel.is/c++draft/expr.sizeof#1)) and is usually equal to 1 (the size of the type char, and the smallest size a type can have), but is not required to be ([expr.sizeof[fn77]](http://eel.is/c++draft/expr.sizeof#footnote-77)): in particular, in Visual Studio up to version 4.2, it was 4. More information about C++ boolean values is available at [docs[expr.sizeof(7.6.2.4)]](http://eel.is/c++draft/expr.sizeof#footnoteref-69[]).

## Resources

[1] –– [https://www.ecma-international.org/publications/standards/Ecma-262.htm](https://www.ecma-international.org/publications/standards/Ecma-262.htm)

[2] –– [https://www.quora.com/In-C%2B%2B-what-is-the-size-of-type-bool/answer/Sergey-Zubkov-1?ch=10&share=2471829a&srid=lXWU](https://www.quora.com/In-C%2B%2B-what-is-the-size-of-type-bool/answer/Sergey-Zubkov-1?ch=10&share=2471829a&srid=lXWU)

[3] –– [https://www.freecodecamp.org/news/understanding-the-core-of-nodejs-the-powerful-chrome-v8-engine-79e7eb8af964/](https://www.freecodecamp.org/news/understanding-the-core-of-nodejs-the-powerful-chrome-v8-engine-79e7eb8af964/)

[4] –– [https://stackoverflow.com/questions/32733314/in-v8-how-are-primitive-types-such-as-null-undefined-and-boolean-stored-in-me](https://stackoverflow.com/questions/32733314/in-v8-how-are-primitive-types-such-as-null-undefined-and-boolean-stored-in-me)