teleren/devto huggingface dataset:
On and Off the Rails
Published: 2021-03-01 18:19:18

Ruby on rails was the focus for the past three weeks. This was a challenge for myself for a couple of reasons. One reason, in particular, was because I found it difficult to understand the often celebrated ‘magic’ of the framework. Leading up to this section I grew accustomed to doing alot of the groud work on my own. Form helpers in rails are a great example of that. In the previous section of sinatra, writing out our forms consited of HTML tags, Input and label tags with the need of having to have made sure that the appropriate tags recieved thier proper closing tags as well.

```<form method="post" action="/games">
<input type="text" name="titlle" >
<input type="text" name="genre" >
<input type="submit" value="Create Game">
</form>```

In the basic example above the form takes in the name and the genre of a new game into the database. Notice that it accepts a method and an action in the opening form HTML tag. As devs we know that upon the creating/submitting of the new game that this will send a post http request to the index page of our web application, through the action giving our post request a “goal”.

Alot of work(basic example in this case), but work that I was used to.

Rails makes life easier with form helpers.

```<%= form_with model: @game, local: true do |f| %>
<%= f.text_field :title %>
<%= f.text_field :genre %>
<%= f.submit %>```

With no method or action telling ths button where to submit being declared on our end ‘explicitly’, the ‘magic’ being performed on the back end looks more like:

```<form action=”/games” accept-charset=”UTF-8" method=”post” data-remote=”true”>
 <input name=”utf8" type=”hidden” value=”✓”>
 <input type=”hidden” name=”authenticity_token” value=”…”>
 <input type=”text” name=”game[title]”>
 <input type=”text” name=”game[genre]”>
 <input type=”submit” name=”commit” value=”Create” data-disable-with=”Create”>
</form>```

Comparing the actual work against the form helper syntax, its safe to say that form helpers are very useful and time savers. Rails is filled with things that help speed up your processes in the beginning stages of your web-application from generating resources, models and even a full app with scaffold. This level of abstraction for devs is appreciated and I look forward to getting more knowledge of both the complex and simple within this language of Ruby.
Looking into Apache Common CLI
Published: 2021-03-01 18:11:55

---
title: Looking into Apache Common CLI
published: true
description: I write a lot of small java applications and need a good command line interpreter. Apache Common CLI helps me keep track of options and arguments. Apache have a lot of great tools in their tool chain and even if some of them are common they have a great track record of usability.
tags:
cover_image: https://i.ytimg.com/vi/w0Bckb9Znfg/maxresdefault.jpg
---

{% youtube w0Bckb9Znfg %}

I write a lot of small java applications and need a good command line interpreter. Apache Common CLI helps me keep track of options and arguments. Apache have a lot of great tools in their tool chain and even if some of them are common they have a great track record of usability.
The beauty of Sinatra, REST, and CRUD
Published: 2021-03-01 18:11:06

The second phase of being a Flatiron student has passed and I find myself growing more and more comfortable with code. The second block of our studies led up to the use of a “light weight framework” called Sinatra. The main page of documentaiton describes sinatra as a domain specific language that allows for web application creation “with minimal effort”. While the effort on my end was far from minimal, I still found the basics of this framework understandable and much easier to follow than I would have orignially thought any of this would have been on day 1.

My sinatra project was a video game organizer. A web application allowing a User to sign up, log in, keep track of the games(through the use of an ActiveRecord Database) that they own and log out. This web application is based on the use of RESTful routing, a convention that allows developers to create usable routes that can Create objects, Read objects, Update objects and even Destroy those Objects. Using HTTP methods (GET, POST, PATCH, DELETE) and CRUD actions (Create, Read, Update, Destroy) theres a flow thats created that you may have never even realized, although you may use it everyday.

Take a facebook status/post for example, you can create a post as a logged in user, that post can be read by you and other users( due to the POST HTTP method). If a mistake is made you could make the appropriate changes and update that existing post thanks to the patch method and even delete your post if you decide that what you posted as an update may have been an “in the heat of the moment” action. Definitely something Im sure we all can relate to.

