teleren/devto huggingface dataset:
How to speak at tech conferences, with Karl Hughes
Tags: podcast, devrel
Published: 2020-03-12 11:47:55

Trick question of the week:
*How do you go about speaking at tech conferences?*

Speaking in conferences is an integral part of DevRel.

**Why?**

Because in DevRel, to build trust, **you need to be helpful**. When you stand in front of a crowd to show how people are solving problems, you are being helpful to developers. 

This is one of the reasons why you should be speaking at conferences. There are a lot of benefits but there are also challenges. Where do you apply? How? How do you prepare?

In our latest episode, we welcome Karl Hughes to help us walk through the process of speaking at conferences: from finding CFPs to apply to, all the way to dealing with stage fright, right before you deliver your talk. 

Ready to get up on that stage and leave everyone in awe? [Listen to the episode and you will.] (https://www.developermarketingpodcast.com/?utm_source=devto&utm_medium=KarlHughes_Article) 

**Karl Hughes** is a hands-on technical leader dedicated to helping startups figure out teams and technology. He is the CTO of The Graide Network and helps tech conference speakers find speaking opportunities at CFP Land.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tsip8rokcrtajhrbwuir.png)
Adding local jar files to a Maven project
Tags: java, todayilearned
Published: 2020-03-12 18:01:12

I was developing a project with spring and maven, however when performing the build I came across a strange error
```bash
org.springframework.beans.factory.unsatisfieddependencyexception error creating bean with name 
```
Even though my jar is in the build path, the error persisted, I tried to install it with the `java -cp` of life, but the problem persisted, that's when I tried something a little different, directly add the dependency in **pom.xml**, after all it is an abstraction of the **manifest** in spring application

# Solution
There are many ways to add local jar files to a Maven project:

- Install manually the JAR into a local Maven repository
use this command:
```bash
mvn install:install-file –Dfile=C:\dev\app.jar -DgroupId=com.mh.tutorial-DartifactId=my-example-app -Dversion=1.0
```
Now, add the dependency to your Maven project by adding these lines to your **pom.xml** file:
```xml
<dependency>
    <groupId>com.mh.tutorial</groupId>
    <artifactId>my-example-app</artifactId>
    <version>1.0</version>
</dependency>
```

- Adding directly the dependency as system scope
Consider that the JAR is located in `<PROJECT_ROOT_FOLDER>/lib`. 
After this add the dependency in your **pom.xml** file as following:
```xml
<dependency>
    <groupId>com.mh.tutorial</groupId>

    <artifactId>my-example-app</artifactId>
    <version>1.0</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/myCustomJAR.jar</systemPath>

</dependency>
```

