teleren/devto huggingface dataset:
The Worst Developer
Tags: career, beginners, management
Published: 2019-08-07 16:27:32

When I was getting started in Web Development, I was told it was good to be the most precise and detail-oriented you can possibly be. I worked with people who had much more technical knowledge of what goes on _behind the scenes_ and I felt very confused. Not only was I not able to understand how everything worked, I also didn't feel a strong need to learn a good 80% of it. I wanted to build stuff, I didn't care whether the Fibonacci sequence was useful for authorization systems or that writing your own code was often much more efficient than using a library. I just wanted to make the things that excited me and I wanted to do it quickly, so I became a product developer.

I define a "Product Developer" as a developer who has a product-first mindset. Someone who prefers to focus on writing real functionality, as efficiently as possible. This doesn't mean that code quality and code efficiency aren't important; on the contrary, they become much more important. There's nothing that will slow you down as much as writing buggy code. However, a product developer won't spend hours or days trying to optimize a piece of code when a user won't actively notice the difference. They believe that they can write 80% of a product's functionality in 20% of the time.

Since I made the decision to focus on what I enjoyed, I found a real market for what I do. There are many small businesses and entrepreneurs who want to build a product or test an idea and just want it done as efficiently as possible. I learned many languages and tools, so I could apply the right one for the job. I'm not the best developer I know, I'm not even the best Ruby or Elixir developer I know, but I'm proficient at a whole set of language and tools that make it possible for me to build anything, and do so efficiently.

I've come a long way since I started all those years ago but the part of me that's generally disinterested in deep technical details still exists. However, instead of that making me feel insecure and worried that I'll never become a [10x developer](https://twitter.com/skirani/status/1149302828420067328), it gives me great confidence and clarity on who I am as a person and a developer. I guess what I want to say with this article is that it's fine not to be interested in optimizing the last little details of your code. It's fine to want to build MVPs all day. It doesn't make you a worse developer, it just means you're going to be working with/for a different market, and that's cool!
Daily Challenge #35 - Find the Outlier
Tags: challenge
Published: 2019-08-07 15:53:16

---
title: Daily Challenge #35 - Find the Outlier
published: true
series: Daily Challenge
description: Find the number that does not match the pattern.
tags: challenge
---

