teleren/devto huggingface dataset:
Preparation of getting start "Ruby on Rails Tutorial"
Tags: ruby, beginners, vagrant, virtualbox
Published: 2018-12-13 16:15:45

---
title: Preparation of getting start "Ruby on Rails Tutorial"
published: true
description: 
tags: ruby, beginner, vagrant, virtualbox
---

# Background

These days, I started studying Rails with [Ruby on Rails Tutorial](https://www.railstutorial.org/book) in Japanese.
(This is [Japanese version](https://railstutorial.jp/))

I set up the local environment with Vagrant and VirtualBox because I don't want to use AWS and Heroku etc... (The main reason is money.)

So I write down the article (or note?) to start Ruby on Rails Tutorial.

# My Environment

- OS: macOS High Sierra (version 10.13.6)
- Vagrant: 2.2.0
- VirtualBox: 5.2.18

Please see below how to install Vagrant and VirtualBox if you do not installed yet.
[Downloads – Oracle VM VirtualBox](https://www.virtualbox.org/wiki/Downloads)
[Installing Vagrant - Vagrant by HashiCorp](https://www.vagrantup.com/docs/installation/)


# Vagrantfile

I used Ubuntu 18.04 as guest Virtual Machine.
And I set the port forwarding from 3000 (host) to 3000 (guest).

*Example*
```
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/bionic64"
  config.vm.network "forwarded_port", guest: 3000, host: 3000
  config.vm.provider "virtualbox" do |vb|
     vb.memory = "2048"
  end
end
```


In my case, the error occurred because of the lack of memory when I install rails on guest VM. So, I changed the size of memory (default is 1024 I guess) as above.

# Install rbenv

After launching VM, 

```bash
$ vagrant up
$ vagrant ssh
```

I installed rbenv first.

```bash
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv -v
rbenv 1.1.1-39-g59785f6
```

Second, I installed rbenv plugin.

```bash
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
```

# Install Ruby

Then, I checked the version of Ruby and installed `2.5.0`.

```bash
$ rbenv install --list
$ rbenv install 2.5.0
$ rbenv rehash
$ rbenv global 2.5.0
$ ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
```

By the way, I found some errors in this procedure because essential packages were not installed. So, I did development tools etc.

```bash
$ sudo apt update
$ sudo apt install build-essential
$ sudo apt install libssl-dev libreadline-dev zlib1g-dev libsqlite3-dev nodejs
```

# Install rails

In [Ruby on Rails Tutorial](https://www.railstutorial.org/book/beginning#sec-introduction), Rails version is `5.1.6`, so I run this command;


```bash
$ gem install rails -v 5.1.6
```

```bash
$ rails -v
Rails 5.1.6
```

Seems success to install.

# First Rails application

I want to check whether the installation was correct, so run these commands;

```bash
$ mkdir environment
$ cd environment/
$ rails _5.1.6_ new hello_app
$ cd hello_app/
$ rails server
```

After that, I accessed this URL;

http://localhost:3000

![Screenshot.png](https://thepracticaldev.s3.amazonaws.com/i/7qnp4964ku6e0h8mnx45.png)

;)
How To Fix Packet Loss
Tags: network, troubleshooting, howto, beginners
Published: 2018-12-13 15:37:26

---
title: How To Fix Packet Loss
published: true
description: 
tags: #network #troubleshooting #howto #beginners
---


1 What Exactly is a Packet Loss?
2 The Security Risks Brought About By Packet Loss
2.1 1. Packet Drop Attacks
2.2 2. Opening the Doors for a Network Attack
2.3 3. Packet Loss Can Be a Domino Effect
3 What Causes Packet Loss?
3.1 Link Congestion
3.1.1 How to Remedy the Situation
3.2 2. Software Bugs on Network Devices
3.3 3. Dismal Device Performance
3.3.1 How to Remedy This
3.4 4. Faulty Cabling or Hardware
3.5 5. Excessive Hops
3.5.1 How to Remedy This
4 Diagnosing and Measuring Packet Loss
4.1 How To Measure Packet Loss Manually
5 Conclusion

https://likegeeks.com/fix-packet-loss/

Hope you like it.
Regards,
React - ES6 tricks in Classes
Tags: javascript, react, es6, class
Published: 2018-12-13 15:37:25

---
title: React - ES6 tricks in Classes
published: true
description: I read several entries with example codes in connection with React. For example, I'd just read a short article about Stateful and Stateless components with React. I saw a lot of "old way approaching" solution, so I would like to share with you a trick about the class based components and their state.
tags: javascript, react, es6, class
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vw7o56w92bjgv2gpfu99.png
---

I read several entries with example codes in connection with React. For example, I'd just read a short article about Stateful and Stateless components with React. I saw a lot of "old way approaching" solution, so I would like to share with you a trick about the class based components and their state. You can use and try them with [Create React App](https://facebook.github.io/create-react-app/) now!

##The constructor things
You don't need to define constructor in a class based component just because of function bindings.

**🌙 Old way:**

````javascript
constructor(props) {
  super(props);
  this.state = {
    value: ""
  };
  this.handleChange = this.handleChange.bind(this);
}
```

**🌞New way:**

````javascript
class Test extends PureComponent {

  constructor(props) {
    super(props);
    this.state = {
     value: ""
    };
  }

  const handleChange = () => {
    // Handle change...
  }

  render() {
   return(
    <input value={this.state.value} onChange={this.handleChange} />
   );
  }

}
```

And this is not the end! The local state can be defined on the class level also:

````javascript
class Test extends PureComponent {

  state = {
    value: ""
  }

  const handleChange = () => {
    // Here comes the change things
  }

  render() {
   return(
    <input value={this.state.value} onChange={this.handleChange} />
   );
  }

}
```

With this solution, you don't need to use constructor and you don't need to bind functions with their name in it. It is question of taste, I know, but I think we can write clear and more readable code this way.
What Does It Mean To Inject Code?
Tags: webdev, csharp, javascript, beginners
Published: 2018-12-13 15:07:01

---
title: What Does It Mean To Inject Code?
published: true
description: Sometimes talking to other web developers can be like listening to a foreign language. Make sure you have a high level of code injection before you get too deep into the details
tags: #webdev, #csharp, #javascript, #beginners
cover_image: https://thepracticaldev.s3.amazonaws.com/i/bdjhmqp30ft1ikeyzvsr.jpg
---

In the tech industry, there's no way you won't hear about code injection. You'll be expected to inject code without being told exactly what to do or how to do it and that's ok because we're going to talk a little about what code inject is.

All code injection means is that you pass in code to other code similar to how you pass in a parameter to a function. Think about dynamic web pages for example. Depending on some user permissions you set, different people will see different layouts. That's because you'll have different code that runs based on those user permissions.

The good thing about code injection is that you can re-use chunks of code incredibly easily with some simple logic. You might have some validation code that needs to execute every time a user logs in. Code injection will help you keep the validation separate from all the other things you'll need to run.

Another thing code injection helps with is automation. If you have a trial version you want people to use, this can help you regulate which users still have access to the trial.

Now it's not all sunshine. Code injection can make debugging take an obscene amount of time. That's because it's harder to tell where the error started since a lot of the executed code is anonymous.

Code injection can also be a security risk if you're not careful. Hackers look for holes that they can poke their code into and you don't want to leave anything open for them. Just make sure you use good security practices.

Of course there's a more technical explanation although hopefully this gives you a high level idea of how code injection works. You've probably already been doing this for a while whether you knew it or not. Coding jargon always made me feel like I was a bad developer until I started to see I knew how to do the right things. Don't let the jargon get you down.

<hr>

Hey! You should follow me on Twitter because reasons: https://twitter.com/FlippedCoding
It is Time For App Security Questions To Die
Tags: development, failure, security, securityquestions
Published: 2022-06-15 17:26:19

---
title: It is Time For App Security Questions To Die
published: true
date: 2018-12-13 14:43:00 UTC
tags: Development,failure,security,securityquestions
canonical_url: https://barretblake.dev/2018/12/it-is-time-for-app-security-questions-to-die/?utm_source=rss&utm_medium=rss&utm_campaign=it-is-time-for-app-security-questions-to-die
---

One of the worst, most annoying, and inept security practices to evolve in online applications over the years is the process of security questions and answers for logging in and/or password & account recovery. They're annoying, vague and restricted and they absolute must die, die, die!

The post [It is Time For App Security Questions To Die](https://barretblake.dev/2018/12/it-is-time-for-app-security-questions-to-die/) first appeared on [Barret Codes](https://barretblake.dev).
Talk: An Introduction to Reinforcement Learning
Tags: ai, aws, reinforcementlearni, machinelearning
Published: 2019-01-25 19:46:31

---
title: Talk: An Introduction to Reinforcement Learning
published: true
tags: artificial-intellige,aws,reinforcement-learni,machine-learning
canonical_url: https://medium.com/@julsimon/talk-an-introduction-to-reinforcement-learning-e26177338787
---

Here’s a presentation I just did at the AWS Builders Days in London and Dublin. This includes an introduction to RL as well as some examples running on SageMaker.

![](https://cdn-images-1.medium.com/max/1024/1*38c0AWb_UREyLlhV_SpEcA.png)

Happy to answer questions. Please follow me on [Twitter](https://twitter.com/julsimon) for more content.

#### Slides
<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FB3PLtZl53nQSA3&amp;url=https%3A%2F%2Fwww.slideshare.net%2FJulienSIMON5%2Fan-introduction-to-reinforcement-learning-december-2018&amp;image=https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Frl-intro-181213065031-thumbnail-4.jpg%3Fcb%3D1544683929&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=slideshare" width="600" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/be8010decf105a033468e6d33287c408/href">https://medium.com/media/be8010decf105a033468e6d33287c408/href</a></iframe>
#### Video

coming soon!
Best Tech GIFs & Memes Ever! Humour and Laughter — The Best Medicine!
Tags: discuss, offtopic, humour, tech
Published: 2018-12-13 14:24:55

---
title: Best Tech GIFs & Memes Ever! Humour and Laughter — The Best Medicine!
published: true
tags: discuss, offtopic, humour, tech
cover_image: https://thepracticaldev.s3.amazonaws.com/i/b9gdxxouw8fvj91ky1z6.png
---
Following Molly's post:
{% link https://dev.to/molly_struve/describe-your-job-with-a-gif-5dhk %}

I thought it would be a good idea to put together the best and funniest GIFS & Memes of all time, since sense of humour is a healthy way of life. 😉 So feel free to share yours!

Benefits of Humour and Laughter:

**1.	Laughter helps you stay mentally healthy**
**2.	Laughter brings people together and strengthens relationships**
**3.	Using humour helps to overcome challenges and enhance your life**

Laughter helps you relax and recharge, and is a powerful antidote since it reduces stress and increases energy, enabling you to stay focused and accomplish more.

Nothing works better to bring your mind and body back into balance than a good laugh. With so much power to heal and renew, the ability to laugh easily and frequently is a tremendous resource for overcoming problems, enhancing your relationships and supporting both physical and emotional health. 

*Best of all, this priceless medicine is fun, free and easy to use!*
{% youtube oCEZC9w5cMc %}

Humour helps you keep a positive, optimistic outlook through tough situations. Even in the most difficult of times, a laugh or even simply a smile can make you feel better.


***
This happens to me all the time!
![](https://i.chzbgr.com/full/6508284928/h274D7F6A/)
Visualizing Temperature Variability with #rstats
Tags: rstats, dataviz
Published: 2018-12-13 14:14:30

---
title: Visualizing Temperature Variability with #rstats
published: true
description: A look at annual temperature variability and debuting new package theme options.
tags: rstats, data viz, 
---

Recently at work I have been looking at some NCDC climate data and thought that a refresh of one of my favorite posts would be something. Awhile ago when the ggridges was released I posted a little tutorial using that package to look at annual temperature trends. It has been a little while and now that I live in Chicago it is time for a refresh. I think that the previous post showed an interesting look at how the temperature changes by month/year but I think this technique could also be used to emphasize that temperature variability we originally discussed.

https://thepracticaldev.s3.amazonaws.com/i/kti26gjbt9gztfg5r8rj.png

Read the rest at [temperature variability with ggridges](https://austinwehrwein.com/data-visualization/weather/)
Talk: From Notebook to Production with Amazon SageMaker
Tags: machinelearning, aws, ai, deeplearning
Published: 2019-01-25 19:46:47

---
title: Talk: From Notebook to Production with Amazon SageMaker
published: true
tags: machine-learning,aws,artificial-intellige,deep-learning
canonical_url: https://medium.com/@julsimon/talk-from-notebook-to-production-with-amazon-sagemaker-ee2a2036c0fe
---

Here’s a presentation I just did at the AWS Builders Days in London and Dublin. This includes all the latest SageMaker features announced at re:Invent.

![](https://cdn-images-1.medium.com/max/1024/1*Wr0L_JyNKRLRkVE4k6c9BA.png)

Happy to answer questions. Please follow me on [Twitter](https://twitter.com/julsimon) for more content.

#### Slides
<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FgYw7lj42xtFmkm&amp;url=https%3A%2F%2Fwww.slideshare.net%2FJulienSIMON5%2Famazon-sagemaker-december-2018&amp;image=https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fsagemaker-181213070035-thumbnail-4.jpg%3Fcb%3D1544684500&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=slideshare" width="600" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f9b40ea6814fceed5f305a08c4f269b/href">https://medium.com/media/9f9b40ea6814fceed5f305a08c4f269b/href</a></iframe>
#### Video

coming soon!
Talk: New Machine Learning services announced at AWS re:Invent 2018
Tags: ai, deeplearning, machinelearning, cloudcomputing
Published: 2019-01-25 19:47:01

---
title: Talk: New Machine Learning services announced at AWS re:Invent 2018
published: true
tags: artificial-intellige,deep-learning,machine-learning,cloud-computing
canonical_url: https://medium.com/@julsimon/talk-new-machine-learning-services-announced-at-aws-re-invent-2018-cdcf38a3992d
---

Here’s a presentation I just did at the AWS Builders Days in London and Dublin.

![](https://cdn-images-1.medium.com/max/1024/1*eVY883euO7bu3KykiGPZrA.png)

Happy to answer questions. Please follow me on [Twitter](https://twitter.com/julsimon) for more content.

#### Slides
<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FM6OosEGAXzSL0H&amp;url=https%3A%2F%2Fwww.slideshare.net%2FJulienSIMON5%2Faws-reinvent-2018-machine-learning-recap-december-2018&amp;image=https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fmlreinventrecap-181213065345-thumbnail-4.jpg%3Fcb%3D1544684126&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=slideshare" width="600" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/bfc34f7bae06cb8f1d98e5c99fbe27f4/href">https://medium.com/media/bfc34f7bae06cb8f1d98e5c99fbe27f4/href</a></iframe>
#### Video

coming soon!
Native .NET and Java APIs to Perform Document Search and Indexing
Tags: net, java, indexing
Published: 2018-12-13 12:26:11

---
title: Native .NET and Java APIs to Perform Document Search and Indexing
published: true
description: post
tags: .NET, Java, Indexing
---

Perform advanced document search operations by with the help of cross platform .NET and Java text search APIs in GroupDocs.Search Product Family suite. It also equips application developers with the ability to create, update or merge multiple indices as well as smart index search functionality to use simple, Boolean, Fuzzy and Regular Expression (regex) search queries across a range of popular document formats. Build different types of feature rich search and indexing apps to fetch and manipulate data according to your specific business requirements. 

Download your free trial today – http://bit.ly/2QNC05G

Watch video tutorials about GroupDocs APIs on YouTube – http://bit.ly/2PwqUNK
What is this book about?
Tags: practices, design, agile, learn
Published: 2018-12-13 12:21:42

---
title: What is this book about?
published: true
description: About our book "Agile technical practices distilled"
tags: practices, design, agile, learn
---

![Agile technical practices distilled book cover](https://s3.amazonaws.com/titlepages.leanpub.com/agiletechnicalpracticesdistilled/hero?1535555570)

This week we released the latest section of our book. It was such a joy to be surrounded by friends and family sharing this moment. Thank you for being there with us.

This book does not contain any new information we merely put together information that has been scattered in books, blog posts, articles and conversations. If you are looking for new information, this book is probably not for you. So what does this book brings? It offers a path for learning agile technical practices and object-oriented design. 

For the past 5 years, we have been working as agile technical practices coaches. We coached/mentored/taught hundreds of developers, and in that process, we tried many alternatives, learned and adapted. What works, what doesn't, what is the best sequence to learn these practices, what exercises work best, what feedback helps the most. In this book, we share our experience and present a path others can follow.

We know sometimes learning can feel like venturing into a dense and unknown forest, fear not we created a path. Use it to help you learn practices such as TDD, pair programming, outside in TDD, refactoring. Some of the principles behind object-oriented design such as SOLID, Cohesion, Coupling, Connascence, the four elements of simple design, code smells.  

Our book can be found [here](https://leanpub.com/agiletechnicalpracticesdistilled)

## Beyond the book

Learning on your own can work, but you are missing a critical piece. Feedback! This is why we put together a community so you can learn and share with others. We are in the community, providing feedback advice and learning :). Join us [here] (https://discourse.agiletechpraxis.com/)
Functional program boundaries
Tags: functional
Published: 2018-12-13 11:46:47

---
title: Functional program boundaries
published: true
series: Functional fundamentals
description: The limits of functional programs
tags: #FP
---

<i>This post is part of a series called </i>functional fundamentals<i>. See the [introduction and index](https://dev.to/drbearhands/a-series-on-functional-fundamentals-48mb). That's also where you can request specific topics</i>

<i>Note that I am not an authoritative figure on these subjects, if you see something you think might be incorrect or incomplete, please point it out with a  comment, let's prevent mistakes from spreading :-)
</i>

-------------------

By this point in the series you should already know a lot about the advantages of (pure) functional programming:
* Safe composition (easy refactoring, guaranteed integration, *real* monads...)
* Strong type systems (no run-time errors, no [backdoors](https://dev.to/ben/npm-package-discovered-to-have-bitcoin-stealing-backdoor-j7i))
* Explicit data-dependencies (good for various optimizations)

And now it's time to talk about the catch.
Functional code doesn't do anything. It's just a value. Even `readLn "Hello, World!"` (the `print("Hello, World!")` equivalent in Haskell) is just a *value* of type `IO ()`.

The program needs to be evaluated, it needs to be applied to inputs at the very least. It needs to interact with the world, which unfortunately, is not functional, at least not in a way that is useful to us.

In places where this happens, we have a functional program boundary, where the functional world ends and the imperative one begins. Haskell crosses this boundary using `do` blocks _(EDIT: this is not entirely accurate, see comments)_, Elm has The Elm Architecture which is specific to websites.

On the boundaries, run-time exceptions become possible, composition is non-trivial and the type system is often more generic.

The larger the boundaries, the less use you will have out of functional programming.

Boundaries can be shifted however. Functional programming only cares about data transformations, not so much *where* or *when* they happen.

Big data applications have leveraged this by extending the boundary over a network of computers rather than single ones. AWS lambda and Google Functions are using a similar concept, treating imperative programs as pure functions. In fact, mapping a pure function over an array, list or dict is [*embarrassingly parallel*](https://en.wikipedia.org/wiki/Embarrassingly_parallel).

Elm, using TEA, instead hides the imperative world by segmenting the problem into functional parts, abstracting away the imperative glue into commands and messages. This way the programmer is only bothered with the functional stuff.

In short: how a functional language, library or framework represents a problem can greatly affect how large your functional boundaries are, smaller boundaries generally being better.

## Further reading:
* [Why Haskell hasn't taken over the world](https://pchiusano.github.io/2017-01-20/why-not-haskell.html)
* [Boundaries in tests](https://www.destroyallsoftware.com/talks/boundaries)