teleren/devto huggingface dataset:
Containerizing your dev environment
Tags: vscode, docker
Published: 2020-10-29 21:38:49

---
title: Containerizing your dev environment
published: true
date: 2020-10-27 00:00:00 UTC
tags: vscode, docker
canonical_url: https://pnodseth.dev/posts/containerizing-your-dev-environment/
---

A couple of weeks ago I listened to another great episode of the [BartJS podcast](https://bartjs.io/tag/podcast-episode/) where containerization was discussed, spesifically containerization of your development environment. When visiting their homepage now I couldn't find the episode in their overview, but here's a direct link: [Remote - Containers i VSCode - Droplet 6](https://pca.st/00mfkulv). I definately got curious about it, and so the last couple of days I've been trying it out for myself.

Containerizing your dev environment means you would create an isolated environment for your source code to run in. If you are a team working on the same repo, this would mean you'd all work in the exact same environment. No more "but it works on my machine". Another benefit is that you don’t have to “pollute” your own file system with all kinds of tools and extensions. They are only installed in this isolated environment.

I borred this description which explains it in an easy to understand way:

> - Develop with a consistent, easily reproducible toolchain on the same operating system you deploy to.
> - Quickly swap between different, isolated development environments and safely make updates without worrying about impacting your local machine.
> - Make it easy for new team members / contributors to get up and running in a consistent development environment.
> - Try out new technologies or clone a copy of a code base without impacting your local setup.

## Getting up and running in VS Code

So I gave it a go, and I’m impressed at how easy it is to get up and running in VS Code. You install the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Then you create a devcontainer/devcontainer.json file in your repo. This is the file VS Code looks for, which has the settings for which extensions to install etc. Also, you need a Dockerfile containing the “recipe” for the Container creation (which files to copy, what commands to run etc). If you are familiar with Docker you've definately written a Dockerfile before. If not, Docker has a great tutorial [here](https://www.docker.com/101-tutorial)

Once you've done this you're basically all set and it's just a couple of clicks to get the container up and running.

## Will I start containerizing my dev projects?

The short answer - no. I haven't felt too much on any of the pain points this workflow solves - yet. But this might change. I can definately see why this would appeal to some projects and teams. The idea of having a "cleaner" file system is also somewhat appealing. Let's say I would want to try Rust. I download a repo, spin up a container and install Rust in that container - keeping my local filesystem untouched. Mmm!
I am an open source developer
Tags: opensource, development, philosophy
Published: 2020-10-28 02:52:44

---
title: I am an open source developer
published: true
date: 2020-10-27 00:00:00 UTC
tags: opensource, development, philosophy
canonical_url: https://www.lifewaza.com/posts/i-am-an-open-source-developer/
---

I’m an open source developer. What does that mean to me?

## Prefer open source software

I always prefer open source software. If no open source software exists to do what I’m trying to do, see the next point.

## If the software doesn’t exist, create it

If there’s no software available to do what I’m trying to do, it’s my job to create it.

## Contribute to open source software

If I use open source software and find a way to improve that software, or fix a bug, it’s my job to improve it.

These statements are aspirational, not absolute. There are always exceptions and I’m not going to spend my life worrying about what piece of not free software I used today.
Happy Hacktoberfest
Published: 2020-11-05 19:23:38

---
title: Happy Hacktoberfest
published: True
date: 2020-10-27 00:00:00 UTC
tags: 
canonical_url: https://relay.sh/blog/happy-hacktoberfest/
---

 ![](https://relay.sh/static/8eec6bb8ea6610675dd542eff8dce071/6050d/happy-hacktoberfest-cover.png)

Happy Halloween! ‘Tis the spooky season and this year, we are kicking off a Hacktoberfest challenge just in time for Halloween. All you have to do for this Hacktoberfest challenge is run a workflow and fill out a brief survey about Relay.

In return we’ll send you a great Relay-themed t-shirt, inspired by the upcoming game, Cyberpunk 2077. The first 75 respondents will get a free t-shirt. We can confidently promise it won’t be as delayed as Cyberpunk. Sadly, we can only offer this shirt to those people living in the continental USA.

As you may already know, Relay (by Puppet) is an event-driven automation platform that pulls together all the tools and technologies DevOps engineers need to effectively manage their environment. It works by listening to signals from DevOps tools and apps people already use and then triggers workflows to orchestrate any required downstream service.

## Here’s what you need to do to get your free t-shirt:

#### 1. Sign up or login to Relay

If you don’t already have an account you can [create one for free](https://app.relay.sh/signup).

[![Sign up for a Relay account](https://relay.sh/static/4507895c48543c9eea88580d958dad51/ee2da/happy-hacktoberfest-1.png "Sign up for a Relay account")](https://relay.sh/static/4507895c48543c9eea88580d958dad51/ee2da/happy-hacktoberfest-1.png)

#### 2. Run [this workflow](https://app.relay.sh/create-workflow?workflowName=get-free-t-shirt&initialContentURL=https://gist.githubusercontent.com/kenazk/9a55d33e54b3dd5bd05376f853d49ac2/raw/b7d6ee66eb2ac5a8d24621fc7a900a4cb38d0358/workflow.yaml)!

Install the workflow and then click the run button.

[![Run the newly installed workflow](https://relay.sh/static/e45ce00bb2fd7748b93d57d7018c230f/ee2da/happy-hacktoberfest-2.png "Run the newly installed workflow")](https://relay.sh/static/e45ce00bb2fd7748b93d57d7018c230f/ee2da/happy-hacktoberfest-2.png)

#### 3. Click the “View Logs” button

In the logs you will find the URL for the survey. Head there to get started.

[![View the logs to get the url for the survey](https://relay.sh/static/e389d59779d51cacd243504b2fb71007/ee2da/happy-hacktoberfest-3.png "View the logs to get the url for the survey")](https://relay.sh/static/e389d59779d51cacd243504b2fb71007/ee2da/happy-hacktoberfest-3.png)

#### 4. Fill out the survey

This should only take a few minutes.

#### 5. We’ll send you a t-shirt!

Thanks for making our product really special and please see this as a thank you for your continued support.
Downloading recent Instagram photos using instascrape and Python
Tags: python, webscraping, showdev, contributorswanted
Published: 2020-10-26 23:22:18

In this post, I'm going to show you how to download a user's recent Instagram photos programatically using the expressive and lightweight [_`instascrape`_](https://github.com/chris-greening/instascrape) library in 3 easy steps!

# :eyes: Loading the profile  

To start, we will use [`instascrape.Profile`](https://github.com/chris-greening/instascrape/blob/master/instascrape/scrapers/profile.py#L10) to load an Instagram profile's necessary data (for this example, we'll use my page [@chris_greening](https://www.instagram.com/chris_greening/).

```python
from instascrape import Profile 
chris = Profile('chris_greening')
chris.scrape()
```

# :watch: Getting the recent posts

From this `Profile` object, we can now get a `list` of [`instascrape.Post`](https://github.com/chris-greening/instascrape/blob/master/instascrape/scrapers/post.py) objects and filter them so that we don't download any videos 

```python
recents = chris.get_recent_posts()
chris_photos = [post for post in recents if not post.is_video]
```

# :computer: Downloading the images

And now the moment we've all been waiting for! `instascrape.Post` provides the `download` method which takes a filepath string as an argument to download our image to. 

We're going to loop through all of the `Post` instances in `chris_photos` and create a unique filename based on its datetime stored in `upload_date` (i.e. `"2020-09-09 10h24m.png"`).  

```python
for post in chris_photos: 
    fname = post.upload_date.strftime("%Y-%m-%d %Hh%Mm")
    post.download(f"{fname}.png")
```

# :camera: The result

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tw3gxfb1lkqqs6xilf9j.png)

It's as easy as that! 

If you want to learn more about `instascrape`, check out some of my other posts 

{% link https://dev.to/chrisgreening/visualizing-instagram-engagement-with-instascrape-326h %}
{% link https://dev.to/chrisgreening/visualizing-the-relationship-between-instagram-variables-using-python-55gg %}

or better yet, come on over to the official repo and leave it a star! I'm always looking for new contributors :smile:.

{% github chris-greening/instascrape %}
One simple switch to improve your life
Tags: nightmode, nighttime, nightshift
Published: 2020-10-26 22:48:50

---
title: One simple switch to improve your life
published: true
description: Improve your sleep, get fewer headaches and keep your eyesight
tags: nightmode,nighttime,nightshift
cover_image: https://unsplash.com/photos/7mLRzf7xWKM/download?force=true&w=1920
---

I am going to keep it brief and to the point. If you want to get better sleep, better eyesight, and fewer headaches then reduce the amount of [blue light](https://blutechlenses.com/blog/what-is-blue-light/) on your screen. Most devices these days come with the ability to reduce their blue light emission. Below are ways to turn them on a Mac and Windows.

[How to turn on `night shift` on a Mac](https://support.apple.com/guide/mac-help/use-night-shift-mchl97bc676d/mac#:~:text=a%20darkened%20room.-,On%20your%20Mac%2C%20choose%20Apple%20menu%20%3E%20System%20Preferences%2C%20click,Displays%2C%20then%20click%20Night%20Shift.&text=Select%20Manual%20to%20turn%20on,turn%20it%20off%2C%20deselect%20Manual.)

[How to turn on `night time` in Windows 10](https://support.microsoft.com/en-us/windows/set-your-display-for-night-time-in-windows-10-18fe903a-e0a1-8326-4c68-fd23d7aaf136)
Drawing a snowy scene in CSS
Tags: css, art, codepen, showdev
Published: 2020-10-26 22:24:02

---
title: Drawing a snowy scene in CSS
published: true
description: Coded a small scene of a person drinking coffee with snowy mountains in the background... this is the video of how it was done.
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/k8hgpvvpyc4clygldz54.png
tags: css,art,codepen,showdev
---

Inspired by "<a href="https://dribbble.com/shots/14424505-Winter-Outfits-Vector-Illustration">Winter Outfits - Vector Illustration</a>" by <a href="https://dribbble.com/koorniaz">Hadi Kurnia</a> on Dribbble... I liked the idea of doing something like that, then built if from scratch inspired by that illustration.

{% codepen https://codepen.io/alvaromontoro/pen/MWeJxZy %}

And I uploaded a [video on how it was done](https://www.youtube.com/watch?v=PkOK-bYMlN8) to Youtube. It took a bit hover 1 hour, but the video is only ~3 minutes at 20x:

{% youtube PkOK-bYMlN8 %}
"You're doing it wrong"
Tags: agile, scrum
Published: 2020-10-26 22:19:43

How often do we hear or read that phrase, when discussing how adopting an Agile approach hasn't quite worked as advertised for a team?


Very often.  


**"You're doing it wrong."**


The implication being that someone has missed a complex, subtle piece of Agile Lore that means, obviously, that their processes are not delivering the goods.

The thing is, the second part of that conversation, where we learn How To Do It Right, is often vague or lost in the emotional compost of online commentary.


##You're welcome

To remedy that for the whole world, I'm going to offer some insight and advice from my many years on projects that often didn't quite do-it-right. 

Let's talk specifically about your imaginary team adopting Scrum, as it's what many of us know best.


##Sometimes, doing it 100% right is not going to happen.

At the risk of being cast into the exterior darkness by the Scrum zealots, I will say that with Scrum methodology, you can lead the horse to water, but you cannot force it to contribute thoughtful feedback during the retrospective.

Humans behaving as they do, if they don't fancy playing your silly planning-poker game every second Tuesday, they won't.  

Or, they can't split their demands down to Sprint deliverables because actually, it *is* a big piece of work and they're not here to play with Jira all day.  

The Boss cares in principal, usually, but in practice maybe not enough to back you with incentives to get people to follow the new process.  You risk becoming a martyr to a methodology.

##The Burnt-out Remains of Scrum

Usually, the daily standup survives, as it has obvious teamwork benefits for the cost of 15 minutes.  

But after weeks of half hearted estimation and missed goals, your sprint planning ends up being 50% rolling over demands and 50% scoping new ones.

The retrospectives write themselves, which is lucky, because no post-it notes are appearing on your sailing boat any more.

Teams run like this and still deliver software regularly.  In fact in many large organisations, this is normal.  The nature of the team, or the product, the support environment; all contribute.

It is quite depressing though and it's not how the online Scrum training said it would be.  We're not seeing much upside.


##Why is this happening?

(It's because you are doing it wrong.)

At this point, I'd usually nominate someone else in the team to take over as Scrum Master.

Seriously though, the way out of this swamp is not through more vigorous flogging of the horse.

We need now to identify what the problems are, not with the adherence to the methodology, but with the quality of what the team delivers, how the team interacts and how the team plans work.

Once that's been done honestly, you might choose to revisit how you implement the Scrum adoption, or you might not.

I'll describe some ways out of this maze next time.
How to debug failing tests in jest
Tags: javascript, jest, node, beginners
Published: 2020-10-26 22:05:52

---
title: How to debug failing tests in jest
published: true
description: Debugging failing tests in jest
tags: javascript,jest,node,beginner
cover_image: https://jestjs.io/img/opengraph.png
---

### TL;DR
```javascript
node inspect ./node_modules/jest/bin/jest.js --t 'test description text' --runInBand
```

Quick tip for debugging failing tests with jest
If you already know why would you want to run tests with the debugger you can skip the next paragraph

## Why run a test with a debugger

If you run a test with the debugger you can use the *debugger* keyword inside your test or code to see what's happening and why the test is failing, if you don't know how to use the debugger you can read this article <a href="https://dev.to/____marcell/debugging-node-applications-4e07" alt="debug-node">debugging node applicatoins</a>

## How to run a single test with the debugger
In order to debug a specific test you going to need to

* run only the failing test
* run the test in the same node process
* run jest with the node debugger

So let's go over each step

## Running only the failing test
To run only one test you going to need two things
* run only one test file
* use the keyword *only* to skip all other tests in that file

So let's say you have a test case with the description 'this is the falling test', to run only that test case you need to run jest with the *-t* option
```javascript
jest -t 'this is the failing test'
```

now you're running only the test case that you need to debug
```javascript
// a lot of other tests above
...
test.only("this is the failing test :(", () => {
....
...
// a lot of other tests below
```

## Run the test in the same process
Jest run tests in parallel to make the test suit faster, but this makes debugging impossible since the test could be running in another spawn process, in order to run the test with just one process you have to use the option *--runInBand* 
```javascript
jest -t 'failling test' --runInBand
```
## Run jest with the node debugger
Now for the final part you just need to run jest with the debugger, since you can pass the debugger option after calling the program executable you going to need to find the executable installed in your process and run it manually with node, the good part is that it's always in the same place, assuming in are in the root folder of your project it should be in *./node_modules/jest/bin/jest.js* 
now the whole command
```javascript
node inspect ./node_modules/jest/bin/jest.js -t 'failling test' --runInBand
```
and that's about it.
Do you like these Five Minute challenges?
Tags: challenges, zim, zimjs, amazing
Published: 2020-10-26 21:46:07

These [short videos](https://www.youtube.com/watch?v=5Xj8IBd-7E8&list=PLCIzupgRt1pbdu4nqdoMw4TuVRXAqaLXJ) are a great way to see what can be done in Five Minutes with ZIM!  [ZIM](https://zimjs.com) is a JavaScript Canvas Framework to code creativity!

{% youtube 5Xj8IBd-7E8 %}

If you have any questions, please join is on [Slack](https://zimjs.com/slack) - hope to see you there!

---

If you have not checked out the Canvas recently - you simply must!  Here is the [ZIM&nbsp;Dev&nbsp;Site](https://dev.zimjs.com) and some [In-depth&nbsp;Guides](https://drabstract.medium.com/) by Dr&nbsp;Abstract including [Your Guide to Coding Creativity on the Canvas](https://drabstract.medium.com/your-guide-to-coding-creativity-on-the-canvas-ada0996298f6).
Day 242: Barbecues and back yards
Tags: hiphop, code, coding, lifelongdev
Published: 2020-10-26 21:32:13

_liner notes_:
- Saturday : This weekend flew by so quickly! Only thing I really member is doing the radio show and have a good time. haha The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show image of two idiots in a music video holding envelopes that were caught committing fraud and stealing a million dollars meant to help people during the pandemic.](https://dev-to-uploads.s3.amazonaws.com/i/ti7gkdl4p0v1gg3kre5f.jpg)

- Sunday : Did my laundry and worked a little on the draft for my next blog post. Worked on the radio show a little. Did some light coding as well.

- Professional : Finally got my blog post submitted for review. Put a lot of work into it. Got to do a livestream with some of my team members. That was cool. Had another meeting with another team. Pretty good day. Not too much coding though.

- Personal : So, over the weekend, I found out that the map on one of my side projects stopped showing up. Turns out the people providing the images for the maps made a change. Since then on newer projects, I've pretty much found another way to display maps without using the people I previously used. So, I thought all I had to do was change a URL and everything would be good. Well, no, not exactly. haha I was right that I just needed to change a URL, but I had to update some other libraries and turns out I built the project in a Docker container and had to do some things with that. Long story short, it took longer than I imagined. haha.

![Star filled night sky above Silverthorne, CO, United States](https://dev-to-uploads.s3.amazonaws.com/i/x179mt8e71m6g6wwil89.png)

Going to spend some time filling out my mail in ballot. There's quite a few things that I want to research first. This stuff is really serious. After that, maybe work on a side project. Played a song on the show called "Barbecues and back yards" and it reminded me that Summer is basically over and due to the pandemic how BBQs basically didn't happen for the most part. Weird times.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube t2uSBKKxCFw %}
Final week of Hacktoberfest!
Tags: hacktoberfest, opensource
Published: 2020-10-26 21:28:26

---
title: Final week of Hacktoberfest!
published: true
description: If you're participating in Hacktoberfest, don't forget to submit those pull requests by October 31st!
tags: hacktoberfest, opensource
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/2ph1gpihx5yvew74givp.png
---

If you're participating in [Hacktoberfest](https://dev.to/devteam/happy-hacktoberfest-here-s-how-to-show-up-for-open-source-this-month-4cee) this month, don't forget that **this is the final week to get those pull-requests in!**

It's been amazing to watch the community come together and expand this past month in the name of open source software. We've been reading contributors' stories, eyeing maintainers' projects, reviewing some [truly awesome Forem contributions](https://dev.to/devteam/hacktoberfest-week-five-thank-you-to-our-contributors-on-forem-3l82), and dreaming about all those trees planted 💚  In other words, we don't want this month to end!

As we head into the final moments of this group celebration of open source, be sure to check out [this thread](https://dev.to/devteam/whos-looking-for-collaborators-hacktoberfest-2020-jl89) of projects seeking contributors if you're on the hunt, seek out any help you need [here](https://dev.to/devteam/hacktoberfest-2020-help-discussion-thread-31aj), and catch our Hacktoberfest streams featuring the Forem team and guests from the community. Details below.

### Hacktoberfest streams with Forem this week 
- **Monday, October 26th (past event)** — Weekly Gratitude Stream where we give shoutouts to those who contributed to Forem's codebase. Replay [here](https://www.twitch.tv/videos/782534221). 
- **Tuesday, October 27th @ 11 AM ET/3 PM UTC** — Raise.dev Hacktoberfest Helpdesk with @nickytonline and @coffeecraftcode, featuring an accessibility challenge!
- **Thursday, October 29th @ 1 PM ET/5 PM UTC** — DEV community member @shriyash joins Nick and Christina to work on an open Forem issue.
- **Friday, October 30th @ 1 PM ET/5 PM UTC** — @levisharpe joins the crew in a discussion about podcasting and what he does as podcast producer here at Forem.

_Catch them all on [Twitch](https://www.twitch.tv/thepracticaldev)! Don't forget to follow us there to be notified when streams kick off._ 

**We also encourage all participants to share their Hacktoberfest reflections, achievements, contributions, and plans for the future with all of us on DEV. Check out [this handy template](https://dev.to/new/hacktoberfest) which you can modify however you want.**

Cheers! 🎃  

![Open Sign](https://media.giphy.com/media/XB3gaBJjllUtBnX8wS/giphy.gif)