teleren/devto huggingface dataset:
Why Communicating with Git Helped You Version
Tags: git
Published: 2019-01-10 02:53:47

---
title: Why Communicating with Git Helped You Version
published: true
description: 
tags: git
canonical_url: https://he-the-great.livejournal.com/61227.html
series: Git Communication
---

In my previous postings about Git I talked about communication, and now that you've been communicating well we can get into what that means from a strategy standpoint.

Versioning is a large topic area and I do favor the idea of supporting several versions, but encourage limitations on that and discourage indefinite version support. But I want to focus on the idea of supporting the development versions: production, in flight, and new work.

New work is simple, you're preparing for the next release and you want to get everything you can into it.

The trouble comes when you're wanting to now make a change to production or an in flight release. If it is production the change should make it into all three, if it is in flight then it should go to new work also. Generally you will want to make the change to the oldest version first and cherry-pick and port into the later versions, but that is not always the case. Sometimes the bug you identified during new work becomes a desired fix in those older versions. Since you've been diligent about your communication you should now have a issue number and specific changes all ready to go and place into the older versions.

QA will be much happier if you're utilizing the original changes stored in your version history than recreating the changes through copy/paste or other manual means. You will also be happy if the changes are more complex than a few line changes.

I don't want to get into the actual [version designation](https://www.reddit.com/r/programming/comments/9qxtp9/tips_and_tricks_for_keeping_a_healthy_git/e8d2rc3/?utm_content=permalink), but the discussion on reddit is relevant.
Reading and Writing Files in C: Part 3
Tags: c, io, file
Published: 2019-01-10 02:10:56

In the last section of the previous article, I promised that we would discuss some of the different errors that potentially could happen. While it is not necessary to learn about the different errors that could pop up, it is, however, educational and informative to know about the different errors that might come up when working with files.

### Moved/Deleted

For some programs, a file is used to record the date and time of certain operations committed by the program and errors. If a user or some other program moves the file to another location or deletes it, then write operation, in theory, could fail and the program will (hopefully) recover gracefully. This usually involves recreating the file and writing all new entries that the program chooses to record. This most likely won't happen with files that are shortlived because, well the name implies, will not be around for very long for a user to move or delete. In Windows, if a file is opened by a process, you are not allowed to move or delete it. On Unix based OSes, a move or deletion of a file is considered acting upon the directory where the file resides. If open and deleted, it will remain on disk until closed.

### Operations After Closing

Each operating system exposes an API for us to get resources that only it can provide. One of these resources is files. On Unix based OSes like Linux, the system call `open()` exists. Before allowing us to open the file, the OS must make sure that we have the permission to do so and, of course, exists on the hard drive. Once the OS has concluded that we are not in any violation of any permissions and can locate the file on the disk, it will return an ID for us to use. This ID is a numeric value and in the context of our program is assigned to an opened file. When we're done with the file, we have to let the OS know to close the file. For Unix basic OSes like Linux, `close()` does this. In the C standard library file I/O library,  this is `fclose()`. Doing any operations with a file that has been closed will result in an error.

Example:

```cpp
#include <stdio.h>

int main(void)
{
    FILE *file = fopen("test", "r");
    fclose(file);
    char buffer[100];
    if(fgets(buffer, 5, file) == 0)
    {
        printf("Error reading file!\n");
        return 1;
    }
    printf("%s\n", buffer);
}
```

Output:

```cpp
~/Desktop 
➜ clang main.c 

~/Desktop 
➜ ./a.out 
Error reading file!

~/Desktop 
➜ 
```

### Full Storage

If the storage medium that is currently being used is at maximum storage capacity then there isn't much to do except for freeing space up by deleting files.

### Faulty Hardware

Failing hard drives can and will cause file I/O operations to fail. Because of the unstable nature of a deteriorating storage medium, you may not even get an error from the OS, but is still an error nonetheless because the data that is read/written might be corrupted.

## Next

For the next part, we will discuss how to save more than just text in a file.
Clustering snacks and vegetables
Tags: machinelearning, udacity, clustering
Published: 2019-01-10 19:14:42

