teleren/devto huggingface dataset:
Open Source Product Analytics With PostHog
Published: 2020-06-08 12:48:47

<p>You spend a lot of time and energy on building a great application, but do you know how it's actually being used? Using a product analytics tool lets you gain visibility into what your users find helpful so that you can prioritize feature development and optimize customer experience. In this episode PostHog CTO Tim Glaser shares his experience building an open source product analytics platform to make it easier and more accessible to understand your product. He shares the story of how and why PostHog was created, how to incorporate it into your projects, the benefits of providing it as open source, and how it is implemented. If you are tired of fighting with your user analytics tools, or unwilling to entrust your data to a third party, then have a listen and then test out PostHog for yourself.</p><p><a href='https://www.pythonpodcast.com/posthog-product-analytics-episode-266/'>Listen Now!</a></p>
Run Magento 1.9.4 using PHP 7.4

Tags: php
Published: 2020-06-08 12:46:18


I know that magento 1.9.4 will support for php7.2. Php7.2 security support will end by this year nov 2020(https://www.php.net/supported-versions.php).

For considering security aspect, planning to run magento 1.9.4 using php 7.4.

can we run magento 1.9.4 using php 7.4?

Please let me know (magento expert*).

Thanks,
That Second Interview
Tags: javascript, codenewbie
Published: 2020-06-08 12:45:46

All Flatiron grads are quite kindly gifted a free mock technical interview with a rep at [Skilled](https://www.skilledinc.com/). 

To me, this interview felt quite authentic. I had all the nerves and sleepless nights that precede an interview.

And yet. The interview was not only an incredible learning experience but a true delight. 

Let me tell you why this surprised me.

**1) I finished the interview feeling positive.** I'll explain why this is a jaw-dropper.

As a career changer, I struggle to exude confidence about my technical skills. Sure I have 20 years of work experience, but mere *months* of coding. Months, folks.

In this interview, my interviewer met me where I was. I was highly encouraged and never left "stuck" for long without a nudge.

Not able to complete the coding challenge, I still walked away uplifted because my interviewer said,

>"You know what you're doing - you just need to practice. That's exactly how we all get better."

Can't tell you how validating that was.

**2) Without nerves, I was the real me.**

At the beginning, my interviewer spent a few minutes small talking, and that naturally led into the first gentle interview question - tell me about your coding journey.

But when he asked, it sure felt like he cared. So, every question that followed, I felt I could be genuine in return.

Thus my slowly nerves melted away and the interview became conversational. 

*This* made an impact on me because I discovered that when I wasn't nervous about what the interviewer thought of me and if my answers were right, I could just be me. 

**3) Interviewing makes me better.**

I've always had a wee bit of test/performance anxiety, and that certainly carries into interviews. From test taking to racing a marathon to interviewing, I become a stressed version of myself when the stakes are high.

What has always helped is **practice**. And yes, I am noticing a theme here, too.

My mindset is shifting around interviewing. My hesitations center around my technical skills - I'm just not good enough, I'd told myself, why interview?

But perhaps that needs adjusting. Maybe it's not up for me to decide if I'm good enough. Maybe I need to keep practicing coding but *also* keep interviewing.

The only way to get better at something is to keep doing it. If you wouldn't mind, just remind me of that before my next interview!

Thanks, as always, for being here and reading. Always love hearing from folks, so don't hesitate to comment below. All the best.
UI DESIGN E A PSICOLOGIA DAS CORES
Tags: ui, ux, design, cores
Published: 2020-06-08 12:35:17

As cores tem o poder de estimular nosso cérebro e provocar reações diretamente ligadas a nossas emoções rapidamente. Devemos levar em consideração a mensagem que a nossa Interface deseja passar para os usuários e assim definir quais cores se adequam melhor ao projeto.
Vamos conhecer mais sobre o significado das cores?

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d0q64s1dut35mq7iezz8.gif)

