teleren/devto huggingface dataset:
Seamless workers for Node.js
Tags: node, worker, javascript
Published: 2020-01-20 17:40:15

Node.js supports native [Worker Threads](http://nodejs.org/api/worker_threads.html) without flags since 12.0, and this finally allows us to circumvent the limitations associated with the single-threaded nature of JavaScript.

Workers in Node can only communicate via a [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) pattern (same as their web counterparts), which is not a bad thing at all: it enables concurrency, like the `go` coroutine pattern used in golang.

However, sometimes you just want a drop-in way to execute a function without blocking the main thread (for instance, regenerating a server's cached data without blocking incoming requests to the previous cached data).

For WebWorkers, [Workerize](https://github.com/developit/workerize) has been providing exactly this. You can execute a function normally without having to change its signature, but it runs in a worker under-the-hood.

I created the `node-inline-worker` npm package ([Github](https://github.com/christophemarois/node-inline-worker)) to achieve the same thing, leveraging the Worker Thread of Node.js instead of the WebWorker API, while keeping the same interface API as Workerize. With it, making a function truly non-blocking is as simple as changing:

```javascript
const result = await expensiveFn(1, 2)
```

to this:

```javascript
const result = await require('node-inline-worker')(expensiveFn)(1, 2)
```

Note: Worker Threads will not magically solve your performance issues, and have some downfalls. For instance, Node.js documentation's states that:

> Workers (threads) are useful for performing CPU-intensive JavaScript operations. They will not help much with I/O-intensive work. Node.js’s built-in asynchronous I/O operations are more efficient than Workers can be.

I suggest that you read the [Worker Thread](https://nodejs.org/api/worker_threads.html) documentation page (especially the *Notable differences inside a Worker environment* section) to find out if workers are suitable for your use case.


For more information on how to use `node-inline-worker`, go read the very straightforward [example](https://github.com/christophemarois/node-inline-worker#usage) on the Github repo's page.

Have a good day!
Coding Boot Camps: Chatting with intern Jesus Ortega about his experience
Tags: beginners, codenewbie, webdev, career
Published: 2020-01-20 17:33:52

{% youtube EhykT6fY54g %}

In this episode of the Zeal Twitch stream. I took the opportunity to have a conversation with our intern Jesus Ortega about his experience going to a Coding Boot Camp. 

If you're curious about a Coding Boot Camp or looking for some tips from someone that has gone through a program, then I hope you enjoy the video.

These are the high-level questions that were asked during our conversation.

- What are you doing before the boot camp?
- What got you interested in web development?
- Why did you want to go to a coding boot camp?
- How did you find out about your boot camp school?
- What were your expectations going into the boot camp?
- What were your experiences during the boot camp, any challenges?
- What were you hoping to get out of the internship?
- Any words of wisdom for people considering a boot camp?

Watch the VOD on Twitch:

[https://www.twitch.tv/videos/537614518](https://www.twitch.tv/videos/537614518)
@DEVTO why arent your unicorns auto generated ? 
Published: 2020-01-20 17:33:24

or is this definition wrong ? 

*unicorn content is that blog post, webinar, video, or another piece of content everyone is talking about. It's a piece of content that performs in the top 1-3% of your site and usually delivers most of your traffic. Unicorns are not only traffic drivers; they're the best-performing content pieces in many ways.*

@everyoneelse until i know better i will treat a unicorn click as a like++ just let me know if ive only liked your post i would be only too happy to like++ it as well
Day 1 of new job.
Published: 2020-01-20 17:15:37

🐸 that would be Kermit waving in panic.

This is how I felt my first day went. It was hardcore, really hardcore, information beyond what anyone would hope to remember, as a developer I have the mind to tune out the irelivent bits and just take what is needed.

I am used to getting up to speed fast, getting told what to work on and smashing through tickets. What I have found was that (although it makes a refreshing change) it's going to take some getting used to, I am not expected to do this immediately. I have joined a company that is highly flexible genuinely far more than I have ever experienced, this is going to take some getting used to. Everyone is highly social and on the same level, that is also going to take some getting used to.

So did I say anything stupid, yep I'm pretty sure I did, but I really tried to get stuck in even if most of it was out of context and hard to follow, it wasn't impossible.

Now I have some equipment to setup and a desk to sit at, let's take on tomorrow with a calmer demenier.

This is going to be fantastic!
Rounded Curved Footer Using Bootstrap 4
Tags: bootstrap, css, html, footer
Published: 2020-01-20 17:02:06

Curved is a similar part to make our interface infographic and attractive. So here we designed awsome  Rounded Curved Footer Using Bootstrap 4 and some CSS properties to make our this footer more stunning.

Footer is an important part of the website to stay connected with the user. Also to show important information and important link also. So here we used border-top-left-radius and border-top-right-radius CSS properties to make our footer top side curved. Also, we used media queries to make this element responsive and mobile-friendly. Here we used custom background colors and also used own padding classes.
 
Make it yours now by using it, downloading it and please share it. we will design more elements for you.

Download Sourcecode:-

https://w3hubs.com/rounded-curved-footer-using-bootstrap-4/
What the fudge is public-key🔑 cryptography?
Tags: tutorial, codenewbie, security, computerscience
Published: 2020-01-20 17:02:02

Have you ever wondered about:

1. What these **keys** were in the programming sense of things?

2. How can you take a *random string consisting* of numbers and alphabets and base the security of your system on it?

I have tried to explain just that using the example of **actual physical lock and keys** in this video: 

{% youtube 64DL9BNVwkU %}

Let me know in the comment section if that was helpful, Cheers!
awstail: AWS Logs a la vieja usanza
Published: 2020-01-20 18:29:53

---
title: awstail: AWS Logs a la vieja usanza
published: true
date: 2020-01-20 16:50:59 UTC
tags: 
canonical_url: https://yorodm.github.io/blog/awstail/
---

[awstail](https://github.com/yorodm/awstail) es una herramienta muy simple que cumple dos funciones:

1. Darme la excusa para aprender **Rust**.
2. Monitorear un grupo de logs en `AWS Cloudwatch` desde la terminal.

Por el momento, estas son las opciones que permite la herramienta:

```
awstail 0.3.0
Yoandy Rodriguez <yoandy.rmartinez@gmail.com>
like tail -f for AWS Cloudwatch

USAGE:
    awstail.exe [OPTIONS] <LOG_GROUP>

FLAGS:
    -h, --help Prints help information
    -V, --version Prints version information

OPTIONS:
    -p <PROFILE> Profile if using other than 'default'
    -r <REGION> AWS region (defaults to us-east-1)
    -s <SINCE> Take logs since a given time (defaults to 5 minutes)
    -w <WATCH> Keep watching for new logs every n seconds (defaults to 10)

ARGS:
    <LOG_GROUP> Log group name
```

Posibles opciones futuras:

1. Agregar logs de más de un grupo.
2. Color diferenciado para mensajes de error.
3. Listar grupos de logs existentes.
whats your web feature pet hate ?
Tags: discuss, w3c, standards
Published: 2020-01-20 16:28:13

my pet hate of the week is fake (or are they just badly written) "sign up with" oauth sites that then ask you for your email and password ! 

obvs does not apply to codepen & devto signed in with no problem

pet hates (in no particular order)
* oauth
 * ask you for another email and another password
 * that want to update your profile and account settings
 * that want to tweet as you
* infinite scroll
* autoplay music or videos

any more ?
What long-held belief have you eventually changed your mind about after learning from experience?
Tags: discuss, career
Published: 2020-01-20 16:10:23

---
title: What long-held belief have you eventually changed your mind about after learning from experience?
published: true
tags: discuss, career
---

If you've been working in software development for a while, you probably have more than a few things that you once thought were Super Important but now don't give much thought to (or vice versa).

If you're new to the field, you probably had some ideas for how you expected software development was going to be. Then after a few weeks or months, you may have realized that things were quite different than you expected.

Either way, I'd love to hear your story, and in particular _what_ made you change your perspective on things.
Replatforming Production Dataflows - Episode 116
Published: 2020-01-20 16:02:15

<p>Building a reliable data platform is a neverending task. Even if you have a process that works for you and your business there can be unexpected events that require a change in your platform architecture. In this episode the head of data for Mayvenn shares their experience migrating an existing set of streaming workflows onto the Ascend platform after their previous vendor was acquired and changed their offering. This is an interesting discussion about the ongoing maintenance and decision making required to keep your business data up to date and accurate.</p><p><a href='https://www.dataengineeringpodcast.com/mayvenn-ascend-data-replatforming-episode-116/'>Listen Now!</a></p>
FOSS and Entitlement
Tags: opensource
Published: 2020-01-20 15:58:28

Another day, another discussion of entitlement on Hacker News. This time the post that drove the discussion is [My FOSS Story](https://blog.burntsushi.net/foss/).

Let me say that I know nothing about the author or any of the background behind the post. My comments are general in nature. The biggest problem is inappropriate expectations of open source project maintainers.

The author of the post writes:

> I've seen or experienced this in FOSS in a number of different ways:
>
>    You should put out a new release.
>    You should rewrite this in [insert programming language here].
>    You should rename your project.
>    You should [insert major architectural change here].
>    You should change the license of your project.

That apparently bothers the author. I don't understand why it matters. *Of course* people are going to request/suggest things. If you don't like what they're asking you to do, just ignore it, or even better, answer that you've open sourced your project so that you can incorporate pull requests.

Anyway, I don't really understand what this has to do with "entitlement". If you put your project out there for the world to see, you're *inviting* comments, feedback, and shoulds. If you don't like it, don't share your work.

Later on, he writes "At some level, even the act of opening a bug is a form of entitlement". *Of course it is. That's why the dang bug tracker exists.* The author even says that in the very next sentence. Evidently the complaint has nothing to do with entitlement.

My suggestion (or "should" if you want to use that term) is to be very clear on the project site what limitations there are. If you don't want feedback, state that clearly. If you don't want bug reports, state *that* clearly. Even better, make a release and tell the world "this is complete, take it as it is, I have no plans to make changes to this project". It's my opinion that you should normally release open source code without any promise to evolve the project or to do any more than basic maintenance. The real problem in that post is that the author is experiencing burnout. He's spending a lot of time on things he doesn't want to do because he doesn't see them as valuable. He should step away, or at least be clear as to the things he's going to work on, and let the community take care of the rest.
Copy By Reference vs Copy By Value Analogy
Tags: dotnet
Published: 2020-01-20 15:54:43

---
title: Copy By Reference vs Copy By Value Analogy
published: true
description: 
tags: dotnet, discuss 
---

Earlier on my way home, I was listening to Richard Campbell and Carl Franklin on their show .NET Rocks - 1664 High Performance C# with Steve Gordon(https://www.dotnetrocks.com/)

Carl Franklin commented on a very interesting analogy regarding Copy By Reference vs Copy By Value.

copy by value = making a copy of the file
copy by reference = creating a desktop shortcut 

I'm just really amused with his analogy and it got stuck in my head. I've been programming for 8 years and probably that's the easiest way to understand it. 🤔
Ara issue of the week number 1
Tags: contributorswanted, kotlin, java, android
Published: 2020-01-20 15:36:11

hello, thanks for reading. I am starting a series to post my main issues at my open source project. so here they are.
{% github https://github.com/FultonBrowne/Ara-android/issues/169 %}
and on the server side of things
{% github https://github.com/FultonBrowne/Ara-Server/issues/73 %}

if like my work please [buy me a coffee](https://www.buymeacoffee.com/28EcqNL)
JSComps: A Vanilla JS components' package
Tags: npm, cli, components, javascript
Published: 2020-01-20 15:34:43

Hello everyone, check out my newest npm package JSComps.

JSComps helps you chunk Vanilla JS into small and scalable components, with the ability to watch for changes on each piece automatically, when any occurs, it combines and minifies them to one output file.

It's available on both npm and yarn:

- https://www.npmjs.com/package/jscomps
- https://yarnpkg.com/en/package/jscomps
  
Help, suggestions and bug reports are very welcomed :D.
Burning ISOs with dd/pv
Tags: linux
Published: 2023-01-06 01:44:06

---
title: Burning ISOs with dd/pv
published: true
date: 2020-01-20 15:23:20 UTC
tags: Linux
canonical_url: https://brandonrozek.com/blog/ddforiso/
---

While there are nice graphical tools like [Etcher](https://www.balena.io/etcher/), what is almost always a constant is the tool `dd`. Therefore, for future reference I’ll just paste the `dd` command I use to make ISO images.

```
sudo dd bs=4M if=image.iso of=/dev/sdX status=progress oflag=sync

```

Alternatively you can use `pv`

```
pv image.iso > /dev/sdX

```
Managing Python Versions with Pyenv
Tags: python
Published: 2023-01-06 01:44:20

---
title: Managing Python Versions with Pyenv
published: true
date: 2020-01-20 14:55:04 UTC
tags: Python
canonical_url: https://brandonrozek.com/blog/pyenv/
---

I wrote previously about [managing python virtual environments](/blog/virtualenv/). Since then, I’ve discovered a software called [Pyenv](https://github.com/pyenv/pyenv) which allows you to not only manage virtual environments but python versions. As someone who likes to develop python programs in his free time, I found this incredibly useful in keeping all my virtual environments in one place and easily upgrading to a more recent version of python.

To install, follow the steps outlined in the [pyenv-istaller](https://github.com/pyenv/pyenv-installer) repository. As of now, it’s a bash script.

## Python Versions

Once it’s installed, we need to download a version of python. To see what’s available,

```
pyenv install --list

```

This will give us a very large list of all the different python versions we can install. Let’s say we want to install vanilla Python version 3.8.1. Then all we do is specify that after the install keyword,

```
pyenv install 3.8.1

```

Now pyenv has a great concept where you can set certain folders to automatically load a specific python version or virtual environment. To set the current directory to use python 3.8.1 by default, run the following command:

```
pyenv local 3.8.1

```

This will then create a file called `.python-version` which contains the text `3.8.1`. To set this globally, just replace `local` with `global`,

```
pyenv global 3.8.1

```

Finally, if you only want to specify a python version for the current shell.

```
pyenv shell 3.8.1

```

## Python Virtual Environments

To create a virtual environment, run the following

```
pyenv virtualenv name

```

This will create a virtual environment called `name` that is bound to the version of Python you have enabled at the current moment.

Once it’s created you can activate it with the following,

```
pyenv activate name

```

You can also use the `local` and `global` pyenv commands to set the current directory or default to be the virtual environment. To do that, all we need to do is replace the python version from above with the environment name

```
pyenv local name

```

With this, you now have a python virtual environment to play with!

## Other useful commands

Which version or virtual environment am I using?

```
pyenv version

```

Which versions or virtual environments are available to me?

```
pyenv versions

```

Which virtual environment or version contains a command I’m looking for? (e.g spyder)

```
pyenv whence executable

```
Storyboard のみで Auto Layout な UIScrollView を動かす w/ Xcode 11
Tags: xcode11, uiscrollview, storyboard, ios
Published: 2020-01-20 14:50:55

---
title: Storyboard のみで Auto Layout な UIScrollView を動かす w/ Xcode 11
published: true
description: 
tags: xcode 11, UIScrollView, storyboard, iOS
---

```
macOS Mojave 10.14
Xcode 11.3
``` 

Xcode 11 の Storyboard で UIScrollView を追加したが単純に追加しただけではエラーが発生しスクロールも行えなかったため原因を調査した。

### TL;DR

`UIScrollView` にスクロールサイズを教えるため、子要素に `Align` とは別に `width`, `height` の制約を追加する必要がある。

### UIScrollView 追加方法

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/iht3pjqsl6fw8r3vv5rx.png)

`UIScrollView` を追加し、好みの場所へ設置する。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/kypb9k0kcaduyit2v32u.png)

この段階ではスクロール対象のサイズが不明なため `Scrollable Content Size Ambiguity: Has ambiguous scrollable content width (height)` と警告が出される。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/s8rkwmg9htw2per5dhi2.png)

`UIScrollView` に `View` を追加。スクロール対象要素をまとめるコンテナとして使う。今回は `Container` と名前をつけた。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/g5tnjymas2cfblj9pxsr.png)

`Container` のサイズを調整する。この際**対象が必ず `Super View (Scroll View)`, もしくは `Content Layout Guide` になっているか確認**する。 `Frame Layout Guide` になっていると前述のエラーは解消しない。


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2afrqew3urdgjx1g5om5.png)

`Scroll View` へサイズを伝えるため `Container` の `height`, `width` の制約を追加する。サイズを伝える以外に特に意味はないので優先度は `250 (Low)` に設定しておく。

ここまでで一旦スクロールは動作するようになるが、スクロールサイズを `Scroll View` と同じに設定してしまっているためバウンス分しかスクロールできない。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/y654l8bhbeiziblut6ub.png)

スクロール確認用に適当な大きさの `UIImage` を追加して `Container` の `width` 制約を2画面分くらい (今回は 818) 設定。実行すると右までスクロールできる事が確認できる。

### スクロール方向の制限をする

今回の画面では横方向にスクロールしたいだけであって縦方向に反応するのは単純に邪魔なだけなので特定の方向には反応しないように制限を入れる。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2d7mgchegm5yftjvsij9.png)
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/p3ks97smlntm0od4u237.png)

縦方向のスクロールを制限したいので、まず `Container` の height の制約を削除する。そしてヒエラルキーの `Container` を選択し、⌃ キー + ドラッグで `Scroll View` に持っていく。制約のメニューが表示されるので、`Equal Heights` を設定する。
この設定により `Scroll View` のスクロール領域の高さは `Scroll View` と同じ、つまりスクロールの必要がない。という事が伝わりバウンスも含めて縦方向にはスクロールしなくなる。

### 終わりに

`UIScrollView` のスクロール範囲は、恐らく殆どの場合スクリプト側から `UIScrollView.contentSize` で設定することになると思うのでここで書いたようにごちゃごちゃやる事はあまりなさそうだと思った🤔
On.NET Episode: Understanding the Event Processor Host in Azure Event Hubs
Tags: azure, dotnet, messaging, microservices
Published: 2020-01-20 14:48:37

In this episode, [Serkant Karaca](https://twitter.com/KaracaSerkant) and [Shubha Vijayasarathy](https://twitter.com/ShubhaVijaya) from the Azure Event Hubs team join us to talk about how and when to use the Event Processor Host for Azure Event Hubs in our .NET applications. They'll discuss use cases and cover topics like partitioning, and also show how to use the .NET SDK for Event Hubs.


{% youtube DDDjFQSQyF4 %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [Azure Event Hubs Documentation](https://docs.microsoft.com/en-us/azure/event-hubs?WT.mc_id=ondotnet-devto-cephilli)

* [GitHub repo with samples](https://github.com/Azure/azure-event-hubs/tree/master/samples/DotNet/Microsoft.Azure.EventHubs?WT.mc_id=ondotnet-devto-cephilli)

* [Reliable messaging for Big Data applications with Azure Event Hubs](https://docs.microsoft.com/en-us/learn/modules/enable-reliable-messaging-for-big-data-apps-using-event-hubs?WT.mc_id=ondotnet-devto-cephilli)

* [Choose between Azure messaging services](https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services?WT.mc_id=ondotnet-devto-cephilli)

* [Azure IoT Documentation](https://docs.microsoft.com/en-us/azure/iot-hub?WT.mc_id=ondotnet-devto-cephilli)

* [Send or receive events from Azure Event Hubs using .NET Core](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-dotnet-standard-getstarted-send?WT.mc_id=ondotnet-devto-cephilli)

* [Microsoft.Azure.EventHubs NuGet package](https://www.nuget.org/packages/Microsoft.Azure.EventHubs?WT.mc_id=ondotnet-devto-cephilli)