teleren/devto huggingface dataset:
Mental Model Machinations
Tags: dailywriting
Published: 2019-06-14 11:22:29

---
title: Mental Model Machinations
published: true
tags: daily-writing
canonical_url: https://marcusblankenship.com/mental-model-machinations/
---

Over the past two weeks, two ideas have been bouncing around in my brain. They have now smashed into each other, producing a couple of emails.

Today’s email is about the first idea, which is from fourth-wave systems thinking. It’s the idea of “mental models,” which we all use, all the time.

Here’s the idea: _We see reality **indirectly** through our mental models._

Trippy, right?

Imagine yourself wearing goggles labeled “mental models” and viewing everything through them.

For example, right now, I’m sitting on a system of cloth, steel, pulls, gears, and hydraulics. My mental model says I’m “sitting on a chair,” and I don’t think twice about it.

I’m also using my fingers to rapidly depress a sequence of illuminated black plastic squares mounted to a rectangle. My mental model says I’m “typing” on a “keyboard.”

We all have mental models and begin forming them as soon as we come into the world.

For example, my 1yr old grandson doesn’t “type” yet, but he does bang his hands on the keyboard, possibly copying me.

I don’t know what his mental model about keyboards is yet, but someday we’ll share the same one.

## ”These go to eleven.”

Due to its abstract nature, software development turns mental models up to 11.

Not only do we have our mental models about physical reality (computers, monitors, networks, etc.), we have mental models around software (applications, websites, databases, web servers, etc.)

Add to this all mental models about building software (code in files, architectures, patterns, frameworks) and processes (agile, kanban, quality, testing, deployment, branching, etc.), and it’s easy to get confused.

If mental models are the lenses we use to understand the world, why don’t we talk about them more?

# What do you discuss?

I notice that people often share information created with mental models, but they rarely share the mental model they’re using.

Sharing information is good, but that’s often like sharing a brute fact, such as “42.”

The mental model is the “engine” which produces information, such as “add the numbers 20 and 22 together.”

As you might notice, there are other mental models which would produce “42.”

It’s no surprise that when people argue about a technical topic, they don’t share the same mental models.

Do you see your teams discussing their mental models?

If not, how could you help?

I’d love to hear your thoughts, so write me back.

Tomorrow: Näive Realism

Best,

Marcus