Azul
Calma, serenidade, confiança e tecnologia. Já reparou que a maioria das Redes Sociais usam a cor azul como: LinkedIN, Facebook, Twitter, Skype, Telegram? Utilizam dessa cor para trazer a ideia de tecnologia e de algo que acalma. É capaz de produzir substâncias químicas dos calmantes!

Vermelho 
Força, paixão, perigo e energia. É capaz de aumentar a frequência cardíaca, pressão, respiração e o apetite. Por isso marcas como Mc Donalds , Coca- Cola e Bobs, utilizam dessa cor. Por ser a cor do perigo, a maioria das placas de sinalização são vermelhas.

Amarelo 
Otimismo, alegria, gratidão e clareza. Traz o entendimento e estimula a comunicação. Os emotions são amarelos porque colocam mais vida nas expressões.

Verde 
Natureza, frescor, esperança, saúde e vida. É usada em hospitais e até em uniformes pois além de representar a saúde essa cor relaxa os pacientes internados reduzindo a ansiedade.

Rosa 
Romantismo, doçura, tranquilidade e delicadeza. Costuma ser usada em marcas infantis e de doces. É atribuída as mulheres, e tende a chamar o público para conhecer um novo produto.

Laranja 
Alegria, entusiasmo, criatividade e diversão. Usada por marcas mais jovens e inovadoras como a Nickelodeon, Fanta e a Gol linhas aéreas. Serve para aumentar a visibilidade sendo utilizada em cones, uniformes de garis e motoboys por exemplo.

Roxo 
Paz, limpeza, mistério e luxo. Remete a espiritualidade e ao bem estar. Geralmente é usada em clínicas de estética e relaxamento.

Cinza 
Solidez, inteligência, independência e autossuficiência. Ideal para ambientes corporativos, mas pode ser uma cor negativa representando a solidão.

Branco 
Paz, conforto, serenidade e clareza. Auxilia na clareza mental, representa um novo começo, por isso é a cor mais utilizada no réveillon por trazer a sensação de renovação. Muito utilizada em sites minimalistas onde menos (cor) é mais!

Preto 
Luto, mistério, sofisticação e autoridade.  Geralmente é utilizada em marcas que trazem uma elegância como perfumes importados por exemplo. Pode se tornar uma cor negativa, por isso é bom equilibrá-la com branco ou prata para diminuir o contraste. 


E aí, qual a sua cor preferida?!
Deno React | Using Create React App with Deno
Tags: deno, react, beginners, tutorial
Published: 2020-06-08 12:26:32

You can combine <strong>react</strong> and <strong>deno</strong> together by using create react app to build an application and serve up the static files via deno. This is exactly what we do in this tutorial where we use the deno ABC library to connect CRA to deno, as well as add an API get request which could be later added as part of the app.

