teleren/devto huggingface dataset:
Separating front end styling and development
Tags: discuss, angular, react, css
Published: 2019-11-13 13:27:37

I'm in an interesting position right now that I'm wondering how some of you other front end devs manage.

So I am a front end developer working with Angular, I tend to just use angular material for the design that has worked well up until now. 

I'm in a situation now, where I'm working with a designer who wants to add custom HTML/CSS but has no interest or knowledge at all of the development. 

So I have no interest in CSS, and they have no interest in learning the intricacies of Angular. 

So, what are people's experiences with this and how do you manage it in a production project?

Assume the deployment of changes is irrelevant, I'm interested to know how work is managed from a day to day perspective.
The best long-brief history of database management systems! Ok, boomer.
Tags: ithistory, database
Published: 2019-11-13 13:24:52

Yesterday I published  <a href='https://medium.com/@ivankhodyrev/the-best-long-brief-history-of-database-management-systems-cb9a2421a578'>the article on Medium</a> regarding DBMS history. The motivation was to gather information from different sources to get an all-in-one view about the past, the present and the future of database management in an article, not longer than 30 minutes of reading, but with as many details as possible. We needed a source like this for our job, but we failed to find a good one. Most of the articles we've seen were either too shallow and general or too long and specialized. So we decided to fill this gap. If you want to learn new facts about DBMS, <a href='https://medium.com/@ivankhodyrev/the-best-long-brief-history-of-database-management-systems-cb9a2421a578'>welcome</a>! 

The article is a bit opinionated, is written with informal language, and probably have mistakes, so don't hesitate to criticize the boomer! And yeah, it's a free tier on Medium, so you will not see that awful paywall (well... at least until Medium decides to monetize a bit more 😁)
Explain Live-coding Like I'm Five
Tags: explainlikeimfivelivecoding
Published: 2019-11-13 13:18:54

---
title: Explain Live-coding Like I'm Five
published: true
tags: explainlikeimfive live-coding
---

I've been starting to see more and more live coding videos on my youtube feed and it got me wondering about why a person would do it and why the viewer might want to watch someone coding, watching a video game stream is understandable but my mind has a hard time wrapping around the idea of watching someone write code for an hour or so
Which OS is best for you 'actually Me'
Tags: linux, windows, operatingsystem
Published: 2019-11-13 12:56:04

---
title: Which OS is best for you 'actually Me'
published: true
description: 
tags: linux,open source,windows,operating system
---