![](https://media1.giphy.com/media/6PopYBwOlKS8o/giphy.gif?cid=790b76113605f90875a8ba21a11cefe9e5a7351de1509bc0&rid=giphy.gif)
Easy as a pie Big O notation: A note about Objects
Tags: beginners, codenewbie, webdev, algoritms
Published: 2020-03-12 20:47:26


An object is an unordered data structure where everything is stored in key-value pairs.

    Let superDog = {
    Name: “Dulce”,
    Breed: “Chihuahua”,
    Weight: “2 pounds” }

Objects are great when storing in order is not a concern and we need to be fast at inserting and removing data.

### But exactly, how fast?

- Insertion: *O(1)*
- Removal: *O(1)*
- Access: *O(1)*
- Searching: *O(N)*

It works in constant time because since we have no order in our data, we technically don’t have a beginning or end so it doesn’t really matter in which order data is added. 

Got something to add? Please feel free to [reach out](https://twitter.com/miss_elliev) for any question, comment or meme.
Day 2  [D&D Character Sheets]
Tags: 100daysofcode
Published: 2020-03-13 04:48:42

# Report
Today I started by setting up my database. 

In my digital life I'm a pretty tidy person, I like consistent, rigid folder structures, don't like a crowded desktop, and I'm striving to install as few apps as I can on my devices. But I also have use different databases all the time. 

This means that not only would I have databases installed that I don't use often, but many of them will run at startup! (Okay I could make it not run at startup, but then I'd have start them manually every time I worked a project.)

That's why I use Docker Desktop to containerize my database servers. Docker allows me to quickly create an instance of whatever database I like, use it, and then delete or forget about it. It also has a bunch of pre-made containers so it's often as easy as running one or two commands. I still have to start the databases manually, but they're all in one place and can be started from a easy-to-use GUI.

These commands install the latest container, and maps the container's port 27017 to the host's port 27017. 

```
 docker pull mongo
 docker run -p 27017:27017 --name mongo -d mongo:latest
```

With Mongo setup, and a connection established in MongoDB-Compass. I began working on setting up the database client for my app. After some time with the documentation I used mongoose to establish a connection with the database, and started setting up mongoose schemas. This is still very work-in-progress, so no code today.

# Project
{% github ApproachingApathy/100days-dnd-character-sheets %}

The First project will be an app to keep D&D character sheets.

## Stack

I'll be using Node.js and building a full-stack Express app with MongoDB.
### Requirements
#### Minimum Viable 
- [ ] Present a D&D Character Sheet
    - [ ] The sheet should display all the same info as the first page of the 5e Official sheet.
- [ ] Users should be able to log in and create player-characters.
- [ ] Users should be able to edit character sheets.
- [ ] Users should be able to organize character sheets into groups (parties/tables)
- [ ] Sheets should auto calculate basic stats like ability modifiers.
    - [ ] Support Proficiency Bonuses 

### Cake
- [ ] Extend character creation to allow the user to use any of the three common stat gen methods.
    - [ ] Point Buy
    - [ ] Standard Array
    - [ ] Roll
- [ ] Extend the character sheet to all the info in the 5e official sheet.
- [ ] Allow for image uploads for character portraits.
- [ ] Allow for extended descriptions/backstories.
    - [ ] Characters should have nice full page backstories.
    - [ ] Preferably use a markdown editor.
How can I volunteer my extra time while self-isolating due to COVID-19?
Tags: discuss
Published: 2020-03-12 23:05:34

My place of work has made the decision to implement working from home starting tomorrow. And most of the country, if now the world is likely to do the same. 

Skipping the daily commute by working from home will unlock a bunch of free time for most of us. 

I'm wondering if anybody has any interesting or creative suggestions for how to volunteer or time online.

Contributing to your favourite open source project seems like a nobrainer.

How about for non-developers? 

I've heard people suggest editing Wikipedia.

What other ideas can we come up with?
Universal Principles Of UX Design
Tags: ux, userexperience, uxprinciples
Published: 2020-03-13 10:09:10

You also need to follow some principles that can ensure the success of the interface you have been building for your website and its successful acceptance by the prospective users. It is essential to keep these principles in mind because they form the necessary foundation on which great design experiences are built. Here's am showing the most important UX design principles that you should follow for making the perfect website: http://bit.ly/2IDRl33
TensorFlow, Deep Learning, Red Hat OpenShift – watch February 2020 online meetup recordings
Tags: containers, kubernetes, machinelearning, ibmcloud
Published: 2020-03-16 22:13:45

---
title: TensorFlow, Deep Learning, Red Hat OpenShift – watch February 2020 online meetup recordings
published: true
date: 2020-03-14 01:50:47 UTC
tags: Containers,Kubernetes,Machine Learning,IBM Cloud
canonical_url: https://maxkatz.org/2020/03/13/tensorflow-deep-learning-red-hat-openshift-watch-february-2020-online-meetup-recordings/
---

[IBM Developer SF team](https://www.meetup.com/IBM-Developer-SF-Bay-Area-Meetup/) hosts weekly online meetups on various topics. [Online events are one of the best ways to scale](https://dev.to/ibmdeveloper/using-online-meetups-to-scale-your-developer-relations-program-17li) your Developer Relations program and reach developers anywhere, anytime and for a long time after the event.

The following are online meetups we hosted in February 2020. Register for any future events on [Crowdcast](http://crowdcast.io/ibmdevelopersf).

**Introduction to TensorFlow and Watson Machine Learning**  
February 5, 2020  
[Watch the recording](https://www.crowdcast.io/e/introduction-to-11) 📺

**Deep Learning Master Class II – Computer Vision**  
February 6, 2020  
[Watch the recording](https://www.crowdcast.io/e/deep-learning-master-2) 📺

**Fraud Prediction using AutoAI**  
February 12, 2020  
[Watch the recording](https://www.crowdcast.io/e/fraud-prediction-using) 📺

**DL Master Class III – Model Performance, Quantization, & Hyperparameter Search**  
February 13, 2020  
[Watch the recording](https://www.crowdcast.io/e/dl-master-class-iii--) 📺

**Deploy Microservices with Red Hat OpenShift**  
February 19, 2020  
[Watch the recording](https://www.crowdcast.io/e/deploy-microservices) 📺

**Serverless Mobile Backend as a Service**  
February 26, 2020  
[Watch the recording](https://www.crowdcast.io/e/serverless-mobile) 📺
Testing React-Redux App with Jest
Published: 2020-03-26 15:00:28

Link: https://blog.joshsoftware.com/2018/02/04/testing-react-redux-app-with-jest/

We often get confused about selecting testing framework for our application. Currently, I am working on a React–Redux based project. While selecting the testing framework, we compared some of the popular JavaScript testing frameworks. We found that Jest is the best fit for testing our application.

Jest is not limited to ReactJs testing. We can test any JavaScript code using Jest. It can be used to test asynchronous code.
Free t-shirt and stickers in return for contribution
Tags: github, erxes
Published: 2020-03-27 08:57:16

As part of an open source community, it’s nice to know that your efforts are appreciated. That’s why we at erxes prepared a little package for all those contributors who have helped our open source platform to become event better. But it doesn’t mean other developer can’t participate, obviously. And guess what, worldwide free shipping is included! Gasp.

👉 So, head over to our website for the instructions on how to claim your freebie: https://erxes.io/hubspot-alternative-erxes-swag

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6vayiwcc65johh9w960v.jpg)</center>
Daily Life as a Practice
Tags: codenewbie, womenintech, devjournal
Published: 2020-04-03 08:56:47

And Friday rolls around, yet again! The days of the week now tend to blend together, so it feels like the weekend is just another set of days tacked on to the long stretch of confinement, but alas we all float on.

Today my main focus will be on starting the next section of my JavaScript course - something that's been on my to-do list probably every day this week but has yet to be actually implemented. No time like the present!

Anyway, I came upon this little nugget in my morning reading (surprise! It's once again from Steven Pressfield's Turning Pro):



_Our work is a practice. One bad day is nothing to us. Ten bad days are nothing._



This is so true for so many things in my life currently. In times like these, it feels simple and almost effortless for me to get all the way back to basics. To stick to my morning routine. To carry on with my daily habits. To view it all as playing the long game.

I've noticed a lot of people in my life are finding it difficult to adapt to staying and working from home (with less freedom of going out, etc). For me, it's the best time to get back to those basics and to take advantage of the time to start building and further cultivating good habits - whether that be with exercising, meditating, writing, getting a good night's sleep, or anything else.

If we start viewing our daily habits as individual practices that we show up for as often as we promise ourselves we will, we won't fall victim to obstacles or setbacks. We'll just pick back up tomorrow and carry on with our amazing lives.

_This post was originally published on March 27, 2020 on [my blog](https://alexlsalt.github.io/blog)._
Best Online Training
Tags: training, software, technology, education
Published: 2020-03-27 11:04:05

GangBoard is a live, interactive platform of software training furnishing personalities with momentary way in to prosperous sundry courses.Get Online Courses from Experts on No 1 live instructor led training website for AWS, Python, Data Science, DevOps, Java, Selenium, RPA, AI, Hadoop, Azure, etc.

https://www.gangboard.com/
O Básico de Tmux
Tags: tmux, linux
Published: 2020-08-28 14:07:43

Para utilizar o Tmux é necessário que o mesmo seja instalado, caso ainda não tenha instalado pode seguir esse guia oficial (https://github.com/tmux/tmux/wiki/Installing) ou instalar pelo gerenciador de pacote do seu SO.

Para iniciar o tmux, basta digitar no shell o comando tmux, mas também podemos utilizar com alguns parâmetros relacionados abaixo:

* `tmux` - cria uma nova sessão de nome 0 (zero) ou o próximo número da sequência;
* `tmux new -s <nome da sessão>` - cria uma nova sessão com o nome especificado;
* `tmux new -s <nome da sessão> -d` - cria uma nova sessão com o nome especificado em background;
* `tmux ls` - vai listar todas as sessões;
* `tmux attach-session -t <session name>` - abre a sessão especificada.

Para acionar os comandos do tmux, utilizamos primeiramente a combinação de teclas `Ctrl+b`, que chamaremos que "Prefixo". 

`Control + b` -  comando principal, antecede a todos os outros

A relação abaixo apresenta um resumo de alguns comandos do tmux:

* `Prefixo + d` - sair da sessão sem desligar o tmux
* `Prefixo + c` - nova janela;
* `Prefixo + ,` - renomear a janela atual;
* `Prefixo + w` - selecionar uma janela;
* `Prefixo + n` - próxima janela;
* `Prefixo + f` - procurar uma janela;
* `Prefixo + z` - suspende o cliente tmux;
* `Prefixo + #` - lista todos os buffers;
* `Prefixo + :` - abre o prompt de comando do tmux;
* `Prefixo + &` - fechar uma janela;
* `Prefixo + ?` - lista todos os atalhos (bindings);
* `Prefixo + "` - dividindo horizontalmente uma janela ou quadr,o em dois quadros;
* `Prefixo + %` - dividindo verticalmente uma janela ou quadro em dois quadros.


Dicas

Utilizar cores e temas do seu terminal atual
Adicione no arquivo ~/.tmux.conf (se nao existir basta criar)
`set -g default-terminal "xterm-256color"`
Immer or Immutable for Redux Reducers?
Tags: immer, immutable, redux, react
Published: 2020-04-02 01:37:46

What I was trying to achieve were cleaner, more intuitive Redux reducer files for my application. I noticed there was a ton of bloat with having to worry about not mutating the current state of the store or state objects before updating it. It gets ugly fast:

```
case USER_CLICKED_CHECKOUT:
return {
    ...state,
    checkoutCart : {
        ...state.checkoutCart,
        isCheckingOut : true
    }
}
```

And that's to update a single variable. 1 line for the case, 2 for the return block, 4 for preventing mutations, and 1 for the value update.

With Immer, this turns into:

```
case USER_CLICKED_CHECKOUT
draft.checkoutCart.isCheckingOut = true
return
```

1 line for the case, 1 for the return, and 1 for the value update.
That's much cleaner AND more apparent what the desired intent is.

From the resources I've looked into so far, in regards to Redux Reducers, Immer is the cleanest tool to reduce bloat and make reducer logic more intuitive.

Here is a post by Chris Vibert where he gave some succinct reasons against Immutable, and *for* Immer:
- [Try These Instead of Using Immutable.js With Redux](https://medium.com/better-programming/try-these-instead-of-using-immutable-js-with-redux-f5bc3bd30190)

Redux weighing in on adding Immutable:
- [Using Immutable.JS with Redux](https://redux.js.org/recipes/using-immutablejs-with-redux#using-immutablejs-with-redux)

Immer vs Immutable npm trends
- [Immer vs Immutable](https://www.npmtrends.com/immutable-vs-immer)

As my bio says, I'm always up for learning, so I'd love to hear from others on whether Immer is the best solution for this use case, or if Immutable (or another tool) is a better alternative?
Engaging developers and working with agencies with Mike Pegg
Tags: podcast, devrel
Published: 2020-04-02 11:09:58

[Originally published at DevRelx] (https://www.devrelx.com/post/engaging-developers-and-working-with-agencies-with-mike-pegg?utm_source=Podcast&utm_medium=Devto&utm_campaign=Article).

**Trick question of the week:**
*Why is it important for your product/service to engage with developers?*

📢But first, an announcement.
This podcast has a new home: [DevRelx] (https://www.devrelx.com/podcast?utm_source=Podcast&utm_medium=Devto&utm_campaign=Article).
DevRelx is a hub for developer marketing and DevRel professionals.
Along with all episodes, you can access industry news, developer population insights, job openings and more, to empower developers and build and grow communities.
 #stayhome while DevRelx brings you rich content to boost your DevRel game.
[Check it out at Devrelx.com] (https://www.devrelx.com/podcast?utm_source=Podcast&utm_medium=Devto&utm_campaign=Article).

There are numerous examples of products that opened their arms to developers. Numerous are those that saw their growth rise in levels they had never imagined. Levels that ended up shaping the world as we know it.

"How you can engage developers" is our quest in this podcast and our book. Being authentic, having solid documentation and a mindset that leads you to help developers solve problems, are the topics that have come up most often.

Today we are joined by Mike Pegg to discuss why and how Google Maps started engaging with developers (spoiler alert: It started with kind-of-a "hack") and how you can work with agencies to enhance your outreach efforts.

📍Want us to put a pin to the episode? [Here it is] (https://www.devrelx.com/podcast?utm_source=Podcast&utm_medium=Devto&utm_campaign=Article).

**Mike Pegg** leads Google Maps Platform Developer Relations. His team helps developers add Google Maps to their web and mobile apps through guides, samples and outreach programs. He has been involved with Google Maps from the beginning. He would go on to incubate developer marketing efforts for several developer products at Google including the Maps APIs, Android, Chrome, Firebase and Flutter, and led the Google I/O developer conference from 2011-18. Mike is an author to the "Developer Marketing + Relations: The Essential Guide" book. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gtmmduy61nf58f1xmdgu.jpg)
docker-composeでDBの起動完了を待ってからWebアプリを実行する
Tags: docker, dockercompose
Published: 2020-03-02 15:35:00

---
title: docker-composeでDBの起動完了を待ってからWebアプリを実行する
published: true
tags: Docker, docker-compose
date: 20200302T15:35Z
canonical_url: https://qiita.com/shiena/items/47437f4f7874bf70d664
---
# はじめに

docker-composeで複数のコンテナを管理するとき、ほぼWebアプリとDBを一緒に使います。
大抵はWebアプリ側に`depends_on`でDBのコンテナを指定して起動順序を制御しますが、あくまで起動順序だけなのでDBの起動完了前にWebアプリがDBにアクセスしてしまい起動失敗する事があります。

せっかくdocker-composeで1つにまとめて管理しているのに便利さが半減してしまうとモヤモヤしていたら、[公式](https://docs.docker.com/compose/startup-order/)ではWebアプリ側でチェックせよと解説していました。


# GitBucket + MySQLの場合

上述の公式の解説ではPostgreSQLを対象にしているのですが、MySQLをよく使うので書き換えてみました。

ファイル構成はこんな感じです。

```txt:files
docker-compose.yml
  + gitbucket/
      + Dockerfile
      + wait.sh
```

今回のメインとなる`wait.sh`は引数からDBのホスト名、ユーザ名、パスワードを受け取って生存チェック後にWebアプリを実行します。

```sh:gitbucket/wait.sh
#!/bin/sh

set -e

host="$1"
shift
user="$1"
shift
password="$1"
shift
cmd="$@"

echo "Waiting for mysql"
until mysql -h"$host" -u"$user" -p"$password" &> /dev/null
do
        >&2 echo -n "."
        sleep 1
done

>&2 echo "MySQL is up - executing command"
exec $cmd
```

ベースイメージはalpine版なのでapkでmysql-clientをインストールしています。

```txt:gitbucket/Dockerfile
FROM java:8-jre-alpine
MAINTAINER shiena
ENV GITBUCKET_HOME /var/gitbucket
VOLUME ["${GITBUCKET_HOME}"]
EXPOSE 8080
RUN apk add --no-cache mysql-client
COPY wait.sh /wait.sh
ENV GITBUCKET_VERSION 4.7.1
ADD https://github.com/gitbucket/gitbucket/releases/download/${GITBUCKET_VERSION}/gitbucket.war /gitbucket.war
```

最後にdocker-compose.ymlです。
wait.shにDBの情報を渡す必要があるため、`command`でGitBucketを起動します。

```yaml:docker-compose.yml
version: '2'
services:
  gitbucket:
    build: gitbucket
    image: gitbucket:4.7.1
    ports:
      - "8080:8080"
    volumes:
      - ./var/gitbucket:/var/gitbucket
    depends_on:
      - db
    command: sh /wait.sh db gitbucket gitbucket java -jar /gitbucket.war

  db:
    image: mysql:5.7
    ports:
      - "3306:3306"
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=1
      - MYSQL_DATABASE=gitbucket
      - MYSQL_USER=gitbucket
      - MYSQL_PASSWORD=gitbucket
      - TZ=Asia/Tokyo
    command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
```

以上、このようなスクリプトを挟む事でDBの起動完了を待ってからWebアプリを起動できるようになります。

# 参考

* [サービスの完成する順番が前後する問題 - docker-compose depends_onとlinksの違い](http://qiita.com/sivertigo/items/9baa73d922a68788402b#サービスの完成する順番が前後する問題)
* [Controlling startup order in Compose](https://docs.docker.com/compose/startup-order/)
* [DreamItGetIT/wait-for-mysql](https://github.com/DreamItGetIT/wait-for-mysql)
* [vishnubob/wait-for-it](https://github.com/vishnubob/wait-for-it)
* [jwilder/dockerize](https://github.com/jwilder/dockerize)
* [Eficode/wait-for](https://github.com/Eficode/wait-for)
Watch deconstructing the lambda trilogy on youtube to see the lambda-lith, fat lambda and single purpose function in action
Tags: aws, cdk, tutorial, beginners
Published: 2020-04-02 17:43:30

I previously wrote about [the lambda trilogy](https://dev.to/nideveloper/learn-the-3-aws-lambda-states-today-the-single-purpose-function-the-fat-lambda-and-the-lambda-lith-361j):

{% link https://dev.to/nideveloper/learn-the-3-aws-lambda-states-today-the-single-purpose-function-the-fat-lambda-and-the-lambda-lith-361j %}

Now you can watch me talk through the pros/cons of the 3 states of Lambda, walk the CDK code, deploy and finally do a live demo:

{% youtube tHD3i06Z6gU %}
Three-Number Sum or Triplet Sum
Tags: algorithms, interview, problemsolving, python
Published: 2020-04-02 23:10:14

Python

Step 1: Thought Process / Set up
<li> Is the array sorted? If not, I will sort the array.
<li> With sorted arrays, I like to utilize pointers
<li> Loop through the array with a for loop
<li> Move pointers using if statements inside the loop

Step: 2: Function Set Up

<pre>
def triplet(array, sum);
  array.sort()
  three_sum = []
  for :
    if
    elif
  return three_sum
</pre>

Here is the basic outline of the problem we will solve. We define a function with parameters of an array and sum. I use the basic sorting method to sort the array. I set up an empty list that we will add our three number sum to. 

Now that I have the skeleton of the problem, we can start filling out the rest.

<pre>
for i in range(len(array)-2):

</pre>

Because we are looking for a three number sum, we will loop through the array and stop before the last two elements.
Day5 - Learning JavaScript
Tags: javascript, git
Published: 2020-04-03 03:05:46

Summary of what we discussed in our daily learning javascript and articles covered

[Understanding This,call, apply, bind ](https://dev.to/digitalocean/understanding-this-bind-call-and-apply-in-javascript-dla)
[Git Concepts ](https://dev.to/unseenwizzard/learn-git-concepts-not-commands-4gjc)
[JavaScript naming conventions](https://www.freecodecamp.org/news/javascript-naming-conventions-dos-and-don-ts-99c0e2fdd78a/)