teleren/devto huggingface dataset:
Kubernetes 1.17 What's New?
Tags: kubernetes, devops, docker, release
Published: 2019-12-08 15:02:33

The newest version of Kubernetes is about to get released. The question is what to expect from version 1.17. In this article, we have a brief overview of some of what Kubernetes 1.17 brings with it.

Feature 1053: Structured Output For The Kubeadm Command
The kubeadm tool is one of the ways you can set up a Kubernetes cluster on your own. Some higher-level tools may also use kubeadm behind the scenes like Terraform. Sometimes, those tools need to parse and process the output produced by the kubadm command. Any slight change to this output may break the chain. This feature allows kubeadm to generate structured output that can be consumed by other tools. For example, using kubeadm command -o json will produce the output in JSON format. This feature is in the alpha stage.

Feature 382: Allow Nodes To Be Tainted On Condition
This feature was already in Kubernetes since version 1.12. In this release, it finally graduates to stable stage. The feature basically allows the node controller to taint a node based on some predefined conditions that it observes. As usual, the user can opt to ignore those taints by adding the appropriate tolerations to the pods.

Feature 548: The kube-Scheduler is Responsible For Scheduling DaemonSet Pods
Another feature finding its way to stable. Like #382, this feature was already in Kubernetes since version 1.12 but in earlier stages of development. Through this change, DaemonSet pods are scheduled using the kube-scheduler just like other pods instead of being scheduled by the DaemonSet controller. The advantage of this is that DamonSets are treated the same way as other pods honoring pod priority and preemption.

Feature 563: IPv6 Support
Now you can assign IPv4 and IPv6 to the pods. This feature is in the apha release and is under heavy development so expect a lot of changes in this and upcoming releases.

Feature 980: Ensure That Service LoadBalancers Are Deleted When Their Parent Services are
By default, when a Service of type LoadBalancer is deleted, the underlying LoadBalancer resource should be deleted as well. However, in some cases, the LoadBalancer is not deleted after the Service is destroyed. This feature ensures that the LoadBalancer is removed when the Service is deleted. The deletion process will be blocked until the LoadBalancer is totally removed.

Feature 177: Support For Volume Snapshots
This feature has been in Kubernetes since 1.12. In this release, it is graduating to Beta. You can use VolumeSnapshot and VolumeSnapshotContent to create and use volume snapshots.

In this article, we discussed some of the most notable features of the Kubernetes 1.17.
https://www.magalix.com/blog/kubernetes-1.17-whats-new
Question regarding "Junior Full Stack Developers"
Tags: career, discuss, anonymous
Published: 2019-12-08 14:56:03

---
title: Question regarding "Junior Full Stack Developers"
published: true
description: An anonymous question regarding junior full stack developers.
tags: career, discuss, anonymous
---

I've been hearing a lot of people refer to themselves as Full Stack Junior Developers, but how does one become one? Doesn't the very nature of being Full Stack mean you've gained enough experience to no longer be a Junior Developer? And while on that topic, when do you know you've gained enough expertise to graduate from being a Junior Dev?
An introduction to JVM bytecode
Tags: java, kotlin, jvm
Published: 2019-12-08 14:48:54

Hey there!

Now that I'm starting to use this site more frequently, I was reminded of an article that I wrote a bit more than a month ago and figured that I might share it here as well.

It's a short introduction to JVM bytecode, i.e. the code that Java, Kotlin, Scala, Clojure etc. compile to. For those of you who use languages that run on the JVM this is particularly interesting but I'm sure others can also take away some ideas and concepts from it.