In this [challenge](https://www.codewars.com/kata/5526fc09a1bbd946250002dc), you'll be given an array with a length of at least three, containing (possibly quite large) integers. The array is either comprised of entirely odd integers or even integers with one exception. Write a method that returns the integer that is not like the others. 

**Example:**
`findOutlier([2, 4, 0, 100, 4, 11, 2602, 36])` => `11`

**Additional practice arrays:**
[160, 3, 1719, 19, 11, 13, -21]
[4, 8, 15, 16, 24, 42] 
[16, 6, 40, 66, 68, 28] 

Good luck, happy coding~!

***
_This challenge comes from user obnounce. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_
JSSheet - A javascript to css parser
Tags: javascript, gulp, css, github
Published: 2019-08-07 10:09:55

Hi to all!

I'm working on my free time on a personal project called **jssheet**.

This project was created to learn how to use gulp and how to create a custom css precompiled stylesheet using javascript.

You can take a look to a realtime demo here:
https://nicolalc.github.io/jssheet/

Currently this is still a WIP but I think this could be really useful in the future.

The goal is: _I want to write logic and style with the same language_ .

JSSheet has this purpose, use JavaScript for styling and logic.

This is an example of implementation:

```javascript
const { fonts, layout, colors } = require("../variables");
const headersProps = {
	margin: layout.itemsMargin,
	color: colors.secondary,
	fontFamily: fonts.secondary,
}
const generics = [
	{
		selector: "h1",
		display: 'block',
		whiteSpace: 'pre-wrap',
		fontSize: fonts.sizes.h1,
		...headersProps,
		transition: "all .1s ease-out",
		children: [
			{
				selector: ":hover",
				letterSpacing: `.5rem`,
				cursor: "default"
			}
		]
	},
	{
		selector: "h2",
		fontSize: fonts.sizes.h2,
		...headersProps
	},
	{
		selector: "h3",
		fontSize: fonts.sizes.h3,
		...headersProps
	},
	{
		selector: "::-webkit-scrollbar",
		width: ".25rem",
		height: ".25rem",
	},
	{
		selector: "::-webkit-scrollbar-thumb",
		background: colors.tertiary
	},
	{
		selector: "p",
		fontSize: fonts.sizes.p,
		fontFamily: fonts.secondary,
		margin: layout.itemsMargin
	},
	{
		selector: "pre",
		background: colors.dark,
		color: "white",
		margin: 0,
		maxWidth: '95%',
		padding: layout.itemsPadding,
		borderRadius: layout.borderRadius,
		fontFamily: fonts.main,
		children: [
			{
				selector: "b",
				color: colors.secondary
			},
			{
				selector: "code",
				fontFamily: fonts.main,
				display: 'block',
				whiteSpace: 'pre-wrap'
			}
		]
	},
	{
		selector: "ul",
		padding: 0,
		margin: 0,
		children: [
			{
			selector: "li",
			padding: 0,
			margin: 0
			}
		]
	},
	{
		selector: 'a',
		color: colors.secondary,
		textDecoration: 'none'
	}
];

module.exports = {
	generics
};
```

As you can see, using Javascript we can reuse portions of css for different selectors, or define global shared variables wich could include **static** or **dinamic** values.

The coolest feature I've added in this project is the **"align"** property, with a single line of code you can create complex flexbox layouts.

For example the following:

```javascript
[...]
align: "center column",
[...]
```

will produce the following css:

```css
[...]
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
[...]
```

So it's a cool shortcut to handle flexbox layout and to prototype your website layout fast!

**Remember**, this is a early WIP project so it's not completed, the documentation is pretty missing.

Feel free to give advice, tips and opinions, and if you want to collaborate just fork this github: https://github.com/NicolaLC/js-sheet
Carrier multipurpose AMP email templates
Tags: amp, email, newsletters, template
Published: 2019-08-07 14:50:12

Now you can sent Interactive AMP email newsletter to your customers and auditory Recently published <a href="https://code.market/product/carrier-multipurpose-amp-email-templates/">Carrier multipurpose AMP email templates</a> include 8 different pages:
<ol>
 	<li>Main newsletter amp email template which includes useful thematic blocks like:
<ul>
 	<li>Hero slider block</li>
 	<li>Featured article block</li>
 	<li>Call back order form block</li>
 	<li>Slider with recent events</li>
 	<li>Our team block</li>
 	<li>Reviews block</li>
</ul>
</li>
 	<li>Main newsletter amp email template with products list. Thematic blocks:
<ul>
 	<li>Hero picture with heading section</li>
 	<li>Features description</li>
 	<li>Products list slider</li>
 	<li>Our team block</li>
 	<li>Reviews block</li>
</ul>
</li>
 	<li>Info about new product newsletter amp email template with description and purchase button. Thematic blocks:
<ul>
 	<li>Hero download section with background image</li>
 	<li>Description block</li>
 	<li>Reviews block</li>
 	<li>Purchase now block</li>
</ul>
</li>
 	<li>News list newsletter amp email template:
<ul>
 	<li>News list block</li>
 	<li>Call back order form block</li>
 	<li>Slider with recent events</li>
 	<li>Reviews block</li>
</ul>
</li>
 	<li>Articles list newsletter amp email template:
<ul>
 	<li>Articles list block</li>
 	<li>Call back order form block</li>
 	<li>Slider with recent events</li>
 	<li>Reviews block</li>
</ul>
</li>
 	<li>Products list newsletter amp email template:
<ul>
 	<li>Products list block</li>
 	<li>Call back order form block</li>
 	<li>Slider with recent events</li>
 	<li>Reviews block</li>
</ul>
</li>
 	<li>Purchase discount newsletter amp email template:
<ul>
 	<li>Hero discount block</li>
 	<li>Products in your cart list</li>
 	<li>Checkout block</li>
</ul>
</li>
 	<li>Purchase confirm newsletter amp email template:
<ul>
 	<li>Hero confirm purchase invoice information block</li>
 	<li>Products in your cart list</li>
 	<li>Checkout block</li>
</ul>
</li>
 	<li>Confirm email registration newsletter amp email template:
<ul>
 	<li>Hero Confirm email registration block</li>
</ul>
</li>
 	<li>Reset password newsletter amp email template:
<ul>
 	<li>Hero reset password URL block</li>
</ul>
</li>
</ol>

<a href="https://code.market/product/carrier-multipurpose-amp-email-templates/">Interactive AMP email newsletter check here</a>
Mac or linux or windows for development work?
Tags: discuss, ubuntu, linux
Published: 2019-08-07 14:33:11

For me, I use iMac in the office and windows at home. Personally, I was not fond of mac because it's expensive 😅 and you cannot play all games. 🎮
But after using for almost 8 months at the office, I am kind of getting used to it and I think it is a good investment to buy a MacBook.

Which platform do you prefer to work with?
Battle Engine Devlog #2 - Adventure Time
Tags: discord, gamedev, javascript, node
Published: 2019-08-07 14:18:08

---
title: Battle Engine Devlog #2 - Adventure Time
published: true
description: Adventure time for Battle Engine, an adventure game discord bot.
tags: #discord,#gamedev,#javascript,#node
series: Battle Engine
---

Welcome back to the Battle Engine devlog! I'd like to show off the next major technical hurdle and core mechanic of *beng*, starting an adventure.

We had to decide how an adventure is started, where it's started, and how it's maintained. 

- in a group DM started by beng?
- in a text channel created by beng?
- in a pre-defined channel created by server admins?

We landed on pre-defined channels intended for adventure use for now, as it was the easiest to setup and clearly define. You can enter one of these pre-defined rooms on the server:

![](https://thepracticaldev.s3.amazonaws.com/i/qmb2j7ot9wjrwpnvio1f.png)

Once in a room, simply ask beng to start an adventure. If there isn't already an active adventure in this channel, a new session will be created.

    .beng adventure

![](https://thepracticaldev.s3.amazonaws.com/i/eath5645vq0qxlri2okp.png)

Once you're adventuring, you can decide where you want to travel. We figured we would define different locations(zones) for variety. As of writing, one starter zone has been defined, the Crescent Woods!

    .beng travel woods

![](https://thepracticaldev.s3.amazonaws.com/i/675cci1z8vvdreo47z0g.png)

This is a good time to stop and mention *slug*(s), as "woods" is the slug for Crescent Woods. All designed information in Battle Engine will necessarily have a consistent identifier to be used via text to interact with that thing. Yes, slugs *can* be changed, but it is unlikely as we will want to maintain consistency, backwards compatibility.

The last, and possibly most exciting part of starting an adventure is inviting your friends. We wanted the best of two worlds:

- interacting with an adventure as a group of friends
- allowing other people to watch, and comment on the adventure without necessarily being engaged

To accomplish both of these goals, the party leader ( the person who starts the adventure ), can invite other users in the discord by name.

    .beng invite @Blaschko#2026

Now we're ready to party! Up next time is the basics of turn based combat.

Come say hi to us on discord! [Join Battle Engine Discord](https://discord.gg/cG2ReFR).

Want to help out or report a bug? check out active issues and contribute to [Battle Engine on GitLab](https://gitlab.com/kamajigames/battle-engine). All skillsets and levels of experience welcome, whether it be content writing, art, development, or just ideas!
A Word on Sass @extend
Tags: css, webdev
Published: 2019-08-07 14:13:43

`@extend` is a powerful SASS tool that helps keep your code nice and dry, but it can have drawbacks if used incorrectly. Calling `@extend` on a class or placehodler will add the _extended_ class to the _extending_ class' selector list. Take this example:

```scss
.message {
  border: 1px solid black;
  color: black;
  padding: 10px 5px;
}

.success {
  @extend .message;
  border-color: green;
}

.warn {
  @extend .message;
  border-color: yellow;
}

.fail {
  @extend .message;
  border-color: red;
}
```

We create a `.message` class, and extend it across a few more classes with only a change to the `border-color`. When compiled, we get:

```css
.message,
.success,
.warn,
.fail {
  border: 1px solid black;
  color: black;
  padding: 10px 5px;
}

.success {
  border-color: green;
}

.warn {
  border-color: yellow;
}

.fail {
  border-color: red;
}
```

Great! We've got an extremely effecient, dry output. However, using `@extend` improperly can leave a massive trail of selectors you just don't need. For example:

```scss
.foo {
  .bar {
    .message {
      color: black;
      border: 1px solid black;
      padding: 10px 5px;
    }
  }
}

.baz {
  .buzz {
    .error {
      @extend .message;
      border-color: red;
    }
  }
}
```

Will result in:

```css
.foo .bar .message,
.foo .bar .baz .buzz .error,
.baz .buzz .foo .bar .error {
  color: black;
  border: 1px solid black;
  padding: 10px 5px;
}

.baz .buzz .error {
  border-color: red;
}
```

Yikes. Is it even worth the trouble?

The real answer is...maybe? If you're running into selector issues, consider using a mixin instead. But if you totally understand how `@extend` works, and there's a use-case that stands out, great! _Go for it!_ Otherwise, it may not be worth forcing into a stylesheet just for the sake of using it.
starting to think about PageObjects
Published: 2019-08-07 13:45:09

---
title: starting to think about PageObjects
published: true
description: 
tags: 
---

How to get started with PageObjects?

First off what is a PageObject. It is mental model/pattern that others have followed in the Selenium community to create maintainable Selenium scripts.

Usually you see it in Java but it can be done in any OO-like languge.

The idea is that a web page is represented by a single class. And the Selenium commands are safely hidden away with methods.

Here is a simple example.

```java
public class LoginPage {
  public boolean login(String username, String password) {
    // detail omitted
  }
  public boolean logout() {
    // detail omitted
  }
}
```

With this type of setup you now have a Java class that you can give to anyone that can be used to login to your website. Logging into your website is still always in the context of Selenium script but another tester in your organization can/should rely that this class just works.

This is an example of how you would use the Login PageObject.

```java
LoginPage lpage = new LoginPage();
lpage.login("fakeuser","fakepassword");
driver.get("http://example.com/app");
// more code here
lpage.logout();
```

The Login PageObject becomes a reusable tool. One that hides the complexity of figuring out how to login to a website. In that way PageObject is a useful tool in your testing toolbelt.
Metro Bundler not bundling
Tags: rea
Published: 2019-08-07 13:23:13

After React-native upgrade to 0.59.5 and gradle upgrade to 4.10.1 had to upgrade few native dependent modules like react-native-maps, react-native-svg and react-native-webview.
After making necessary changes my app is getting built successful but the metro bundler is not bundling and the app is crashing on launch.
Not able to identify the root cause!!
Weekly Picks #87 — Development Posts
Tags: webdev, vue, node, git
Published: 2019-08-07 13:09:01

* [Vue.js 3: Future-Oriented Programming](https://app.dailynow.co/r/bb64f5bb1162eceb540f95381a0d6930)
* [The Best Node.js Boilerplate to Speed Up Your Project Development](https://app.dailynow.co/r/8e882004f20a4a7d3d707457bb417b46)
* [Create beautiful boxes using the outline CSS property](https://app.dailynow.co/r/257e05b5e60de0d66c4dfaba26460720)
* [10 Lessons I Learned Using React Native](https://app.dailynow.co/r/05a760a4010b140ec1c1cb75e05eb40f)
* [Top JavaScript Calendar Plugins](https://app.dailynow.co/r/82ad3a5e3f91dde6a0ff614904f4bb86)
* [JavaScript loops comparison and performance](https://app.dailynow.co/r/f24a84325b74c7d014b2296ff9cae301)
* [CSS is Data](https://app.dailynow.co/r/e0ef1e133d27b5e254263092a4868b84)
* [Git 101: Git workflow to get you started pushing code.](https://app.dailynow.co/r/6ba91bae43a4addf775f1d24b0c3e447)
* [?The guide to Visual Studio Code shortcuts, higher productivity and 30 of my favourite shortcuts you need to learn](https://app.dailynow.co/r/03dcdcfd61f9ccc6713e6d9a0f011241)
* [5 easy wins to refactor even the ugliest code](https://app.dailynow.co/r/400e08c9e819780488db6fd0111178c9)


* * *

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

[![Daily promotion cover](https://cdn-images-1.medium.com/max/1024/1*7bwIhcH467BKX5Ni8XWpQg.jpeg)](https://www.dailynow.co/)
What's the primary factor that makes you quit your job?
Tags: discuss, work, life
Published: 2019-08-07 12:43:37

---
title:What's the primary factor that makes you quit your job?
published: true
description: know when to quit your job
tags: discuss, work, life
---
Have you ever been in a situation where you're complaining about your job every day?
What are the factors that force you to quit your job? (List as many as you want)
Exibir hora no formato de 24 horas
Tags: javascript, react, node
Published: 2019-08-07 12:23:09

![Exibir hora no formato de 24 horas](https://thepracticaldev.s3.amazonaws.com/i/hb3m19jab4uqyro7u41q.jpg)

Quando você precisa de mostrar a hora no formato de 24 horas, ou seja 5 da tarde seja exibido como 17 a gente pode usar o toLocaleString() e passar nas opções que o hour12 é false.

[➜ Participe da nossa lista de desenvolvedores](https://emersonbroga.com/e/participe/)
[➜ Aprenda ES6](https://amzn.to/2J4XnLg)
[➜ Veja as dicas no instagram](https://www.instagram.com/emersonbrogadev/)
[➜ Assita nosso canal no Youtube](https://www.youtube.com/c/emersonbroga/)
[➜ Curta nossa página no facebook](https://www.facebook.com/emersonbrogadev/)
[➜ Não perca as atualizações no twitter](https://www.twitter.com/emersonbrogadev/)

=)
I learnt Python a year ago, is there some open source projects I can contribute in?
Tags: python, help, django, webdev
Published: 2019-08-07 12:04:45

Hi there! Since 2018,I used to solve some hackerrank challenges with python,I tried Django aswell but in deep. I teached python basics for one month and succeeded in my university assignment and exam!
 But but... I am not feeling the usefulness or the spirit of Python yet! So if there is some projects to work on I would be grateful!

NB: I am willing to apply for Google Summer of Code (GSoC) 2020!
How do you detect what line it is in wrapped text elements?
Tags: javascript, webdev
Published: 2019-08-07 11:47:04

---
title: How do you detect what line it is in wrapped text elements?
published: true
description: How do you detect what line it is, or where the text splits in wrapped 
tags: javascript, webdev
---

I'm implementing a custom editor that uses rows of `contenteditable` divs. I'm having trouble implementing the right behavior for the 'up' or 'down' key.

When the 'up' key is pressed, I need to detect whether the caret is on the first line of text, and move the caret to the div above. Likewise for the 'down' key and the last line of text.

Thanks!
Inductive specification using a top-down definition
Tags: eopl, elm, math
Published: 2019-08-07 10:45:26

---
title: Inductive specification using a top-down definition
published: true
description: 
tags: eopl, elm, math
---

**Inductive specification** is a powerful method for specifying a set of values.

And, a **top-down definition** is one way to write an inductive specification.

For e.g.

Given the set consisting of multiples of 5, i.e. `S = { 5n | n ∊ ℕ }` we can define `S` alternatively using a top-down inductive specification as follows:

A natural number `n` is in `S` if and only if:

1. `n = 0`, or
2. `n - 5 ∊ S`.

We can use this definition to determine what natural numbers are in `S`. `0 ∊ S` by condition 1. `5 ∊ S` since `5 - 5 = 0 ∊ S` by condition 2. `10 ∊ S` since `10 - 5 = 5 ∊ S` by condition 2. And so on.

What about 3? Is 3 in `S`?

We know that `3 ≠ 0`, so condition 1 is not satisfied. Furthermore, `3 - 5 = -2`, which is not a natural number and so is not a member of `S`. Therefore, condition 2 is not satisfied. Since 3 satisfies neither condition, `3 ∉ S`.

Can you see why 8 is not a member of `S`?

Can you see why only the multiples of 5 are members of `S`?

## Why bother?

Many discrete structures in Computer Science, lists, binary trees, lambda calculus expressions, regular expressions and much more, can be defined using an inductive specification.

Inductive specifications allow us to:

1. Prove properties about the set of values or structures.
2. Write functions that manipulate them.

Top-down definitions in particular can be used to test for inclusion in the set of values.

For e.g. the above specification for `S` can be used to write the following predicate:

```elm
inS : Int -> Bool
inS =
  if n == 0 then
    True
  else if n >= 5 then
    inS (n-5)
  else
    False
```

## Challenge

Write a top-down inductive specification for the set `S = {2n + 3m + 1 | n, m ∊ ℕ}`.

**N.B.** *This post is based on my [EoPL notes for Chapter 1](https://github.com/dwayne/eopl3/blob/master/03-ch1.md).*
👥 We pitch your project to 100 founders
Tags: showdev, productivity, discuss, webdev
Published: 2019-08-07 10:18:50

Hi Devs,

today I'll try out something new. I can pitch your project or service to 100 tech founders that recently launched a project themselves. At the end you'll receive a spreadsheet with the email addresses and projects.

What do you think, could you use a service like that?

https://launchpropeller.com/#/pitch
MarkDown Technical Document By Rohil ( Freecodecamp )
Tags: codepen, html, css, freecodecamp
Published: 2019-08-07 10:10:09

---
title: MarkDown Technical Document By Rohil ( Freecodecamp )
published: true
tags: codepen, html, css, freecodecamp
---



{% codepen https://codepen.io/Rcrisp/pen/bXwLRO %}
Steps I am taking to improve my writing skills
Tags: productivity, writing
Published: 2019-08-07 09:55:45

while I am not a fan of making [new year resolutions](https://lewiskori.com/post/staying-true-to-yourself-in-2019), writing is something I've been interested in doing for a while now. Through a combination of many factors(**read procrastinating), I haven't been doing as much as I would love to. So this weekend, I drafted a small list of strategies I plan on using to deal with the issue. 
####1. Identify my why.
####2. Write and edit later.
####3. Write about things I am passionate about instead of generalizing.
####4. Develop a routine for writing.
####5. Read other people's work voraciously.
####6. Physically exercising everyday to clear my head.

what are some of your writing tips? kindly tell on the comment section 📚