teleren/devto huggingface dataset:
Dear SDK developers
Tags: sdk, changelog, release
Published: 2018-04-15 07:36:51

--- 
title: Dear SDK developers
published: true
description: 
tags: sdk, changelog, release
---

Original post https://github.com/onmyway133/blog/issues/84

Dear SDK developers,

- ***Please don't do swizzling***. Give us instructions on where to call your APIs instead of doing unnecessary swizzling. You're making it for developers to use, and they know how to write code. Most of the time, you don't know how to do swizzling right ⚠️ 
- ***Please don't use configuration file***. If possible, please consider configuration via pure code, instead of the plist file that is more exposable in the app bundle.
- ***Please don't make assumption about the app***. Your assumptions about the app the SDK is going to be integrated are not always correct. Every app has its own use case and view hierarchy.
- ***Please provide proper releases***. Tag and make releases for new changes in the SDK. If there are major changes, there should be migration guide and affect of that to older apps. Also, please write proper change logs, either in release notes or change log file. 
- ***Please don't leave us with a dump header file***. Please add documentations to all the functions.
- ***Please improve the README***. To avoid all the guessing, please improve the README with detail instructions.
- ***Please include a sample demo project***. When making a demo project, you possible have chances to deal with potential problems. And developers have a clue on which steps they might be missing.
- ***Please open source it***. You're selling your service, not the code. By open sourcing it, the code is clear to everybody, and they might help you with bug fixing and suggestion.

To be honest, I was very scared when asked to integrate the SDK with poor documentation and closed source. It's like playing the guessing and praying game.

If the service is not important to you, and you're doing it for fun, then you can ignore these requests. But if you're serious about it, then please consider doing. We know you can do better 💪  

Thanks ❤️
Speaking at a tech meetup
Published: 2018-04-15 07:00:27

---
title: Speaking at a tech meetup
published: true
description: Thought dump on the idea of doing a howto talk at a tech meetup
tags: 
---

Three types of talks:
- **why talk**: high level, keynote, get people understand they have a problem
- **how talk**: breakout workshop level, how to make this particular change that I need to have happened
- **what now talk**: keynotes. usually the first half of the talk is the the goal, the idea. then the second half of the talk is about what do we need to do (hint of the change, direction)

----

Universal framework / pattern of how human make meaning:

**We all want [GOAL] but the problem is [PROBLEM]. In order to solve that problem we have to understand [IDEA]. Which means to achieve our goals, we have to [CHANGE]. How? [ACTIONS]**

This is the template I would need to fill in by next Saturday.

----

People are always listening to / on the lookout for:
- the goal: what will I get, what outcome
- the problem: the thing that I have to get past in order to get that thing
- idea: why haven't I figured that already, what is the thing I need to understand, before I can understand what new direction I need to go
- change: what is the new direction that I need to go
- action: how do I get there

----

I synthesised those frameworks and concepts from Tamsen Webster. She is the Executive Producer of TEDxCambridge and professional messaging consultant.

I discovered her when researching online for resources to improve my storytelling skill. I have been following her work for a while and highly recommend checking out all her work at http://tamsenwebster.com/ 

I listened to 5-6 interviews she has done on several podcasts and have always managed to step away with actionable takeaways and useful frameworks to think about speaking.

----

Looking forward to applying the information after a year of "knowing". Let's do.
On empathy (or lack thereof) in tech
Tags: discuss, culture, career
Published: 2018-04-15 02:53:04

---
title: On empathy (or lack thereof) in tech
published: true
description: Discussion on empathy in tech roles 
tags: #discuss #culture #career
---

Recently, I've noticed a disturbing pattern among companies I've worked at that seem to care very little for their employees professional development, unrealistic expectations, etc. I keep wondering, is it me? am I a bad developer? Bad at setting expectations? All this seems very soul crushing and I wonder if it might not be time to find a different career. 

How do you all deal with it?

Should one just find another job, or should you work to improve the culture?
Weekly UI Challenge Week 1 Day 7: Tweaks, refactors, fixes
Tags: ui, weeklyui, challenge, react
Published: 2018-04-14 20:53:23

---
cover_image: https://thepracticaldev.s3.amazonaws.com/i/njqzjs9z01djgckfv8de.jpg
title: "Weekly UI Challenge Week 1 Day 7: Tweaks, refactors, fixes"
published: true
description: "Week 1 Day 7 of my Weekly UI Challenge: All the fixings"
tags: ui,weeklyui,challenge,react
---

## A quick recap