As it all comes to using personal Operating System, someone says windows is better and someone says linux so mac is still here. But sometimes its all about your development requirements, money, and always theming the OS like pro developer [#acker is here].
#### Conflict between hardware requirements
Mac is always comes with required hardware =>You are Awesome<=
Windows almost which comes with preinstalled hardware when bought laptop, or a windows pc
Linux some laptops like dell sells ubuntu preinstalled and optimized laptops. But when we install linux as of self, the main problems is of wifi drivers that are not in repo

Next post will be released later
comment points you like
Is NAN Not a Number?
Tags: javascript
Published: 2019-11-13 12:53:39

---
title: Is NAN Not a Number?
published: true
description: 
tags: javascript
---
![Alt text of image](https://img.devrant.com/devrant/rant/r_444204_KJJCE.jpg)

Recently Javascript became my main development language so I have to solve complex problems using javascript, one of the challenging tasks was in Numeric operation how to represent the absence of a numeric value, do we use 

```javascript
0           // 0 has a specific value 
undefined   // it is not numeric
null        // it is an object
false       // boolean type
-1          // another specific value
```

In IEEE spec give special bit pattern or values call NAN, it is called invalid number

```javascript
typeof NaN  // "number"
```
So if we use numeric operation in a function we need to get a numeric answer

```javascript
const ageCompare = (age,newAge) => { 
  return Number(age) - Number(newAge)
}

const result = ageCompare(10,2)     // 8
const result = ageCompare(10,"n/a") // NaN
const result = ageCompare("myAge","n/a") // NaN

Number.isNaN(result) ... // true
```

*** NAN is the only value that not equal to each other 

```javascript
NAN===NAN  // false
```

Please refer following a link that gives a good explanation by Kyle Simpson 
https://frontendmasters.com/courses/deep-javascript-v3/nan-isnan/
Kubernetes Secrets 101
Tags: kubernetes, devops, docker
Published: 2019-11-13 12:33:27

What is a Kubernetes Secret?
There are many times when a Kubernetes Pod needs to use sensitive data. Think for examples of:

- SSH keys.
- Database passwords.
- OAuth tokens.
- API keys.
- Image registry keys.

Kubernetes is designed to have a declarative syntax. Object definitions are stored in YAML (or JSON) files and - typically - placed under version control. Adding confidential information to a version-controlled file (that anyone can view) is against any security best practice. For that reason, Kubernetes includes Secrets.

A Secret is just another Kubernetes object that stores restricted data so that it can be used without being revealed. Kubernetes users can create Secrets, and also the system itself establishes and uses Secrets.

You can find Secrets referenced through a file attached to the pod through a volume. The kubelet also makes use of Secrets when it needs to pull an image from an Image Registry that requires authentication (for example, a private Docker Hub account, AWS ECR, or Google GCR). Additionally, Kubernetes makes use of Secrets internally to enable Pods to access and communicate with the apiserver component. The system automatically manages API tokens through Secrets attached to the Pods.
https://www.magalix.com/blog/kubernetes-secrets-101
[Git] git ignores .gitignore
Tags: git
Published: 2019-11-13 12:31:48

---
title: [Git] git ignores .gitignore
tags: git
published: true
---

Thanks for the [question & answer](https://stackoverflow.com/questions/11451535/gitignore-is-ignored-by-git) on StackOverFlow. It saved my day.

So, I save the way.

```sh
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
```

---

## 🔗 Parent Note
{% link n350071/my-git-note-5259 %}
A trap point at "push your rails app to Heroku which uses mysql"
Tags: rails, heroku
Published: 2019-11-13 12:25:28

A trap point at "Push to Heroku your rails app with mysql"

## 🤔Situation

- I have a Heroku account
- I have installed Heroku CLI, and Logged in.
- I set my env into Heroku
- I add the "ClearDB MySQL" Add-Ons.
- I made sure the connection from my laptop to the ClearDB by sequel-pro
- My rails app run on my local with mysql2


```sh
$ brew tap heroku/brew && brew install heroku
$ heroku login
```


```sh
$ heroku config -a my-app-name
=== my-app-name Config Vars
CLEARDB_DATABASE_URL:     mysql://user_name:password@host/database_name?reconnect=true
DATABASE_URL:             mysql://user_name:password@host/database_name?reconnect=true
DB_HOST:                  host
DB_NAME:                  database_name
DB_PASSWORD:              password
DB_USERNAME:              user_name
LANG:                     en_US.UTF-8
RACK_ENV:                 production
RAILS_ENV:                production
RAILS_LOG_TO_STDOUT:      enabled
RAILS_SERVE_STATIC_FILES: enabled
SECRET_KEY_BASE:          xxxxxxxxxxxxxxx
```

## 🚧 Trap point
I faced like the error.

```
LoadError: Could not load the 'mysql' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.
```

## 🦄 Solution

I've changed the enviroment variables

|  | |
| --- | --- |
| form | mysql://user_name:password@host/database_name?reconnect=true |
| to   | mysql2://user_name:password@host/database_name?reconnect=true |

##  👍 then,..
It makes Heroku deploy your app again. Maybe you need to run migrate again.

```sh
$ heroku run -a my-app-name bundle exec rails db:migrate
```

##  👍 for debag

```sh
$ heroku run -a my-app-name bundle exec rails console
```
[Feedback] Gitlab: Product Usage Tracking
Tags: feedback, highstandard, gitlab
Published: 2019-11-13 11:59:18

---
title: [Feedback] Gitlab: Product Usage Tracking
published: true
description: 
tags: #feedback #highstandard #gitlab
---

- https://gitlab.com/gitlab-com/www-gitlab-com/issues/5672#note_243535906
- https://gitlab.com/gitlab-com/www-gitlab-com/issues/5672#note_243962234


> ... We're interested in speaking with users of Gitlab.com that have feedback regarding Telemetry on GitLab.com. ...

only can speak for me, i would love to give feedback but i don't do video calls and i don't want to fill out a form with my personal data (my gitlab username is a unique identifer) on third party sites which can't be trusted.

the form is on a third party server (qualtrics.com) which uses cloudfront.net (=amazon) and relevantid.com to give feedback about tracking and privacy.

the title of the relevantid page / imperium.com page is "The Industry Standard for Digital Fingerprinting and Data Quality"

please switch to opensource tools or create a simple form by yourself (i am  sure nobody would mind a simple plain long html form without any javascript and fancy design) and host it yourself. the topic is to critical to require video recording and the use third party services which use tracking.

i think i can speak for most of us "We don't want tracking"
:(
Old product UI Code migration to React
Tags: react, redux
Published: 2019-11-13 11:55:25

Hi everyone,

Currently i am working on project where my company is trying to move their old UI product code to React Framework.
Problem is that our product is enterprise application & it has maximum of code written in plain JS & JSPs which gets rendered in iframe(s).We have around 800-900 JSPs and huge unique screens which have multiple of functionalities, these screens are created in Backbone.js/Ext.js.
To convert it into React should be very huge considerable amount of work.

What we have decided to that to convert one screen at a time with the help of iframes where we will develop using node js and then use node to fire build and we will use build generated JS/HTML/CSS files in our product.

We follow two weeks of sprint cycle, so we will release react converted new screen(s) in each sprint, so using this approach we plan to release each page(s) as part of each sprint & port entire application into React pages.
We don't want entire application porting into React as part of single major release, our intention is to use release page(s) per Sprint.

Do you think the approach which we are taking is proper? If not then please suggest any other feasible alternatives.
Conditional hooks, maybe
Tags: react, javascript, hooks
Published: 2019-11-13 11:31:27

Most of the times I can handle development with react hooks without additional tricks. Until today I had no issue with the rules of react-hooks, but today was the day when everything changed.

We use a third-party hook that handles the persistence of the state in our simple form, but it does not handle the case if the local storage is not available. We requested a fallback implementation in the third-party hook but we still needed a fix, a temporary fix maybe.

Hooks can't be used inside conditions, and I needed to use a different hook based on the local storage availability.

Here is my solution:


``` javascript
const getHook = () => {
  try {
    // this throws an error if the localstorage is not available
    window.localStorage.getItem('key'); 

    return usePersistence;
  } catch {
    return useState;
  }
};
```

The `getHook` function tests the local storage then it returns the right hook based on the trycatch success state.

Based on this solution we need to get an initial value (because our hooks use different initial values)

``` javascript
const getInitialValue = () => {
  try {
    window.localStorage.getItem('contact-form');

    return 'contact-form';
  } catch {
    return {};
  }
};
```

So now we have a fallback for our third-party hook and the right initial value for each case.

The usage is the following:

``` javascript
// inside the functional component
const [formValues, setFormValues] = getHook()(getInitialValue());
```

Not the nicest solution, but it works.

English isn’t my first language, so please excuse any mistakes.

Thank you all for your attention and time, hopefully, my solution won't last long in the project.
5 things I learnt during my first year as a developer
Tags: productivity
Published: 2019-11-13 11:20:18

I managed to 'survive' a year working as an Android developer. Congratulations to me.

Here are top 5 things that I learnt over these past 14 months, listed in no particular order.

1. Learning curve slows down over time, but it never stops
I started my developer career as an Android Developer intern, and those days were just intense! I had new stuff coming every other hour, and that was just pure gold. I thought things would always be like that, and I was both excited and scared at the same time. But once I started getting the hang of it, things started to slow down. But, what I've understood is this process never stops. You learn new things in your field every day, just not as much as in the early days.

2. Linux is better than Windows
Unless you require some specific application that runs on Windows only, I think Linux is a heck of a lot better OS for doing all the development stuff. Period. I had tried Linux Mint because it looked close to Windows, but that was before I was doing the development work.
Later I switched to Ubuntu, and I admit I was not very impressed, specially with the UI. Desktop and UI looked as if I was in 2009. But it didn't take much time for me to realize that Ubuntu was just, and read well when I say this, 'distraction-less'. I, all of a sudden, didn't need all those fancy applications or fancier looking UI or disruptive updates. Ubuntu got the job done calmly, yet in a superior way. I've never had to look back ever since.

3. Looking at how others code is like taking three step ahead instead of two
No doubt I wrote messy codes, and I still do, but I can say for a fact that looking at others' code made me learn so much faster, specially regarding "how" to code, rather than "what". Of course I still cherish the idea of discovering something on my own. But looking at somebody else's masterpiece and trying to replicate that, is just priceless.

4. There is a skill that you do as your job, and other skills that need to come with it, and the latter is equally important
As an Android developer, Java/Android was my main skill. But there were others that had to come with it, in a way, like Git for example. And not to mention designing and design principles etc. Sometimes these side skills are what make you stand out.

5. Coding a polished project from 0 to end, will take really long time
I need not explain more on it.


[Time's up!]
Rest for some other time I guess.
Are you excited to go to work tomorrow? I am
Tags: career
Published: 2019-11-13 11:18:49


The easiest way to get excited about your job is to talk about what you do. And the best way to do that is to explain them rather than just tell them.

Most people when they tell others what they do, they go something like this: "I'm an engineer", "I work in IT", "I build mobile apps", "I do DevOps", and so on...

While this is technically accurate doesn't tell anything relevant and doesn't spark enthusiasm on what you actually do.

Try changing your description to something more explicit about what you do, who do it for and how it helps those people.

When doing that, you will notice that understanding and telling the story time and time again will help you in different ways:

* It will keep you focused on what you need to do
* It will help you prioritize tasks
* It will help you prioritize learning
* It will help you understand your end-users
* It will help you build better relationships with them.
* It will help your thought process
* It will help you imagine new ways to achieve those goals

Additionally:

* They will understand how you can help them
* They will remember you
* They will want to work with you, or at least learn more about what you do

Here is an example of how I did it:

Before: 
"I'm a Junior CRM Developer"

After: 
"Using CRM, I provide every revenue-generating person in the business with the information they need, at the time they need it, to close another deal"

You will find this works equally good for both job hunting and when looking for clients for your business.
How to Build а Social Network From Scratch: Decide on the Type
Tags: socialnetwork, socialnetworkwebsite
Published: 2019-11-13 10:57:22

![how to build a social network website from scratch](https://d32myzxfxyl12w.cloudfront.net/assets/images/article_images/55180d117b3ed951d8eba177aeaacf57032fc340.jpg?1570704962)

Social media networks are built for different purposes: interaction, providing useful information and uniting users based on their interests. Knowing the needs of your target users will help you decide how to make a social media website interesting for them.

The main types of social network services are:

1 Media sharing websites

They focus on the display and exchange of multimedia content. They allow users to share content in the form of photos, videos, audio, etc. Great examples here are: Instagram, YouTube and Flickr.

2 Business and professional sites

They help establish business connections and create a brand image. They provide users with the ability to communicate, create groups by professional interest, exchange professional expertise, and even find new jobs. The most popular examples here are: LinkedIn and Glassdoor. 

3 Informational sites

They provide information and help people find answers to relevant questions. Such platforms are often created in the form of forums and review sites. The most popular social network examples here are: Reddit and Quora.

4 Educational websites

They are designed to help students communicate with each other and to look up answers, get help from teaching staff, conduct research, and much more. The most popular ones here are: the Student Room and the Math forum.

5 Hobby networks

They are quite popular these days because users can actively search for communities that share their interests. You can find many sites that can be dedicated to almost any hobby that is currently popular.

6 Academic websites

They unite scientists and researchers who are willing to share knowledge, present the results of their work, and find out about the most vibrant research. ResearchGate and Academia.edu are the greatest examples in this category.

7 Social networks

They allow users to communicate with each other directly, establish personal connections, and unite in groups. Facebook and Twitter are the most remarkable examples.

8 Dating platforms

They allow users to search for their soulmates.

[Here](https://mlsdev.com/blog/how-to-build-a-social-network-website-from-scratch) you will learn about why it is worth investing in social network development and how to build a social network website from scratch.
Email client for MAC. Which one? 
Tags: discuss, productivity, tips
Published: 2019-11-13 11:15:59

There are many email clients for macOS.

I am a MAC user, and this is a really important topic for me personally and for my research in this area.

How did you choose email client for MAC from the variety of them?
Why did you choose your email client?

Please share your thoughts with me. Comment below!👇
New Workshop: TypeScript for React (and GraphQL!) Devs with Michel Weststrate
Published: 2019-11-13 11:15:31

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

The React community is moving to TypeScript fast & it can be hard to keep up. What better way to learn about both TypeScript & how to migrate a React app to it than with none other than [@mweststrate](https://twitter.com/mweststrate) who wrote MobX in TypeScript?

GraphQL is also taking over the world and has typing included, however, it’s a pity that you often have to define your typing twice, once in your GraphQL backend and then again on the client. Michel will show you how to make this process easier during the workshop.

You can get your ticket and more info here [https://www.react-europe.org/](https://www.react-europe.org/#schedule-item-1805)

This workshop will get you up and running with the basic and more advanced patterns of TypeScript. TypeScript has some powerful features, that fit very well with the dynamic nature of the JavaScript language. In this workshop we will cover all the essentials and some of the unique features of TypeScript.

But beyond that, this is a workshop for React devs! To practice the theory, during the hands-on parts of this workshop we will be migrating an application from plain JavaScript to TypeScript.

[Michel Weststrate](https://medium.com/u/de4496bfa1e2?source=post_page-----c6e09a315e99----------------------) has been working with TypeScript full-time for the last 3 years. He authored several open source libraries (such as MobX and MobX-state-tree) that are written in TypeScript and leverage some of it’s finest features.

Get your ticket here [https://www.react-europe.org/#tickets](https://www.react-europe.org/#schedule-item-1805)

**Also in case you missed it, we have six other workshops to choose from about **[React.js, React Native, GraphQL, Next.js, Gatsby, Forms](https://www.react-europe.org/#schedule) and more.

Cheers and see you soon,

\-the [ReactEurope](https://twitter.com/reacteurope) team

PS: if you would like to sponsor the conference, get in touch with us at [reacteurope@eventlama.com](mailto:reacteurope@eventlama.com?subject=sponsoring%20ReactEurope%202018)
C# code to calculate Depreciaiton
Published: 2019-11-13 11:09:49

i want to write a code that monthly depreciates an asset over time using the straight line depreciation method(formula= Purchase Price of Asset - Salvage Value) / Estimated Useful Life of Asset) in c# asp.net, i dont have any code yet but this link below shows the screenshot of what i wanna achieve
https://thepracticaldev.s3.amazonaws.com/i/fanh9vp9p5y85p4ep7tm.PNG