This project really opened my eyes to the possibilities that I’ll have If I continue to give this venture my all and my best. I really enjoyed this project and am looking forward to learning even more in this world of coding.
A Principled Approach to Authorization Using Python & SQLAlchemy
Tags: python, sqlalchemy, authorization
Published: 2021-03-01 18:10:51

Authorization is an unstructured problem. Writing code to decide who can do what in your app can cover a broad set of cases. The most structure that typically gets applied to this problem area is a set of if statements and roles, but in reality, there are a lot more patterns and structure that we can apply. 

Oso is an open source system for building authorization into applications. It's a bit like SQLAlchemy in that it provides a structured approached to authorization, much like SQLAlchemy does for data modeling and access. Oso cofounder/CTO, Sam Scott, gave a talk providing a mental model for authorization and showing how to apply it using Oso, Python and SQLAlchemy - watch the recording below.

https://www.osohq.com/post/authorization-using-oso-python-sqlalchemy
Pry: the villain that became an ally
Published: 2021-03-01 18:07:38

At the beginning of this course, my cohort lead raved on and on about this gem called Pry. At first, I wrote it off as a professional having an extensive technical understanding of Ruby promoting something that we’d eventually use later down the line. However, after working through my first CLI project I found that pry wasn’t an application to be avoided, but a tool that can help in times of need.

My CLI (Command Line Interface) project was built around the topic of plants. The information I used was acquired by using trefle.io API. While going through the data provided through the use of the API, I found myself using pry more often than I had at the beginning of the course curriculum.

Pry is a gem that needs to be required within your documentation (normally at the very beginning alongside a gem install in your terminal) in order to be used properly. Simply put, pry pauses your program wherever you have it placed and allows you to check the return value you may receive at the end of the method that you have it placed it in. Pry’s function can also be thought of in the way the “pause” button works within a video game, but instead of a video game, it’s a method. With such large amounts of data, you want to be certain about what you’re receiving at the end of a method. Using a properly placed ‘binding.pry’ within my enumerating method, I was able to see all of the values each plant listing provided, and select said value to show the user in my CLI as well. All in all, Pry became an ally during this project and I suspect that as I continue to use ruby, Pry and I will build a stronger connection as time goes on.
Get excited for Redis Enterprise on Azure
Tags: redis, timeseries, azure, database
Published: 2021-03-01 18:07:31

---
title: Get excited for Redis Enterprise on Azure
published: true
description: 
tags: redis,timeseries,azure,database
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iz55dwp6a3hmwbhumtwb.png
---
Everyone that I have worked with loves Redis.  It is a highly effective tool used as a database, cache, pubsub, and many other things.  It is highly optimized and enjoyed success for 10 years in its space.  Redis's ease of use and intense scalability make it a must use in my opinion.  So how could Redis Labs improve Redis?  Take on a strategic partnership with Microsoft Azure and roll out the Redis Enterprise tier!