The post [Mental Model Machinations](https://marcusblankenship.com/mental-model-machinations/) appeared first on [Marcus Blankenship](https://marcusblankenship.com).
6 stages of refactoring a jest test case
Tags: tests, testing, jest, javascript
Published: 2019-06-14 06:54:45

---
title: 6 stages of refactoring a jest test case
published: true
description: what makes a test case good? how can we improve the developer friendliness when writing test code?
tags: tests, testing, jest, javascript
canonical_url: https://www.lirantal.com/blog/2019-06-14_6-stages-of-refactoring-a-jest-test-case
---

An underrated feature of Jest is customizing the assertion errors that the console displays when tests fail. Imagine the following test code, which needs to programmatically loop an object to ensure keys exist as expected:

![](https://thepracticaldev.s3.amazonaws.com/i/3kg7kab34fwkx3t4njsp.png)

The test is written fine but imagine a developer on the team made some changes to the code, added a new file in one place, but forgot to add it to another place such as to export it properly.

When the test fails the reason for failing will not be intuitive and if you’re new to the code you’d likely not even know what broke:

![](https://thepracticaldev.s3.amazonaws.com/i/5ctqlb4g9jbfdmnnbezn.png)

So jest has more semantic expectations such as toHaveProperty(), which looks like this:

![](https://thepracticaldev.s3.amazonaws.com/i/mddxn4w5h8l40tixxidp.png)

Now when a test fails it at least makes it clearer as to which property is missing, but it’s still a bit cryptic as you can see in the screenshot. What can we do? 🤔

![](https://thepracticaldev.s3.amazonaws.com/i/3ti80y830wqjeh6k66xn.png)

At this point, it might be good enough. The test name is self-explanatory as you can see but the issue is that we have just one test case that fails and when looking at a test trace it isn’t very obvious which validators were used exactly.

Let's refactor:

![](https://thepracticaldev.s3.amazonaws.com/i/l1uagsnyipzk5rzm8kzg.png)

Now, when my test pass or fail, it is much more obvious and intuitive as to what exactly was tested, what exactly failed, and why:

![](https://thepracticaldev.s3.amazonaws.com/i/d4q9gk8rw10k44koym4n.png)

Much better! 🌈🦄🎉

---

If you love Jest as much as I do (😍) you might also be interested in reading some of my other pieces on jest here on dev.to!:
- [Demystifying Jest Async Testing Patterns
](https://dev.to/lirantal/demystifying-jest-async-testing-patterns-4n5n)
- [Reasons to Love Jest: The Developer Experience
](https://dev.to/lirantal/reasons-to-love-jest-the-developer-experience-4o6f)
- [Reasons to Love Jest: The Test Framework
](https://dev.to/lirantal/reasons-to-love-jest-the-test-framework-2hoe)
Articles You can read over this weekend
Tags: weekendreading, articles
Published: 2019-06-14 05:09:12

---
title: Articles You can read over this weekend
published: true
description: Articles You can read over this weekend
tags: weekend reading, articles
---

<img src="https://cdn.pixabay.com/photo/2016/09/10/17/18/book-1659717_960_720.jpg"></img>


<b>1) PHP Cookies and Sessions | Detailed Explanation | Coding Examples</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/06/php-cookies-and-sessions-examples.html" >PHP Cookies and Sessions | Detailed Explanation | Coding Examples
</a>


<b>2) Best PHP Frameworks (2019)</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/05/best-php-frameworks.html">Best PHP Frameworks (2019)</a>


<b>3) Implementing OTP in PHP using Twilio</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/03/implement-otp-in-php-with-example.html">Implementing OTP in PHP using Twilio</a>


<b>4) What should I learn after PHP | Roadmap 2019</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/05/what-should-i-learn-after-php.html">What should I learn after PHP | Roadmap 2019</a>


<b>5) Redis vs MySQL Benchmarks</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/04/redis-vs-mysql-benchmark.html">Redis vs MySQL Benchmarks</a>


<b>6) Var vs Let in JavaScript</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/02/var-vs-let-javascript.html">Var vs Let in JavaScript</a>


<b>7) Asynchronous JavaScript</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/02/asynchronous-javascript-explained-for-beginners.html">Asynchronous JavaScript</a>


<b>8) Introduction to Elasticsearch and the ELK stack</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/03/introduction-to-elasticsearch-and-elk-stack.html">Introduction to Elasticsearch and the ELK stack</a>


<b>9) InnoDB vs MyISAM | Storage Engines | Tabular Differences
</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/05/main-differences-between-innodb-and-myisam.html">InnoDB vs MyISAM | Storage Engines | Tabular Differences
</a>


<b>10) Best PHP Frameworks (2019)</b>

Read Here: <a href="https://fullstackgeek.blogspot.com/2019/05/best-php-frameworks.html">Best PHP Frameworks (2019)</a>
Public APIs for your Front-end Applications
Tags: public, api, free, frontend
Published: 2019-06-14 06:50:15

---
title: Public APIs for your Front-end Applications
published: true
description: Public and Free APIs to learn and build front-end applications like movie application, weather application, cryptocurrency application, etc.
tags: public, APIs, free, frontend
cover_image: https://thepracticaldev.s3.amazonaws.com/i/la12vyojmdubb86z4s99.png
---

Are you building something cool and interesting this summer then you need public APIs to get data like movie APIs, weather APIs, Machine learning APIs, etc?

