teleren/devto huggingface dataset:
Stuff I'm Working on
Published: 2019-04-28 19:28:59

---
title: Stuff I'm Working on
published: true
description: An update because I never actually write anything.
tags: 
---

Howdy everyone. I noticed that I got a few more followers in the last little bit despite never writing. My hope is that you've been my last few articles. I've been planning to write a few more but I don't usually have time because of work and school.

That being said, I have a few ideas planned out:

1. My attempts at challenges from /r/dailyprogrammer
2. A neat little side project on literate openscad for 3d printing.
3. Some neat math ideas that I'm working on.
4. Refining my note style.

As with all of my work, none of these ideas are inherently practical. But I don't do practical. If any of those gists sound interesting to you. Please leave a comment and I'll see about putting them higher in my priority list.
I've been using cat and vim for the wrong reasons for so long...
Tags: bash, codenewbie, productivity
Published: 2019-04-28 19:17:32

---
title: I've been using cat and vim for the wrong reasons for so long...
published: true
description: A quick explanation on how to use pbcopy and paste
tags: bash, codenewbie, productivity
---


My situation: I have a file that I need to copy the entire contents of it.

In the terminal, I type: `cat file.txt`, then copy the terminal output.


The easy solution: 

`pbcopy < file.txt`

And now the contents are saved in my clipboard.

Then, if I had to paste those contents somewhere else, I would use vim to create a file and paste those contents in there, and if I was lucky, I wouldn't have to restart my computer from getting stuck in vim.

Instead, the easy solution:

`pbpaste > file-two.txt`

And now, all of the contents from my clipboard are saved in file-two.txt!

What other bash commands have you found useful? Let me know in the comments!
New course on AWS Step Functions!
Tags: aws, me, serverless, stepfunctions
Published: 2019-05-04 09:47:24

---
title: New course on AWS Step Functions!
published: true
tags: AWS,Me,Serverless,Step Functions
canonical_url: https://theburningmonk.com/2019/04/new-course-on-aws-step-functions/
---

It’s been a while coming, but I’m excited to announce that my new course – **Complete guide to AWS Step Functions** – is now live!

