teleren/devto huggingface dataset:
Podcast ou um tapa na cara? Segurança da Informação: muito além do Telegram – Hipster
Tags: self, hipster, podcast, security
Published: 2019-07-31 17:31:05

---
title: Podcast ou um tapa na cara? Segurança da Informação: muito além do Telegram – Hipster
published: true
tags: Self,hipster,podcast,security
canonical_url: https://marquesfernandes.com/2019/07/31/podcast-ou-um-tapa-na-cara-seguranca-da-informacao-muito-alem-do-telegram-hipster/
---

Esse podcast foi um tapa na minha cara, não vou falar muito porque se não vai perder a graça. Todos os Devs, como eu que acham (achavam…) que o melhor anti-vírus é o bom senso, precisam escutar e refletir um pouco de fato a importância da segurança no nosso dia-a-dia e o quanto deixamos nosso ego técnico virar uma brecha de segurança.

<iframe title="Spotify Embed: Segurança da Informação: muito além do Telegram – Hipsters #159" width="100%" height="232" allowtransparency="true" frameborder="0" allow="encrypted-media" src="https://open.spotify.com/embed-podcast/episode/71KKKdDFPkEZYKICieNpVh"></iframe>

O post [Podcast ou um tapa na cara? Segurança da Informação: muito além do Telegram – Hipster](https://marquesfernandes.com/2019/07/31/podcast-ou-um-tapa-na-cara-seguranca-da-informacao-muito-alem-do-telegram-hipster/) apareceu primeiro em [Henrique Marques Fernandes](https://marquesfernandes.com).
How large is the scope of seniority?
Tags: discuss
Published: 2019-07-31 15:44:32

When talking about a "Senior Developer", how far can seniority go, considering the questions below:

Will a Frontend Developer still be senior if put in the role of a Backend Developer?

Is there such a thing as "Java Senior Developer" or ".NET Senior Developer"?

Can a Senior Developer in a specific team change to a completely different company, dealing with a completely different domain, using a different technology and still be called senior?
Daily Challenge #28 - Kill the Monster!
Tags: challenge
Published: 2019-07-31 15:35:48

---
title: Daily Challenge #28 - Kill the Monster!
published: true
description: part of the Daily Challenge Series
tags: #challenge
series: Daily Challenge
---

We have a real challenge for you today - You are fighting against a monster and are strong enough to kill it with a few hits. But after every 3 punches you make, the monster hits you once. Your health is $h; number of monsters is $m, damage that monster can give you is $dm.

> Write a function that will calculate: how many hits you received, how much damage you received and your remaining health. If your health is <= 0, you die and function should return "hero died".

> Examples

> `killMonsters(100, 3, 33); // => "hits: 0, damage: 0, health: 100"`
> `killMonsters(50, 7, 10); // => "hits: 2, damage: 20, health: 30"`

> *Note*: All numbers are strictly positive. Your function should always return a string.


Good luck!


***
_This challenge comes from user levan765. 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)!_

_Want to propose a challenge for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
The interesting case of the `/remind` command in slack
Tags: randomthoughts, slack, productivity
Published: 2019-07-31 15:34:35

---
title: The interesting case of the `/remind` command in slack
published: true
description: or how to make sure your co-worker start using the do-not-disturbe feature
tags: random-thoughts, slack, productivity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/pa07fauoieae40xgiwbo.png
---


