teleren/devto huggingface dataset:
I've been coding for 20 years, Ask Me Anything!
Tags: ama
Published: 2019-05-16 20:11:46

---
title: I've been coding for 20 years, Ask Me Anything!
published: true
tags: ama
description: My first website was built on GeoCities! I remember the original browser wars! I may or may not belonged to a webring or two.
---

My first website was built on GeoCities! I remember the original browser wars! I may or may not belonged to a webring or two.

I've worked for successful start up's, failed start up's, large companies, freelance, and everything in between.

Today I'm primarily a PHP developer, but I've written code in many different languages using many different tools and philosophies.
Get up to speed with Particle Variable and Function Primitives
Tags: tutorial, iot, cpp, embedded
Published: 2019-05-17 13:20:58

---
title: Get up to speed with Particle Variable and Function Primitives
published: true
tags: tutorial, iot, cpp, embedded
canonical_url: https://blog.particle.io/2019/05/16/get-up-to-speed-with-particle-variable-and-function-primitives/
---

IoT Projects often need to share the data they collect, or enable external systems to trigger actions. That’s the “I” in IoT, after all. To make connectivity easier, Particle provides a number of “primitives” in the built-in Device OS, including variables, functions and messaging with Particle [publish and subscribe](https://docs.particle.io/reference/device-os/firmware/photon/#particle-publish-).

{% youtube POHyi5xV8Mc %}


In this [video](https://www.youtube.com/watch?v=POHyi5xV8Mc), I walk through a simple project that shows you how to use the Particle Variable and Function primitives with a [Particle Argon](https://store.particle.io/products/argon-kit), and two Grove sensors from the [Grove Starter Kit for Particle Mesh](https://store.particle.io/products/grove-starter-kit).

With the variable and function primitives, developers can access local device state, for instance, to retrieve the latest reading from a connected sensor, or call firmware functions to take action on the device, for instance, to turn on a light or move a servo. Because these primitives are mediated securely through the Particle Device Cloud, they can be accessed from other devices, the Particle console, or even in web and mobile applications.

For other videos covering the basics of working with Particle devices, check out our [Particle 101 series on YouTube](https://www.youtube.com/watch?v=0T5rFu-9JAI&list=PLIeLC6NIW2tKvC5W007j_PU-dxONK_ZXR). If you have questions about using Particle variables, functions, or anything else in the Particle platform, [visit us in the Particle Community](https://community.particle.io).

The post [Get up to speed with Particle Variable and Function Primitives](https://blog.particle.io/2019/05/16/get-up-to-speed-with-particle-variable-and-function-primitives/) appeared first on [Particle Blog](https://blog.particle.io).
Reminder:  markdown_helper Has a CLI
Tags: programming, ruby, markdown, github
Published: 2019-05-16 19:07:14

---
title: Reminder:  markdown_helper Has a CLI
published: true
description: 
tags: programming, ruby, markdown, github
---
Ruby gem <code>markdown_helper</code>:

- Supports file inclusion for markdown files (which GitHub refuses to do).  That means your markdown file can include other files:  more markdown, highlighted code, etc.
- Can insert a table of contents into your markdown page.

You don't need to code in Ruby to use <code>markdown_helper</code>.  You only need to have Ruby installed, which is the default on many Linux installations.

Type <code>ruby --version</code>.  If that succeeds, you already have Ruby installed.

All you need do now is type <code>gem install markdown_helper</code>, and you're ready to use the [CLI](https://github.com/BurdetteLamar/markdown_helper#cli).

Read all about it on [GitHub](https://github.com/BurdetteLamar/markdown_helper#markdown-helper).
CSS Flexbox Nav Bar - Building a Blog, Part 1
Tags: css, webdev, flexbox
Published: 2019-05-16 18:32:21

---
title: CSS Flexbox Nav Bar - Building a Blog, Part 1
published: true
description: Flexbox Layout of a Blog Feature by Feature 
tags: css, webdev, flexbox
---

<p> CSS Flexbox is a uni-directional way layout components of your website one at a time. Elements can only be ordered in either a row or in a column when the display is set to "flex" then ordered and spaced to it's desired position. For ease and brevity, I quickly learned the importance of creating containers for all of my items/child elements. </p>

<p> The first feature I tackled in creating my blog was the nav bar. Creating a nav bar in CSS Flexbox was simpler than I thought. Here's a snippet of the code I used.</p>

**HTML**

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

**CSS**

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

<p> For the nav bar, I didn't need to style the nav container itself, instead, we're just going to apply flex as the display for the nav items. "Flex-flow" is a shorthand element that combines "flex-direction" and "flex-wrap". It determines whether the direction is going to be in a horizontal row or in a vertical column and also if the items will wrap around to the next line, wrap in reverse, or not wrap at all.</p>
    
<p>"nowrap" is the default, so I changed it to "wrap". I also applied a wrap to the row for responsitivity (hamburger menu for mobile coming soon).</p>

<p> "Justify-content" sets the alignment of the items in the container. Just like with text, there's right, center, and left, but we use "flex-start" to align items towards the beginning, "center", and "flex-end" for alignment towards the end of the flex container; there are a few other options that set the spacing of items, but they are not necessary here. For this nav bar, I chose "flex-end" for the nav-items and added 1 em of padding between each a tag. </p>
    
For demonstration purposes, I changed my original colors so they'd stand out more.
{% codepen https://codepen.io/njericooper/pen/QRKeBo %}
    
<p> If you know any other cases for flexbox let me know on [Twitter](https://twitter.com/njericooper)


Prefer video? Watch me code on Youtube

{% youtube 3iuL9rZZwfw %}

{% twitter 1129082616345432064%}
Review of Learning How to Learn: Powerful mental tools to help you master tough subjects
Tags: learning, mooc
Published: 2019-05-16 18:28:17

---
title: Review of Learning How to Learn: Powerful mental tools to help you master tough subjects
published: true
description: It is true that you should even learn how to learn.
tags: learning, mooc
series: MOOC reviews
cover_image: https://images.unsplash.com/photo-1516534775068-ba3e7458af70
---
*This review has been originally written Dec/2017.*


[Learning How to Learn: Powerful mental tools to help you master tough subjects](https://www.coursera.org/learn/learning-how-to-learn)

Since the original book "A Mind for Numbers" written by Dr. Barbara Oakley came out some years ago alongside the other books and studies, if you have been highly interested in learning method you might see the ideas in this course whether via books or online like I did. In spite of the fact that there rarely was a totally new method I got to know, it was great to see all the brilliant ideas in one place with supportive references so I don't need to worry about false myths and unreasonable remedies.

The lecture is about learning, and the best point of this lecture is that it is about not only 'study' itself but also things for a better study such as preventing procrastination and test-taking tips. Dr. Barbara also gives you some mindful advice for learning to help you not to be afraid of taking a new step and not to judge your own ability and give up too early and too easily. Personally, I do not like most of the self-help books which point out all the problem could be changed if you think differently. However, her lecture was a bit different since she actually helps you find a better perspective on your problem and let you know it is not only you who have the same problem and it is able to be solved.

You could finish this course without paying option and there are honour contents that will give you further understanding and extra recognition for the course. There is no doubt that by having this course I would be better prepared for my further study.
How to create a developer presence in #Twitter
Tags: discuss, twitter
Published: 2019-05-16 17:53:03

---
title: How to create a developer presence in #Twitter
published: true
tags: discuss, twitter
---

Hello fellow developers. I'm kind of a guy who got into the internet when Facebook started booming. And for social media presence, I preferred Facebook since all my friends were in it. And since then I didn't try any other platforms much. 

I just create my common handle on all sites to avoid regretting about it later.

One of the main way to keep track of Dev.to itself is through facebook.  

But after the facebook's whole privacy issue came out, I planned to get rid of facebook and settle for decent social media platform. And I chose twitter since many developers are in it and it can funnel me towards programming regime and not funny cat videos. 

The Problem: I created a twitter account and started following few people. But its like my Following numbers are higher than my followers. I really don't get this concept. How do developers create a presence for them in Twitter? 

I have a feeling like my Twitter Handle is somewhere in a graph with lowest possible node weight which rarely gets any action to begin interaction with it (aka dead node).

P.S: I know this question might be elementary or Stupid one. But A true stupid one is the question which was left unasked. Hence asked.
SVG inherit Color
Tags: svg, css
Published: 2019-05-16 17:21:03

---
title: SVG inherit Color
published: true
description: How you can make your SVG inherit the color of your button text
tags: svg, css
cover_image: https://images.unsplash.com/photo-1484666086787-6cd0ccd39860?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1489&q=80
---

## Let's Go
Nice short post for you guys but I think it's going to be a beneficial one.

Imagine we have a button like so:
![Picture of button](https://thepracticaldev.s3.amazonaws.com/i/xcdeh95bor4rxc7bl16x.png)


On hover of this button, we will change the `background` to be `blue` and the `color` of the text to be `white`.
![Hover of Button](https://thepracticaldev.s3.amazonaws.com/i/m4pfpg560t06oy8ju33z.gif)


As you can see our SVG remains the same color, thankfully we can have our SVG inherit the color of the button text.

We do this like so:
```html
<svg height="25px" width="25px" viewBox="0 0 100 100">
     <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="currentColor" />
</svg>
```

We give the `circle fill` the value `currentColor` which will use whatever color we set our text to be.

So now on hover we have:
![Hover Done Right](https://thepracticaldev.s3.amazonaws.com/i/72v04okn4j6nco4vd9yk.gif)

And that's all there is folks, hope you learned something.

Here is the Codepen with all the code:
{% codepen https://codepen.io/PaulRyan17/pen/JqWgbx %}
Elegant JavaScript Code - Combining Two Strings
Tags: showdev, javascript, beginners, webdev
Published: 2019-05-16 16:55:15

 ---
title: Elegant JavaScript Code - Combining Two Strings
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ppeqa4pqas3py9zpstkv.png
description: Showcase elegant JavaScript code written to combine two strings together.
tags: showdev, javascript, beginners, webdev
---

Today I've implemented a function (**combineLabels**) to combine two string together, here are the requirements for said function:-

* Return both strings combined using the supplied separator
* Return the first string if the second string is **falsy**
* Return the second string if the first string is **falsy**
* Return an empty string is both strings are **falsy**

Now, I could of implemented this using multiple if statements, but the following approach is more elegant and less code and handles all of the above scenarios.

```javascript
const combineLabels = (label1, label2, separator = ' - ') => {
  return [ label1, label2 ].filter(Boolean).join(separator);
}
```

Let me explain what is going on with the code. Firstly I'm creating an array of the two labels passed into the function. Then comes the magic, by performing the `.filter(Boolean)`, this excludes all the items that evaluate to a **falsy** value ('', undefined, null, etc) from the array. Once the items are excluded the `join` method then joins the strings together using the supplied separator. The separator is ignore when there are no strings in the array or when only one is present.

The listing below shows examples of calling the function, along with the return values.

```javascript
combineLabels('Label 1', 'Label 2'); // returns 'Label 1 - Label 2'
combineLabels('Label 1', 'Label 2', ','); // returns 'Label 1,Label 2'
combineLabels('Label 1', undefined); // returns 'Label 1'
combineLabels('Label 1', null); // returns 'Label 1'
combineLabels('Label 1', ''); // returns 'Label 1'
combineLabels(undefined, 'Label 2'); // returns 'Label 2'
combineLabels(null, 'Label 2'); // returns 'Label 2'
combineLabels('', 'Label 2'); // returns 'Label 2'
combineLabels('', ''); // returns ''
combineLabels(undefined, undefined); // returns ''
combineLabels(null, null); // returns ''
combineLabels(undefined, null); // returns ''
combineLabels(undefined, ''); // returns ''
combineLabels(null, undefined); // returns ''
combineLabels(null, ''); // returns ''

```

So, what elegant code have you written today?
1 week = 1 frontend talk for free
Tags: frontend, talks, webdev, discuss
Published: 2019-05-16 16:42:37

---
title: 1 week = 1 frontend talk for free
published: true
description: Doge Talks — curated newsletter with frontend talks, summaries, and inspiring stories. 
tags: frontend, talks, webdev, discuss
cover_image: https://i.imgur.com/bLffYYd.png
---

Hey! I'm Stacy, and I create educational projects for devs.
Recently I started Doge Talks — curated newsletter with frontend talks, summaries, and inspiring stories. 
https://dogetalks.com

I send them weekly and, as I suppose, it helps devs to stay updated and sharpen their knowledge. I'd be glad to hear your thoughts on continuous learning, talks' suggestions or anything related. 

As it's all for free, hope, it doesn't look promotional. Subscribe if you like the idea :)
New Release: Build your free Full-Stack Developer Resume
Tags: jobs, maker, startup, showdev
Published: 2019-05-16 15:39:36


---
title: New Release: Build your free Full-Stack Developer Resume
published: true
description: Full-Stack Developer Jobs and Candidate Resumes, Vue/Go based project
tags:  jobs, maker, startup, showdev
---

As announced about 4 weeks ago, I want to offer Job Candidates to show up to qualified Job Recruiters with a well-prepared Resume/Candidate Profile.
For Recruiters we offer the possibility to get access to qualified candidate.

And all of this, as with the Job Positions, based on quality and not quantity. I will check and accept only real Full-Stack Developer Candidates and same for Recruiters, which can be qualified companies, recruiter agencies and head-hunters.

Register now for free and build your Online Resume as a Full-Stack Developer:
https://fullstackjob.com/developer/profiles

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


Now with advanced Privacy Settings, Skill Filter and much more

![](https://thepracticaldev.s3.amazonaws.com/i/xxjuywx5fdznwgji7c53.png)
Quickly Alias Git Commands
Tags: git, webdev, shell, productivity
Published: 2019-05-16 15:35:26

---
title: Quickly Alias Git Commands
published: true
description: alias common git commands
tags: git, webdev, shell, #productivity
---

Typing Git commands over and over can get real tedious. Let's make it easier! 

Run this command in your shell with your own alias name and the corresponding git command

`git config --global alias.{alias-name} {git command}`


####Examples: 
`git config --global alias.show-remote 'remote show origin'`
* command is now `git show-remote`

instead of:
`git remote show origin`

#####You can even combine commands!
`git config --global alias.add-commit '!git add -A && git commit'`
* command is now `git add-commit -m 'My commit message'`

instead of:
`git add .`git commit -m 'my commit message'` 


Aliases can save you a lot of time! I'm always misspelling git commands but with aliases that is a thing of the past. 

To see all your aliases run this command:

`nano ~/.gitconfig`

Near the bottom you'll see something like this

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

####Disclaimer
With great power comes great responsibility. Use this command wisely! Make sure you know exactly what the command is doing before you alias or combine them. 


Thanks 😁
Learning for Life
Tags: help, productivity, webdev, career
Published: 2019-05-16 15:13:29

---
title: Learning for Life
published: true
tags: help, productivity, webdev, career
---

Today marks my first month as a fresh SW in As a associate engineer. I mainly deal with ReactJS and Flask in front and back end respectively. I've. I've some past experience with Flask (made a chat bot once) unlike React which is totally new for me. So far, my work as has been a mix of both excitement and challenges.

**My main issue is that there's so much that I don't know yet I would love to learn.** I want to pursue cloud certifications, become a full-stack engineer (my front-end skills are rusty compare to back-end for now), contribute in OSS projects and learn sign sign language. 

I've heard a lot of stories about SWs getting burned out period after 3-5 years because apparently they start to loose their stamina to absorbing latest knowledge. **I find this thought really scary to be honest. Spending 5 years in CS undergrad just to get stagnant after 2 or 3 would be nightmare for me.**

In short,my fears boil down to these questions: 
 
- How can one maintain a habit of constant learning for lifetime?
- What sort of strategies have you adopted for learning new stuff?
- How do you develop a sustaining stamina?

I would love to hear your thoughts and tips on this!
ARM: Enable Container Monitoring Solution on an existing Log Analytics Workspace
Tags: azure, arm, automation, loganalytics
Published: 2019-06-04 19:52:21

---
title: ARM: Enable Container Monitoring Solution on an existing Log Analytics Workspace
published: true
tags: azure,arm,automation,loganalytics
canonical_url: https://carlos.mendible.com/2019/05/16/arm-enable-container-solution-on-an-existing-loganalytics-workspace/
---

Recently I had to update a bunch of [Log Analytics Workspaces](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwiFrof58qDiAhXqyIUKHWPuBaIQFjAAegQIARAB&url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Flearn%2Fquick-create-workspace&usg=AOvVaw3DvKwidPs8__aX0fQ0vjQf) resources to enable the [Container Monitoring Solution](https://docs.microsoft.com/en-us/azure/azure-monitor/insights/containers) in order to monitor some new [Azure Kubernetes Services](https://azure.microsoft.com/en-us/services/kubernetes-service/) instances. So I came up with this ARM Template that I want to share with you:

```
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "LogAnalyticsWorkspaceName": {
            "type": "string",
            "metadata": {
                "description": "Log Analytics Workspace name"
            }
        }
    },
    "variables": {
        "workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('LogAnalyticsWorkspaceName'))]",
        "containerSolutionName": "[concat(parameters('LogAnalyticsWorkspaceName'), '-containers')]"
    },
    "resources": [
        {
            "type": "Microsoft.OperationsManagement/solutions",
            "apiVersion": "2015-11-01-preview",
            "name": "[variables('containerSolutionName')]",
            "location": "[resourceGroup().location]",
            "plan": {
                "name": "[variables('containerSolutionName')]",
                "product": "[concat('OMSGallery/', 'ContainerInsights')]",
                "promotionCode": "",
                "publisher": "Microsoft"
            },
            "properties": {
                "workspaceResourceId": "[variables('workspaceResourceId')]"
            }
        }
    ],
    "outputs": {}
}
```

[![](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fcmendible%2Farmtemplates%2Fmaster%2Fcontainers%2Fenable-container-solution-existing-loganalytics-workspace%2Fazuredeploy.json)

Hope it helps!
Node.js Monitoring in Production - eBook
Tags: node, javascript, devops, showdev
Published: 2019-05-16 14:46:43

Hey!

I've spent the last month focused on writing an extensive guide on [Node.js Monitoring in Production](https://sematext.com/blog/author/adnan/). Here's the fruit of my labor. The first eBook I've ever written!

Words cannot describe how hyped and proud I am of all the people that helped me achieve this feat. You know who you are ❤️.
Lots of love peeps!

[Here's the official download link!](https://hubs.ly/H0hZ8rp0)

Hope you like it! Feel free to let me know your thoughts in the comments below. Happy coding. :)
How do you prioritize?
Tags: discuss, productivity, help, projectmanagement
Published: 2019-05-16 12:29:49

Some engineers will have the luxury (and restriction) of having their work selected for them. However, when working on small teams (like mine), it’s up to the engineers to decide what to work on and when. What are the factors you or your company uses to prioritize work? How to you organize your backlog to make sure the important work is getting done first?