teleren/devto huggingface dataset:
Diversity in the Tech Industry
Tags: diversity, inclusion, womenintech
Published: 2020-01-29 09:55:24

---
title: Diversity in the Tech Industry
published: true
date: 2019-06-24 07:03:36 UTC
tags: diversity,inclusion,womenintech
canonical_url: https://www.jcmc.xyz/diversity/inclusion/womenintech/2019/06/24/diversity-in-tech.html
---

_I am still figuring out where my opinions are on this topic, as such I reserve the right to contradict myself, change my mind and just generally be wrong throughout this and every subsequent post on the subject._

So I am what is considered “diverse” within the techy industry. This year I have fully taken advantage of my special status and applied for many diversity tickets to conferences, and have been to loads of events I would never have been able to go to otherwise. But every time I apply I feel a little guilty, like I don’t deserve special treatment and a magic free ticket.

I have justified this to myself by thinking of old me. If you met me now you’d think I’m confident, outgoing, laid back and easy to hang out with (!) but the me of 10 years ago was a very different beast. Due to many circumstances, I was not half the person I am today. I was _painfully_ shy, wouldn’t go anywhere when I didn’t know people, wouldn’t do anything new. Certainly wouldn’t put myself up for some of the stupid things I’ve done recently. I justify my diversity tickets for old me, because if I did dare to leave the house and go to a conference, seeing people like current me, being all happy and normal there might have helped me out a bit.

Promoting diversity in tech (and anywhere else) to me is not about going out and looking for the right proportions of “diverse” people to hire/attend your event/be your friends… It’s about creating an atmosphere where all kinds of people are - and _feel_ - welcome. This does not mean separating ourselves off into thousands of little splinter groups for women in tech, gay women in tech, gay women with nose piercings in tech, gay women with nose piercings and multiple cats in tech… It means creating inclusive events with a sensible code of conduct that is actually enforced when it has to be. I don’t want to go to a meetup for _just_ queer coders, I want to go to an event for coders, some of which may or may not identify as queer.

I don’t know. I’m not part of this new generation of people whose entire identity is based around their “otherness”. I’m a whole person. I am interested in many subjects and I have many features - some of which classify as “diverse”. If I want to go to a techy meetup I want to go there to talk about tech with whoever the hell else wants to go and talk about tech. If they happen to be some kind of minority, well good for them. If I wanted to exclusively talk to gay people I’d join a gay meetup group (I have in fact done this, and made some very lovely friends. Other than when they were planning their wedding we very rarely, if ever, talk about our shared gayness.).

This post, and this opinion is a work in progress.
How to manage free time as a software developer?
Tags: discuss, lifestyle, opensources, blogging
Published: 2019-06-24 06:48:28

---
title: How to manage free time as a software developer?
published: true
description: As a software developer, I am wondering how other developers manage their free time.
tags: discuss, lifestyle, open sources, blogging
---

Nowadays, Technologies are pretty fast changing and we all developers are struggling to sync with those technologies. 

As a software developer, I am wondering how other developers manage their free time. 

If I subtract 15 or 16 hrs of office working time(8hrs) and sleeping from 24hrs, let me know how to manage my free time for -

- blogging,
- contributing open source projects by learning from others
- personal side projects
- helping community like StackOverflow,
- new technologies to learn
- physical exercises for health,
- love, family and friends
- sometimes, learning a new language like Chinese, Japanese
I have no idea what I'm doing, but here Goes #2 Yay! Json!!
Tags: beginners, discuss, node, blog
Published: 2019-06-24 06:45:19

---
title: I have no idea what I'm doing, but here Goes #2 Yay! Json!!
published: true
description: a journey of awareness
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1c4evw2wuy73sly1ebl9.png
tags: #beginner #discuss #node #blog
---
Well folks if you've been playing along, the goal here is to further make life easier with tWC2k (the Work Chaser 2000!) by automating the never ending treadmill that afflicts all freelancers -  the work hustle, thus freeing up to for me to surf and drink beer with my friends. "A noble goal!" I hear you cry. Yes, yes it is. 