A while back, as I was setting some reminder on slack so I would not forget about that code-review I was supposed to do, I missed type what I wanted to ask slack to remember. It showed me this help message: 
![@someone? really?](https://thepracticaldev.s3.amazonaws.com/i/ienclwymnnwisyul59yj.png)

I'd seen this message a countless amount of time before but I don't know why I paused. `@someone`? Really? Can I make slackbot notify other people whenever I want? Even if I'm not online? let's give it a try, shall we! 

Next, I was setting up a couple of reminders for my colleagues so they would not forget to drink coffee and take a walk from time to time to refresh their brain... 

Still when concentration is maybe the most precious asset for a dev, isn't it odd that we can steal away that of our co-workers in one line? 
In order to prevent any retaliation, I started using the `/dnd` command to turn off any notification for a given amount of time. As an occasional Pomodoro person, I must that using `/dnd 25 minutes` is working well. 

Has anyone found a useful use case for putting reminders to other people? 


![](https://thepracticaldev.s3.amazonaws.com/i/h858v38xqmqwbdb81nmy.png)
Why entrepreneurs are getting attention to build cryptocurrency exchange platform like bitmex ?
Tags: blockchain, bitmex, cryptocurrency, trading
Published: 2019-07-31 14:56:55

---
title: Why entrepreneurs are getting attention to build cryptocurrency exchange platform like bitmex ?
published: true
description: Bitmex cryptocurrency exchange platform introduces unprecedented standards for security, accuracy, efficiency, and transparency. we have listed out how?
tags: blockchain, bitmex, cryptocurrency, trading



---
What's your push?
Tags: motivation, personalgrowth, selfdevelopment, discuss
Published: 2019-07-31 14:31:53

---
title: What's your push? 
published: true
description: what is your motivation? 
tags: #motivation #personalgrowth #selfdevelopment #discuss
---
As I wrote [here](https://dev.to/dvddpl/do-you-bring-your-laptop-on-vacation-5gpj) I normally stay away from screens during my vacations and I generally do a lot of physical activity and I read a lot, books, on paper!! :-) 

Since **I set my goal of writing a post every week** I am making an exception and I am writing, struggling, with my smartphone. So I'll keep it short. 

![Tommy Caldwell book: the push](https://thepracticaldev.s3.amazonaws.com/i/kkqmsuebshzisltayp3d.jpg)

What I am reading right now, is **The Push** from the famous climber [Tommy Caldwell](https://www.amazon.de/Push-Climbers-Search-Path/dp/0399562710/ref=asc_df_0399562710/?tag=googshopde-21&linkCode=df0&hvadid=310780560952&hvpos=1o2&hvnetw=g&hvrand=14953585376676412441&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9043445&hvtargid=pla-521485409933&psc=1&th=1&psc=1&tag=&ref=&adgrpid=59941303337&hvpone=&hvptwo=&hvadid=310780560952&hvpos=1o2&hvnetw=g&hvrand=14953585376676412441&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9043445&hvtargid=pla-521485409933). An amazing story of commitment and dedication. (the guy was kidnapped by kind of talibans during a climbing expedition and lost a finger with a chainsaw, nevertheless he never gave up climbing professionally). 
> An incredible inspiration to always pushing your limits.

Success and personal growth require a lot of **self discipline**, what keeps you going? What make you stick to your plans and work hard towards your goals?  What drives you? What is your inner motivation?
Job Opportunity For Junior Software Developers 💻
Tags: jobs, junior, developers, remote
Published: 2019-07-31 14:12:11

---
title: Job Opportunity For Junior Software Developers 💻
published: True 
description: Share job opportunities you know about
tags: #jobs #Junior #Developers #Remote
---

# Do you know of any internship program in any tech industries?

#### If *YES*, let's share so that intermediate developers can benefit from.
Shell, watch file content as it populates
Tags: cli
Published: 2019-07-31 14:00:55

One very useful command line tool I use is `tail`. It’s a little Unix utility command that is found on almost any *nix system, including macOS and of course Linux.

Here’s the man page for `tail`. It says the command _displays the last part of a file_.

The command can be used to display the last x lines of a file by using it with the `-n` option. For example this command shows the last 2 lines of the file specified:

`tail -n 2 <filename>`

I almost never used `tail` like this though. What I used it the most was to “watch” a file for new content appended to it, by using the `-f` option:

`tail -f <filename>`

This starts the command and it just waits until there’s something new appended to the file.

For example I have a script that stays active for a while and fetches remote data, then prints some results to a text file. I just watch the `results.txt` file for incoming data using

`tail -f results.txt`
The CSS calc() function
Tags: css
Published: 2019-07-31 13:59:27

The `calc()` function lets you perform basic math operations on values, and it’s especially useful when you need to add or subtract a length value from a percentage.

This is how it works:

```css
div {
	max-width: calc(80% - 100px)
}
```

It returns a length value, so it can be used anywhere you expect a pixel value.

You can perform

* additions using `+`
* subtractions using `-`
* multiplication using `*`
* division using `/`

> One caveat: with addition and subtraction, the space around the operator is mandatory, otherwise it does not work as expected.

Examples:

```css
div {
	max-width: calc(50% / 3)
}
div {
	max-width: calc(50% + 3px)
}
I use test-driven development every day, ask me anything
Tags: ama, tdd, discuss
Published: 2019-07-31 13:50:05

Hey Readers,

I have been working in software since 2007. After a very frustrating project in 2010, I discovered test-driven development as a way to check my work in an automated fashion. 

I was a lone developer writing an iPad app, working 12 to 14 hour days in order to make the deadlines. I watched in horror, as my stakeholder discovered new regressions at every demo. Out of desperation, I searched the internet for a way to automate all of the manual testing that I was doing. Then I found TDD. 

I bought Kent Beck's book Test-Driven Development by Example. After reading it over a weekend, I wrote my first test that Monday, and I have never looked back.

For the past 8 years I have used TDD every day at work and on side-projects. It has brought stability, precision, and enjoyment to how I write code. Now, I would like to discuss this technique with you all. 

I invite you to ask me anything. 

Looking forward to your questions,
Steve


**If you enjoy the discussion, please leave a like**
Meet The Board : Brian Holt
Tags: showdev
Published: 2019-07-31 13:35:15

---
title: Meet The Board : Brian Holt
published: true
description: 
tags: showdev
---

Brian is currently working as a senior program manager on Visual Studio Code ( the editor we all love) && Azure at Microsoft and he's all about developers, developers, developers. Previously he was a JavaScript engineer at Netflix, LinkedIn and Reddit. When not working, Brian finds time to teach on Frontend Masters, run his mouth on Front End Happy Hour, travel all over the world, and play with his adorable dog. Brian is currently a resident of Seattle, WA.

Brian has been an integral part of our phase one education process that focuses heavily on the fundamentals as well helping us cultivate a partnership with Front End Masters, one of the most in-depth resources for javascript developers. Find him on twitter at [@holtbt](https://twitter.com/holtbt).
Weekly Picks #86 — Development Posts
Tags: webdev, javascript, typescript, react
Published: 2019-07-31 13:28:19

* [The Best Newsletters to Subscribe to for a Frontend Developer](https://app.dailynow.co/r/7a3bdd9a5bf06d23af01c21844aa8234)
* [TypeScript is a waste of time. Change my mind.](https://app.dailynow.co/r/82017936374158cd6eb477977171a9d8)
* [How to write 90% cleaner code with Hooks ?](https://app.dailynow.co/r/a749ac21522c738b76c5d881ab7fea96)
* [Top 10 JavaScript Patterns Every Developers Like](https://app.dailynow.co/r/69e95c568e644a8e1bbd90e46632b886)
* [JavaScript series, Reverse Engineering, best practices](https://app.dailynow.co/r/4e4f9ae999183e8968b14a6c904a92a3)
* [Base - API for authentication, email sending, image upload and more!](https://app.dailynow.co/r/328d05c77706fc997864546b31256e14)
* [3 flavors of the For loop in JavaScript and when to use them](https://app.dailynow.co/r/d54029ef74fb3319842e2fe728d25369)
* [4 Ways You Can “Level Up” As A Developer](https://app.dailynow.co/r/8a4295258b4d2be364d77041c5280574)
* [Designing And Building A Progressive Web Application Without A Framework (Part 1)](https://app.dailynow.co/r/714f792d732a9f05a2af15200cfbbd4b)
* [Animate React with Framer Motion](https://app.dailynow.co/r/bec54145883cae088b8f1da2813e8844)


* * *

[_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/)
Você conhece o console do JavaScript?
Tags: javascript, react, console, node
Published: 2019-07-31 12:21:36

[![18 métodos do console do JavaScript](https://thepracticaldev.s3.amazonaws.com/i/d753cdp6avtf1yka9un2.jpg)](http://www.youtube.com/watch?v=NTVIZ0Xn4uA "18 métodos do console do JavaScript")

Muito alem do console.log.

Você conhece o console do JavaScript? 

Sabia que existem muitos métodos disponíveis que vão além do console.log? 

Você vai aprender conhecer 18 métodos diferentes do console para realizar as mais diversas tarefas e de bonus ainda vou te mostrar como customizar as mensagens com CSS!

O link do vídeo tá nos comentários aqui:

Compartilhe com seus amiguinhos!

#javascript #console #react
using Seleniun to login to a website part 2
Tags: selenium, python, automation
Published: 2019-07-31 12:07:06

---
title: using Seleniun to login to a website part 2
published: true
description: 
tags: selenium,python,automation
---

Today we will look at another website and decide how we would login with Selenium. Github will be our target. First you need to find a good place to login.

https://github.com/login

First the name field.

```html
<input type="text" name="login" id="login_field" class="form-control input-block" tabindex="1" autocapitalize="off" autocorrect="off" autofocus="autofocus">
```

The choice is obvious. We will use the id field as the locator, "login_field."


```html
<input type="password" name="password" id="password" class="form-control form-control input-block" tabindex="2">
```

Again here the choice is obvious we will use the id again and it is "password."

Now the button...

```html
<input type="submit" name="commit" value="Sign in" tabindex="3" class="btn btn-primary btn-block" data-disable-with="Signing in…">
```

Here is our first example where ID is not available. Sigh. Why did github not put an ID on the sign in button? We could pick the name field but to make it interesting we are going to use something else.

Lets look at two other choices we could use.

CSS selector:
```
#login > form > div.auth-form-body.mt-3 > input.btn.btn-primary.btn-block
```
XPath:
```
//*[@id="login"]/form/div[3]/input[4]
```

Both choices are tied directly to the DOM structure. If the designer for this page adds even a single div to the page above the button neither the CSS Selector or the XPath will work.

In the example below I chose the CSS Selector.

```python


from selenium import webdriver
from selenium.webdriver.common.by import By

import time
driver = None
try:
    cpath = "e:\\projects\\headless\\chromedriver.exe"
    driver = webdriver.Chrome(cpath)
    driver.get("https://github.com/login")
    e = driver.find_element(By.ID, "login_field")
    print(e)
    e.send_keys("github_selenium")
    e = driver.find_element(By.ID, "password")
    e.send_keys("githubsupersecretpasswordhere")
    e = driver.find_element(By.CSS_SELECTOR, "#login > form > div.auth-form-body.mt-3 > input.btn.btn-primary.btn-block")
    driver.save_screenshot("github.png")
    e.click()
    driver.save_screenshot("github.png")
finally:
    if driver is not None:
        driver.quit()

```

Once you run the program you will end up with two screenshots so you can verify your program worked as expected. You will get a login failure in this case since I used a bogus username/password.
Simple CSS animated loading icon
Tags: css, html, webdev, frontend
Published: 2019-07-31 10:38:51

---
title: Simple CSS animated loading icon
published: true
description: Animated loading icon
tags: css, html, webdev, frontend
---

Hello! 
I've recently got my first real programming job as a junior programmer and I'm still learning various thing along the way. Also, some time ago I have started thinking about writing some blog post to this site so here is my first attempt :)

For my first post, I've wanted to write about something simple so there is less space for me to make mistake :) so I've made a simple animated loading icon with CSS.

Here is codepen:
{% codepen https://codepen.io/dudakp/pen/dxWQYM %}

The animation is based on keyframes as you can see. 
Basically,I'm just scaling and rotating html element and infinitely looping animation with alternating direction with means that keyframe animation is played forwards and then backward with ease-in-out timing function that sets the speed of the animation. The ease-in-out timing function plays animation starting and ending slowly. For example, if I've used ease-in function the animation will start slowly.

Any feedback positive or negative is highly appreciated! :) I'm looking forward to write about more stuff I've learned (including Spring, React and maybe Angular)

Thank you for reading :)
Full Stack Developer WANTED! 
Tags: career
Published: 2019-07-31 09:24:08

Sponge |UK| Angular/Node/Typescript/MongoDB|

Sponge creates custom elearning for global businesses. We pride ourselves on our seriously creative approach, a recent example is that we built VR training for the Royal Mail to prevent dog attacks. We are always looking for fresh ideas and are currently working on a number of greenfield projects. If you don't have the full tech stack listed above don't worry! We are always looking to learn from the talent we bring in.

Email ethan.lavers@wearesponge.com and we can talk :)

https://wearesponge.com/current-vacancies#development

Currently recruiting for:

Intermediate Full Stack Developer (Plymouth) Senior Full Stack Developer (6 national locations or remote)
How do you turn your bad days into good ones?
Tags: discuss
Published: 2019-07-31 09:02:04

---
title: How do you turn your bad days into good ones?
published: true
description: discuss how to turn bad days into good days
tags: #discuss
---
 Sometimes we go through situations that turn our day into a really bad one.
Share your story.
How do you turn bad days into good days?
Taking advantage of React context und useContext in a function only React App with Hooks
Tags: react, javascript, functional
Published: 2019-07-31 08:57:48

## What problem does Context in React solve?
The typical use case for Context in React is passing down user data or the number of current items in a checkout, because you don't really need to load that kind of data every time you rerender a component.

In a common scenario you would pass down the value from the main root, where you have saved the data. This leads to a problem, where you are using some child components just as a proxy to pass down the values. In this case, you would add extra props and dependencies to a component, even if you don't really need them.

```javascript
import React from 'react';

function UserData({ userName }) {
    return (
        <div>{userName}</div>
    )
}

function Header({ userName }) {
    return (
        <div>
            <h2>Header</h2>
            <UserData userName={userName} />
        </div>
    )
}

export default function MainFn() {
    const [userName, setUserName] = React.useState("Sven");
    React.useEffect(() => {
        // load user data and set username
    }, []);

    return (
        <Header userName={userName} />
    )
}
```

## A better way with React Context

Hooks and React Context to the rescue! With Context we can just set some data from the MainFn and with useContext we can just get the context data into any child elements.

```javascript
import React from 'react';

const UserContext = React.createContext(
    { username: "", email: "" }
);

function UserData() {
    const context = React.useContext(UserContext);

    return (
        <div>
            {context.username}
        </div>
    )
}

function Header() {
    return (
        <UserData />
    )
}

export default function MainFn() {
    const [username, setUsername] = React.useState("Sven");
    const context = React.useContext(UserContext);

    // copy the origin context to override only necessary objects and not the whole object
    const contextValue = { ...context }
    contextValue["username"] = username;

    return (
        <UserContext.Provider value={contextValue}>
            <Header />
        </UserContext.Provider>
    )
};
```

## Disclaimer

Always think about if you really want to use Context. As you can see, the function for the UserData does not specify any parameter. So you never know what data is needed and where it comes from. By design it is difficult to see which dependencies are needed in a component that uses Context.
TSLint lints Typescript
Tags: todayilearned, javascript, typescript
Published: 2019-07-31 08:15:39

Whilst searching for something else I came across the word "TSLint". Hmm ... 

So I went off looking for TSLint and found [a blurb about installing](https://palantir.github.io/tslint/) it using `yarn`. I remembered that `scoop` does `yarn` so I did a `scoop install yarn` then the instructions regarding yarn.

Now I don't have the yarn-based install because the tslint support in VSCode is via `npm`. And now I don't have yarn either after `scoop uninstall yarn`. (I'm waiting for someone to convince me I need yarn).

This tslint thing is interesting and a little annoying too. One of the annoyings is that the `external.d.ts` file that I've been building today is now full of 'problems' that tslint has identified and it wants me to put every class definition in a separate file (that won't happen _this_ month.) 

The more useful thing is that in my project files I'm now getting reminded to remove `var` in favour of `const` and `let`, and anonymous functions in favour of `=>` which is fair enough. And seeing as I have ts2gas installed, these will get appropriately transcoded when next I do a `clasp push`.

Mind you, now I have to keep wandering off to find out what these tslint error mean and what to do about them, if anything. Like
```
Expected a 'for-of' loop instead of a 'for' loop with this simple iteration:
 tslint(prefer-for-of)
```
Day 8: Repository, tested
Tags: android, testing, architecture, kotlin
Published: 2019-07-31 07:55:47

# Yesterday's work

I started refactoring my repository to accept local and remote source contracts instead of concrete classes.

This move was to make my repository unit-testable using [JUnit4](https://junit.org/junit4/) and [Mockito](https://site.mockito.org/).

Here's an awesome tutorial on how to use Mockito for unit tests: https://www.vogella.com/tutorials/Mockito/article.html

# Today?

I worked the morning on writing unit tests for my repository. I have to say, it was fun.

I used Mockito for the first time and it was a great experience. There were hiccups here and there but overall it was a nice experience.

Some of the roadblocks I faced:

* `NullPointerException` on mocking `Boolean` values. Turns out there was an issue with Mockito v2.8.9 while unboxing/autoboxing `Boolean` values on Kotlin. Solved it by upgrading to v3.0.0.

* `IllegalStateException` because `ArgumentMatchers.eq()` returns a `Nullable` value and my parameters were non-nullable. I had to fix this by introducing a local alternate method like this:

```kotlin
fun <T : Any> safeArgumentEq(value: T): T = eq(value) ?: value
```

My repository is now well-tested. You can find the test file for reference, [on GitHub](https://github.com/rahulchowdhury/elly/blob/master/app/src/test/java/co/rahulchowdhury/elly/data/repo/DefaultElephantRepositoryTest.kt).