teleren/devto huggingface dataset:
Getting Started Blogging 
Published: 2019-06-28 04:04:18

I recently started a new job and have been working hard at learning some new JS frameworks.  I started a project after taking some classes and wanted to start writing blog posts about the experience.  The thing that I found was that getting started with the first blog post was difficult.  I ran into stumbling blocks along the way and that has prevented me from reaching my goal.  I'd like to share those stumbling blocks and what I did to get past them here.

Getting started with what I imagined my first blog post would be didn't seem very difficult at the time.  I started by documenting the steps I took and before I knew it I had a whole list of steps on how to repeat what I had done.  A blog post this was not.  I read over the steps multiple times and thought to myself that this would get someone to the same point I currently was, but didn't include any actual information about why I chose the route I did.  I also realized that the list of steps would quickly become outdated and then it would be less useful to the reader.

A decision needed to be made.  I needed to expand on the information I was providing and I was uncertain about how to move forward.  It felt so overwhelmed that I gave up.  This was the end of my first attempt at blogging about my learning experience and it had ended almost as quickly as it had started.

One issue I encountered here was that I had the expectation that I could just sit down and instantly be a tech blogger.  This assumption was so totally not correct.  As a coworker mentioned today these things take practice.  This issue is being worked on by writing this blog post!  It is the beginning of my practice.  Hopefully with time I will get better at the process.

Another issue I noticed after my session with my coworker was that I needed to have some thoughts about what it was that I intended to convey.  In my first shot at this, I thought the only thing that was important was documenting the steps I took.  While this could have some use, I think it's the why behind the steps that is equally if not more important.  I needed to spend a little time on what I wanted my post's message to be.  This was something I put some time into today with this post.  The idea here is not just to document that the process was hard and oh noes I quit and can't move forward.  It was also to document the issues and to provide a story about how I learned from the process and what I can do to make things better for the next round.

So, I will end this post here.  The issues have been overcome and I have a post now.  Coming soon will be posts on how I went about creating my latest project.
What is this "problem-solving", and how do you do it?
Tags: productivity, programming
Published: 2019-06-28 04:03:15

---
title: What is this "problem-solving", and how do you do it?
published: true
description: 
tags: productivity, programming,
---


**1. Bigger tasks always depend on a number of smaller ones.**

**2. Completing smaller tasks enables you to progress to the next problem.**

**3. Knowing how to identify what next problem to solve should be.**
Running Enterprise Builds in the Cloud
Tags: cloud, ci, continuousdelivery
Published: 2019-07-05 03:38:42

---
title: Running Enterprise Builds in the Cloud
published: true
tags: cloud, continuous integration, continuous delivery
canonical_url: https://tryexceptpass.org/article/continuous-builds-2/
cover_image: https://tryexceptpass.org/images/continuous-builds-cloud.jpg
---

There are many solutions to building code, some of them are available as cloud services, others run on your own infrastructure, on private clouds or all of the above. They make it easy to create custom pipelines, as well as simple testing and packaging solutions. Some even offer open source feature-limited “community editions” to download and run on-premises for free.

Following is my experience on the important aspects to consider when deciding on a build system for your organization that depends on cloud services. The original intent was to include a detailed review of various online solutions, but I decided to leave that for another time. Instead, I’m speaking more from an enterprise viewpoint, which is closer to reality in a large organization than the usual how-to’s. We’re here to discuss the implications and the practicality of doing so.