You can browse the curriculum and purchase the course **[here](https://theburningmonk.thinkific.com/courses/complete-guide-to-aws-step-functions)**. The first two chapters are free to everyone. The course is approximately 2 hours in length and covers everything you need to know to use Step Functions effectively.

- what is Step Functions, and when to use it?
- the 7 types of states
- API Gateway and CloudWatch Event triggers
- activities
- integration with other AWS services – SNS, SQS and DynamoDB
- best practices
- design patterns

I sincerely hope you enjoy this course and don’t forget to leave feedback so I can continue to improve it.
🐶 ModdoC: A new way to read Documentation of Node Modules
Tags: javascript, node, opensource, showdev
Published: 2019-04-28 18:01:30

---
title: 🐶 ModdoC: A new way to read Documentation of Node Modules 
published: true
description: 
tags: javascript, node, opensource, showdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/wu12bjov96jo9tohs0gd.png
---

We all use node modules in our projects, and we have to read their documentation over and over. But going on npm org and searching for a node module to read its documentation can waste a lot of time. So that's why we made **MODDOC**. It's a simple tool to read the node module's documentation easily.



### Some Features

***1. Open multiple projects at a time***

***2. Shows both dependencies and dev dependencies***

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

***3. Quick copy widget***

![](https://thepracticaldev.s3.amazonaws.com/i/aoaxzwce5c7er77btcri.gif)

***4. In-app browser for external links***

![](https://thepracticaldev.s3.amazonaws.com/i/bzdvxos058215zcxnh3y.gif)

***5. Offline access to Documentation***


It's just a start, and with your help we can add more features to it and make it more awesome. The best part is that this tool is completely Open Source. So feel free to have a look, suggest features, find bugs or fix them. 

{% github sarthology/moddoc %}

This is a beta release, so I thought this is the best place to discuss it. I hope you will like it. See you next time.

![](https://media.giphy.com/media/vxdpsQNMFLT3RuMeYX/giphy.gif)
I Undervalue Books
Tags: books, money
Published: 2019-04-28 17:44:04

I am not a big spender. I want the basics — heat, a bed, and a roof, maybe some shoes — but beyond a decent computer (which is essentially a work expense), I don't want much else.

Some might call me a minimalist. Others would say I'm cheap. Personally, I think I'm a little bit paranoid. I tend to devote roughly 100% of my mental energy on the future, with 0% and 0% focused on the past and the present respectively. In general, I think this is a good principle; the past can't be changed, and the present is too short to be meaningful, but it sometimes causes me problems.

The only valuable money is the money you spend, but right now I've mostly been stockpiling. This is probably a good thing for the most part. I'm fast-approaching a life with real living expenses (instead of my parents fronting the bill), so having a cushion isn't awful. **However, there is one good which I believe I chronically undervalue: books.**

If, in the next few years, I spent $1000 on buying and reading (nonfiction) books, it would almost certainly be a good investment. New ideas are key to making innovations, and keeping $12 at the expense of a book full of those ideas is almost certainly a bad plan. But I'm scared, so I save.

In most cases, recognizing an irrational behavior is all I need to do in order to override it. But this one is tricky. Preparing for the future is a rational plan, and saving money *feels* like the right way to do it. Books are almost certainly a better investment, but that's not an intuitive plan.
React Prop-Types
Tags: react, proptypes
Published: 2019-04-28 17:30:29

---
title: React Prop-Types
published: True
description: Intro to prop types and it's use for components with props
tags: react, prop-types 
---
##PropTypes with React
If we create a component which accepts props as an array, what will happen when user by-mistake pass a string instead of an array. Yes, you're right. It will break. So at this point react Prop Types comes into play.

```
class Users extends React.Component {
  render() {
    return (
      <ul>
        {this.props.list.map(function (friend) {
          return <li>{friend}</li>
        })}
      </ul>
    )
  }
}

```
Imagine if I pass string as a prop to a component

```<Users list="Jason, Minky, Orio" /> ```

Everything will break as string does not have a map functions with it. So to avoid this issue we can use Proptypes.

PropTypes allow you to declare the "type" (string, number, function, etc) of each prop being passed to a component. Then, if a prop passed in isn't of the declared type, you'll get a warning in the console.

```Users.propTypes = {
  list: PropTypes.array.isRequired
}```

In order to use PropTypes, you'll need to install them. Note: They used to be included with React, but as of React 15.5 they were made they're own package which can be downloaded from npm as prop-types.

PropTypes are great for finding bugs in your components but what I like most about them is their ability to add documentation to a component. When I look at a well written component, I can look at the render method to figure out what it's going to look like and I can look at its propTypes to figure out what it needs to accept to render properly.

To check more in depth API [click here](https://reactjs.org/docs/typechecking-with-proptypes.html)
What should I know to be a software architect?
Tags: discuss, help, career, computerscience
Published: 2019-04-28 16:49:12

---
title: What should I know to be a software architect?
published: true
description: What are the most effective ways to gain real deep understanding? What is the required knowledge?
tags: [discuss, help, career, computerscience]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/34k4qrm4rhg25ha7am0s.jpg
---

From time to time I read articles or tweets or watch talks from [@hillelogram](https://twitter.com/hillelogram) or [@pressron](https://twitter.com/pressron) or [@sebmarkbage](https://twitter.com/sebmarkbage) (in no particular order) and realize that those people have much deeper understanding. They are not stuck in one paradigm or one programming language, they can bring paradigms from different languages to current languages.

For example, [@hillelogram talks about inheritance at the whole new level] (https://twitter.com/hillelogram/status/1104163861496774657?s=20) I used inheritance for many years, yet never thought about it from this angle, never questioned it. Or for example, @sebmarkbage brought the idea of algebraic effects to JavaScript, yes in limited form, yes only for React, yet this idea started to spread across different frameworks, and it is quite intuitive and powerful. Or for example, how [@pressron explains that imperative paradigm has its pros](https://www.youtube.com/watch?v=449j7oKQVkc) (people typically prise functional paradigm and not often otherwise).

Even more, they not just understand it, but also able to make it accessible for others. They are able to explain it - which proves again dipper understanding.

> Dr. Hoenikker used to say that any scientist who couldn't explain to an 
eight-year-old what he was doing was a charlatan
>
> from Kurt Vonnegut's novel [Cat's Cradle](https://archive.org/stream/KurtVonnegutCatsCradle/KurtVonnegut-CatsCradle_djvu.txt)

I guess they have been exposed to many different programming paradigms, or maybe they studied some arcane, but very clever programming languages or they had pretty good CS education (not all degrees are the same).

Recently I stumbled on this quote:

> If you don't know how compilers work, then you don't know how computers work.
>
> -- [Steve Yegge](http://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html)

And this made me think: are there specific topics in CS which will significantly improve understanding of CS in general? Should I write my own Lisp, or should I learn E programming language, or should I learn about [branch prediction](https://danluu.com/branch-prediction/), should I read Types and Programming Languages or SICP, should I know answers to Entscheidungsproblem?

**What are the most effective ways to gain real deep understanding? What is the required knowledge?**

> Photo by Samuel Zeller on Unsplash
Intro to web dev lesson 1A - HTML
Tags: junior, intro, webdev
Published: 2019-04-16 23:09:35

---
title: Intro to web dev lesson 1A - HTML
published: true
description: A course (sent to your inbox every week) teaching web development to beginners
tags: junior, intro, web development
---

[This course is completely free and will be free forever. It takes a bit of time to prepare and support, so if you'd like to contribute, you can do so at https://paypal.me/tevko. Any contribution helps!](https://paypal.me/tevko)

Welcome! This is the first email in a series of emails designed to prepare you for a career in web development. No previous experience necessary.

[More about me](https://timevko.website).

About the course: The course is primarily designed to teach you to how to research for yourselves. Everything you need is already freely available, but a push in the right direction is always necessary. That said, I'll be giving you tasks, as well as required reading that will give you a background on what you're supposed to accomplish for each task. I am intentionally not giving you everything you need. You'll have to google a lot. But the information is out there, and I am available for questions! Just reply to the thread if you need help. By the end of this course, you will be ready for a career in web development.

** LESSON 1 **

Prerequisites: Make an account on https://codepen.io

Study: https://developer.mozilla.org/en-US/docs/Web/HTML

Complete: Use the html panel in codepen to create a resume. Try to ensure the document outline is as valid as possible. Codepen includes the <head> <body> tags for you, but read up on their purpose. Do not add any styling or style tags to the HTML. We're only looking for a valid, symantec, accessible document outline.

Respond: Reply to the email with a link to the completed task (a codepen link) and a brief summary of what you've learned about HTML, as well as what you're going to be studying / reading before the next lesson.

Notes: MDN and Stackoverflow are your friends. If you have a question, google it. Everything you ever need to know about web development is on the internet for free.

Lesson 2 will go out next week
One-liner to reset the password associated with git
Tags: git, commandline, oneliner, notetoself
Published: 2019-04-28 16:15:47

---
title: One-liner to reset the password associated with git
published: true
description: 
tags: git, commandline, oneliner, notetoself
---

*Note to self*

One-liner to reset the password associated with git. Once it is run git will prompt the user to re-enter the password before making a push. Useful for those times when you change the GitHub password.

```
git config --global --unset user.password
```
Are you using Redux or thinking about using it?
Tags: react, redux, javascript, statemanagement
Published: 2019-04-28 15:38:25

---
title: Are you using Redux or thinking about using it?
published: true
description: The simplest way for Application State Management in React.
tags: react, redux, javascript, state management
---

![react.js logo](https://thepracticaldev.s3.amazonaws.com/i/1jhm1awiwawx8xavqcjn.png)

Are you using Redux or thinking about using it? YOU DO NOT need it! React is a complete library to control the state of our applications. Using React Context in combination with Local State in your components is more than enough. Simplify the management of the state in your project and save valuable bytes 💰. How? Use useContext and useState, I recommend this great article by Kent C. Dodds, comes with examples and a deep explanation of this pattern that I use in all my projects and is very powerful: [Application State Management with React](https://kentcdodds.com/blog/application-state-management-with-react). If you have any questions, feel free to ask.

Follow me on Twitter [@carloslfu](https://twitter.com/carloslfu) if you want to learn more about React, programming, and technology.

Good luck!
Coffee - An opinionated 2D game engine for Rust
Tags: rust, gamedev, showdev, graphics
Published: 2019-04-28 15:30:09

---
title: Coffee - An opinionated 2D game engine for Rust
published: true
description: Coffee is an opinionated 2D game engine for Rust focused on simplicity, explicitness, and type-safety.
tags: rust, gamedev, showdev, graphics
---

[Coffee](https://github.com/hecrj/coffee) is an opinionated 2D game engine for Rust focused on simplicity, explicitness, and type-safety.

__Coffee is in a very early stage of development.__ Active development is
planned during 2019 (and hopefully beyond that!). Many [basic features are still
missing], some [dependencies are experimental], and there are probably _many_
bugs. [Feel free to contribute!]

[basic features are still missing]: https://github.com/hecrj/coffee/issues?q=is%3Aissue+is%3Aopen+label%3Afeature
[dependencies are experimental]: https://github.com/hecrj/coffee#implementation-details
[Feel free to contribute!]: https://github.com/hecrj/coffee#contributing--feedback

## Features
  * Declarative, type-safe asset loading
  * Loading screens with progress tracking
  * Built-in [debug view with performance metrics]
  * Fixed timestep
  * Explicit, easy to use, hardware-accelerated 2D graphics API
  * Multiplatform support leveraging OpenGL, Vulkan, Metal, D3D11, and D3D12
  * Texture array support
  * Explicit and efficient batched draws
  * Off-screen rendering
  * TrueType font rendering

[debug view with performance metrics]: https://github.com/hecrj/coffee/blob/master/images/debug.png

## Overview
Here is a minimal example that will open a window:

```rust
use coffee::{Game, Result, Timer};
use coffee::graphics::{Color, Window, WindowSettings};

fn main() -> Result<()> {
    MyGame::run(WindowSettings {
        title: String::from("A caffeinated game"),
        size: (1280, 1024),
        resizable: true,
    })
}

struct MyGame {
    // Your game state goes here...
}

impl Game for MyGame {
    type View = (); // No view data.
    type Input = (); // No input data.

    const TICKS_PER_SECOND: u16 = 60; // Update rate

    fn new(_window: &mut Window) -> Result<(MyGame, Self::View, Self::Input)> {
        // Load your game assets here. Check out the `load` module!
        Ok((MyGame { /* ... */ }, (), ()))
    }

    fn update(&mut self, _view: &Self::View, _window: &Window) {
        // Update your game here
    }

    fn draw(&self, _view: &mut Self::View, window: &mut Window, _timer: &Timer) {
        // Clear the current frame
        let mut frame = window.frame();
        frame.clear(Color::BLACK);

        // Draw your game here. Check out the `graphics` module!
    }
}
```

## Repository

If you want to know more, check out the repository on GitHub!

{% github hecrj/coffee %}
How to find a mentor?
Tags: help, discuss, productivity
Published: 2019-04-28 14:54:41

---
title: How to find a mentor?
published: true
tags: help, discuss, productivity
---

Hi all!  My name is Kenneth and I am an aspiring web developer.  For 2 years I have been spending, literally, just about every free minute I have trying to self teach myself programming.  I will say that I am a great, great deal closer to my goal than when I first started, but I still feel like I have an insane amount to learn.


The problem is that, without the structure of a classroom, I have trouble knowing where to start, what to learn next, should I keep focusing on this? Or should I move on and learn about that?  It seems like I spend a quarter of my time just trying to figure out what to focus on, then another quarter of my time trying to find a good resource to learn from.


The next problem I have is that I don't have the time or money to go back to school or attend a bootcamp.  I am 33 years old and have a home and family I have to worry about.  Trust me, even if I just had the time to do one of these things, I would.  I do, however, have the time to spend a few hours everyday to sit and try to learn what I can.  I think with a bit of structure and guidance I could really take off and make web development a career.


So, that brings me to why I am writing this.  I would love to find a mentor to work with me.  Give me that little bit of structure and guidance I need.  I have seen some of the mentoring programs online and, while I would love to do that, I just can't afford the hourly rate most are asking for.  As I said, I have a family and home I need to worry about, and am living paycheck to paycheck just to provide for them.  So, does anyone out there know of any options for me?  Anyway to find a mentoring program that is fairly cheap?  Any ideas at all are welcome.


I have poured my heart and mind into learning all of this and sometimes I feel like I am just going around and around in circles and not getting anywhere at all.  If ANYONE out there can help, I would be forever grateful.



        Thank You in advance for any responses
                                  Kenneth Olsen
Android device debugging on Linux Mint: “error: insufficient permissions for device: udev requires plugdev group membership”
Tags: android, linux
Published: 2019-04-28 13:58:13

---
title: Android device debugging on Linux Mint: “error: insufficient permissions for device: udev requires plugdev group membership”
published: true
description: 
tags: android, linux
---

As I rejoiced in the achievement of finally finding a Linux distro which plays well with my Dell XPS 13 (2019 edition, model 9380), I plugged in my Moto test device, intending to continue working on an Android app. Pressing the Run button promptly made Android Studio (3.4) do its compilation magic, but got stopped in its tracks rather quickly. An angry-looking error message awaited me:

    error: insufficient permissions for device: udev requires plugdev group membership


Android Studio also left a note pointing me to [their developer page on the subject](https://developer.android.com/studio/run/device). As I suspected, it seemed I had some configuration work left to get device debugging working on Linux. However, following Google’s instructions on setting up adb didn’t do much to resolve my problem. The part about adding yourself to the udev group is important, though, as it’s linked to the actual solution described in the next paragraph.

    sudo usermod -aG plugdev $LOGNAME


An ill-timed dog walk (let’s just say I hadn’t expected to be caught in the middle of a downpour), and a few mildly frustrated Google searches later, I ran across a blog post from 2013 (!) on the subject of [“Adding udev rules for USB debugging Android devices“](http://www.janosgyerik.com/adding-udev-rules-for-usb-debugging-android-devices/), by Janos Gyerik.

I will not pretend to know why this extra configuration is required, but it describes looking up the device’s identifier and adding it to the aforementioned plugdev access group, so Android Studio can properly access the USB device.

And there you go, a working USB debugging connection to my Android device, thanks to some great advice from 2013!

_Originally posted on [jarroo.com](https://jarroo.com/android-device-debugging-on-linux-mint-error-insufficient-permissions-for-device-udev-requires-plugdev-group-membership/)_
Simple way of modifying Ant Design default theme
Tags: css, webdev, react, javascript
Published: 2019-04-28 13:55:09

---
title: Simple way of modifying Ant Design default theme
published: true
description: 
tags: css, webdev, react, javascript
---

*Note to self*

Start by installing lessc.
```bash
npm install less -g
```

Move into the 'dist' directory inside the antd package.

Create a file with the following content and name it 'my-theme.less'

```css
@import "./antd.less";   // Import Ant Design styles by less entry

@primary-color: #d228e9;                         // primary color for all components
@link-color: #1890ff;                            // link color
@success-color: #52c41a;                         // success state color
@warning-color: #faad14;                         // warning state color
@error-color: #f5222d;                           // error state color
@font-size-base: 40px;                           // major text font size
@heading-color: rgba(0, 0, 0, .85);              // heading text color
@text-color: rgba(0, 0, 0, .65);                 // major text color
@text-color-secondary : rgba(0, 0, 0, .45);      // secondary text color
@disabled-color : rgba(0, 0, 0, .25);            // disable state color
@border-radius-base: 4px;                        // major border radius
@border-color-base: #d9d9d9;                     // major border color
@box-shadow-base: 0 2px 8px rgba(0, 0, 0, .15);  // major shadow for layers
```

Execute the following command in the terminal:

```bash
lessc --js my-theme.less result.css
```

Example to compile it inside the project styles folder:
```bash
lessc --js my-theme.less ../../../src/style/custom-antd.css
```

Now import the resulting CSS into your project.
One-liner to prevent accidental pushes to public repositories
Tags: git, commandline, oneliner, notetoself
Published: 2019-04-28 13:43:45

---
title: One-liner to prevent accidental pushes to public repositories
published: true
description: One-liner to disable remote pushing. Useful to prevent accidental pushes to public repositories.
tags: git, commandline, oneliner, notetoself
---

*Note to self*

One-liner to disable remote pushing. Useful to prevent accidental pushes to public repositories.

```
git remote set-url --push origin no_push
```