As we wind down this week's challenge, I want to thank **[Ben](https://dev.to/ben)** and his fellow **dev.to admins** for getting behind this Weekly UI Challenge and setting up some great new tools for moderating the [#weeklyui](https://dev.to/t/weeklyui) tag page. (seriously, check it out, it looks awesome)

Thank you to everyone who has participated, retweeted, and liked/unicorn'd these posts; I really hope we can get more of the community involved for Week 2 and beyond. Speaking of participants, **[Ali Spittel](https://dev.to/aspittel)** gets the Week 1 Gold Star🌟 for tweeting and displaying her daily results!

---

Welcome to Week 1, Day 7 of my Weekly UI challenge! As I stated in the [announcement post](https://dev.to/geoff/announcing-weekly-ui-challenge-h87), week 1 will focus on an **ecommerce listing** UI component; each day throughout this following week, I will pick one or two (usually related) subelements of the design to implement. For day seven, our goal is to…

## Tweak, refactor, and/or fix your code

Today is all about you and your design/code perfectionism. Did you want to change your component API to be more flexible? Did you mean to tweak spacing on Day 5 but didn't have time? Perhaps you needed more time to research how to fix a few more a11y issues before you get that perfect score on Day 6. We all have to get sleep, spend time with friends and family, and have other things pop up that may affect your workflow; today is your day to finish strong and get everything up to spec as **you** see fit.

I will be updating my variant thumbnails to be tab-able, adjusting focus states on my buttons, and updating the API to be more programmatic. As always, you can check out my coded implementation [on my Github pages site for this project](https://geoffdavis92.github.io/weekly-ui/).

Please add your repos and/or images of your designs in the comments for inspiration! I would love to see what you all created throughout the week.

Happy fixing! 🎉

### Week 1 Calendar

1. Design component ✅
2. Display product name, price, and image ✅
3. Add to cart button, favorite button ✅
4. Sale price display, sold out states ✅
5. Color variant thumbnail buttons ✅
6. 100% a11y score ✅
7. Tweaks, refactors, fixes 🎯
Shaving the Yak
Tags: productivity
Published: 2018-04-14 20:11:29

---
title: "Shaving the Yak"
published: true
description: When you end up doing stupid things.
tags: productivity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vcdffl0ssmltqi6a0g9y.jpg
---


I learned a new term, [Shaving the Yak](http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html) today.
This has come to me as a such a surprise that I'd like to share it.

## What does "Yak Shaving" mean❓

It's basically when you end up doing things totally unrelated to what you were trying to accomplish initially.

Here is a great illustration.

{% youtube 8fnfeuoh4s8 %}

Hal was to replace a light bulb 💡 but a series of events led him to fix his car 🚗 😆.

## 🙋 My Experience

As a new comer to ASP.NET Core, I've been trying to create a simple website displaying Calendar.
➡️ Then I thought that I can use a SPA template to generate the calendar dynamically.
➡️ I wanted to use ES6 syntax so looked at Webpack 4 configuration options.
➡️ Thought it was too complicated so looked for an alternative.
➡️ Found RollUp, which was better for library.
➡️ RollUp tutorials were out of date.
➡️ Create [a GitHub issue](https://github.com/jlengstorf/learn-rollup/issues/48) reporting tutorial was out of date.
➡️ Ended up creating [an NPM package](https://www.npmjs.com/package/calendar-dates) for generating calendar dates.

I wanted to learn ASP.NET Core but ended up publishing an NPM package.
I wasn't able to accomplish what I set out to do initially.

## What can you do about it❓

Create a plan and stick to it and refer to the plan constantly.
Just knowing about this concept will help you stay alert of what you are currently doing.

Now the question is, have you guys been shaving the yak lately?
If so, would you share your experience?

## 📚 Resources

* [Yak Shaving](http://projects.csail.mit.edu/gsb/old-archive/gsb-archive/gsb2000-02-11.html) - the term coined by Carlin Vieri.
* [Don't Shave That Yak!](http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html) by Seth Godin
* [Hal replacing a light bulb - Malcolm in the Middle, S03E06](https://www.youtube.com/watch?v=8fnfeuoh4s8)
Metrics that can Drive Change?
Tags: discuss
Published: 2018-04-14 17:33:11

---
title: Metrics that can Drive Change?
published: true
description: 
tags: discuss
---

Here's the deal. I just got my first "senior developer" job in a company that's moving from the "Ahhh! Write all the code and deliver all the things so we can get some marketshare!" phase to the "Ok, now we need a professional codebase" phase. It's AngularJS and the things that need to change are seemingly obvious (add tests, reduce duplication, clean things up, etc), but I keep finding myself asking the same questions. 

- How can I prove that one version of the application is better than another?
- How can I set up an environment that allows my devs to prove that a change they want to make is worthwhile?

I feel that all of these things come down to metrics, but as of now, there are no metrics being gathered that I can use to drive my decisions. I don't believe there's a need to change something on a hunch or because the community says I should be at one version of a framework over another. I'd like to add that I believe _better_ can me measured from the user's POV or from a developer's POV. A version of an application that's easier to maintain is better that one that isn't, although not directly to the user. Below are a few things that I already know:

- Page load time is the most important metric to the user.
- Tests allow change to happen safely. They are absolutely necessary, but the "what to test" conversation is for a different post.
Trending Blackgold Theme  For Vscode 🌛 🌜 🌚 🌕 🌖 
Tags: react, vscode, showdev, webdev
Published: 2018-04-14 17:09:56

---
title: Trending Blackgold Theme  For Vscode 🌛 🌜 🌚 🌕 🌖 
published: true
description: A black gold theme for vscode
tags: react,vscode,showdev,webdev,
cover_image: https://thepracticaldev.s3.amazonaws.com/i/lx07rb9vz3uq3qtrfohh.png
---

 I just created a new theme called [Black gold](https://marketplace.visualstudio.com/items?itemName=saigowthamr.black-gold).Download now and enjoy 
hidden features.Happy coding 
 
# BlackGold 
![blackgold](https://thepracticaldev.s3.amazonaws.com/i/lx07rb9vz3uq3qtrfohh.png)



![blackgolden theme](https://thepracticaldev.s3.amazonaws.com/i/0xg0849v4m8u11xboebz.gif)



Installation Procedure
1.Open Extensions sidebar panel in VS Code. View → Extensions
2.Search for blackgold
3.Click Install to install it.
4.Click Reload to reload your editor
5.Code > Preferences > Color Theme > Blackgold
Check Your Passwords for Pwnage - The Pythonic Way
Tags: python, security, passwords, tools
Published: 2018-04-14 16:59:52

---
title: 'Check Your Passwords for Pwnage - The Pythonic Way'
published: true
description: Open-source library for easily interfacing with Have I Been Pwned API v2.
tags: python, security, passwords, tools
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mnlgy7g17btnc8i78015.jpg
---

We humans rarely practice enough as software developers. Therefore, as a practice I decided to roll out my first public Python package few days ago. It's called [**pwnedapi**][pwnedapi] and it helps you stay aware of your passwords.

For those who are not familiar with **Troy Hunt's** [Have I Been Pwned API][hibp] it's, in brief, a wonderful REST service for searching if your user data has been compromised in one or more security breaches which the service is continuously tracking. For the most simplistic use case, go ahead and input your email address on their [homepage][hibp2] to see if it has been _pwned_.

All right, back to the nest of Python then. The package (version 0.3.0) I created has two main implementations.

**a)** Check if a single password was pwned using the API version 2 range search and the _k-Anonymity_ model:

```python
>>> from pwnedapi import Password
>>> password = Password("mysupersecretpassword")
>>>
>>> if password.is_pwned():
...     print(f"Your password has been pwned {password.pwned_count} times.")
...
Your password has been pwned 2 times.
>>>
```

**b)** Scan a list of passwords and report their leak counts in any format provided by **Kenneth Reitz's** ingenious [**tablib**][tablib] library:

```python
>>> from pwnedapi import Scanner
>>> scanner = Scanner()
>>> scanner.scan("passwords.txt")
>>> scanner.export_as("leaked.json")
>>> open("leaked.json").read()
'[{"Password": "dog", "Leak Count": 28348}, {"Password": "cat", "Leak Count": 26354}, {"Password": "somepass", "Leak Count": 657}]'
```

The implementation was inspired by **Phil Nash's** Ruby implementation covered in this excellent post.

{% link https://dev.to/philnash/better-passwords-in-ruby-applications-with-the-pwned-passwords-api-4o9f %}

It's easy to use the package for standard library needs or create, for example, a CLI tool for system administration with it – as a matter of fact, I created one at work.

As noted in the package _README_ and at the beginning of this post, it is my first public package. Pull requests and feedback are warmly welcome.

[**Download**][pwnedapi] it or [**fork**][github] it.

<!-- Links -->
[pwnedapi]: https://pypi.org/project/pwnedapi/
[github]: https://github.com/nikoheikkila/pwnedapi
[nash]: https://dev.to/philnash/better-passwords-in-ruby-applications-with-the-pwned-passwords-api-4o9f
[hibp]: https://haveibeenpwned.com/API/v2
[hibp2]: https://haveibeenpwned.com/
[tablib]: http://docs.python-tablib.org/en/master/
Can the entire journey of Interstellar be rendered pointless by a supercomputer?
Tags: discuss, bruteforce
Published: 2018-04-14 11:00:04

---
title: Can the entire journey of Interstellar be rendered pointless by a supercomputer?
published: true
description: Shower thoughts after watching the movie Interstellar
tags: discuss,bruteforce
---
So here's my theory.
In the movie, to solve the unified theory - harnessing gravity - requires quantum data to be transmitted from inside a black hole.
But it is TARS the robot that sends the data. 
Assuming they have computational capabilities of a monstrous supercomputer and extreme programming capabilities( cause they programmed the super intelligent TARS), isn't it technically possible to have brute-forced the finite amount of data that TARS is capable of sending that somehow solves the unified theory and hence renders the journey useless?

P.S. Can we apply this theory to a theoretical physicist's research? Instead of arriving at a conclusion, use a supercomputer to generate a conclusion that solves the problem in question?

Let me know your opinions on this in the comments!
I am kind of baffled by this code in the `__init__.py` file in my Python project. How does this work internally?
Tags: discuss, python, setuptools
Published: 2018-04-14 14:44:33

---
title: I am kind of baffled by this code in the `__init__.py` file in my Python project. How does this work internally?
published: true
tags: discuss, python, setuptools
---

So, I have the following Python code residing in the `__init__.py` file of my Python project which I autogenerated using PyScaffold.

```python
from pkg_resources import get_distribution, DistributionNotFound

try:
    # Change here if project is renamed and does not equal the package name
    dist_name = 'mlfq-sim'
    __version__ = get_distribution(dist_name).version
except DistributionNotFound:  # pragma: no cover
    # Can't unit test this for now since I do not know how to temporarily
    # remove a distribution during runtime. Help. Also, is this even
    # worth it?
    __version__ = 'unknown'
```

I get that it gets the version of my project. But how does it do it? Is there a benefit in using it compared to the one below?

```python
__version__ = 'some version'
```
Why not to change the working directory on Microsoft Machine Learning Server
Tags: datascience, microsoft, machinelearning, r
Published: 2018-08-08 22:42:45

---
title: Why not to change the working directory on Microsoft Machine Learning Server
published: true
tags: data-science,microsoft,machine-learning,r
canonical_url: 
---

Some time ago I was developing an R service that used MicrosoftR, now called Machine Learning Server, which instead of creating a model as suggested in the documentation [**_examples_**](https://docs.microsoft.com/en-us/machine-learning-server/operationalize/how-to-deploy-web-service-publish-manage-in-r#standard-workflow-examples) it just run R routines which operated over a [**_data.table_**](https://cran.r-project.org/web/packages/data.table/vignettes/datatable-intro.html) . Therefore, I needed to load my code on each call to the API service since you are not able to use [**_snapshots_**](https://docs.microsoft.com/en-us/machine-learning-server/r/how-to-execute-code-remotely#r-session-snapshots) but only when working with the R-Client (not on any web application).

The problem rises at the moment I tried to change the working directory. As I used relative paths for my different modules, for example:

```
source('/home/administrator/src/MyMainFile.R')
```

which in turn loaded some other modules, but as I say, through relative routes:

```
source('/utils.R')
```

I needed to set my base directory. As a consequence, after 3 or, luckily, 4 really slow executions, the web node crushed and the only log message I got was:

```
{ "Link": null, "Message": "c66b3558-9d60-4620-adba-1429fc5355ab", "ExceptionType": null } { "Link": null, "Message": "b16bdf62-1396-4be9-ad54-bd1ed59f0d35", "ExceptionType": null }
```

No one in MicrosoftR forums gave just only 1 answer. So after days of hitting my head against the wall (because I had deeply and thoroughly tested my code), I decided to just republish the service one line at a time and run it 3 or 4 times. My surprise was huge when only the first line **setwd(‘my/base/directory’)** was responsible for my desperation. It’s even worse when you see that this is not documented in Microsoft docs.

So the solution was simple:

1. Remove **setwd()**
2. Use absolute paths

Nevertheless, after that experience I decided to never work again with MLS without making a package, so from that moment on I use [**_Rcpp_**](https://cran.r-project.org/web/packages/Rcpp/index.html) and [**_R6Classes_**](https://cran.r-project.org/web/packages/R6/vignettes/Introduction.html) **_._**

_Originally published at_ [_leolanchas.ml_](http://leolanchas.ml/blog/2018/04/14/not-change-working-directory-machine-learning-server/) _on April 14, 2018._
@mention people on dev.to
Tags: discuss
Published: 2018-04-14 12:36:44

---
title: "@mention people on dev.to"
published: true
tags: discuss
---

Can we @mention other people here on dev.to in articles and/or comments? I did not find this. If this is currently not a feature then I would like to suggest it. 

* Enables people to directly reference the post or profile when quoting somebody. _Often I am writing the introduction to an article inspired by something someone said or people debated._
* (assuming we are notified when mentioned) Enables you to invite someone to the conversation or bring a post or comment to the attention of somebody without sending them a private message. _Hey! This article is super relevant. [@jochemstoel](https://dev.to/jochemstoel) you should read this._
* A few more reasons to add this feature.
To pass MobX's observable array to FlatList, .slice() is needed
Tags: mobx, react, reactnative, javascript
Published: 2018-04-14 08:17:07

---
title: To pass MobX's observable array to FlatList, .slice() is needed
published: true
description: 
tags: mobx, react, reactnative, javascript
---

A problem happened when using MobX and React Native together.

# Problem

I encountered a Warning when I pass  MobX's `ObservableArray` to `FlatList`.

```
[mobx.array]
Attempt to read an array index(2) that is out of bounds (2).
Please check length first. Out of bound indices will not be tracked by MobX
```

This may be because FlatList receives array and render lists.
Exact Prop type Array is unexpected for FlatList.

MobX's ObservableArray is defined like this:

```
@observable users: Array<User> = []
```

or

```
users: Array<User> = observable([])
```

`ObservableArray` is not `Array`, but ObservableArray behave like native Array so I was confused.


`ListView`, `SectionList` also regards `ObservableArray` as unsuitable prop.

# Solution

We can convert `ObservableArray` to `Array` by `.toJS` or `.slice()`.


```jsx
// @flow

import React from 'react'
import { FlatList, Text } from 'react-native'
import { observable } from 'mobx'
import { userApi } from 'app/api'

type User = {
  id: number,
  name: string
}

class SomeComponent extends React.Component<{}> {
  @observable users: Array<User>

  componentDidMount() {
    userApi.get().then(users => { this.users = users })
  }

  render() {
    <FlatList
      keyExtractor={(user) => String(user.id)}
      renderItem={({ item }) => <Text>{item.name}</Text> }
      // data={this.users} create Warning
      data={this.users.slice()}
    />
  }
}
```

# Other cases

`ObservableArray` and `render()` create problems of reactivity.
So if there is no Warning, passing state with `.slice()` is a second-good way for preventing unexpected bugs.

Particularly, reactivity problem would happen when we add an element to empty `ObservableArray`, or change an attribute of an Object of array.

https://stackoverflow.com/questions/44278526/react-native-flatlist-not-rerendering-row-when-props-change

Sometimes there are no need to `.slice()`.
`.slice()` cause performance issue so we should not abuse it.
But, in my opinion, reactivity problem is difficult to solve so performance loss is acceptable to some extent.

For prevent further problems, I wrote MobX Store's unit test.

TODO: research and understand when rendering problem happen and not happen

# Refs:

- https://github.com/facebook/react-native/issues/15167
- https://mobx.js.org/best/pitfalls.html
A New Way Of Debugger PHP 
Tags: php, showdev, debugging
Published: 2018-04-14 06:05:29

---
title: A New Way Of Debugger PHP 
published: true
tags: php, showdev, debugging
cover_image: 
 https://thepracticaldev.s3.amazonaws.com/i/uxku82y7w5l90ahtp4zv.png
---

![Firebug panel](
 https://thepracticaldev.s3.amazonaws.com/i/uxku82y7w5l90ahtp4zv.png)

Hey guys! I wanted to share the latest new little piece of code that is coming from our lab. FireBug PHP...

https://github.com/ua1-labs/firebug

Basically, it is a debug panel that easily integrates into your PHP application. You can also, very easily, create your own debug panels to track the things that are important to you during the debugging process. ALSO! It comes with integration with var_dump/debug_trace. Basically combining the power of these two methods and integrating its output into a "Debuggers" panel.