I build a platform called [Public APIs](https://publicapis.io) with 1k+ Awesome, Fun and cool Public APIs to build great projects.

Project Link: [https://publicapis.io](https://publicapis.io)

![](https://thepracticaldev.s3.amazonaws.com/i/avqnbbz4xgsk542g4tpi.png)

What you can do here:

⚡  Blazing fast loading time for every page.
🔎 Advanced Search with Algolia.
💖 Nice and simple design with APIs logo.
📦 Top collection of APIs in some categories.
💬 Comment Box on every APIs page. So, now you can discuss your ideas there.
💾 Save your favorite APIs into your profile.

{% youtube gHMGZ85dpDo %}

If you know any good API or you build then request to add there. I'll approve your request.

Website Link: [https://publicapis.io](https://publicapis.io)

if you have any question then let me know in the comments.

Love you guys :)
OC Salsa
Published: 2019-06-14 06:44:23

All instructors at OC Salsa are former students of Master Instructor Esteban Conde. They were all at one point beginner students. They all know how to dance and are certified to teach. They understand and relate with beginner students and have the patience to teach them well.We at OC Salsa know deciding to learn how to dance can be challenging. That is why making new students feel at ease and welcomed from the first day is big part of our philosophy. We strive in every class to make learning how to dance a fun experience.For more details at:http://estebanconde.com/classes/
DailyHack: A place of Tricks and Hacks
Tags: tricks, community, daily, hack
Published: 2019-06-14 05:24:06

---
title: DailyHack: A place of Tricks and Hacks
published: true
description: A Community of Makers and Geeks
tags: #tricks, #community #daily #hack
---

I build an plateform for the Makers, Developers and geeks. where they share their daily hacks and tricks. So, other people can learn those tricks.

I'm pretty sure, everyone here have unique hacks you are using to build products. why not to share them.

So, If you wanna share then here you can https://github.com/mddanishyusuf/dailyhack/

Just create 'new issue' and submit. All the tricks are showing on the platform https://dailyhack.xyz

Thanks
Outputs with Terraform Modules
Tags: systemadministratio, terraform, automation, configurationmanage
Published: 2019-12-31 09:10:46

---
title: Outputs with Terraform Modules
published: true
tags: system-administratio,terraform,automation,configuration-manage
canonical_url: https://medium.com/@jmarhee/outputs-with-terraform-modules-ec0ce38ea1ad
---

Typically, when you create a plan like:

[Continue reading on Medium »](https://medium.com/@jmarhee/outputs-with-terraform-modules-ec0ce38ea1ad?source=rss-d532e3e97d0f------2)
Errors are good right???
Tags: gamedev, beginners, unity3d, discuss
Published: 2019-06-14 01:06:13

I like the thought that if I don't fail I'm not trying. I realize to get better you have to push yourself out of your comfort zone. BUT this gets frustrating sometimes. Its like I got from one error to another. Every function I ad gives be problems. It makes it really hard to stay focused and finish the project the way I want without making changes and shortcuts.
More easily leveraging bool's from a ptr
Tags: go, kubernetes, discuss
Published: 2019-06-14 00:34:49

I am currently working on a project that leverages pointers to Bool values in golang. I am using [corev1.SecurityContext.RunAsNonRoot](https://godoc.org/k8s.io/api/core/v1#SecurityContext) which is a `*bool`. When I am doing comparisons, I have to wrap all the checks for true/false in [a helper function](https://github.com/reactiveops/polaris/blob/c6e3550293d5067a0e2208b8daa93ac35c6cadcb/pkg/validator/bool_pointer_helpers.go#L10-L21) since I cannot be sure if the value will be unset (`nil`) which will cause a fatal error.

Is there some other golang trick or pro-tip I should be using? Or is there some other type of method I should consider when using libraries that have this type of struct referencing `*bool`?

Any discussion would be so great! Happy Thursday!
Cute CSS Animals
Tags: beginners, css, codepen, art
Published: 2019-06-13 23:21:43

---
title: Cute CSS Animals
published: true
description: Check out this codepen and see if you can create your own CSS animals!
tags: beginners, css, codepen, art
cover_image: https://thepracticaldev.s3.amazonaws.com/i/kd2xrrygye6na463riw2.png
---

Hello!

I recently got some cute pens in the mail, and I thought they looked like they could be recreated in CSS, this is what I came up with:

{% codepen https://codepen.io/GRA0007/pen/vqEWyO %}

My challenge to both new and experienced CSS artists, try and create your own animals! I'd love to see a dog, a cat, maybe even a turtle. You can try adding more animals to the pen, or if you're not entirely sure how the code works, try changing the CSS of an existing animal, see what you can make!

And please, share it with us below. 😄
How Much Math is Needed? (or desirable)
Tags: discuss, begginers, computerscience
Published: 2019-06-13 22:04:08

---
title: How Much Math is Needed? (or desirable)
published: true
description: As a Software Developer, How Much Math do You Need to Know?
tags: discuss, begginers, Computer Science
---

As a Software Developer, how much math do you need to know? You may say none, so, I'll rephraseit a bit, what specific math helps in becoming a better programmer? 

And for you seniors out there, what specific math has helped you to grow as a Dev?
I Wrote This Article In The Terminal
Tags: node, javascript, cli
Published: 2019-06-13 22:03:10

This article was written with my new tool [devto](https://github.com/hagnerd/devto#readme), a CLI for creating new articles, and posting them to Dev.to. It's dead simple, and probably a little rough around the edges.

## Prior Art 
This tool was heavily inspired by [Tim Deschryver](https://dev.to/timdeschryver) who wrote this [article](https://dev.to/timdeschryver/writing-a-dev-to-blog-post-with-vscode-1fn) about a VS Code extension called [New Blog Post](https://marketplace.visualstudio.com/items?itemName=timdeschryver.new-blog-post). If you use VS Code, check it out!

---

If you're interested in using the CLI app you can install it globally at `@hagnerd/devto`, or run it with `npx @hagnerd/devto`.

Once installed it will be globally available with `devto new`.

The following commands are available:
1. `devto new` - creates a new article with frontmatter.
1. `devto publish` - pushes the article up to your dev.to account*
1. `devto dashboard` - just a quick alias to open dev.to/dashboard in the browser.
   Great if you want to push a draft up, and make changes or preview it.
1. `devto reset` - deletes your global ~/.devto file (which stores your API key)

\* I haven't tested it with orgs so if someone that is part of an org tries it
out and the cli doesn't behave correctly, let me know!

* [npm](https://www.npmjs.com/package/@hagnerd/devto) link
* [Github](https://github.com/hagnerd/devto#readme) link
What was your favorite song/album/artist to listen to while programming this week?
Tags: discuss
Published: 2019-06-13 21:35:50

*Community highlight:* Last week [t4rzsan](https://dev.to/t4rzsan) shared some consequences of wearing headphones while working in the article: [Why you shouldn't wear headphones while working](https://dev.to/t4rzsan/please-don-t-use-headphones-when-working-261g).

***Protip* Spotify Embed:** Enter the Spotify URI of the Spotify track / playlist / album / artist / podcast episode you are trying to embed. 
`{% spotify spotify:episode:5V4XZWqZQJvbddd31n56mf %}`

### Whether you are quietly jamming to tunes in the office or blasting some beats at home, **what was your favorite song/album/artist to listen to while programming this week?**
A very simple command line tool as a side-project to learn go.
Tags: go, beginners, sideprojects
Published: 2019-06-13 21:32:39

### The story
I've been using [Larder](https://larder.io) as my bookmark manager about a year and maybe and a half, more or less. Before Larder, I was -and still- using [Buku](https://github.com/jarun/Buku/) (_a powerful bookmark manager written in Python3 and sqlite3_ -from Buku github page). Being used to Buku, one thing I was missing from larder was a cli to do searches directly from the command line, and since I love command line tools, what better excuse to start one in go?

### Starting small
Every time I learn something new I like to find small projects, because keeping the idea small helps me to focus on specific tasks. Another reason to start small is because it's easier to finish the project in a reasonable amount of time and it feels great once it's finished, which is also great motivation to continue.

### The cli
This is how larder-cli was born a month ago, with Buku in mind and as inspiration. The current state of the cli is not nearly close to being called a complete tool, but that wasn't its purpose. It's been a lot of fun working in this little piece of software and I'm planning to add more features. One thing I want to learn now is a proper way to manage command line args.

Another cool thing, I got an A+ in goreportcard!

![goreportcard](https://thepracticaldev.s3.amazonaws.com/i/tvmhbuok4fkexxjnxgfo.png)
(that screen is from my self-hosted app, because for some reason the main app is giving me an error).

I can't embed gitlab repos here so I'll leave the link: https://gitlab.com/flrnprz/larder-cli in case you want to check it out.

Thanks for reading and happy coding!
What's the difference between SDK and API?
Tags: dotnet
Published: 2019-06-13 21:31:54

Hi there! My name is Alex Sokolov. I'm a senior engineering manager at <a href="https://www.itechart.com/">iTechArt Group</a>. Within my working experience, I've faced with a challenge to choose between SDK and API numerous times. I've decided to write this post to clarify the difference between SDK and API, as people are confused with defining these two notions too often.

<b>So, what is a SDK?</b>

A SDK (Software Development Kit) is a set of development tools such as libraries, various utilities (both CLI and GUI), documentation, code samples, etc. that help developers build applications for a certain platform. SDK’s main constituents are libraries that can integrate one or more platform APIs and usually contain configurable and reusable components. Different SDK utilities (if available in SDK) can simplify a developer’s life even further by automating development processes.

<b>What is an API? </b>

An API (Application Programming Interface) is an interface designed for the interaction between different apps, programs, or platforms. It’s more a set of methods for app-to-app communication than a set of tools for creating a new solution. The communication between apps is performed by a set of rules that specify data structures, routines, protocols, etc. Being a set of tools for application development, SDKs often include one or more APIs, along with code samples, libraries, and other components. The difference between SDKs and APIs can be summed up as follows: “All SDKs contain APIs, but not all APIs are part of SDKs.” 

<b>When to use SDK and API?</b>

Developers always use SDKs when building an application. Moreover, there are SDKs designed specifically for a certain platform, such as Android SDK or Azure SDK. 

An API is used for communication with external applications and/or platforms by means of various methods and protocols.

For example, to integrate a .NET application with a particular Azure service (for example, a file storage), it’s possible to use either their Web API (by using HTTP requests to a certain URL) or .NET libraries (which is easier, as there is no need to deal with direct HTTP requests.) 

In summary, when developing any type of software application, an engineer will use SDKs. When communication with other third-party service providers (applications/platforms) is required, API integration will be used, which sometimes can be a part of SDK.
I need advice before beginning new project
Tags: advice, beginners, discuss
Published: 2019-06-13 21:16:04

---
title: I need advice before beginning new project
published: true
description: advice  
tags: #advice #beginners #discuss
---
Hello everyone! I'm about to start my next project to continue on the learning path. I'd like to build a calendar roster management application, mainly for myself and a couple of friends (to give you an idea). 
1. What backend language would you use?
2. What approach would you take with structuring the database?
3. What approach would you take with structuring the application?
Design Critiques: @pixmy portfolio website design
Tags: design, beginners, css
Published: 2019-06-13 21:02:00

This is the first in what I hope to make a weekly series of doing design reviews for folks who are looking for feedback.

In this series, I'll tackle one website, project, or app per video and post them here as well as [on YouTube](https://www.youtube.com/watch?v=rPwgkaoWOeA). I took some inspiration for this from James Q. Quick on YouTube doing Code Reviews. If you're interested in that idea as well, [definitely check it out here](https://www.youtube.com/watch?v=dgttPoE_R5Q).

In this video, I take a look at @pixmy's portfolio and provide a few actionable items to address to add some polish to what is a great looking site! You can see the site for yourself here: https://codepen.io/Pixmy/full/XeqvNm

{% user pixmy %}


## Would you like a design or code review?

I've started a site off of the DEV platform to collect requests for code, design and resume reviews. I'm partnering with my friend [James Q. Quick](https://learnbuildteach.com). He'll provide amazing code reviews ([like this one](https://www.youtube.com/watch?v=dgttPoE_R5Q)), I'll provide design critiques and we'll both take a look at resumés submitted.

### Go over to [PeerReviews.dev](https://peerreviews.dev) to request a review!
Generate beautiful README in 10 seconds
Tags: webdev, javascript, opensource
Published: 2019-06-13 20:00:01

---
title: Generate beautiful README in 10 seconds
published: true
description: A CLI that generates beautiful README.md files
tags: #webdev, #javascript, #opensource
cover_image: https://user-images.githubusercontent.com/9840435/59461914-cbc18380-8e22-11e9-8567-87b43da950ac.png
---

Hi 👋

A well structured and beautiful README is very important, especially for opensource projects. This is the first thing that visitors will see when they discover your project.

This is why I created [readme-md-generator](https://github.com/kefranabg/readme-md-generator), a tool that generates beautiful basic `README.md` files with less efforts !

All you need to do is answer a few questions, and [readme-md-generator](https://github.com/kefranabg/readme-md-generator) will do the rest 👌

`readme-md-generator` is able to read your environment (package.json, git config...) to suggest you default answers during the `README.md` creation process :

<p align="center">
  <img width="700" align="center" src="https://user-images.githubusercontent.com/9840435/59462324-cca6e500-8e23-11e9-8399-1372492c123b.jpg" alt="demo"/>
</p>


Generated `README.md` :

<p align="center">
  <img width="700" src="https://user-images.githubusercontent.com/9840435/59458494-d7a94780-8e1a-11e9-9103-42639c347c38.jpg" alt="cli output"/>
</p>

Feel free to check out the [github repos](https://github.com/kefranabg/readme-md-generator) if you're interested !