So, after a busy weekend of work (cue the violins again), I sat down this morning and thought, "how will this actually work?" In the last post I thought maybe the right way to go would be to build an express app, then test the end points with Postman - and then connect *that* to the Google Calendar API. But, if you think about it (there it goes again, this whole 'thinking' thing... shudder), maybe I need to see if I can get stuff out of the Google API first. Probably a good idea not to put the horse before the cart, right? Let's get something, *anything* out of a Google Calendar, first. Fine. Now, that's all great, but how does one do that? Ah. Lightbulb. One could ask Google, I suppose? (I know, it's bordering on genius again) It turns out there's a [npm script] (https://developers.google.com/calendar/quickstart/nodejs) you run and hey-presto! There's your connection to a Calendar with the last 10 events listed. Even a dullard like me managed to do it.

The thing I managed to get working is on [my GitHub] (https://github.com/jamonjamon/twc2k). It manages to pull the last 20 events from a Google calendar and display them as a json object in the browser. The little bit of code that is there is like my house - a total mess, I apologise in advance, if you're going to look at it. 

Next up: to use this json to find the holes in my calendar and make a new json with available dates.

Thoughts?
Google Maps APi Pricing
Tags: googlemapsapi, pricing, webapp
Published: 2019-06-24 06:38:27

---
title: Google Maps APi Pricing
published: true
description: 
tags: google-maps-api, pricing, web-app
---

Can anyone give me the brief explanation of google maps api pricing? Suppose I have more than 10,000 coordinates (latitude, longitude) which I have to check they are inside in a map polygon or not. Using google map's polygon's google map api contains location api I can understand how many people is inside the polygon. So I have to call the api 10,000 times. Suppose I have the situation 50 times a day so I will call the api around 500,00 times. Can someone give me the pricing of this situation? I am calling the api inside a web application via javascript.
Enumize - 扩展 ActiveRecord::Enum 增加实用方法
Published: 2020-10-20 10:44:08

---
title: Enumize - 扩展 ActiveRecord::Enum 增加实用方法
published: true
date: 2019-06-24 06:32:01 UTC
tags: 
canonical_url: https://ruby-china.org/topics/38728
---

Rails 4.2 (如果没记错）给我们带来了官方的 Enum 解决方案，目前大家都在使用它了。

比如：

```
class Book
  enum status: %i[draft published archived]
end

```

然而我们在使用的时候会发现，往往我们需要将 `status` 字段用中文或其他的方式在界面上显示，而不是一个 `draft / published / archived`。

于是很多人可能会这样：

```
class Book
  enum status: %i[draft published archived]

  def status_name
    case status
    when "draft" then "草稿"
    when "published" then "已发布"
    when "archived" then "归档"
    end
  end
end

```

然后随着项目的推进，你会发现你的 Model 里面大量有这种函数。

为了解决这个问题，我们最初在自己的项目里面实现了一个扩展，用于代替 `enum` 的定义，给它增加一些函数扩展，现在提取成一个 Gem，可以方便以后使用。

* * *

## 使用方法
 
```
gem "enumize"

```

然后你的原来的 enum 定义不需要改变，这个 Gem 已经覆盖了那个方法。

> ![🚨](https://twemoji.ruby-china.com/2/svg/1f6a8.svg ":rotating\_light:") 所以，你可以认为这个 Gem 的引入不会改变 ActiveRecord::Enum 的原有使用方式，你可以无缝的集成到你的项目中！

```
class Book
  enum status: %i[draft published archived]
end

```

现在你有了 `status_name`, `status_color`, `status_value` 以及 `Book.status_options` 这些方法:

- `#{attribute}_name` - 返回 name 的 I18n 信息，用于显示
- `#{attribute}_color` - 返回从 I18n 里面读取 color 的信息（如果你项目用不到可以忽略它）
- `#{attribute}_value` - 返回原始的数据库值，用来代替 `Book.statuses[@book.status]`
- `Book.#{attribute}_options` - 返回一个 Array，用于 `select` tag，比如 `<%= f.select :status, Book.status_options %>`.

配置 I18n:

config/locales/en.yml

```
en:
  activerecord:
    enums:
      book:
        status:
          draft: Drafting
          published: Published
          archived: Archived
        status_color:
          draft: "#999999"
          published: "green"
          archived: "red"

```

config/locales/zh-CN.yml

```
zh-CN:
  activerecord:
    enums:
      book:
        status:
          draft: "草稿"
          published: "已发布"
          archived: "归档"

```

下面是使用的演示：

```
irb> @book = Book.new(status: :draft)
irb> @book.status
"draft"
irb> @book.draft?
true
irb> @book.published?
false
irb> @book.status_value
0
irb> @book.status_name
"草稿"
irb> @book.status_color
"#999999"

```

`status_options` 方法用在 View 里面的演示:

```
<% form_for(@book) do |f| %>
  <%= f.text_field :name %>
  <%= f.select :status, Book.status_options %>
  <%= f.submit %>
<% end >

```
 
## 项目地址

[https://github.com/huacnlee/enumize](https://github.com/huacnlee/enumize)
Weekly blog sharing culture
Tags: discuss, productivity
Published: 2019-06-24 06:15:00

---
title: Weekly blog sharing culture
published: true
description: 
tags: #discuss, #productivity
---

Recently, the place where I work is coming up with this weekly blog sharing culture. The blog includes the contents that frontenders, designers and backenders gather throughout the week. 

Here is the link for [frontend-designer sharing] (https://medium.com/@rai.saugat.sr/frontend-design-knowledge-sharing-4-9fde634d374e)

Here is the link for [backend sharing] (https://blog.yipl.com.np/backend-knowledge-sharing-4-cda62c176f79)

This culture has been fruitful to all of us. Are there any sharing culture around your work area? 

Feel free to share. :)
How & why to create a roadmap? Is it waste of time?
Tags: discuss, help, healthydebate, startup
Published: 2019-06-24 05:59:08

How do you create a roadmap for the software you're building? What process you follow and what tools do you use? And what exactly do you include in a roadmap? What benefits a roadmap provides?

I want to create a roadmap for the app I'm building and I want to add the feature of creating a roadmap into the app, so I'm looking for suggestions on how do people solves this problem.

Btw if anyone interested what I'm building, it's yet another open sourced project management tool.

{% github iluminar/goodwork %}
Var vs Let vs Const in Javascript 
Tags: var, javascript, let, const
Published: 2019-06-24 05:55:17

In this article, we explain the var vs let vs const in JavaScript. Also, we will look difference between var, let, and const Keywords in JavaScript. All these three keywords used to create variables in JavaScript. First of all, you must understand the var keyword to grasp the benefits of let and const keywords. So let’s start one by one.

Var vs Let
First, The main difference between var and let keyword, var is follow function scoped while let is follow block scoped. var can be available either in the global scope or function scope. let can be accessible only in enclosing block {} like in a for loop or if condition.

Let vs Const
const keyword is almost the same as let keyword except only one difference. You can’t reassign value to const variable. If you try to reassign value it will throw syntax Error (value has already been declared).

Here is great article you must have to read. Link to article: <a href="https://speedysense.com/var-vs-let-vs-const-in-javascript/">var vs let vs const in JavaScript</a>
Write to Text File in C# Asynchronously
Tags: csharp, tutorial, beginners
Published: 2019-06-24 09:14:11

---
title: Write to Text File in C# Asynchronously
published: true
tags: csharp,tutorial,beginners
series: C# File I/O
cover_image: https://wellsb.com/csharp/wp-content/uploads/sites/2/2019/05/beginners-file-write-async-min.png
canonical_url: 
---

This is the second part of a C# File I/O series.  Last week, you learned a [synchronous method](https://wellsb.com/csharp/beginners/write-to-text-file-csharp/) for writing to a file.  This week, you will learn [how to asynchronously write to a text file in C#](https://wellsb.com/csharp/beginners/async-write-to-text-file-csharp/) using the StreamWriter constructor within an async method.

Writing to a file asynchronously allows your application to continue executing other tasks while the file is being written. This is helpful when writing large amounts of data or when you will not need to read content from the file immediately.

Performing read/write operations asynchronously is useful with GUI applications, because the program’s user-interface can still be redrawn (if window is resized, for example), while the file I/O operation is being completed.  The technique is also useful in applications where performance is important, such as when developing ASP.NET web apps.

Click through to the source to learn how: [Source](https://wellsb.com/csharp/beginners/async-write-to-text-file-csharp/)
How To Describe A Function Typing Using An Interface In TypeScript
Tags: webdev, typescript, tips
Published: 2019-06-24 04:48:17

---
title: How To Describe A Function Typing Using An Interface In TypeScript
published: true
description: 
tags: webdev, typescript, tips
---

I keep forgetting how to do this but TypeScript supports describing a function signature (its arguments and return) using an interface and it's not that difficult. For example, to describe a regular Node-style callback, you might write something like this:

```ts
interface NodeStyleCallback {
  (err, data): any
}
```

The syntax is essentially a regular interface as you're used to and arguments in the parentheses with a return type:

```ts
interface SomeFunction {
  (arg1, arg2, arg3, arg4): any
}

function someFunction(arg1, arg2, arg3, arg4) {
 // doesn't matter what the return, it'll always satisfy `any`
}
```

You can also assign types to the arguments!

```ts
interface Sum {
  (arg1: number, arg2: number): number
}
```

And while you can't assign an interface to a function, you can use the interface to describe variables -- include arguments like so:

```ts
interface IObject {
  [key: string]: any
}

interface EventHandler {
  (e: IObject): any
}

const handler: EventHandler = (e) => {
  console.log(e);
};

function handleOnClick(domEl, eventHandler: EventHandler) {
  domEl.addEventListener('click', eventHandler);
}
```

## What about generics?

You can make function interfaces generic just like any other interface.

```ts
interface SpecialHandler<U> {
  (event: U): any
}

const handler: SpecialHandler<string> = (eventString) => {
  document.title = eventString;
};

function registerEvent(eventName, handler: SpecialHandler) {

}
```
Improving SQL Query by Adding conditions in Joins
Tags: sql, joins, performance, showdev
Published: 2019-06-24 04:04:53

---
title: Improving SQL Query by Adding conditions in Joins
published: true
description: If we move conditions from where clause to join, performance improves drastically
tags: sql, joins, performance, showdev
---

Recently I was trying to optimize query, this was the query,

```sql
SELECT ... 
FROM A
INNER JOIN B
   ON B.ID = A.ID
WHERE B.Status = 'Done' 
   AND B.DateCreated BETWEEN @Start and @End
   AND NOT EXISTS (...)
   AND A. ... other conditions
```

Table `B` is huge table, and query took couple of seconds. Even though there was an index of (ID, Status, DateCreated).

When I changed query to,


```sql
SELECT ... 
FROM A
INNER JOIN B
   ON B.ID = A.ID AND B.Status = 'Done'
   AND B.DateCreated BETWEEN @Start and @End
   AND NOT EXISTS (...)
WHERE A. ... other conditions
```

Surprisingly query only took few milliseconds. Upon further investigation I found that moving `NOT EXISTS` inside JOIN improved the speed.
Fossil Q Marshal Gen 2
Tags: fossilq
Published: 2019-06-24 03:41:47

Do you know the smartwatch industry has gained popularity due to user-friendly features and experience? Today, you can do what you want on your smartwatch, nevertheless, we have smartphones. Fossil has manufactured some of the classy looking smartwatches for the last couple of years.

Fossil Q Marshall Gen 2 is the <a href="https://geekyegg.com/best-smartwatches/">best available smartwatch</a> with stainless steel strap, besides this, To state that the Fossil Group has grasped smartwatch innovation is a touch of a modest representation of the truth. It's incorporated Android Wear or Misfit half and half watch usefulness into almost the entirety of its brands, including Skagen, Michael Kors, Kate Spade, Armani and, obviously, Fossil.
<a href="https://geekyegg.com/fossil-q-marshal-gen2-smartwatch-review/"><img src="https://geekyegg.com/wp-content/uploads/2018/11/Fossil-Q.jpg"></img></a>

This carries us to the Fossil Q Marshal, the follow-up to the Fossil Q Founder and partner to the Fossil Q Wander. The deduction behind propelling the Marshal and Wander together is that the last has a somewhat littler, increasingly ladylike plan, while the Marshal goes for a progressively rough methodology. 

Yet, past the conventional watch plan, there's not a lot to cause the Fossil Q To meander emerge from the Android Wear swarm. 

Normal battery life and a disillusioning screen make it feel like simply one more Android Wear watch produced to have whatever number of Fossil alternatives available as would be prudent. In any case, there is some comfort to be found in the information that Android Wear 2.0 is, as indicated by Google, seemingly within easy reach.
In RMDBS is join table bad for perfomance ?
Tags: help, discuss
Published: 2019-06-24 03:03:18

---
title: In RMDBS is join table bad for perfomance ?
published: true
description: 
tags: #help #discuss
---
In the company I work for, we use Postgres, one time while we creating a simple chat app, I suggest that we join `messages table` with `user table` so that we can get the `message author name`. But my boss say it bad, he say that join with big table slow everything down, the more data has to join the slower it get.

I only learn basic stuff about RMDBS like join,inner join, etc... . So I really don't understand, why my boss say that. What I learn from school is different, when you design RMBDS model `normalized` you have to use join, it normal stuff.

The model is like this:
```
Message {
  author_name,
  body
}

User {
  user_name
}
```

I really need some help, I am confusing right now, Thank you
CrateD
Tags: replit, python
Published: 2019-06-24 02:49:34

# A Useful Box 
#### Made with Python, SQLite, and peewee-ORM

Don't let the flashy UI fool you. CrateD has some serious Python techniques under the covers. In the demo below, we dynamically create Peewee Models which create tables in a SQLite database. As the user builds the data model, the system records metadata about the models and their fields. This metadata is stored in a special table so that the models can be reconstructed on the fly when the system restarts.
![](https://thepracticaldev.s3.amazonaws.com/i/2lah062hry61bdgbvurt.gif)

You can see the code and try it yourself here:
{% replit @PatrickShouse/crated-demo %}
Go learn together, (code) => return english;
Published: 2019-06-24 01:51:48

### Hi, greetings

I am a senior frontend engineer, and I want to improve my english skills this year, also teach about using javascript and php tools like react, vue, angular, lumen and typescript.

if you can, just help me learn more about English (conversation, verbs and pronunciation).

My native language is portuguese, my english level is A2 accordig to OOPT ( Oxford Online Placement Test )

Graciously,
3 Simple Ways to Secure Your Websites/Applications
Tags: engineering
Published: 2020-09-21 07:17:04

---
title: 3 Simple Ways to Secure Your Websites/Applications
published: true
date: 2019-06-24 00:00:00 UTC
tags: Engineering
canonical_url: https://www.loginradius.com/engineering/blog/3-simple-ways-to-secure-your-websites-applications/
---

It is hard to write 100% holes-free code, no matter how hard you tried. Sometimes it is not even your own fault (language implementation, server setups, etc.) and those factor are likely out of your control. That being said, as developers, we should strive to write our code as…

   
[Read On](https://www.loginradius.com/engineering/blog/3-simple-ways-to-secure-your-websites-applications/)
Failover Systems and LoginRadius' 99.99% Uptime
Tags: engineering
Published: 2020-09-21 07:17:24

---
title: Failover Systems and LoginRadius' 99.99% Uptime
published: true
date: 2019-06-24 00:00:00 UTC
tags: Engineering, AWS
canonical_url: https://www.loginradius.com/engineering/blog/failover-systems-and-loginradius-99-99-uptime/
---

Do you remember the Amazon outage that affected several high-profile customers back in 2011? On April 21st, widely-used sites such as Reddit and Quora were brought down, and many others experienced latency or were knocked offline, too. Early that morning, as part of normal…

   
[Read On](https://www.loginradius.com/engineering/blog/failover-systems-and-loginradius-99-99-uptime/)
Top 10 Developer Tools You Didn't Know You Needed
Tags: javascript, typescript, java, react
Published: 2019-06-23 23:43:31

Your master guide to become a professional model web developer in Mac:
There are my 'Must have' programming tools. They are universally applicable: you will absolutely benefit from using them regarding of the kind of programming jobs. I hope you will find out more useful tools to add to your development environment.

### 1. JetBrains Tools App

Manage installed JetBrains tools, download new ones and open recent projects.
https://www.jetbrains.com/toolbox/
![](https://thepracticaldev.s3.amazonaws.com/i/yof1geh9ys3mhnredsd9.png)

### 2. Dash

Awesome API documentation browser and code snippet manager.
https://kapeli.com/dash
![](https://thepracticaldev.s3.amazonaws.com/i/3m6i3ziw9v1y0gqxpz23.png)


### 3. DBeaver

Universal SQL Client such as MYSQL, Postgres, etc
https://dbeaver.io/
![](https://thepracticaldev.s3.amazonaws.com/i/sqd5jisgdeubltg76ayi.png)

### 4. Studio 3T

Easy IDE for manager and it is free for MongoDB
https://studio3t.com/
![](https://thepracticaldev.s3.amazonaws.com/i/3xmllzmocsj3a7no8u9j.png)

### 5. Spark 

Manager large scale and organize your email while developing
https://sparkmailapp.com/
![](https://thepracticaldev.s3.amazonaws.com/i/uuwf1fhn29b29qif9ghj.png)

### 6. Tor Browser

Anonymity Online. Protect your privacy. Defend against network surveillance and traffic analysis. 
https://www.torproject.org/
![](https://thepracticaldev.s3.amazonaws.com/i/4vpe6es6ecrx69ueo03w.png)

### 7. Alfred

Award-winning app which boosts efficiency with hotkeys, keywords, text expansion and more. Search your Mac and the web, and be more productive with custom actions to control your Mac. 
https://www.alfredapp.com/
![](https://thepracticaldev.s3.amazonaws.com/i/nuvmf55rd15a6u41qg1p.png)

### 8. GitKraken

The most popular Git GUI for Windows, Mac and Linux.
https://www.gitkraken.com/
![](https://thepracticaldev.s3.amazonaws.com/i/hbuq1r1e6gpgywur7ibu.png)

### 9. StarUML3 

All-in-one UML, SysML, BPMN Modeling Platform for Agile, EA TOGAF ADM Process Management.
http://staruml.io/
![](https://thepracticaldev.s3.amazonaws.com/i/w390a9nev800k6zf9uzo.png)

### 10. Insomnia

The most intuitive cross-platform REST API Client.
https://insomnia.rest/
![](https://thepracticaldev.s3.amazonaws.com/i/w92icn3ybmsljwskh2as.png)