teleren/devto huggingface dataset:
I'm a Junior Software Developer and this is my story, pt.1
Tags: junior, software, developer
Published: 2019-07-23 01:56:56

I spent 10 years in the food service industry and decided the spring of 2018 to attend a coding boot camp. I had told myself before attending culinary school in Georgia that food was all I had known and it's all I'd ever be good at. I put all my eggs in one basket and resigned myself to a life of working in a kitchen.

But boy oh boy did I sell myself short. I know I'm a smart guy who can achieve challenging goals things when I apply myself but I also liked being comfortable in a job even if it meant working through 12 plus hours on my feet all day. It works for some people but I was no longer that person and that's okay. I wasn't willing to make that personal sacrifice any longer.

My room mate attended a coding boot camp in Akron, OH. At the time I was a professional artisan bread baker working long hours early in the morning. When he would get home I would observe him practically doing magic on his computer. He would often excitedly try to explain to me what he was working on but it flew completely over my head. One look at the screen and the image came to mind of a movie character hacking a top-secret government file. I didn't at the time understand, but all it took was that brief introduction to unlock something in my brain that told me, hey you could do this.

So in the spring of 2018 I decided to start teaching myself how to code. I went through the web development section of freeCodeCamp, paired programmed with my buddy who had gotten a job out of his boot camp and regularly attended meet ups at the coding boot camp where I would eventually attend. 

I was eager to begin school in the fall of 2018 but upon not doing so well in the technical assessment I was put on hold to the spring of 2019. I was very discouraged but used it as a motivating factor to take advantage of the next 8 months and learn as much as I could on my own in preparation so I could really hit the ground running. I continued to go through freeCodeCamp, worked on coding katas, attended meet ups, scheduled a few 1 on 1  lessons with my future teacher,  and pretty much lived and breathed code until the 14th of January, 2019 when my life would forever change.
Reversing a string using RegExp
Tags: javascript, programming
Published: 2019-07-23 01:45:54

---
title: Reversing a string using RegExp
published: true
description: The least optimal way
tags: javascript, programming
series: reversing a string
---
Just when you thought it was safe to go out, here's another take on [reversing a string](https://dev.to/sarah_chima/reverse-a-string-four-javascript-solutions-2nbm): using RegExp object.

```javascript
function Bruce_RegReverse(string) {
  let res = "";
  const re = /^(.)(.*$)/;
  while (string !== "") {
    const match = re.exec(string);
    if (null !== match) {
      res = match[1] + res;
      string = match[2];
    }
  }
  return res;
}
```

The naming here reflects that I've put it into my [testing framework](https://dev.to/bugmagnet/testing-string-reversal-functions-8m6). The results indicate that you shouldn't use RegExp to reverse at string, or at least not like the above: In a run that saw Sarah Chima's Sarah_SplitReverseJoin take an average of 2551.8 ticks, Bruce_RegReverse took an average of 500494.9 ticks.
Finally Building An Actual Thing
Tags: javascript, codenewbie, beginners, design
Published: 2019-07-23 01:26:10

---
title: Finally Building An Actual Thing
published: true
description: I finally built a fun personal project using HTML, CSS, and JavaScript, after a year and a half of learning...
tags: JavaScript, codenewbie, beginners, design
---

I am so *excited* to announce that I finally built ~A Thing~ that I am proud of, that came from my own brain, that didn't involve following any tutorials, and didn't copy anyone else's work (that I know of). I've been learning to code for over a year, and until now I hadn't had the courage or knowledge to build anything that I had an idea for, outside of a few pure HTML/CSS responsive websites and components. 

I've been doing #100DaysOfCode (for the second time) this summer, and I had finished a TON of freeCodeCamp JavaScript exercises, followed a few #JavaScript30 tutorials, worked my way through the Flatiron School bootcamp prep course JavaScript labs, and I was feeling a little stuck on what to do next. 

I had gotten stuck between a rock and a hard place on the Flatiron "Rock Dodger" project (lol), and I decided that I needed some more JavaScript practice. I needed to access the DOM in JS, iterate through an array or object, and manipulate DOM elements. 