[Redis Labs and Microsoft Azure Partnership](https://azure.microsoft.com/en-us/blog/microsoft-and-redis-labs-collaborate-to-give-developers-new-azure-cache-for-redis-capabilities/)


## Redis Enterprise Better on Azure
Redis Labs thinks latency is the new downtime and they mean business with Redis Enterprise!  Redis Enterprise is about to exit preview and go mainstream on Azure for the masses.
* High Availability (99.99%)
* Geographically Distributed
* Module Extension
    * RedisTimeSeries
    * RedisSearch
    * RedisBloom
* Redis on Flash (RoF) over Azure NVMe
* Scaling
    * up to 15TB
    * 50K to 500K connections
* Secure
    * Azure Virtual Network, Private Link

## Usage
Currently in the preview version we have made heavy use of the TimeSeries Module, to replace organic processes.  There will be subsequent posts and code samples detailing our work around the TimeSeries Module but the others can be leveraged either in conjunction or independently.  Our use needs to support hundreds of thousands of IoT sensors providing real-time data. 
*   [Redis TimeSeries Module](https://redislabs.com/modules/redis-timeseries/)
*   [Redis Search](https://oss.redislabs.com/redisearch/)
*   [Redis Bloom](https://redislabs.com/modules/redis-bloom/)

## Resources
The developer ecosystem around Redis is fantastic.  Redis also has some tools that you should have already installed. 

* [RedisInsight](https://redislabs.com/redis-enterprise/redis-insight/ "The best tool for managing Redis and Redis Enterprise")

Node resources
* [Redis Modules (TypeScript)](https://github.com/danitseitlin/redis-modules-sdk/)
* [RedisTimeSeries-JS](https://www.npmjs.com/package/redistimeseries-js)

Planning
* [Redis TimeSeries Sizing Calculator](https://redislabs.com/modules/redis-timeseries/time-series-sizing-calculator/)

## Conclusion
As Redis Enterprise becomes generally available you owe it to yourself and organization to see if this improves your current Redis topology or if one of the new modules for Redis Enterprise can solve some business problems.

In the next post we will dive into TimeSeries and showcase some concepts including data topology, down sampling, covering the steps needed to be successful when planning for leveraging the Redis TimeSeries module to scale!

Thank You!
How Is Your S3 Bucket Life-Cycle?
Tags: aws, cloudopz, s3, lifecylce
Published: 2021-03-01 18:05:06

<p align="center">
  <a href="https://dev.to/vumdao">
    <img alt="How Is Your S3 Bucket Life-Cycle?" src="https://github.com/vumdao/s3-bucket-lifecycle/blob/master/cover.png?raw=true" width="500" />
  </a>
</p>
<h1 align="center">
  <div><b>How Is Your S3 Bucket Life-Cycle?</b></div>
</h1>

### - Set S3 bucket life-cycle rule is to save cost of long-term storage objects such database backup. This post gives an experinced case and a sumarized of S3 storage object class.

---

## What’s In This Document 
- [Example of S3 Life-cycle Rule](#-Example-of-S3-Life-cycle-Rule)
- [S3 Object Storage Classes](#-S3-Object-Storage-Classes)

---

### 🚀 **[Example of S3 Life-cycle Rule](#-Example-of-S3-Life-cycle-Rule)**
![Alt-Text](https://github.com/vumdao/s3-bucket-lifecycle/blob/master/lifecycle_rule.png?raw=true)

### 🚀 **[S3 Object Storage Classes](#-S3-Object-Storage-Classes)**
- Amazon S3 supports a [waterfall model](https://docs.amazonaws.cn/en_us/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html) for transitioning between storage classes, as shown in the following diagram.
![Alt-Text](https://github.com/vumdao/s3-bucket-lifecycle/blob/master/lifecycle_waterfall.png?raw=true)

- Advanced knowledge here is about extend object classes which AWS uses for [CloudWatch dimensions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/metrics-dimensions.html) and you are charged for this additional storage 
![Alt-Text](https://github.com/vumdao/s3-bucket-lifecycle/blob/master/bucket_metrics.png?raw=true)

![Alt-Text](https://github.com/vumdao/s3-bucket-lifecycle/blob/master/glaicer_obj_overhead.png?raw=true)

![Alt-Text](https://github.com/vumdao/s3-bucket-lifecycle/blob/master/deep_archive_obj_overhead.png?raw=true)

- See cloudwatch metric graph to see AWS add more storage classes
![Alt-Text](https://github.com/vumdao/s3-bucket-lifecycle/blob/master/cloudwatch_metric_graph.png?raw=true)

<h3 align="center">
  <a href="https://dev.to/vumdao">:stars: Blog</a>
  <span> · </span>
  <a href="https://github.com/vumdao/">Github</a>
  <span> · </span>
  <a href="https://vumdao.hashnode.dev/">Web</a>
  <span> · </span>
  <a href="https://www.linkedin.com/in/vu-dao-9280ab43/">Linkedin</a>
  <span> · </span>
  <a href="https://www.linkedin.com/groups/12488649/">Group</a>
  <span> · </span>
  <a href="https://www.facebook.com/CloudOpz-104917804863956">Page</a>
  <span> · </span>
  <a href="https://twitter.com/VuDao81124667">Twitter :stars:</a>
</h3>
Testing localhost on mobile
Tags: mobile, testing, webdev
Published: 2021-03-01 17:51:11

Sometimes I find that Google Dev Tools aren't always accurate when testing for mobile and responsivity and I end up realizing certain UI bugs only after deploying. To save time, I wanted a way to test my localhost directly on mobile devices.

Note: I've only used this with Django and Apple devices - so just bear this in mind, but I want to try with React etc. and will update the post when I do

Before you start, ensure your computer and your device you want to test on (mobile, iPad etc.) are connected to the same network

1) Navigate to **System Preferences -> Sharing**
2) Check the **Internet Sharing** checkbox (Confirm by clicking Start in the pop-up)
3) At the top under Computer Name, you should see **"Computers on your local network can access your computer at: Your-Computer-Name-Here"** (In my case it is Tiffanys-Macbook-Air.local)
4) Now if I want to access localhost:8001 for example, I would type *Tiffanys-Macbook-Air.local:8001* into my mobile browser

5) Sometimes you need an extra step, and in the case of Django, you need to do some binding before 4). You need to explicitly run your server on that port. 

So in my case instead of starting my Django server like this: ``python manage.py runserver localhost:8001``

I would do this: 
``python manage.py runserver Tiffanys-Macbook-Air.local:8001``

If anyone has any tips, feedback, or experience with this approach I'm really interested so feel free to drop a comment!
Brackets Editor as my TextEditor
Tags: brackets, css, texteditor, html
Published: 2021-03-01 17:36:06

I uninstalled Atom and now using Brackets as my main editor for my website.
Internally, I still love using Vim so Brackets will never replace that.
When I am coding html or css, I will be using this so I can live preview. I find it much better than Atom's live preview.
See screenshot. It will use your default browser to do the live preview. 

I highly recommend getting the extension Beautify. It is a life changer.

![Screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sbfhhdgdbfgyocbigsrz.png)
Software Engineering vs Video Games
Tags: softwareengineering
Published: 2021-03-01 15:46:25

---
title: Software Engineering vs Video Games
published: true
description: There is so much in common between these two for me. What do you guys think?
tags: softwareengineering
---

Well, since I was a kid, I loved to play video games. Started with Mega Drive, playing Sonic. Then my brother earned a PlayStation, I loved to play "Crash Bandicoot". The consoles generation were evolving and I followed until Xbox 360.

I don't play video games anymore.
I was thinking about that and realized that I don't miss it, but I didn't loose that feeling and I know why that happens.

What I liked on video games was to complete missions, achieve the best results possible.
Do you know those kind of games that you can finish doing about 70 percent of you could do on the game stages? To achieve 100 percent of completion, you needed to do some side tasks, take all the gold coins scattered through the stage, and things like that.
I was the kind of player that wished to reach 100 percent of completion. It wasn't always possible (after all, sometimes it's so difficult and time consuming that it doesn't worth it), but I was always trying to make it. 

I reach those feelings I felt playing video games while developing software.
Whenever a suite of unit tests passes, a request of a Rest API I implemented works, the Stakeholders' feed-backs are positive, it's like completing a video game stage, defeating a boss, winning the game.
It's so satisfying...
Also, I don't aim to achieve 70 percent completion, that is, delivering a feature that works in a functional way. I want 100 percent. I want the cleanest code, the most secure level, the best performance possible. But by the same way I used to think while playing, sometimes it doesn't worth the effort and time consumed to achieve this.
I have in mind things like time-to-market, agility and generating value for company in order to decide when it's worth waste more time trying to achieve 100 percent.

Does it makes sense for you?
Top 20 SVG Animation in CodePen
Tags: html, css, beginners, tutorial
Published: 2021-03-01 17:20:19

***Hello, guys in this <a href="https://blog.stackfindover.com/category/tutorials/" rel="dofollow">tutorial</a> we will check out the top 20 SVG animations in CodePen***

###Common Query###
1. SVG animation CodePen
2. How to create SVG animation
3. SVG <a href="https://blog.stackfindover.com/animated-background-using-html-css/" rel="dofollow">background animation</a> CodePen

Hello, guys In this tutorial we will try to solve above mention query. and also we will check out the top 20 SVG animations in CodePen.

***Top 20 SVG Animation in CodePen***

**01**
{% codepen https://codepen.io/mark_sottek/pen/MYJLpX %}

**02**
{% codepen https://codepen.io/gzmiraz/pen/XmqWWx %}

**03**
{% codepen https://codepen.io/brandondward/pen/WjyBQW %}

**04**
{% codepen https://codepen.io/sdras/pen/zvXbGJ %}

**05**
{% codepen https://codepen.io/uiswarup/pen/MWWNOjo %}

**06**
{% codepen https://codepen.io/KamilDyrek/pen/vraoLJ %}

**07**
{% codepen https://codepen.io/thepheer/pen/aJHcw %}

**08**
{% codepen https://codepen.io/Yasio/pen/wEWyLE %}

**09**
{% codepen https://codepen.io/Virtuousquare/pen/EZeoEP %}

**10**
{% codepen https://codepen.io/chrisgannon/pen/VjWWZO %}

**11**
{% codepen https://codepen.io/issey/pen/brmoZa %}

**12**
{% codepen https://codepen.io/bleepbloop/pen/Kkdzq %}

**13**
{% codepen https://codepen.io/issey/pen/wzQJZE %}

**14**
{% codepen https://codepen.io/grizzlyowlet/pen/NGEaxX %}

**15**
{% codepen https://codepen.io/morkett/pen/VjByYj %}

**16**
{% codepen https://codepen.io/robin-dela/pen/yajzQW %}

**17**
{% codepen https://codepen.io/CyrilLevallois/pen/Dtfhd %}

**18**
{% codepen https://codepen.io/uchardon/pen/eGjJap %}

**19**
{% codepen https://codepen.io/ihatetomatoes/pen/RrKPop %}

**20**
{% codepen https://codepen.io/issey/pen/NvPgVp %}
A cool feature for your next Jenkinsfile - Closure
Published: 2021-03-01 17:00:38

## Definition
*Definition from Apache Groovy*
> A closure in Groovy is an open, anonymous, block of code that can take arguments, return a value and be assigned to a variable.

---

The cool thing with closure is that we can use it as a parameter. With this, we are able to reuse a lot more of our code!

One case I met was to execute some scripts in a particular docker image. But the code to start the docker can take a lot of lines. 

So, closures were really helpful! I was able to create a generic method to start a docker image and give a closure in parameter to execute inside the image.

*Example*
```groovy
...
dockerLoader(param, ..., {
  // some script to execute
})
...

def dockerLoader(param, ... closure: Closure) {
  ...
  // Closure execution
  closure()
  ...
}
```

For more information, go check the official documentation which contains a lot of examples.

---

## Links
- Groovy documentation: https://groovy-lang.org/closures.html
- Baeldung Closure example: https://www.baeldung.com/groovy-closures

---

I hope it will help you! 😀
Does asking for more money damage your career?
Tags: discuss, talkpay, watercooler
Published: 2021-03-01 16:55:05

---
title: Does asking for more money damage your career?
published: true
description: a quick article on salary negotiation
tags: discuss, talkpay, watercooler
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9edyq7908ujo4epjyu70.jpg
---

*cover image By [Basile Morin](https://commons.wikimedia.org/w/index.php?curid=79171135) CC BY-SA 4.0* 

Whether it's in the initial interview process or during your performance review, some of us are extremely nervous to ask for more pay. The concern, in general, is that it will 'damage your career.'

> Before going any further it's important to acknowledge that discrimination is a real part of the job market. Women ask for raises just as often as men, [but are more likely to be denied](https://hbr.org/2018/06/research-women-ask-for-raises-as-often-as-men-but-are-less-likely-to-get-them). This post isn't implying that changing our behavior can 'solve' discrimination.

For me, I have had one job offer rescinded after I tried to negotiate pay. In retrospect I'm glad! The initial offer would have been difficult to live off, and by rescinding they made it clear that they weren't likely to ever give me a raise.

I'm curious if there was ever a time you asked for more money, and wished afterward you *hadn't*.