---
title: Clustering snacks and vegetables
published: true
tags: ml,ml,udacity,clustering
cover_image: https://thepracticaldev.s3.amazonaws.com/i/jbxjuzxwjdti0soahsxw.jpg
canonical_url: https://lukaszkuczynski.github.io/ml/2019/01/10/Clustering.html
---

## Supervised vs Unsupervised:

Lesson no 9 of Udacity’s [Introduction to Machine Learning](https://eu.udacity.com/course/intro-to-machine-learning--ud120) showed another aspect of machine learning to me. I could strengthen my knowledge in an area of clustering. This is topic particularly interesting as is it reveals insights, which may inspire you to further analysis. As I am lately into NLP, one possible use case is that it can group similar documents together and then you can discover the connections between them. Supervised learning is about having labels and then checking if these labels fit features of newly acquired data. Unsupervised learning has no comparison phase, as no labels are known at the beginning.

## K-Means and sklearn

Clustering using K-means algorithm is one of the most widely used unsupervised techniques. It is about finding such cluster centres that will allow the whole system to be in a “harmony”. Distances are calculated using Euclidean distance.  
There is a nice visualization that was advertised during the training, you can take a look at fantastic work was done [at naftaliharris blog](https://www.naftaliharris.com/blog/visualizing-k-means-clustering/)As with every algorithm we have to be aware of its limitations. One of these is the fact that K-means is a hill climbing algorithm. This very fact has its own [Wikipedia page, that you can check](https://en.wikipedia.org/wiki/Hill_climbing). So the algorithm is very sensitive to local minima. Thus, some specific way of choosing initial points (centroids) can lead to clusters we would like not to have. This is why in sklearn implementation you are encouraged to do the clustering several times and then the best clustering is chosen.

## Use case : veggies vs snacks.

The Kaggle for the following [you can find here](https://www.kaggle.com/panlukaszk/vegetables-vs-snacks). I thought: maybe I could use clustering somewhere? Maybe a computer can be smart enough to distinct junk food from a nice one? So I found this dataset, that is [the Australian Food Nutrient Database](http://www.foodstandards.gov.au/science/monitoringnutrients/ausnut/ausnutdatafiles/Pages/foodnutrient.aspx). I played around a bit, and you know what? It works. Of course, if I spent more time on the careful assignment of snack and vegetable categories it would be more meaningful, without that I have some outliers, like tomatoes with a lot of fat, as an example. Anyhow KMeans was able to mark a clear distinction between high calories, low Vitamin C snacks and low calories, healthy vegetables.
Programming Intuition
Tags: discuss
Published: 2019-01-09 21:47:32

---
title: Programming Intuition
published: true
description: 
tags: discuss
---

Often when I'm programming I'll have questions or ideas that aren't fully formed logically, but nonetheless help me find bugs or think up code design solutions.

Does anyone else have these sort of intuitive leaps when programming? How do you cultivate them, and bring them into your work more clearly?
Upcoming Open Source Conference
Tags: opensource, database
Published: 2019-01-09 21:44:38

---
title: Upcoming Open Source Conference
published: true
description: 
tags: opensource, databases
---

Hi everyone! I wanted to let the community know that the upcoming Percona Live Open Source Database Conference will have a specific track for “Other Open Source Databases”. If anyone is interested in presenting, you can use this link: https://perconacfp.hubb.me/

Or let me know in a comment if you would like to discuss anything further. You can present talks on *any* DB you want, as long as it is open source :)
The Case For Mastering a Skill Before Moving On
Tags: javascript, freecodecamp, webdev, computerscience
Published: 2019-01-09 21:01:44

---
title: The Case For Mastering a Skill Before Moving On
published: true
description: A new blog post for my blog, Bowlen Development!
tags: JS, freeCodeCamp, web development, Computer Science
---

<a href="https://bowlendevelopment.blogspot.com/2019/01/the-case-for-mastering-skill-before.html" >New Blog Post</a>

<p>How I'm starting to focus and not be so scatterbrained about my studies and the dividends that it's paying!</p>
Editing web translations right in your browser
Tags: i18n, phraseapp, incontexteditor, translations
Published: 2019-01-09 20:28:12

---
title: Editing web translations right in your browser
published: true
description: Give your translator more context
tags: i18n, phraseapp, in-context-editor, translations
---

Sometimes GIF replaces 1000 words:

![In-Context Editor](https://i.imgur.com/PPDZrBn.gif)
<figcaption>looks interesting, right?</figcaption>

[DEMO](https://demo.phraseapp.com/)

Having this, you give your translator 100% understanding of the translation context.

The feature is usually called `In-Context Editor` (for instance in [Locize](https://docs.locize.com/more/incontext-editor) or [Phraseapp](https://help.phraseapp.com/translate-website-and-app-content/use-in-context-editor-to-translate/translate-directly-on-your-website)).

It's worth to say you need PhraseApp Pro subscription for it. In pair to that, we also use `lingui-js` as a translation library.

## How to enable

All you need to is

1. Add PhraseApp In-Context Editor snippet to your page
2. Format messages into the proper format.

If you're in the Javascript world, I have wrote a [lingui-phraseapp](https://www.npmjs.com/package/lingui-phraseapp), which helps you to do these two steps, so your integration may look alike

    import { initializePhraseAppEditor, initializePhraseAppEditor } from "lingui-phraseapp";
    import catalog from './locales/de/messages.js';

    const configInContextEditor = {
      projectId: REACT_APP_PHRASEAPP_PROJECT_ID,
      autoLowercase: false,
      prefix: "--__",
      suffix: "__--",
      phraseEnabled: !!localStorage.getItem("inContextEditor");
    };

    ...
    <!-- Add snippet -->
    initializePhraseAppEditor(configInContextEditor);

    <!-- Format messages -->
    const catalogFormatted = configInContextEditor.phraseEnabled
      ? transformCatalog(catalog, configInContextEditor)
      : catalog;

    const i18n = setupI18n({ catalogs: { de: catalogFormatted });
    ...

As you can see from above to enable Editor set `inContextEditor: true` in the LocalStorage. After that, the modal for username and password will appear.

There are also implementations for other popular translation libraries [react-intl-phraseapp](https://github.com/phrase/react-intl-phraseapp), [react-i18next-phraseapp](https://github.com/phrase/react-i18next-phraseapp), although integration itself is pretty straightforward and simple.

## The most important question

Now to the things that really matter:

> Does this brings value at all?

The translator we're working says she wanted it for 2 years, although we haven't started active translation phase yet. And you can't say for sure until you'll work with it on daily basis.

I will give an update on this feature, stay tuned!
🐛 Bug or feature 💡 
Tags: discuss, funny, sincerity
Published: 2019-01-09 20:27:55

---
title: 🐛 Bug or feature 💡 
published: true
description: 
tags: #discuss, #funny, #sincerity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/0l4j6i0zsvfwrnmg8iay.jpg
---

In case you never heard that expression:
> Excuse made by software developers when they try to convince the user that a flaw in their program is actually what it's supposed to be doing. - [Urban dictionary](https://www.urbandictionary.com/define.php?term=It%27s%20not%20a%20bug%2C%20it%27s%20a%20feature)

Please don't be shy and share your (own or other's) bug-or-feature moments.
How to store a secret on Kubernetes?
Tags: kubernetes, devops, gitops, devsecops
Published: 2019-01-09 20:21:09

---
title: How to store a secret on Kubernetes?
published: true
description: 
tags: kubernetes, devops, gitops, devsecops
cover_image: https://cdn.pixabay.com/photo/2015/08/30/23/20/girls-914823_1280.jpg
---
At [Soluto](https://www.solutotlv.com/), we're using Kubernetes platform in production for more than a year. One of the challenges we faced is secrets management, which is not a simple task at all (did you experienced similar issues?). Kubernetes Secret object has its own limitations (especially, how to store the manifest files). We also tried various solutions (like [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets) and [Helm Secrets](https://github.com/futuresimple/helm-secrets) to name a few), but none of them was a good fit for us. We wanted a solution that is:
- GitOps (so it can support our decentralized ops culture)
- Zero trust (once a secret is encrypted, there is no need and no way to decrypt it)

This is why we built [Kamus](https://github.com/Soluto/kamus) - our secret encryption solution. Kamus let you seamlessly encrypt secrets, that can be decrypted only by the app running in production. 
I'll be more than happy to answer any question you might have regarding Kamus, and of course - look forward to hearing your feedback!
A complete "Live Reload" feature for PHP projects in a single class
Tags: php, webdev, showdev, opensource
Published: 2019-01-09 20:13:01

---
title: A complete "Live Reload" feature for PHP projects in a single class
published: true
description: A class which gives to any Php project a Live Reload feature
tags: #php #webdev #showdev #opensource
---

> WARNING:This project has changed A LOT since the publication date of this post. It still offers a hot reload feature in a single class, but now with a SSE (Server-Sent Events) approach. Take a look on the github docs to further information

Recently i made this PHP class to use in my personal projects and in the company which i work for. I really enjoy the Vue (and other frameworks) Hot Reload capabilities and i became kinda badly accustomed with this new features, so i wrote this class to add a live reload feature to any php project in a very simple way. It allows you to see your page dinamically changing while coding, without have to keep refreshing the browser on every change. By default, the script will turn your project tab reactive to changes in included/required files, css and js files releated to the tab opened. Every browser, every project, one single file.

The use is really simple: You must call the HotReloader on the sources you want to auto-react to changes. The reactions will happen on js, css, and other php files related to current page. You must have a layout file, common footer or something like this in your boilerplate. If dont, you'll need to put the HotReloader() in your code manually. The examples here must be putted on your footer section or somewhere after your \<body> tag.

The simplest way to start is: require the class, instantiate it, call the init method. Now, keep the page opened while coding, and just code.

```php
require "../hotreloader.php";
$reloader = new HotReloader();
$reloader->init();
```

You can change, expand and adapt this default behavior, and you can configure the class to a better experience in according to your needings. Different from other live reloaders i have seen in php, by default this will not assist your entire directory, but only files related to your current page. I have using this class in huge projects and inside frameworks as Cake Php, and its behavior its been really acceptable and lightweight. The project is a BETA version, to download or read the documentation, please see the Github page. Contributors are really wellcome ;)

https://github.com/felippe-regazio/php-hot-reloader

Hope you enjoy!
Database design where state is a function of mutations.
Tags: discuss, help, webdev
Published: 2019-01-09 19:55:26

---
title: Database design where state is a function of mutations.
published: true
description: 
tags: discuss, help, webdev
---
I'm thinking along the lines of redux, where the state is a function of an initial state, and mutations carried out by reducers.

The benefit is that mutations can capture a large amount of information, and as requirements change, the reducers can be modified to produce a new state.

Also, we have a history built in.

Is this a common pattern in database design?

Specifically, I'm considering implementing this on Firestore. What should I know?
The DEV Team is growing!
Tags: meta
Published: 2019-01-09 19:51:52

---
title: The DEV Team is growing!
published: true
description: We are excited to welcome two new members to the DEV core team.
tags: meta
cover_image: https://thepracticaldev.s3.amazonaws.com/i/97a2sge9bgapcn6szuep.png
---

We are so excited to officially welcome two new members to the DEV core team: [Ali Spittel](https://dev.to/aspittel) and [Michael Tharrington](https://dev.to/michaeltharrington).

Many of you know Ali as a fantastic writer and prolific contributor on DEV, with more than 50+ published articles ranging from technical guides to daily challenges to career advice. Since we [open-sourced](https://dev.to/ben/devto-is-now-open-source-5n1) this past Summer, Ali has also made contributions to the DEV codebase, bringing you our awesome interactive offline page for doodlin'. We have been extremely impressed by Ali and couldn't be more thrilled that she is officially on our core team as a Software Engineer and DEV Advocate. 

You can read more about why she joined the team here: 

{% link https://dev.to/aspittel/new-years-and-new-beginnings-im-joining-the-dev-team-3dnb %}


We are equally excited to welcome Michael to the team. Michael has been a long time lurker of DEV 😃 and has so much experience and insight into developer content. He's actually been working with us for a few weeks and has made a huge impact in getting your posts in front of more eyeballs. When we first met Michael, we were not only blown away by his experience, but his sheer enthusiasm for our community in particular. We are so happy to have Michael on the team as a Community Coordinator -- expect to hear a lot more from him!


Read on to learn more about Michael:

{% link https://dev.to/michaeltharrington/happy-to-be-on-the-dev-team---502m %}


What a wonderful way to kick off 2019. 

Happy Coding!
Blockchain technology has young features for your business needs
Tags: technology, business, blockchain, cryptocurrency
Published: 2019-01-09 19:37:53

---
title: Blockchain technology has young features for your business needs
published: true
description:  
tags: technology, business, blockchain, cryptocurrency
---
You may come across the most of business models on this blockchain. 

<b>What is blockchain ?</b>

A blockchain is, in the simplest of terms, a time-stamped series of immutable record of data that is managed by a cluster of computers not owned by any single entity. Each of these blocks of data (i.e. block) are secured and bound to each other using cryptographic principles (i.e. chain).  

The reason why the blockchain has gained so much admiration for business setup :

1) It is not owned by a single entity, hence it is decentralized
2) The data is cryptographically stored inside
3) The blockchain is immutable, so no one can tamper with the data that is inside the blockchain.

A blockchain and  its essence, a decentralized and more secure database and there are multiple forms of its implementations. 

Here, The two forms of blockchain 

<b>Public blockchains:</b> 
A Open blockchain where anyone can join and be a part of the network. 

<b>Permissioned blockchains:</b>
A Closed network where existing nodes must vet the participants before making them a part of the network

The hype behind blockchain is pretty unreal as of right now. 

In fact, recent statistical report suggest that companies that add the word “blockchain” to their names have seen their shares jump up significantly. For example: Shares in a tiny US soft drinks firm went up by 432% after the company changed its name from Long Island Iced Tea Corp to Long Blockchain Corporation! 

This kind of unreal hype does put a lot of unfair expectations on the blockchain. 

While we believe that the blockchain is a great innovation, it is by no means a magic button. 

The technology is still very young and there are tons of new business avenues that need to be explored and improved upon like scalability and interoperability. However, having said that, an interesting feature of the blockchain is that it will become more powerful as it gets more widely adopted. 

We believe in the potential of the blockchain and we believe that majority of the businesses are going to adopt it in the future. However, it doesn’t mean that every business needs to have it in the first place. 

You need to take a deep, hard look at your business and consider all the points that after getting <a href="https://www.alwin.io/contact-us">free technical consultation</a>>

Presented by <a href="https://www.alwin.io/">blockchain development company</a>
I'm Joseph Jacks, founder of OSS Capital, ask me anything!
Tags: ama, opensource, startup
Published: 2019-01-09 17:19:19

---
title: I'm Joseph Jacks, founder of OSS Capital, ask me anything!
published: true
description: 
tags: ama, opensource, startup
cover_image: https://thepracticaldev.s3.amazonaws.com/i/58muf8qwg312yylgjb0h.png
---

I founded [OSS Capital](https://oss.capital/), a new kind of investment platform firm which exclusively invests in, accelerates and starts commercial OSS (COSS) startup companies. We were the lead investor in the DEV seed round back in the fall and have been partnering with the team here to grow as a leading COSS company.

I also founded KubeCon and have been involved in the Kubernetes project since the early days and open source software in a variety of roles.

Ask me anything.
Hello World!
Tags: welcome, helloworld, new, firstpost
Published: 2019-01-09 17:19:00

---
title: Hello World!
published: true
description: My first post on dev.to
tags: welcome,hello-world,new,firstpost
---

Finally I decided to register myself on dev.to. I loved tweeting around on Twitter and following developers from all around the world so this should be the perfect platform for myself!

## Who are you?

I'm Dominik, frontend developer from Berlin and currently working on a modern chat solution for companies @ ZIP-Software.

I love JavaScript, React, development in general and open source and I always try to pick up something new everyday.

I also enjoy video games, general chats and metal music.

## What did you work on?

I think one of my biggest success-stories is my Discord server called "Devcord". We're almost at 4k users and have a very active core community which discusses webdevelopment topics.

We built the bot framework "Cordlr" together which is inactive right now and won't be updated for a long time.

I also worked on the open source Wordpress Framework "Flynt" (https://flyntwp.com) while working for the webdevelopment agency Bleech.

Otherwise I also built several smaller solutions and packages for all kind of things. Just check out my GitHub account!

I think thats it for my first post. Have fun reading it!