So, I decided to build a [Pantone Color Sample Randomizer](https://codepen.io/TheCodePixi/full/WVNNPQ). (Highly recommend visiting the link. I personally find it really fun to play with.) 

I've also had an idea floating around in the back of my brain for another project involving randomization, so I thought this would be a good chance to practice. I wanted to pick something that would be relatively easy to randomize (the color of something) and also use relational data in an object to return not only the color, but its name. 

I also desperately needed to learn Git and GitHub, so I killed two birds with one stone (rock?)! If you'd like to see the GitHub repo for this project, you are more than welcome to take a look! 

{% github thecodepixi/pantone-randomizer %}

And, last but not least, I ended up using this project to learn how to post effectively on Dev.to! I used emphasis, links, and an embedded GitHub repo. 🎉

Let me know what you think of the Pantone project, and what some of your first independent projects were. I'd love see them or hear about them. 


xoxo
@thecodepixi
Trustworthy vs Trustless Apps
Tags: security
Published: 2019-07-23 01:30:53

---
title: Trustworthy vs Trustless Apps
published: true
tags: Security
canonical_url: https://qvault.io/2019/07/23/trustworthy-vs-trustless-apps/
---

By Lane Wagner

In the wake of the [hearings](https://www.youtube.com/watch?v=h4aPp3wGufY) about Facebook’s new Libra blockchain, it is more important than ever that we all understand the difference between _trustworthy_ and _trustless_ apps.

A trustworthy app is an app whose developers are known and trusted by the community. The developer’s reputations and businesses are on the line, so they are motivated to make sure their applications have few bugs and no malicious code.

A trustless app is an app whose code is [open source](https://en.wikipedia.org/wiki/Open_source), so that the community can see for themselves that the code has few bugs and no malicious code. Trustless apps are cryptographically signed by the developers so that users know that the application they download corresponds to the open source code. Trustless apps also don’t move user data unless it is encrypted by keys only the user holds.

![](https://qvault.io/wp-content/uploads/2019/07/Facebook_Thumb_Down-e1525184112308.jpg)<figcaption><a href="https://threatpost.com/experts-call-facebooks-latest-controversy-a-social-media-breach-of-trust/130572/">threatpost.com</a></figcaption>

Facebook is at best a trustworthy app. They say they will keep our information secure, and our only choice is to trust them. When they inevitably fail to secure user data, congress comes down hard on them, but fails to understand the problem. User data should be trustless.

## Which is better?

Ideally an application is trustworthy **and** trustless. It is open source and manages user data properly, which can be verified by the users and community. It also means that the developers aren’t anonymous and are available in case something goes wrong.

![](https://qvault.io/wp-content/uploads/2019/07/Chapter-1-part-1-1520x1024-1024x690.jpg)<figcaption><a href="https://news.bitcoin.com/the-satoshi-revolution-a-revolution-of-rising-expectations-chap1-part1/">news.bitcoin.com</a></figcaption>

However, if you have to choose between a trustworthy and a trustless app, trustless is better every time. “_Don't trust, verify_” is the best motto when it comes to your private data.

For this reason [Bitcoin](https://bitcoin.org) is better than banks, and opensource security software will always be safer than proprietary solutions. Stay safe out there and always do your own research!
Forms, Chrome, and Autofill
Tags: chromehtml
Published: 2019-07-23 00:55:44

I recently had an issue that was unusual and a bit frustrating so I'm hoping this post will help someone if they get stuck.

I have a form that gets sent to one or two people from a list of about 50 depending on user selection in two select fields. I got an email from one person on the list that she was getting ALL the forms. I double checked the code to switch people based on selection several times and rewrote it once for good measure. All the tests were fine. 

She was still getting all the forms though. I started manually testing the form and discovered that autofill settings in chrome had decided the select for organization names was actually a field for home states. I'm guessing it did that because one of the organisation names includes a state name. 

My first attempt at fixing it was to just set autocomplete="off" on the field. That didn't do anything. While looking up solutions, I found that chrome overrides autocomplete="off". 

To find everything chrome associates with a form field, go into chrome://flags and search for &#35;show-autofill-type-predictions and set it to Enabled. Relaunch chrome and go to your form and hover over it. You will see a list of properties including heuristic type. This is what chrome will try to autofill.

Autocomplete has a set of tags you can use listed <a href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofilling-form-controls:-the-autocomplete-attribute">here</a>. I added organization-title but that still didn't fix it or even update the heuristic type in chrome. 

What finally made it work somewhat right was making the field read only until the user set focus on it.
As a non-web-developer, which are the things you'd like to learn to become a web developer?
Tags: discuss, webdev, career
Published: 2019-07-23 00:17:42

---
title: As a non-web-developer, which are the things you'd like to learn to become a web developer?
published: true
tags: discuss, webdev, career
---

There are a lot of **topics** around web development, but as a person that has never written code for the web (ie: c, c++, java for embedded systems, etc):
- Which are the most appealing ones? 
- Which would make you or made you change careers?
Hi I'm Mori
Tags: introductions
Published: 2019-07-23 00:02:46


I live in Ottawa, Canada
I work as an iOS developer for an amazing company called Shopify. I started developing for Apple's platforms almost a year ago and it's been a great journey. 
you can find me on Twitter [@mori_ahk](https://twitter.com/mori_ahk)

Great to meet you all.
Stable docker CE for Fedora 30 are available!
Tags: linux, docker, dnf, fedora
Published: 2019-08-07 09:12:47

---
title: Stable docker CE for Fedora 30 are available!
published: true
tags: Linux,Docker,DNF, Fedora
canonical_url: 
---

Do you use docker? If you are using Fedora 30 then I have good news for you. They officially relesed stable docker CE for [Fedora 30](https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/), yay!

Most of us have been waiting for stable docker since February, OMG! You can check issue [#600](https://github.com/docker/for-linux/issues/600) how frustrating most of docker users because we don’t have stable release and unable to use testing or nightly release because of missing `containerd.io` and forced dev to seek alternatives using old repo (F29) or using [Podman](https://serverascode.com/2019/05/19/docker-podman-fedora-30.html) as workaround.

### How to install docker on Fedora 30?

That easy, First you need to install and enable docker repository and update metadata cache with DNF

```
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
$ sudo dnf makecache
```

Now install docker CE package to install on your workstation via DNF.

```
$ sudo dnf install docker-ce
```

After successful installation of Docker engine, Let’s enable and start the docker service.

```
$ sudo systemctl enable docker.service
$ sudo systemctl start docker.service
```

Congratulation, docker has been installed and running on your system. You need to check other tutorial how to use docker for further more explaination.

P/s: I prefer to manually enable and start the docker instead automatically load each time you booting your workstation. Since I only using docker when required only.

Thanks for the stable release!
React Hooks - useContext and State
Tags: react
Published: 2019-07-22 23:48:35

I am using useContext react hook, and when I get the context from the useContext, is there a way to access the state?

I might be mixing up things, 

here is my global state component 

```
    <GlobalContext.Provider
      value={{
        loadingProducts: state.loadingProducts,
        products: state.products,
        cart: state.cart,
        searchTerm: state.searchTerm,
        addProductToCart: addProductToCart,
        removeProductFromCart: removeProductFromCart,
        showAllProducts: showAllProducts,
        showFilteredProducts: showFilteredProducts,
        initCatalog: initCatalog,
        catalogLoadSuccess: catalogLoadSuccess,
        catalogLoadFailure: catalogLoadFailure

      }}
    >
      {props.children}
    </GlobalContext.Provider>
```

and here is my initial state object

```
const initialState = {
  initialProducts: [],
  products: [],
  cart: [],
  searchTerm: '',
  loadingProducts: true
};

```

I have initialized the Global State 

```
const GlobalState = props => {
  const [state, dispatch] = useReducer(reducer, initialState);

```

I want to get to the state object (loadingProducts) from my component and this is how I am getting it.

```
  const context = useContext(GlobalContext);
  const {loadingProducts} = context.loadingProducts

```

Question: Can I access the state directly from context, in my component
ie. 

  const context = useContext(GlobalContext);

  // Or is there an alternative?
  const state = context.state
The Importance of Semantic HTML
Tags: html, webdev, a11y
Published: 2019-07-22 22:59:08

##### Semantic HTML can have a variety of different impacts both on your users and other developers.

<h2>What is Semantic HTML?</h2>

<p><a href="https://developer.mozilla.org/en-US/docs/Glossary/Semantics#Semantics_in_HTML">Semantic HTML</a> is markup that adds context and explains to the browser how the element should be displayed rather than only explaining the element's presentation. This further shifts the responsibility of an element's presentation onto CSS. For example, <code>&lt;strong&gt;</code>  and <code>&lt;em&gt;</code> instead of <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code>. <code>&lt;strong&gt;</code> and <code>&lt;em&gt;</code> provide context behind the text. <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> explain how the text should be presented. (Check out <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">Mozilla's HTML elements reference page</a> for more semantic HTML tags and how they should be used.)</p>  

<h2>Why?</h2>

<h3>It's usually less work.</h3>
<p>If the element is actionable, such as a button, there are accessibility features and functionality baked into the native <code>&lt;button&gt;</code> element. Using a <code>&lt;div&gt;</code> to simulate a button action with JavaScript makes a developer's job a great deal harder by shifting the work of making the element actionable and accessible onto the developer. Using semantic HTML keeps you from having to reinvent the wheel and potentially missing key features that you get by default when using a native element.</p>
<p>This also means it requires less work from developers to make the element accessible or better for search engine optimization (SEO). Assistive technologies can use tags, such as <code>&lt;nav&gt;</code> and <code>&lt;main&gt;</code>, to help users more effectively navigate through a site. Search engines consider semantic HTML when ranking a page.</p>

<h3>It's easier to read.</h3>
<p>Having semantic HTML in your markup means that it will be easier for other developers to read and maintain. It gives each section meaning by describing the type of information the element is expected to contain. Plus, it's easier to see if you've forgotten to close a tag than if you're having to hunt through a mass of <code>&lt;/div&gt;</code>s.</p>

<p>Just use semantic HTML. It's easier for you and for your users. 🎉</p>
5 reasons to use Golang
Tags: go, softwaredevelopment, softwareengineering, computerscience
Published: 2019-07-22 22:48:26

---
title: 5 reasons to use Golang
published: true
description: My experience working with Golang in a start-up
tags: Golang, software development, software engineering, computer science
cover_image: https://thepracticaldev.s3.amazonaws.com/i/rlyibpr58qk49ci8y1rk.png
---

There are several reasons to start using **Go**:

1. It’s statically, strongly typed with a great way to handle errors, this makes Golang more reliable and robust.
2. It compiles down to one binary. Just execute it in wherever you want.
3. It’s faster.
4. The main reason why I use it is **simplicity**, there is only one way to do things, no more “beauty” and “clever code”, this point increases your code readability. You and your team always know what a piece of code is doing. It is the Golangs killer-feature 🔥.
5. For the reasons above, it is easier to teach Golang to new devs from scratch and they will get productive in a short time.

In my case, I used **NodeJS** for a long time and had **Golang** under my eyes once I read an article by **Tj**, an important member of the NodeJS community. If you have used Node, probably you have used ExpressJS or at least read about it. Well, **TJ Holowaychuk** is its creator! I leave here the link to the article: https://medium.com/code-adventures/farewell-node-js-4ba9e7f3e52b

In the beginning, Golang is a bit weird and your code gets larger, you have to forget about *Array.map* .. *filter* .. and all kinds of “beauty” things of **JavaScript** and other modern languages, also, you have **to handle every possible error**. But, in the long-term, it makes your code more readable, simple and stable.

For example, the unique way to iterate in Golang is “for” and there is no ternary operator 😮, but this is the Golang strength 💪, simplicity.

A couple of months ago with my team, we are using Golang for building the [LiciMatic’s](https://licitamatic.com) backend, the platform I work on, and now Golang is my preferred language.

So, I recommend you learning Glango, you are going to learn a lot and you will have big professional opportunities.

I want to highlight that Golang is at the top of the best-paid languages of 2019: https://lvivity.com/top-highly-paid-programming-languages

I leave here 3 free learning resources:

- [Online development environment for Golang](https://goplay.space)
- [Golang by example](https://gobyexample.com)
- [Golang video tutorial](https://www.youtube.com/watch?v=G3PvTWRIhZA&list=PLQVvvaa0QuDeF3hP0wQoSxpkqgRcgxMqX)

Want to learn more about Golang and other interesting tech topics?
Follow me here on **Dev.to** and on **Twitter**: https://twitter.com/carloslfu

Thanks and happy learning! 🙂
go-react starter
Tags: go, react, jwt, postgres
Published: 2019-07-22 22:28:09

---
title: go-react starter
published: true
description: starter project for go, postgre, react and jwt based auth apps.
tags: #go #react #jwt #postgres
---
For everyone looking to get started with building web apps and auth APIs with go.

I worked on a go and react project over the weekend to help you get started on authentication with golang, complete with a postgresql database and token based authentication using JWT.

Here is the url.

{% github IsraelAdura/go-postgres-jwt-react-starter %}


I hope you like it!

Contributions are welcome. Cheers🎉
Testing &amp; things <script>alert('Hi');</script> <i>Hi</i> Hello um what
Tags: hiamp, howampareyou, scriptalerttestingscript
Published: 2019-07-22 21:34:56

---
title: Testing &amp; things <script>alert('Hi');</script> <i>Hi</i> Hello um what
published: true
description: More testing &amp; here <script>alert('Hello');</script>
tags: Hi&amp;, "How &amp; are you", "<script>alert('testing');</script>"
cover_image: https://imgur.com/img.png
---
Hi, I'm just testing
&amp;
<!-- An html comment -->
<script>alert("Wowzers")</script>
# &amp;
[Link: &amp;](">&amp; WHa)

Watch what happens to the title when it is in a link tag
{% link https://dev.to/hkrogstie/testing-amp-things-script-alert-hi-script-2n1k %}
How to install 'Go' on Linux 
Tags: go, beginners
Published: 2019-07-22 21:26:37

<hr>
1. Check to see that your packages are up to date 
<u>in the terminal type</u>
<i><b>sudo apt-get update</i><b>
<code> This will bring in all the repo list and update them.
It will also tell you how many of the packages can be upgraded 
</code>
**Now we are getting ready to install go**
2. Go to the Go website and download the linux package. https://golang.org/

3. Create the folder **usr** and inside that the folder another folder called **local**. 
<code>Extract downloaded file to usr/local.</code>
If you CD to **usr/local/go** and type <code>go version</code> you can see go version is installed. 

**But we want to be able to use go from everywhere on our computer.**
To do that we need to set the path in our Vim profile or your preferred editor.

4. Type **Vim ~/.profile** and then add to path
   PATH = $PATH: /usr/local/go/bin 
   <code>Save and close! </code>

5. Type **go version** anywhere on the terminal. You should see the version of **go** you installed displayed on your screen. 
<code>Hurray now you have go installed. </code>

6. Let us create our first file for testing purposes. 
   Type what you see below

    **CD /tmp **
Then create a new file. 
     **Vim test.go **
Type what you see below inside the test.go file you just created.
<code>
Package main 
Import 'fmt' 
Func main () {
Fmt.println("Welcome to my first go code!")
}
</code>

7. Save the file and close it then run it. 
type what you see below to run it
** Go run test.go **
<code> You should see the result <i>Welcome to my first go code!</i> displayed.

<h2>Congratulations!.</h2>

Side note
<code>  
I am taking up the challenge to learn Go in 100 days. Will share from time to time what the journey is like. Want to build an application at the end of the 100 days. Please share your experience with Go and resources you have so we can cross reference etc.</code>