teleren/devto huggingface dataset:
Concurrency != Parallelism
Tags: concurrency, parallelism, multithreading
Published: 2018-01-31 21:07:56

---
title: "Concurrency != Parallelism"
published: true
tags: concurrency, parallelism, multithreading
canonical_url: https://monades.roperzh.com/concurrency-is-different-than-parallelism/
cover_image: https://user-images.githubusercontent.com/4419992/35423042-8764d082-022a-11e8-9c20-4348e9ea2540.jpg
---


_This post was originally published on [monades.roperzh.com](https://monades.roperzh.com/concurrency-is-different-than-parallelism/?cm=devto)_

I truly enjoy listening to [Carl Hewitt](https://en.wikipedia.org/wiki/Carl_Hewitt) talk about computers, and something he repeats often is “concurrency is not parallelism”. For me, there was no real difference, and honestly, I’ve never bothered to dig into it.

Last week, I’ve stumbled upon [Rob Pike’s talk](https://blog.golang.org/concurrency-is-not-parallelism) on the subject, which leads me to finally do some research on the matter. Here are my findings.

_beware: as with most things in life, a lot of people consider that there’s no real difference between the two._

## Concurrency

Concurrency is all about doing tasks in the same _interval of time_. The important detail here is that the tasks don’t necessarily execute _at the same time_, but they can be divided into smaller tasks that can be interleaved.

![concurrency](https://user-images.githubusercontent.com/4419992/35572695-ee6275c8-05b3-11e8-8460-2c1ac7081574.jpg)

A good place where concurrency takes place is in the kitchen, imagine a single chef cutting lettuce while is also checking from time to time something in the oven. He has to stop cutting, check the oven, stop checking the oven and then start cutting again, and repeat the process until is done.

As you can see, concurrency is mostly related to the _logistics_, without concurrency, the chef will have to wait until the meat in the oven is ready in order to cut the lettuce.

## Parallelism

Parallelism, on the other hand, is about doing tasks _literally at the same time_, as the name implies they are executed in parallel.

![parallelism-bw](https://user-images.githubusercontent.com/4419992/35572701-f14520f6-05b3-11e8-9989-f4dcc7fc987e.jpg)

Back in the kitchen again, now we have two chefs, one can take care of the oven, while the otter cuts the lettuce, we split the work at the expence of having another chef.

Parallelism is a subclass of concurrency: before you execute multiple tasks simultaneously, you first have to manage multiple tasks.

## Sources

- [Brave Clojure](https://www.braveclojure.com/concurrency/): The Sacred Art of Concurrent and Parallel Programming
- [Haskell Wiki](https://wiki.haskell.org/Parallelism_vs._Concurrency)
- [Rob Pike’s talk](https://blog.golang.org/concurrency-is-not-parallelism)

**Bonus**

If you have time, take a look at [this humorous exchange](https://en.wikipedia.org/wiki/Talk%3AParallel_programming) between Carl Hewitt and a Wikipedia moderator about concurrency vs parallelism.
Docker - Standard_init_linux.go:187 exec user process caused no such file or directory
Published: 2021-02-26 22:21:15

---
title: Docker - Standard_init_linux.go:187 exec user process caused no such file or directory
published: true
tags: 
canonical_url: 
---

I have been working a lot with Docker and Go lately and I come across a very annoying error when running tools built in Go in containers on a RaspberryPi. All of the bug reports I found had something to do with Windows-style line endings (CRLF) but I am using MacOS, so this can’t be the solution (at least) for me here.

This is the Dockerfile I have been using:

```
FROM alpine
WORKDIR /app
ADD washing-machine /app/washing-machine
CMD ["./washing-machine"]

```

Turns out building the binary on the mac doesn’t work, even using [GOOS and GOARCH](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) didn’t do the trick, so I now build the binary in the container, using the [golang](https://hub.docker.com/_/golang/) image from Docker hub:

```
FROM golang:1.9.3-alpine3.7
ADD . /app
WORKDIR /app
RUN cd /app && \
    apk update && \
    apk add git bash && \
    go get github.com/domnikl/ifttt-webhook && \
    go get github.com/domnikl/fritz-box && \
    go build -o washing-machine
CMD ["/app/washing-machine"]

```

Hope this will help you in getting around this annoying error message.
入門自然言語処理 pp.199-203
Tags: nlp, python, reading
Published: 2018-01-30 23:53:31

---
title: 入門自然言語処理 pp.199-203
published: true
description: 
tags: nlp, python, reading
---

5.2 はタグ付きコーパスの続き。

タグの `NN$` のように、$がついているとプロットするときのラベルとしてパースでいないので、雑に削除するコードを昨日書いた。んだけど、これはよくないことに気づく。

読み進めていくと、`NN` タグは spam のような一般的な名詞、 `NN$` タグは spam's のような所有格名詞を表す。

```
import nltk
tagged_words = nltk.corpus.brown.tagged_words(categories="news")
dist = nltk.FreqDist(tag.replace("$", r"\$") for (word, tag) in tagged_words)
dist.plot()
```
Describe the worst coding culture you've been a part of
Tags: discuss
Published: 2018-01-30 23:12:55

---
title: Describe the worst coding culture you've been a part of
published: true
description: 
tags: discuss
---

There are a lot of ways to have bad culture, and coding is sometimes the least of your concerns here. But in this case I'm interested in the worst _coding_ culture you've been a part of: Where it was really hard to build good software for reasons that were engrained in the company's culture (deadlines, testing practices, vision issues, etc.)

I'm very curious to hear some stories!
How I Organize My Files
Tags: folders, productivity, discuss
Published: 2017-12-05 10:31:14

---
title: How I Organize My Files
published: true
description: How Roger Stach organize his files, explained.
tags: folders, productivity, discussion
---

> I backup all my files in git, basically my life in a nutshell.
For now, I am using bitbucket for the git storage. 
Planning to migrate to GitHub in the future.

I don't just organize my code, I organize all my files. Including videos, pictures and rants. And also much more in the future.

All of that backups will be cloned in all of my developing machines. I usually name them as root, so '~/root'.

Here's the tree view of root :

```
dev/
files/
images/
rants/
videos/
```

#### Here, let me explain.

* `dev/` is for my works. Developer stuffs.
* `files/` is for files. Mostly downloads of zip files.
*  `images/` is for images. Basically my photos, backuped.
* `rants/` is for my rants. I'm usually bored at the bus. So I just open my MacBook and just start ranting as I wait for the bus to arrive.
* `videos/` is for my videos. When I don't have anything to do, I usually sing random shit and I record it. Even tho the folder says `videos` some of them isn't a video.

`files/`, `images/`, `rants/` & `videos/` doesn't really have a lot of files for now since I'm really focused on the `dev/` directory.

#### Inside the dev/ folder

Treeview :
```
cdn/
fun/
packages/
works/
``` 

* `cdn/` is the directory of my CDN. Mostly frameworks or clients files.
* `fun/` is where I put files that isn't related to works. Mostly open-source contribution and stuffs.
* `packages/` is where I put installer stuffs. Probably some frameworks configuration and some dotfiles.
* `works/` is where I put work stuff. Clients source code. Yeah, those stuffs.

#### Inside the fun/ folder
Treeview :

```
experiments/
mine/
open-source/
shits/
``` 

* `experiments/` is where I do experiments.
* `mine/` is where I put personal codes. Mostly website and algorithm.
* `open-source/` is where I do my open source stuffs. You know, those stuffs.
* `shits/` is where all those legacy codes rests in peace.

> That's it. Let me know what you think.

## Update

> I ended up splitting the git repo between the dev/ folder and everything else.

* `dev/` is now called Workspace.
* everything else is now called `BEE` (Basically Everything Else)

Oh, and I also moved `shits` from fun to root. (`mv fun/shits . && mv shits cemetery`)
> It is now called `cemetery`.
Help Me Validate My Blog Topics 
Tags: cnc2018, codenewbie, blogmore
Published: 2018-01-30 17:49:36

---
title: Help Me Validate My Blog Topics 
published: true
description: CNC2018 Blog more track.Mission 1.
tags: #CNC2018, #CodeNewbie, #blogmore
---

I am participating in the CodeNewbie Challenge for 2018 and I would like some feedback on my potential blog topics, for the first mission. Here are the top five ideas I have come up with:

1. Explain: Neural Network Building Blocks - A blog explaining components of neural network architecture(logistic functions, loss functions, artificial neurons).
2. Tutorial: Classifying Handwritten Digits with TensorFlow and MNIST  - A tutorial using the MNIST database to train and test a neural network.
3. Explain: Google Cloud Functions Hello World - A simple writeup about all the code in a GCF that returns "Helo World!"
4. Project: Amazon Lex Recipe Bot - Summary of a chatbot I built, as part of a group, with AWS Lambda and Lex, for a contest.
5. Tutorial: Serverless CRUD Web App - A tutorial on making a simple note-keeping app with a serverless back-end.

All feedback is appreciated. Thanks!
Bootstrap 4.0 Release: What’s New?
Tags: javascript, bootstrap, bootstrap4, css
Published: 2018-01-30 16:53:39

---
title: "Bootstrap 4.0 Release: What’s New?"
published: true
description: Bootstrap 4 ships with a lot of new features and adds spice to the most popular CSS framework in the world. Learn what's new in Bootstrap!
tags: #javascript #bootstrap #bootstrap4 #css
canonical_url: https://auth0.com/blog/whats-new-in-bootstrap4/
---

Bootstrap is the de-facto design frontend component library for designing web and mobile sites. In this article, we'll cover the new features in Bootstrap 4.0 and several other changes and deprecations!

[Read on 🖌](https://auth0.com/blog/whats-new-in-bootstrap4/?utm_source=dev&utm_medium=sc&utm_campaign=new_bootstrap4)

![Bootstrap 4.0 Release: What’s New?](https://thepracticaldev.s3.amazonaws.com/i/5wyj58mydo7f3go5izwl.png)
I Made a Conference Calendar for People in Tech
Tags: showdev, conferences
Published: 2018-01-30 15:46:51

---
title: I Made a Conference Calendar for People in Tech
published: true
description: Introducing confercal, an easier way to find creative and tech conferences.
tags: #showdev, #conferences
---

Hi everyone! I recently launched [conferCal](https://www.confercal.com), a conference calendar for developers and other people in tech.

With filters for topics, dates, price and location, I wanted to make it easier to find creative or tech conferences you want to attend, speak, exhibit etc.

![Code Calendar](https://thepracticaldev.s3.amazonaws.com/i/dbug017dpp5a6wwsypdv.png)

### Why

The idea for conferCal came about because I was just too lazy to scour every list on the internet for conferences related to design, code or entrepreneurship. It was also annoying to find cool conferences and then 3 clicks later, figure out that it was too expensive, from a location or price standpoint, to attend.

### Plan

My first goal with conferCal is to become a single resource, for those mainly in tech (from designers to developers to marketers to entrepreneurs) to find conferences. Eventually, if the demand is there, it would be awesome to expand to other creative fields. But I’m taking it one step at a time.


**Check it out at:** https://www.confercal.com
**Conferences for Developers:** https://www.confercal.com/calendars/code

Let me know what you think! 🙈
Compilers 103 – Semantic Analyzer
Tags: llvm, compiler
Published: 2018-01-30 15:25:23

---
title: Compilers 103 – Semantic Analyzer
series: Compilers
published: true
description: Learn how compilers work.
tags: llvm, compiler
---
The Semantic Analyzer is the real heart of the compiler. Its job is to validate code and figure out what the code actually means. Essentially it validates that the code is semantically correct.

This is the third post in my Compiler series. Previous posts:

* [Compilers 101 – Overview and Lexer](https://dev.to/lefebvre/compilers-101---overview-and-lexer-3i0m)
* [Compilers 102 – Parser](https://dev.to/lefebvre/compilers-102---parser-2gni)

## Semantic Analyzer

With the output from the Parser, all the compiler has is what the user actually typed, although converted to a format that is easy for the compiler to digest.

The Semantic Analyzer knows all the rules regarding the programming language. For example, it knows that an Integer can be multiplied with a Double. It knows a String cannot be compared with a Double. It knows how to do assignments to variables. It knows that Objects can be used with the “New” command. It knows about scope information. Everything that the compiler knows to pass the initial syntax check is in the Semantic Analyzer.

If we start with the syntax tree produced by the Parser, the Semantic Analyzer will go through it and add information to the syntax tree regarding types. And not just types, but adds information about things that are implicit in the language. For example, you may not think about it but there are implicit conversions that happen should you do something like assign a Double to an Integer.

As you can see below, the Semantic Analyzer has gone through the syntax tree and updated it to include when implicit conversions (ImplicitCast) are done.

![](https://blog.xojo.com/wp-content/uploads/2017/05/2017-05-19_09-02-03.png)

This updated tree is then handed off to the next part of the compiler, [IR Generation](https://dev.to/lefebvre/compilers-104---ir-generation-39e8)
CNC2018 5 Blog ideas
Tags: blogmore, cnc2018, codenewbie, discuss
Published: 2018-01-30 14:45:05

---
title: CNC2018 5 Blog ideas
published: true
description: Help me to choose my top three ideas
tags: #blogmore #cnc2018 #codenewbie #discuss
---

#CNC2018 Blog More - Mission 1

Hey guys, I'm currently involved in #BlogMore challenge from [CNC2018](https://2018.codenewbie.org/).

My first mission is to look for ideas and to validate them. Here are my five ideas, let me know what's on your mind :

* How I created custom JUnit annotations for Elasticsearch integration tests. It's a simple example of how you can create custom annotations to set up test fixtures in Java.
* What’s new in the next release of Chrome DevTools.
* A summary of my first time at [Snowcamp](http://snowcamp.io/en/), a French technical conference.
* A feedback on how we do high availability and continuous delivery in my current project. It will be about all technologies involved in the process of development, validation, delivery of a web application and also interactions between people.
* How to set up a simple Elasticsearch search and autocompletion mechanism into your legacy application. It's will be in Java.

Thank for your feedback and don't hesitate to ask me precision.
Docker Missing Tools
Tags: devops, docker, bash
Published: 2018-01-30 11:31:06

---
title: Docker Missing Tools
published: true
description: A set of commands to make docker dev-ops easier.
tags: #devops, #docker, #bash
---

A set of commands to make docker dev-ops easier.

Docker Missing Tools help to automate dev-ops tasks without including noise to source code.

Avoid creating typical helper scripts like "build.sh" and "deploy.sh" inside shared code repositories.

https://github.com/nandoquintana/docker-missing-tools
入門自然言語処理 pp.195-198
Tags: nlp, python, reading
Published: 2018-01-29 22:19:44

---
title: 入門自然言語処理 pp.195-198
published: true
description: 
tags: nlp, python, reading
---

5.2 タグ付きコーパスの導入。単語とタグのタプルとして、コーパスが格納されている。tagged_words() メソッドでイテレートできる。

tagged_sents() なら、 `[[(word, tag), (word, tag), ...], [...], ...]` として文ごとにイテレートできる。

Python 3.6 + matplotlib==2.1.1 では、p.198 のプロットするサンプルでエラーが出る。FreqDict のキーに「PP$」のように $ が入っていて、この $をパースできないようだ。ここで根本原因を解決するのは本来の目的ではないので、適当に済ませる。

```
import nltk
tagged_words = nltk.corpus.brown.tagged_words(categories="news")
dist = nltk.FreqDist(tag.replace("$", "") for (word, tag) in tagged_words)
dist.plot()
```
On Non-Zero Offsets
Published: 2018-01-29 23:51:48

---
title: "On Non-Zero Offsets"
published: true
tags: 
canonical_url: https://jacoby.github.io//2018/01/29/on-nonzero-offsets.html
---

This is a topic I feel compelled to write but know this is not a thing I expect anyone to read. `Blog` derives from `weblog` and comes from people logging their actions on the web.

Here it comes from Globus, which is a service by which I say _“I want to share this huge amount of data with Joe”_, and Globus lets my server know that this is Joe and Joe is who he says he is, and, should there be a problem between Joe’s computer and mine, it will try to pick up where we left off.

We get this from a protocol called GridFTP. I’ve only used it through Globus, so I can’t say much about it outside of that context. But one of the features it has is an offset. If I start a transfer with `get(big_file.tar)`, that starts from the beginning, but with `get(big_file.tar, 12345678)`, it starts about a gigabyte in.

The Joe I know works on the other side of campus from me, and he may want to move the file across the fast campus backbone to the gigabit network drop at his desk. But the Joe might be somewhere else, across several network jumps and political borders. Joe’s a very popular name.

And, for another example, it might not be a directory of small files of less than 16GB (we now live in a world where 16GB is _small_), but a large tarball of 300 or more GB. If I am trying to transfer that over a not-so-good connection, one that might show signs of brittleness, this would be a very good thing.

But, the long-term storage computer where you are storing the tarballs holds the archives of a lot of people. It could actually have the tape that `tar` – `*t*ape *ar*chive` – is named for. And because it’s supposed to be stable, it could not be running the newest software, the code that allows you to restart the download at bit 12345678 might not there.

But that would be _the_ place you want it. It’s far more important to be able to restart halfway through a 300GB download than a 30GB download.

Theoretically.

No identification with actual systems (living or deceased) is intended or should be inferred. No Joes were harmed in the making of this blog post.

If you have any questions or comments, I would be glad to hear it. Ask me on [Twitter](https://twitter.com/jacobydave) or [make an issue on my blog repo](https://github.com/jacoby/jacoby.github.io).
Monitoring my solar system from the cloud
Tags: solar, c, mssql
Published: 2019-12-17 01:19:53

---
title: Monitoring my solar system from the cloud
published: true
date: 2018-01-29 21:00:49 UTC
tags: solar, c#, mssql
canonical_url: https://mullineaux.com.au/2018/01/30/26/
cover_image: https://i0.wp.com/blogmullineaux.blob.core.windows.net/wordpress/projects/monitoring-my-solar-system/image-10.png?resize=1024%2C579&ssl=1
---

I graphed and cloud-enabled my solar production and consumption metrics using the SolarEdge API, Azure Automation, Powershell, Azure SQL Database and Microsoft PowerBI, to detect faults with my equipment and predict my power bills.

[Continue reading](https://mullineaux.com.au/2018/01/30/26/)

The post [Monitoring my solar system from the cloud](https://mullineaux.com.au/2018/01/30/26/) appeared first on [Casey Mullineaux](https://mullineaux.com.au).
Ideas for 'Blog More' challenge #CNC2018
Tags: cnc2018, discuss, helpneeded
Published: 2018-01-29 20:25:13

---
title: Ideas for 'Blog More' challenge #CNC2018
published: true
description: 
tags: CNC2018, discuss, helpneeded 
---

I know it's a bit past the deadline, but I decided to try and catch up with 'Blog More' challenge. I narrowed my ideas to following 5:

1. Few words about Data Classes in Python - In the next Python version (3.7), one of added features will be 'Data Classes' described in PEP 577. In my blogpost I would like to shortly describe what they are and why you might want to use them.
2. Getting started with Python apps on AWS Lambda - Recently, I'm learning more and more about "serverless" and figured that it could be useful to describe how you can build Python apps with Serverless framework and AWS Lambda.
3. CLI tools that I'm using on daily basis - There's a lot of awesome CLI tools that greatly simplify tasks I'm dealing with every day.
4. How to set up private npm registry on AWS Elastic Beanstalk - In this blog post I'd like to show how you can quickly set up your own private npm registry (https://github.com/verdaccio/verdaccio). Platform that I'll be using in my tutorial will be Elastic Beanstalk, but since I'll be using Docker, it can be easily adapted to other cloud providers or running it locally.
5. Introduction to AWS Machine Learning Application Services for Pythonistas -
 Recently, Machine Learning is rapidly gaining popularity and are being used for a variety of applications. What if you'd like to enchance your Python app with AI-capabilities, but don't have resources to develop it on your own ? AWS Machine Learning Application Services to the rescue! In my blog post (or series of posts), I will describe what services has AWS to offer when it comes to ML-driven APIs and I'll show how Pythonistas can leverage services like AWS Polly, AWS Rekognition or AWS Transcribe to add image analysis or text to speech conversion to their services.

I have a hard time picking the final 3, so any feedback would be really appreciated!

Thanks for reading!
Which is faster: obj.hasOwnProperty(prop) vs Object.keys(obj).includes(prop)
Tags: javascript, discuss
Published: 2018-01-29 19:06:09

---
title: "Which is faster: obj.hasOwnProperty(prop) vs Object.keys(obj).includes(prop)"
published: true
description: 
tags: #javascript #discuss
---

I don't know how to test runtime speed but I'm interested in which of these methods would cause more overhead.

Given an object with **n** _properties_ (also called _keys_) is it faster to check if that property exists using `obj.hasOwnProperty(prop)` or `Object.keys(obj).includes(prop)`. Something to consider is what if you need to check multiple properties multiple times?

If you store the `keys` in a variable: `const keys = Object.keys(obj)` and then make a series of checks `keys.includes(prop1); keys.includes(prop2);` is this faster or slower than `obj.hasOwnProperty(prop1); obj.hasOwnProperty(prop2);`
Which language should I take to make a web app
Tags: discuss, webdev, javascript
Published: 2018-01-29 17:35:56

---
title: Which language should I take to make a web app
published: true 
description: Best languaje - enviroment to work in a web app.
tags: discuss, webdev, javascript
---
I will start developing a responsive web app. I will make the interface with bootstrap. I'll make the frontend development in JQuery.
I'm used to work with php for the backend on other web pages I done, but I'm not sure in this case is the best option. Is better to star working with Node.js or Angular just to have everything bases on js?