{% youtube UUiC5RoTek8 %}
<center>[Youtube: Deno React ](https://youtu.be/UUiC5RoTek8)</center>

Tutorial includes:
* Installing and building CRA
* Setting up Deno with ABC library
* Creating static files for serving the CRA build
* Creating an API endpoint

Deno:
https://deno.land/

Deno Abc:
https://deno.land/x/abc/

Create React App:
https://reactjs.org/docs/create-a-new-react-app.html

## Follow and support me: 
Special thanks if you subscribe to my channel :)
* [🎞️ Youtube](https://www.youtube.com/channel/UCvM5YYWwfLwpcQgbRr68JLQ?sub_confirmation=1)
* [🐦 Twitter](https://twitter.com/adrian_twarog)

## Want to see more:
I will try to post new great content every day. Here are the latest items:
* [Adobe XD to Fully Responsive WordPress Site](https://dev.to/adriantwarog/adobe-xd-to-fully-responsive-wordpress-site-16e0)
* [Adobe XD to HTML Full Process](https://dev.to/adriantwarog/adobe-xd-to-html-full-process-ao6)
* [Full Tutorial on how to use SASS to improve your CSS](https://dev.to/adriantwarog/full-tutorial-on-how-to-use-sass-to-improve-your-css-57on)
* [Creating a Mobile Design and Developing it](https://dev.to/adriantwarog/creating-a-mobile-design-and-developing-it-5c4o)
Looking for agencies or freelancers who face those problems:
Tags: freelancer, client, agency, message
Published: 2020-06-08 12:18:42

Looking for agencies or freelancers who faces either:
- slow communication from clients.
- time-wasting back and forth with clients.
- Losing track of information and updates
- not receiving information from client on time
- wanting to meet clients deadlines
- Long and tiring client onboarding

I'm building http://messageclient.com/ that aims to fix all these issues. But to ensure I make this product amazing for both the client and the user, I need to gain further knowledge of the user experiences before we launch. That's where I need your help if possible. 

Comment below if you'd like to chat about this
Time Tracking is NOT a Band-Aid for Management or Trust Problems
Tags: devops, productivity
Published: 2020-06-08 12:18:20

If you really want to demoralize your engineering team and galvanize their distrust for time tracking and management, then you can use their time sheet data against them.

![gif from officespace](https://media1.giphy.com/media/lSVL6vdhdZVPW/giphy.gif?cid=ecf05e47f44aa02649455a39bc60867b97e66da350ad878c&rid=giphy.gif)

Call us into a meeting. Pour over our time entries line by line and pick apart how we spent our week.

For added flavor, go ahead and tell us how much time you think we <i>should</i> have spent on those tasks—it’s sure to liven us up!

Aka, take a tool that can help us make estimations, learn about our work, and plan better and use it as a tool to spy on us. We love that. 

<h3>Dear managers, understand that knowledge work is not linear.</h3>

There’s no straight line to the final answer, and that means that there’s no quantifiable way to determine exactly how long it’s going to take you to solve a given engineering problem.

Greg Smith from [Bocoup](https://bocoup.com/blog/developer-weeks) points out (while arguing against time tracking as a mechanism, ironically) that a developer’s time generally looks something like this:
![chart with time spent over a week with peaks midday](https://lh6.googleusercontent.com/q_fxvXw4k4PzDI4ZJ682pLsT3PkdYCialk8HMdnKbX1LQx1GW7ICPSklLVU4ize8vW9oDIBzgevRO_3rKq1IEaFMlJK50Vav4-UX9OZ6fgh9el-L9AbpMQKVmK8Tc-eujL6O4hR5)

So, yeah, there will be down time. No one can work at peak productivity all day–let alone all week. But that’s totally normal and okay. It shouldn’t reflect poorly on a developer or the team.

As such, there’s no value in scolding a team for using “too much time” on a particular task.

<h3>What managers are communicating here is clear: They don’t trust your team.</h3>

If they trusted them, then thy would provide them with autonomy to complete the work that’s before them. You would assume that their interests are aligned with yours and that they have no ulterior motives that involve lying or falsifying their time.

Ask yourself: Does your manager trust your team?

If they can’t trust your team to complete their work and provide accurate accounting for their time, then there are <i> much deeper  </i> issues to unravel here.

<h3>TDLR; </h3>
Don’t wield a developer’s time data like a weapon to be used against them. If at any point you find this to be the case, then it’s clear that there’s a much bigger problem.

This is a no-nonsense excerpt from [here.](https://www.7pace.com/blog/developer-time-tracking-fails)
Docker pipeline with Typescript + Express for production
Tags: typescript, docker, express, backend
Published: 2020-06-08 12:10:02

---
title: Docker pipeline with Typescript + Express for production
published: true
description: 
tags: typescript,docker,express, backend
cover_image: https://miro.medium.com/max/9986/1*hohK6EONXCAy4mTRkT8K8A.png
---
This post will guide you through how to setup docker for a express app on typescript. This also works for other frameworks besides express.
This post assumes you have used docker.
We will be using multi stage builds on docker as we have to 
compile the express app before we can actually use it on production. For reference on multistage build, check it on here 
https://docs.docker.com/develop/develop-images/multistage-build/

In a nutshell, as the name suggest multistage build is nothing more than a docker file split into several stages , each stage creating an intermediate image and passing the result to the next step and so on. The main difference using multi stage build vs using single build for compiling and running an app is the final image size.


```docker
## this is the stage one , also know as the build step

FROM node:12.17.0-alpine
WORKDIR /usr/src/app
COPY package*.json ./
COPY . .
RUN npm install
RUN npm run build

## this is stage two , where the app actually runs

FROM node:12.17.0-alpine

WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --only=production
COPY --from=0 /usr/src/app/dist ./dist
EXPOSE 3000
CMD npm start

```
This is the dockerfile we will be using for building and running the app. Here we have defined two stages, one for compilation and another stage is for actually running the app.
The first stage code is nothing different from a typical nodejs dockerfile, the only difference is we are building or compiling the app with `npm run build ` .Now emphasis on the second stage.
The important lines here are, we are only installing dependencies for production and also copying dist. The copy command here tells docker to copy the dist files from the build step on to the deployment stage.Then we are exposing the port like we usually do and atlast, running the npm command for starting the app.
The full project can be found at:
https://github.com/rubiin/dockerpipeline-with-typescript-express
How to elegantly use enum in rails
Tags: ruby, rails, elegantly
Published: 2020-06-08 12:04:48

---
title: How to elegantly use enum in rails
published: true
description: More enum API
tags: Ruby, Rails, elegantly


---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/w2y2a7yfdcpn4hojp0xc.jpg)

### What is enum?

`enum` is data structure more simpley and readable also is a useful method can help us do more things than you thinks.

``` ruby
enum :status {open: 0, close: 1, unknow: -1}
```

We can see `status` maybe **open**, **close**,**unknow** more readable for **0**,**1**,**-1** isn't it? 

### Use `enum` elegantly

### On `Rails`  use `enum` to defined `select` tag **options** is more simpley

```ruby
# activity.rb
class Activity < ActiveRecordBase
  enum :status {open: 0, close: 1, unknow: -1}
end

# zh-CN.yml
zh-CN:
  active_records:
    enums:
     activity:
       open: 开启
       close: 关闭
       unknow: 未知

# en.yml
zh-CN:
  active_records:
    enums:
     activity:
       open: Opened
       close: Closed
       unknow: Unknown

# activities/_form.html.erb
<= f.select :status, Activity.status_options, {}, class:'form-control' %>
```

All is done  you just defined **i18n** for **activity** form add `select` tag to dom with options `[open,close,unknow]` The output 

``` html
# The result 
<select class='form-control'>
  <option value='open'>开启</option>
  <option value='close'>关闭</option>
  <option value='unknow'>未知</option>
</select>
```

It's too simple and elegantly

### More useful API

```ruby
# get enum value 0,1,-1, here status is open, close or unknow
Activity.statuses[status] #=> 0,1,-1

# opend?, close?, unknow?
activity = Activity.find(1)
activity.opend? #=> true | false
activity.close? #=> true | false

# open!
activity = Activity.find(1)
activity.open! #=> activity.update!(status: 0)
activity.close! #=> activity.update!(status: 1)

# with scopes
class Activity < ActiveRecordBase
  scope :open, ->{where(status: 0)}
  scope :close, ->{where(status: 1)}
  scope :unknow, ->{where(status: -1)}
end
Activity.open # where status = 0

# with not scope
class Activity < ActiveRecordBase
  scope :not_open, ->{where.not(status: 0)}
  scope :not_close, ->{where.not(status: 1)}
  scope :not_unknow, ->{where.not(status: -1)}
end
Activity.not_open # where status != 0
```

Hope it can help you :)
Exploring the definition of a tree
Tags: math, graphtheory
Published: 2020-05-25 20:38:53

---
title: Exploring the definition of a tree
published: true
description: Let's look at why trees are defined the way they are in graph theory.
tags: math, graphtheory
---

When you look at the definition of a tree on Wikipedia, you'll see something like:

> In graph theory, a tree is an undirected graph in which any two vertices are connected by exactly one path, or equivalently a connected acyclic undirected graph.

The first bit of that definition may seem weird at first. An acyclic undirected graph might make more sense. But it's the first bit of the definition that explicitly highlights an essential property of a tree.

A graph `T` is a tree if and only if between every pair of distinct vertices of `T` there is ***a*** unique path.

Let's prove it! 

Assume graph `T` is a tree. Let `u` and `v` be distinct vertices in that assumed tree. If `T` has one vertex, then the conclusion is satisfied automatically as there is only one path to get to one vertex.

Now, we must show two parts:

1. There is a path.
2. There is not _more than one_ path.

The first part is satisfied by our assumption that `T` is a tree. Recall that trees are acyclic connected graphs. Check ✔️.

Next, to show that the path is _unique_, suppose that our tree actually has _two_ paths between `u` and `v`. 

If there are two paths from `u` to `v`, we know that these paths start the same way and differ somewhere along the way. Because these paths go to the same end, the paths must converge at the same vertex. 

In fact, they must diverge at a common vertex `u'` and converge at a common vertex `v'`. Look what that gives us:

```
   u
   u'
  / \
 x   y
  \ /
   v'
   v
```
We arrived at a contradiction regarding the "acyclic" property of trees. Trees are "acyclic connected graphs." What we have shown above is a cyclic connected graph, not a tree.
Daily Developer Jokes - Monday, Jun 8, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-06-08 12:00:08

---
title: "Daily Developer Jokes - Monday, Jun 8, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Monday%2C%20Jun%208%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258ca137e1.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Why was the computer freezing?

___A:___ It left its Windows open!
 -->
7 FREE Courses to learn ANGULAR
Tags: angular, webdev, codenewbie, javascript
Published: 2020-06-08 11:53:54

Angular is one of the most biggest community of developers who keep on sharing amazing things.
Here are some of the FREE courses which will take you through the basics for working in Angular.

1. [Angular For Beginners](https://angular-university.io/course/getting-started-with-angular2)
2. [Angular Basics for Absolute Beginners](https://www.udemy.com/course/angular-6-for-beginners-by-harsha/)
3. [Getting Started with Angular 2+](https://www.udemy.com/course/getting-started-with-angular-2/)
4. [Angular - Mastering the Basics](https://www.udemy.com/course/angular-mastering-the-basics/)
5. [Build an Angular and Spring MVC Web Application](https://www.udemy.com/course/build-an-angular-and-spring-mvc-web-application/)
6. [MEAN Stack For Web Developers: Build Websites on Javascript](https://www.udemy.com/course/javascript-based-website-in-minutes-using-the-mean-stack/)
7. [Learn Angular 4 from Scratch](https://www.udemy.com/course/learn-angular-from-scratch/)

All these courses are free as on 8th June 2020. I hope this list will be useful for beginners who are getting started with Angular.
Top 8 no-code signup form builders – Review
Tags: webdev, nocode, formbuilder, appdevelopment
Published: 2020-06-08 11:53:25

Hi guys, 

For those who have ever faced the need to build a signup page fast and with no hassle, check a concise and to the point review of no-code signup form builders.

Typeform, Paperform, Formstack, Formsite, Wufoo, and other form builders are on the list.

The screenshots of the tools' interfaces are inside as well so that you could decide whether they're appealing for you or not.

Check the review here: https://hubs.ly/H0rcvLx0
New Smart UI for React with 60+ components
Tags: react, datagrid, kanban
Published: 2020-06-08 11:53:06

---
title: New Smart UI for React with 60+ components
published: true
description: Toolkit with 60+ React UI Components - Grid, Kanban, Gantt, Chart and more 
tags: react, reactjs, datagrid, kanban
cover_image: ''
---
Demos: https://www.htmlelements.com/react/