[Here's the link](https://medium.com/p/an-introduction-to-jvm-bytecode-5ef3165fae70?source=email-e6e27a602296--writer.postDistributed&sk=536caa64482bf8130da8f056f28c5700)
Vue Unicons v2.0.0 is out 🚀🎉
Tags: vue, icons, githunt
Published: 2019-12-08 14:43:21

---
title: Vue Unicons v2.0.0 is out 🚀🎉
published: true
description: New release Vue Unicons added 60+ Brand & UI icons
tags: vue, icons, githunt
cover_image: https://thepracticaldev.s3.amazonaws.com/i/22hdjd3v2p3xz88ijqt8.png
---

Hi, here!

Vue Unicons just released version 2.0.0, which traditionally has additional icons, and most importantly, the monochrome style.
Now you can set the main color, and the rest of the colors will be calculated from it.

{% github antonreshetov/vue-unicons %}

![demo](https://thepracticaldev.s3.amazonaws.com/i/99nhgtyfu00tiwknudjm.gif)

Enjoy!
Ionic 4 Cordova Camera Plugin Tutorial with Example
Tags: ionic, cordovacameraplugin, plugintutorial
Published: 2020-02-07 10:04:02

---
title: Ionic 4 Cordova Camera Plugin Tutorial with Example
published: true
date: 2019-12-08 13:12:56 UTC
tags: Ionic,Cordova Camera Plugin, Plugin Tutorial
canonical_url: https://www.positronx.io/ionic-cordova-camera-plugin-tutorial-with-example/
---

The post [Ionic 4 Cordova Camera Plugin Tutorial with Example](https://www.positronx.io/ionic-cordova-camera-plugin-tutorial-with-example/) appeared first on [positronX.io](https://www.positronx.io).

**Ionic 4 Camera tutorial is going to be today’s main topic, In this tutorial, we will learn how to take pictures using Ionic Native & Cordova Camera plugin.**

Creating a Hybrid app doesn’t take a lot of time; however, in most of the cases, we get stuck in building any feature which is directly related to hardware accessibility. To access Network, Sensors, GPS, File System, Storage and Camera in Native devices sometimes becomes a bit tedious.

[click here to read more](https://www.positronx.io/ionic-cordova-camera-plugin-tutorial-with-example/)
A Secret Santa Assignment Tool in Svelte 3
Tags: svelte, christmas, showdev
Published: 2019-12-08 13:05:28

Does anybody else have this problem? My family asks me to have everyone draw names from a hat, something I could do in 3 minutes. Where does my mind go?

> "I've done this *hundreds* [read '5'] of times. I could fix this by [...]"

There I go again, trying to fix the world's non-existent problems.

Anyways, I thought I'd share my latest project, which was to whip together a basic tool to randomize the assignments for our family's Secret Santa.

[Secret Santa Shuffler](secret-santa.orangealligator.io)

It's a pretty basic app made with Svelte 3, which is what I've been using for the last few months for small projects. I was looking for an excuse to try the awesome built-in [Svelte animations](https://svelte.dev/docs#svelte_animate).

If you'd like to fork and give it superpowers (like input validation), the source code is public on my GitHub.

{% github thompcd/secret-santa-shuffle no-readme %}
Getting started with GitHub Actions - CI/CD Firebase deploy
Tags: github, firebase, ci, cd
Published: 2019-12-08 13:01:50

GitHub Actions are used to automatically run a pipeline on a repository. Uses cases can be to run tests on your code, build your application and/or deploy your application.

## Set Up a Workflow
In your repository, click the Actions tab in the middle.
![GitHub Actions tab](https://thepracticaldev.s3.amazonaws.com/i/1aipjfyajo1fhuj3gyl5.PNG)
Then click <i>Set up a workflow yourself</i> in the top right corner.

## Yaml
This has created a .yml file for you which will contain all your triggers and steps. 

First let's change it to trigger on a push, but only on the master branch.
```yml
on:
  push:
    branches:
      - master
```

Now let's create a step to build our code.
```yml
- name: Build
      run: |
        npm install
        npm run build
```

## Firebase deploy
Now we will set up continuous deployment to Firebase. To deploy to Firebase on our behalf, we need to get our Firebase token through the cli in your terminal. Run `firebase login:ci`. Now copy your token. Open a new tab for your GitHub repository and go to <i>Settings</i>, then <i>Secrets</i>. Add your secret and name it FIREBASE_TOKEN.

Now back to your .yml file, add a deploy step. First install the firebase-tools (if your job run's on linux, remember to add sudo). Then deploy with the token.
```yml
- name: Firebase Deploy
      run: |
        sudo npm install -g firebase-tools
        firebase deploy --token ${{ secrets.FIREBASE_TOKEN }}
```

## Finishing up
Click <i>Start commit</i> in the top right corner and commit your .yml file.
Go to the <i>Actions</i> tab and see your pipeline running.

The complete .yml file:
```yml
name: CI/CD

on:
  push:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Build
      run: |
        npm install
        npm run build
    - name: Firebase Deploy
      run: |
        sudo npm install -g firebase-tools
        firebase deploy --token ${{ secrets.FIREBASE_TOKEN }}
```
How to Learn Python as a Beginner?
Tags: education, python, opensource, beginners
Published: 2019-12-08 12:49:49

Python is one of the most loved programming languages. Companies including Google, Uber, Instagram have based their applications on Python language.

Being an easy to learn language, beginners are often suggested to start their programming career with Python. And having uses in Machine Learning & Data Science has made Python an important language to start with.

Now if you will ask people about learning to code they would most probably suggest you go with an online course. When students start with something new they have so many queries in mind and sometimes they are not even sure if they can carry on with the thing they are starting.

So it would be better for them to go with some [free Python courses](https://www.presentslide.in/2019/12/free-python-courses-certifications.html) and check if this is something they can base their career on. And if you find that basic overview suits your interest then you can go with any paid course of your choice.

Finding free resources in this digital world is no big deal. There are tons of online stuff that can give you everything you will ever need for your career. You only need to focus and concentrate on learning.

#Some Websites That Can Give You Free Python Courses

1. **Udemy**: One of the most popular online learning platform.

2. **SoloLearn**: Having so many free resources for teaching coding to students.

3. **Alison**: Provides free courses in multiple dimensions.

4. **Real Python**: Interactive Python guides and resources for both beginners and intermediate programmers.

5. **Python Tricks**: Providing so many tutorials for learning Python from scratch.

These resources are enough for getting your basics clear and get a hold on the fundamentals of Python. After that, you can switch on to some paid training courses for further polishing your programming skills.

Programming is not a one day job and for being a better programmer you will have to keep yourself updated with all the latest updates and trends.

And one more interesting to share is that you don't need to go anywhere for getting paid courses. The websites that are mentioned above provide paid courses and training too so you can just switch from free to paid if you are finding them a good source to learn.
A CSS-only Carousel
Tags: css
Published: 2019-12-08 22:08:15

---
title: A CSS-only Carousel
published: true
date: 2019-12-08 00:00:00 UTC
tags: css
canonical_url: https://schepp.dev/posts/css-only-carousel/
---

I've recently [read about](https://24ways.org/2019/beautiful-scrolling-experiences-without-libraries/) and [discussed](https://twitter.com/AndyDavies/status/1202862028412661760) CSS Scroll Snapping so often that I felt like I should build a CSS-only carousel based on it. There it is:

{% codepen https://codepen.io/Schepp/pen/WNbQByE default-tab=result %}

[Link to Codepen](https://codepen.io/Schepp/pen/WNbQByE?editors=1100)

## Here are a few things to note: #

Accessibility is in line with all other CSS-only experiments: it can only be considered mediocre in term of semantics and visual indicators. Don't do this in production.

The going forward and back is done via a combination of [CSS Scroll Snap](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Scroll_Snap) together with [`scroll-behavior: smooth`](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior) and moving the focus through the slides via anchor links.

The nicest trick I pull off is the one for the auto-forward:

1. first I slowly offset the scroll snap points to the right, making the scroll area follow along due to being snapped to them.
2. after having scrolled the width of a whole slide, I deactivate the snapping. The scroll area is now untied from the scroll snap points.
3. Now I let the scroll snap points jump back to their initial positions without them "snap-dragging" the scroll area back with them
4. Then I re-engage the snapping which now lets the scroll area snap to a different snap point 🤯 Whatever... [look at the code](https://codepen.io/Schepp/pen/WNbQByE?editors=1100) 🙃
What would you call this function?
Tags: javascript, naming, functions
Published: 2019-12-08 10:47:29

## (WWYD) What Would You Do - #0

I'm working on a little js library with some functions I use a lot and are not present in other libs I currently use. 

I recently needed a function that receives an `object` and returns an array with it's property paths and values:
```js
flatten({ foo: { bar: 'Salmon' }, name: 'John' });
```

This will return:
```json
[
    {
        "path": "foo.bar",
        "value": "Salmon"
    },
    {
        "path": "name",
        "value": "John"
    },
    {
        "path": "foo",
        "value": [
            {
                "path": "foo.bar",
                "value": "Salmon"
            }
        ]
    }
]

```

I've been changing the name of the function quite a bit, and the best I could come up with is `flatten`, as it return the object as a 1 dimension array of path-value pairs, although I don't feel it fully expresses what it does. 

I'm kinda curious on what you would call it? And why?
Customer code coverage
Tags: codequality, testing, productmarketfit, coverage
Published: 2019-12-08 10:43:05

The notion of <a href="https://en.wikipedia.org/wiki/Code_coverage" target="_blank" rel="noopener">code coverage</a> is well known in software testing. In short, code coverage is the percentage of code which is covered by automated tests. The more your tests are able to "exercise" different parts of your code (e.g. enter into all its conditional branches) the better. Obviously, the higher your code coverage the lower the chance of your software containing undetected software bugs.

Still, I'd like to argue there is an even more important metric when you're starting a new software project <strong>customer code coverage </strong>.
<blockquote>Customer code coverage metric: percentage of your code written to satisfy an actual customer feature request.</blockquote>

How much of your code has been executed at least once by one of your users/clients? And how much of your code was written thinking that a client would need it, and you're still waiting for that need to appear?

Of course, as for all code coverage criteria, the goal would be to reach a 100% coverage, i.e. all your code should come from understanding and responding to the real needs of your clients. This would mean that **all the code you've written has been developed to satisfy the needs of at least one user/client**. No pieces of useless code in your software. Imagine the cost of maintaining (evolving, refactoring,... ) blocks of code that in fact nobody has ever executed, not even once. That would be an extreme case of premature optimization :-) .

I do believe that this "customer-driven development" approach is the best way to proceed in many scenarios, especially in early-stages of product development. It's almost impossible to guess right what clients will need or ask in the future so you may be better of not trying or you may end up **blindly developing many features that may never be executed**.

A completely different discussion is **how many clients should ask for a given feature before you decide to develop it**. Probably the number goes up as the tool matures. It also depends on whether those interested users are ready to put the money where their mouth is and fund this new feature upfront (this would be especially [beneficial in open source projects](https://livablesoftware.com/5-ways-to-thank-open-source-maintainers/)).
Custom element netsi-css-rotation using lit-html
Tags: codepen
Published: 2019-12-08 10:29:32

---
title: Custom element netsi-css-rotation using lit-html
published: true
tags: codepen
---

<p>We are in/moving towards a time where custom elements should be distributed and shared for use on the web. There are some paths to reach that goal - one option may be lit-element.</p>

<p>This pen creates a small visualization of the CSS rotate of X, Y and Z.</p>

{% codepen https://codepen.io/netsi1964/pen/GRgpewx %}
React-table
Tags: react, redux
Published: 2019-12-08 09:30:16

Lightweight at 11kb (and just 2kb more for styles)
Fully customizable (JSX, templates, state, styles, callbacks)
Client-side & Server-side pagination
Multi-sort
Filters
Pivoting & Aggregation
Minimal design & easily themeable
Fully controllable via optional props and callbacks
My stats for 2019
Tags: meta, dever, community
Published: 2019-12-08 09:03:42

Hey all,

So Paula Santamaría and Mauro Garcia, fellow devvers created this awesome stats tool with Svelte:

Awesome job!!!

I've used it to assess my evolution here and here it is:


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


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

I've only started writing posts around the middle of the year, so it has been an amazing year for me, got great feedback from the community and have learned a lot!

Thanks to this amazing community and I hope to contribute a lot more in the year to come :)
Clojure’s thread-first macro: ->
Tags: clojure, threadfirst, day8
Published: 2019-12-09 05:14:33

---
title: Clojure’s thread-first macro: ->
published: true
date: 2019-12-08 07:00:00 UTC
tags: clojure,thread-first,day 8
canonical_url: https://alexanderoloo.com/blog/2019/12/08/clojures-thread-first-macro.html
---

Don’t you just hate functions with names that you can’t pronounce. I mean how do you pronounce `->` ? On top of that, its name is not consistent across languages so learning it once is not a guarantee that you’ll know its name in another programming language.

In Clojure this, `->`, is the thread-first macro. You’re welcome.

```clojure
(-> x & forms)

"Threads the expr through the forms. Inserts x as the
second item in the first form, making a list of it if it is not a
list already. If there are more forms, inserts the first form as the
second item in second form, etc."

```

### A super practical everyday example

To help us illustrate how the thread-first macro works we need a few functions

```clojure
; let's set everything up
(def ws "wheat-seed")
(defn plant [seed field farm] (str seed "->planted"))
(defn harvest [plant farm] (str plant "->harvested"))
(defn grind [grain machine] (str grain "->ground"))
(defn prepare-dough [flour salt sugar olive-oil] (str flour "->prepared-dough"))   
(defn make-base [dough] (str dough "->made-base"))   
(defn add-toppings [base tomato cheese meat] (str base "->added-toppings"))
(defn bake [dough oven] (str dough "->baked"))
(defn enjoy [pizza] (str pizza "->enjoyed-macro-pizza"))

```

Now let’s get threading!

```clojure
;Now lets make a macro pizza
(-> ws
    (plant "far-field" "Old McDonald's Farm") 
    (harvest "Old McDonald's Farm") 
    (grind "stone-mill")
    (prepare-dough "sea-salt" "white-sugar" "ev-olive-oil")
    (make-base)
    (add-toppings "rosa-tomatoes" "mozzarella" "ham")
    (bake "stone oven")
    (enjoy))

```

You’ll notice that each function in our pizza maker has one less argument than in its function definition. The first argument is handled by thread-first macro. The thread-first macro takes the output of `ws` and makes it the first argument of `plant` and makes the output `plant` the first argumemt of `harvest`. In other words it does this:

```clojure
(harvest (plant ws "far-field" "Old McDonald's Farm") "Old McDonald's Farm") 

```

And hence its name. It threads previous output as the **first** argument of the next function and continues doing so until it’s done.

The true benefit of the thread-first macro is that it can make code easier to read. You can do your future self a huge favour by using the thread-first macro. Using this macro coupled with naming your functions sensibly makes for code that is a pleasure to read and maintain.

Happy threading!

<iframe src="https://giphy.com/embed/VIEngKb5u48e35Lxp4" width="300" height="168" frameborder="0" allowfullscreen=""></iframe>

_May your build always pass._

_Alex_

This post is part of the ["Advent of Parens"](https://alexanderoloo.com/blog/2019/12/01/advent-of-parens.html).
Advent of Code 2019 Solution Megathread - Day 8: Space Image Format
Tags: adventofcode, challenge, adventofcode2019, spoilers
Published: 2019-12-08 06:45:58

---
title: Advent of Code 2019 Solution Megathread - Day 8: Space Image Format
published: True
description: Proprietary formats mean proprietary problems!
tags: adventofcode,challenge, adventofcode2019, spoilers
series: Advent of Code 2019 Solutions
cover_image: https://i.imgur.com/pz9sMGj.png
---

Hooray! A reason to make _cool gifs_^TM.

### [Day 8 - The Problem](https://adventofcode.com/2019/day/8)
In order to finish booting a Elvish Mars Rover, they sent us a picture of the password. Credit where credit is due, the elves managed to at least encrypt the image file, so they have some security sensibility at least. Unfortunately, we have to build our own decryptor.

> Humblebrag: I was out partying all day (playing board games!), and I want people to have a place to post.  I'll update with a snappy summary when I finish the problem (probably tomorrow).

Part 1 was a simple counting problem. The main hurdle seemed to be correctly chunking the input data into the proper layers.

Part 2 also seemed strangely straightforward compared to Day 07, but maybe the list comprehension sugar of my chosen language simplified more than I realized.

Phew! I'm catching back up to where I wanted to be faster than I expected.


### Ongoing Meta

#### Dev.to List of Leaderboards

* `120635-5c140b9a` - provided by [Linda Thompson](https://dev.to/lindakatcodes) 

 If you were part of [Ryan Palo](https://dev.to/rpalo)'s leaderboard last year, you're still a member of that! 

If you want me to add your leaderboard code to this page, reply to one of these posts and/or send me a DM containing your  code and any theming or notes you’d like me to add. (You can find your private leaderboard code on your "[Private Leaderboard](https://adventofcode.com/2019/leaderboard/private)" page.)

I'll edit in any leaderboards that people want to post, along with any description for the kinds of people you want to have on it. (My leaderboard is being used as my office's leaderboard.) And if I get something wrong, please call me out or message me and I’ll fix it ASAP.

There's no limit to the number of leaderboards you can join, so there's no problem belonging to a "Beginner" *and* a language specific one if you want.

#### Neat Statistics

I'm planning on adding some statistics, but other than "what languages did we see yesterday" does anyone have any ideas?

**Languages Seen On Day 07**

* javascript x 3
* python x 2
* c
* clojure
* haskell
* kotlin
* swift