[Read on ...](https://tryexceptpass.org/article/continuous-builds-2/)
EP18 - The Repercussions of Online Actions.
Published: 2019-07-15 11:38:10

---
title: EP18 - The Repercussions of Online Actions.
published: true
tags: 
canonical_url: https://anchor.fm/code-cast-zm/episodes/EP18---The-Repercussions-of-Online-Actions-e4eqgl
---

In the news, we talk about Facebook's announcement of Libra, the Cypto-Currency (If at all it can be described as such) it believes the world needs right now. We highlight what we feel are the public's' biggest things we enjoy and are skeptical about.

Also in the news, E3 releases and announcements may convince you to not move to Google Stadia, value for money in this economy is a big factor in making the choice. Plus, Google announces base price for Stadia.

On this weeks episode, we are joined by Freddie, he gives us the low down on what the law says about what we can and cannot maybe do online. YouTube recently made headlines because of how easy its algorithm makes it easy for pedophiles to find minors on its platform,

We discuss whose responsibility it is to punish cyberbullies and whether Zambian law covers the platform or the User. We talk about defamation and ask whether we are making progress with Cyber laws in Zambia and Africa.

**Links to Articles:**

- [**Libra**](https://libra.org/en-US/)
- [**E3 Announcements**](https://live.e3expo.com/)
- [**YouTube Algorithm**](http://social.colostate.edu/2019/04/02/youtube-algorithm/)
- [**Zambian Law**](https://zambialii.org/)
- [**Section 230 of the Decency Act**](https://www.minclaw.com/legal-resource-center/what-is-section-230-of-the-communication-decency-act-cda/)

Leave us a review on[<u><strong>iTunes</strong></u>](https://podcasts.apple.com/us/podcast/codecast-zambia/id1442693166?mt=2) to let us know what you think about the show.   

--- Send in a voice message: https://anchor.fm/code-cast-zm/message
JavaScript: Microtasks e Macrotasks
Tags: ptbr, javascript, node, webdev
Published: 2019-06-28 03:10:47

## Duas histórias no mesmo Event Loop e suas prioridades

Dentro do Event Loop do JavaScript/Node.js, existem dois tipos de tarefas com prioridades bem diferentes, por exemplo:

- **Microtasks**: process.nextTick, Promises, Object.observe, MutationObserver
- **Macrotasks**: setTimeout, setInterval, setImmediate, requestAnimationFrame, I/O, UI rendering

Mas qual a diferença prática entre os dois? Podemos resumir na seguinte afirmação:

Se alguma Microtask estiver pendente na fila para o Event Loop, ela será executada antes do início do próximo loop (no final do loop atual). Já as Macrotask serão executadas apenas no próximo loop.

Essa definição é importante, pois o resultado de algumas operações podem surpreender os não familiarizados com a engine do JavaScript.

Com isso em mente, qual será o resultado do trecho de código abaixo?

```js
console.log('01-Console');

setTimeout(_ => console.log('02-Timeout'), 0);

Promise.resolve().then(_ => console.log('03-Promise'));

console.log('04-Console');
```

Antes de olhar a resposta abaixo, você consegue imaginar a saída desse programa?

![](https://thepracticaldev.s3.amazonaws.com/i/zsqcrlgv3pohehki6ndq.jpg)
_Uma hora ou outra precisamos saber a resposta…_

Ao executar o trecho acima, teremos o seguinte resultado:

```bash
$ node tasks.js

01-Console
04-Console
03-Promise
02-Timeout
```

Colocando algumas anotações no código, temos:

```js
console.log('01-Console'); // [A]

setTimeout(_ => console.log('02-Timeout'), 0); // [B]

Promise.resolve().then(_ => console.log('03-Promise')); // [C]

console.log('04-Console'); // [D]
```

- **[A]**: Executado diretamente na “main thread”, síncrono
- **[B]**: Enfileirado como uma tarefa futura, prioridade “macrotask”, será executado apenas no próximo loop
- **[C]**: Enfileirado como uma tarefa futura, prioridade “microtask”, será executado imediatamente após todas as tarefas/tasks do loop atual e antes do próximo loop
- **[D]**: Executado diretamente na “main thread”, síncrono

---

📚 Links Relacionados

- https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/
- https://blog.risingstack.com/node-js-at-scale-understanding-node-js-event-loop/
- https://javascript.info/microtask-queue
- https://github.com/nodejs/node/issues/22257
- https://stackoverflow.com/questions/25915634/difference-between-microtask-and-macrotask-within-an-event-loop-context
Introducing Mongoosejs-cli: Generate models, migrations and seeders for mongoosejs right from your terminal
Tags: opensource, mongodb, npm, javascript
Published: 2019-06-28 02:53:52

##My first article and first npm/yarn package ever!

I am new to mongodb especially with nodejs. In my pursuit of learning mongodb with nodejs, i came across a tool called Mongoosejs(mongoose) which helps devs work with mongodb with ease. My [repl.it page] (https://repl.it/@waptik/mongoose-test) is where i started practicing mongodb and mongoose for the first time. It includes tutorials i followed on [MDN by Mozilla] (https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose).

When i used to play mysql and nodejs, i usually use [Sequelize](https://github.com/sequelize/sequelize) and its [cli](https://github.com/sequelize/cli), so i was looking for a similar cli for mongoose. I did some search on the internet and i found these https://gist.github.com/waptik/c7557d7ac1f7ba2c3a6b589ee30b2ec5 . Most of them either don't have a configuration file or are not maintained or do just one thing(migration/seed).

I said to myself, why not build something of my own that will solve my problem? I went back to sequelize-cli github page, cloned the repo, started playing around with things and that's how [Mongoosejs-cli] (https://github.com/waptik/mongoose-cli) was born. I also launched it on [Product Hunt](https://www.producthunt.com/posts/mongoosejs-cli) .

If you use mongodb with nodejs or mongoosejs, kindly give it a try and lemme know what your thoughts are.

Thanks :smile:
A practical use case for a JavaScript Proxy
Tags: javascript, webdev
Published: 2019-07-07 06:58:47

---
title: A practical use case for a JavaScript Proxy
published: false
tags: javascript, webdev
canonical_url: https://larsgraubner.com/javascript-proxy/
published: true
---

When JavaScript Proxies were introduced I was excited. It sounded like a nice feature, but after all I was lacking any practical use cases. Until now! Some days ago I was refactoring some code and came across an object which had upper cased keys for it’s content. I really wanted to make them lower case for consistency, but those keys also exist on users devices local state. So just changing them in the codebase would break it for them. To switch to lower case keys anyways I remembered JavaScript Proxy.

With [JavaScript Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) you can hook into objects getter and setter mechanism. So my idea was to make an Proxy to access object values with case insensitive keys. That’s actually really ease to implement:

```javascript
function caseInsensitive(target) {
  return new Proxy(target, {
    get: (obj, key) => obj[key.toLowerCase()]
    set: (obj, key, value) => {
      obj[key.toLowerCase()] = value
      // required, see https://lrs.link/proxy
      return true
    }
  });
}
```

As you can see the getters and setters just lower case any key used to access the object. This way all of the following works:

```javascript
const animals = caseInsensitive({
  species: 'monkey'
})

animals['SPECIES'] // monkey

animals['SpEcIeS'] = 'giraffe'
animals['species']// giraffe
```

Simple, but effective this suits my needs. Finally I can say I have used JavaScript proxies to solve a problem. If you know any other use cases let me know in the comments!
A VS Code Extension for Managing Profiles
Tags: vscode, opensource, showdev, productivity
Published: 2019-06-28 03:49:25

---
title: A VS Code Extension for Managing Profiles
published: true
tags: vscode, opensource, showdev, productivity
canonical_url: https://www.aaron-powell.com/posts/2019-06-28-vscode-extension-for-managing-profiles/
---

Part of my job as a Cloud Developer Advocate is to present, whether that is at a lunch and learn session, a user group, a conference or a screen cast. One thing that’s become second nature to me with presenting is tweaking my editor font size, theme, etc. so that it is optimal for the audience. But this becomes a bit tedious, because I then have to go back and undo all my changes again and the constant change back and forth is annoying.

So with that I decided to create an [extension for VS Code](https://code.visualstudio.com/api/get-started/your-first-extension?wt.mc_id=devto-blog-aapowell) called [Profile Switcher](https://marketplace.visualstudio.com/items?itemName=aaronpowell.vscode-profile-switcher).

![Profile Switcher in action](https://www.aaron-powell.com/images/vscode-profile-switcher-demo.gif)

## How It Works

When you save a profile with the extension it will create a copy of the `settings.json` file that exists for your user (on Windows this is `%APPDATA%\Roaming\Code\User\settings.json`) and then store it in the `settings.json` file in settings property that the extension knows about.

_Side note: It doesn’t clone the extension settings, just everything else, wouldn’t want you to have recursive settings saved!_ 🤣

Then when you load the a profile it will merge your current `settings.json` with the previously saved one, updating the properties that are different (and not touching the ones that didn’t change). Because it updates your user `settings.json` all open VS Code instances will have the changes applied, handy if you’re running demos across multiple VS Code instances!

A nifty side-effect of how this works is that if you’re using the [Settings Sync extension](https://dev.to/scottw/vscode-settings-sync-4d27) your profiles will be synchronised with that, so when you jump between machines you can bring your profiles along with you!

This also means that it’s not just for presenting, it’s for any scenario where you might want to quickly jump between settings changes in VS Code.

## Conclusion

I hope you find this extension useful and I’ve love to get some feedback on what it could also be used for. I’ve made the code available [on GitHub](https://github.com/aaronpowell/vscode-profile-switcher) so you can create an issue for me or propose an update. 😁

{% github aaronpowell/vscode-profile-switcher %}
NPM Angular
Tags: npm
Published: 2019-06-28 01:22:57

Help, when execute ng serve, achive:

Cannot find module '@angular/compiler-cli/ngcc'
Error: Cannot find module '@angular/compiler-cli/ngcc'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\CatalinaSofiaOrozcoS\Documents\OldMutual\menucontextual\fuentes\node_modules\@ngtools\webpack\src\ngcc_processor.js:10:16)16)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)                                                                                                     in.js:23:26)    at Object.<anonymous> (C:\Users\CatalinaSofiaOrozcoS\Documents\OldMutual\menucontextual\fuentes\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:23:26)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\CatalinaSofiaOrozcoS\Documents\OldMutual\menucontextual\fuentes\node_modules\@ngtools\webpack\src\index.js:13:10)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
How we shifted our testing left with helm test and Cypress
Tags: testing, kubernetes, webdev
Published: 2019-06-28 00:51:42

We had a problem. Our development was seriously outpacing our testing velocity and our testers just didn't have time to do really good regressions. This of course led to bugs sneaking out the door and affecting our production users. We needed to change so we decided to take some of our development capacity and use it to create automated tests to lessen the burden on our QA. 

This is where Cypress comes in.  If  you're not familiar [Cypress](https://www.cypress.io/) is an absolutely amazing testing tool that lets developers write tests in javascript without the headache of existing tools like Selenium or Ranorex.  I won't get into the advantages in this post but after trying out Cypress we've decided to rewrite our entire testing suite in it.  After about a sprint we had a core regression test implemented(our app is not super large so neither is our core regression).  We ended up with somewhere around 30 tests that ran in less than 2 minutes.

Here is where things start to get interesting. Cypress publishes [base docker images](https://github.com/cypress-io/cypress-docker-images) and we started building on top of them with our cypress tests. We did the containerization in the same Jenkin's pipeline as our main app to ensure that our application and its tests stayed in sync.  Both test and application image were then pushed to our artifactory and tagged with the version number.  

We use Kubernetes to orchestrate our environments and Helm to manage the kubernetes configuration.  Helm has an awesome feature called [Helm Tests](https://helm.sh/docs/developing_charts/#a-breakdown-of-the-helm-test-hooks) that allows a test image to be run for a chart and its status reported back. We configured our helm charts to use the test image and we were all set to run our cypress tests with the helm test command.

The final result of all this is a set of automated regression tests that run on every release to every environment. Any failure in our helm tests is reported as a failure of the deploy. This gives our QA team confidence that before they even get to feature testing the new image has passed the baseline regression checks. We have a saying "If you aint breaking, you aint building".  Bugs are inevitable but now we are able to catch them before QA spends any effort and they can concentrate on feature testing which is where we provide value to our users. 

Moving forward we plan on expanding our test suite to include more of our edge cases.  As our QA finds bugs manually we'd like to incorporate them so they won't get missed again. Additionally we've considered running the tests suite against production periodically as a health check to let us catch issues before users find them.
At Campus Movie Fest ... Making a game
Tags: gamedev, devlog, gdevelop, opensource
Published: 2019-06-28 01:07:51

---
title: At Campus Movie Fest ... Making a game
published: true
tags: gamedev, devlog, gdevelop, opensource
canonical_url: https://triptych.writeas.com/at-campus-movie-fest?pk_campaign=rss-feed
---

![](https://i.snap.as/ALASQNu.png)

# At Campus Movie Fest ... Making a game

I'm in Atlanta for 🎬 #campusmoviefest while my daughter and her friend get to check out cool sessions on movie making and present their short films. But, I get to work on my side projects. For some reason I'm gravitating toward 🎮[GDevelop](https://gdevelop-app.com/). It seems like such a good fit for me – as it's close to my javascript heart for games, while also being easy to code for. The UI is still kinda ... rough in some ways, but it's still very usable. What gets me is that the games that I've seen made for this engine are so fast. I don't see any framerate drops and the controls seem to be pretty responsive. I don't know about the UI, but there must be some real good things going on under the hood.

If you've not tried it out, I encourage you to check it out and kick the tires. It's both been around for a long time (2008?) but seems new with this latest version 5. It's free and open source, so support it!
Offline Survival Kit
Tags: discuss, help
Published: 2019-06-28 00:21:03

Tomorrow, I'm going offline for 5 weeks. I'll only have access to my laptop and no internet. It'll be very fun, but what kinds of things should I bring with me on my computer?

So far...
- Yarn with some cached packages
- Go and its offline documentation
- Every single XKCD comic
- Spotify music
List AWS Lambda functions not associated with VPC
Tags: lambda, python, aws, devops
Published: 2019-06-27 23:57:15

AWS Lambdas has gained lot of popularity and most of the companies use them today. 

For some of security requirements we might have a need where in you want to pull all lambdas that are not associated to VPC. script below can help you do that.


```
import boto3
from botocore.exceptions import ClientError

client = boto3.client('lambda')
response = client.list_functions()
for function in response['Functions']:
    try:
        response = client.get_function(
            FunctionName=function['FunctionName']
        )
        vpcid = response['Configuration']['VpcConfig']['VpcId']
    except KeyError:
        print("==>" + function['FunctionName'])
    except ClientError as e:
        print("[ERROR] Invoking Lambda Function" + e)
```
What word/phrase do you use to include everyone?
Tags: discuss, inclusion
Published: 2019-06-27 23:29:31

---
title: What word/phrase do you use to include everyone?
published: true
description: A discussion on the best word or phrase to use to ensure everyone is included, apart from the word "everyone".
tags: discuss,inclusion
---
The languages we speak and write in seems inherently biased. For example, to refer to a group of men, there are plenty of words to choose from: lads, gentleman, chaps... etc. The case is similar for women.

What if you want to refer to everyone, without using "everyone"? This may sound like a rhetorical question, but nine times out of ten, I find the alternative people use to do so is "guys". For me, "guys" is another word for referring to a group of men, so when you use that, are you really including everyone?

Speakers of some European languages may argue that by convention, the masculine plural words (like pronouns) are used and meant to refer to everyone in a mixed group. However, I'd beg to differ and claim that it's masculine biasedness and an outdated convention that doesn't seem applicable to the world we live in anymore.

To ensure everyone is truly included, be that in an event or a meeting, what are your alternative choices for referring to a group of people consists of mixed genders?

Some of my favourites (in English) are: y'all, folks, peeps. What are yours?