teleren/devto huggingface dataset:
Failing to succeed. (CLI Gem Project: Part 1)
Tags: ruby, coding, bootcamp
Published: 2019-06-18 21:01:52

---
title: Failing to succeed. (CLI Gem Project: Part 1)
published: true
description: My first coding project for Flatiron
tags: ruby, coding, bootcamp
---

Sometimes you gotta fail to succeed. And that's what exactly happened to my first project.

I failed. I haven't had my assessment with my lead yet but I already know I failed. I've been going over all the mistakes I made the past 72 hours. I didn't utilize my time right. I didn't utilize the resources available to me. I let my stubbornness get in the way and didn't ask for help. I stayed on a problem for hours on end trying to solve it.

The project involves using OOP to create a web scraping tool that pulls data from a website and allows the user to view that data in the terminal. It had to be two levels deep (For example, selecting from a list of purses and then seeing the details and price) and cover all basics in terms of usability (the program respond the way it should be). Along with that we get to create a GEM, which helps with loading all the dependencies requires for your CLI and scraper to function, along with giving it a single command to make everything run. 

My Gem works. My CLI works. My scraper doesn't work.

And I tried. I stayed up for many hours trying to get it to work. I spent all of my sleepless weekend and even took off work to get it working. But I was trying desperately to make the program work that I wasn't focusing on understanding what I was doing to try to get it to work. Then I got frustrated and would delete the entire thing and start over. I think I changed my entire code around about 6 or 7 times.

But I finally figured it out today on the way to work. The problem is that when my code runs, it's not executing the 2nd part of my code to display the details of of the items (in the case, laptops). I'm not calling the CSS classes for the scraper properly in order for it to pass through the CLI. 

Now that I know, I can learn. I meet with my tech lead to do the assessment and from there I'll probably will get a second chance at passing it. But instead of being nervous I'm more motivated. Tired, but motivated.

I look forward to sharing my project with you all once I get it fixed.
Quick API Debugging Tip
Tags: javascript, console, postman, api
Published: 2019-06-14 14:10:18

---
title: Quick API Debugging Tip
published: true
description: A very handy tip for when you are debugging an API. 
tags: javascript, console, postman, api
---

I learned this trick a couple years ago and it has saved me so much time that it's only prudent to share. 

Say you built an API, and you are working on the front end to consume the awesomeness that is your API. You get your form set up to log your user in. Hit the send button and you get a 400 response. Wait, what the what?  I have a very simple starting point that you can use with tools you are probably already using.

This tip involves either Google Chrome, or Mozilla Firefox. There might be more, but these are the two browsers that I use. As well as the [Postman](https://www.getpostman.com/) app. These are all free to use, so use them. They are awesome!

1. Open your dev tools.
  - Chrome (cmd + alt + i)
  - Firefox (cmd + alt + i)
2. Go to the network tab.
  - ![Tabs of the chrome developer tools](https://i.imgur.com/pw2VHnS.png)
3. Find the failing request.
  - ![Failed request in chrome developer tools](https://i.imgur.com/MCoFlJT.png)
4. Right click and copy as cURL.
  - ![Menu items for chrome with Copy as cURL highlighted](https://i.imgur.com/xCpP2kA.png)
5. Open Postman and select import.
  - ![Postman header showing the import button](https://i.imgur.com/z2VtUgW.png)
6. Select the "Paste Raw Text" tab.
  - ![Postman modal showing the import tabs with Paste Raw Text highlighted](https://i.imgur.com/6S62HWG.png)
7. Paste your cURL request you copied from your browser and hit Import.
  - ![Postman modal with raw cURL request pasted in](https://i.imgur.com/hxYsPWf.png)
8. Send your request for much easier debugging.
  - ![Postman after the request has been imported](https://i.imgur.com/TVGjb6s.png)


One thing to take note of, your request is completely imported into Postman. This makes it very simple to debug your request. You can see your data easier and any headers sent in their nice UI.

As a backend dev, I find it handy for the front end dev to send that request to me in chat. This way I can recreate what is breaking in my API with the exact data that they are sending.

I use this trick on a daily basis. I hope that you will too!
Why are you using Rust for web development?
Tags: discuss, rust, webdev
Published: 2019-06-18 21:35:15

For those of you using Rust for web development, WASM or not, why did you decide on Rust over something like Go? I assume you wanted a static/compiled language compared to say Python. But I would be interested in why not using a scripted language as well.

How hard has it been to do web development in Rust? What has been your biggest problems slowing you down? What has made using Rust better? Do you find time to get to MVP/Production much slower than in other languages like Go, Python, or JavaScript?

It might be interesting to also hear from those that have tried stacks built around Elixir/Erlang as well.
What are the right approach to build chat app that scale with socket.io?
Tags: help, discuss, askdev
Published: 2019-06-18 21:05:52

Hi I had a bit of thinking problem to figure it out how good chat app really are.

For this case I use socket.io, I think plain Websockets also use this similiar approach, I think...


## Send message to user, private message

There a lot [example](https://stackoverflow.com/questions/11356001/socket-io-private-message) outhere, and it involves saving the socket.id of a websockets, or sockets.io id.

But what are the right approach? 

Socket.io had rooms feature, could I just create new unique rooms if there are another people chatting?

Websockets can use redis pub/sub do I should create dynamic redis pub/sub to send messages?

Are these approach are okay if I had 100.000++ users conected to dynamic pub/sub or socket.io rooms mecanism?

There are tools called rabbitMQ, some people recomend it when building chat app or realtime app, what actually its do? It is simplify the app and easy to scale app?

What are message broker? Why is this keep recomended for building realtime apps?
Anyone needing help in open source projects?
Tags: discuss, opensource
Published: 2019-06-18 20:45:25

---
title: Anyone needing help in open source projects?
published: true
tags: discuss, opensource
---

Hello, I'm a front-end developer looking for an open source project to help, specially the small ones. I work mainly with javascript, but could open to other languages. Is there anyone needing help?
On not-so-smart coding standards
Tags: cpp, codequality
Published: 2019-06-18 20:44:07

Sometimes bad naming conventions are biting us. Long before I joined the project someone decided that every class should have a 'C' prefix to its name. So, instead of Window we have CWindow etc. And all those reside in files named without the initial 'C'. This rule has a very nice side effect.

Can you guess what class is in the file called Logger.cpp? :)
A To Do List using Torus 
Tags: replit, html, css, javascript
Published: 2019-06-18 20:38:53

---
title: A To Do List using Torus 
published: true
tags: replit, html, css, js
---

I walked through the code demo listed here https://thesephist.github.io/torus/todo-demo.html and created a working version on Repl.it

{% replit @triptych/triptych-torus-todo %}
Should I finish University?
Published: 2019-06-18 20:31:45

---
title: Should I finish University?
published: true
description: Does degree matter?
tags: 
---

Heeello everyone, it's my 1st post here and I'd like open a HUGE discussion here.

I'm thinking about dump Bs in Computer Science, Because I've been on market Since 2016 and in my opinion it's starting to be a waste of time. What you guys think about it?

Notes: Actually it ins't a bad college but I just did 1/4 of course.
Rails Layouts
Tags: beginners, rails
Published: 2019-06-18 20:19:53

In my coding bootcamp we have started the Rails section of the curriculum. Last week it seemed very overwhelming, as if there was so much Rails content that I would not be able to understand enough to build an app.

At the start of this week, I still feel that I have barely scraped the surface of what Rails can really do. However, I did find one thing in particular that I really enjoy about the Rails apps we have made so far.

## Layouts ##

Layouts allow you to do a great many things with your application but to keep it simple, lets break down three simple ways that a layout can impact your application.

### Default Layout ###

This is the layout that will persist throughout your application. A default layout may contain a link to your homepage, a login/logout link, and a help link. This might look something like this. 


```javascript
<%= link_to 'Home', root_path %>
<%= link_to 'Login', login_path %>
<%= link_to 'Help', help_path %>
<%= yield %>
```

### Rendering a layout ###

Much like how you can render a view page, you can render a specific layout as well. For example, you may want to have a different layout on your login page than you do for your homepage. Rendering a layout uses a very similar syntax to rendering a specific view.

```ruby
render layout: 'login'
```

### Controller vs Method ###

By default your controller will look for a layout file that matches the controller model. For example, for your users controller, Rails will look for a users view file in your layouts folder. However, if you want to use a specific layout for one of your methods, you can still specify that with the render layout command that we saw above.

### Moving Forward ###

Layouts are an excellent way of keeping your code dry as something such as a 'Home' link might be found on nearly every page of your app. They also have the benefit of allowing you to include links that help you to navigate and test your app quickly. While it may not seem like much, I very much appreciate the ability to navigate my apps directly without having to manually enter URLs.
Angular 9|8|7 Autocomplete Tutorial with Angular Material
Tags: angular987, softwaredevelopment, angular8autocomple, angularmaterial
Published: 2020-01-30 10:59:13

---
title: Angular 9|8|7 Autocomplete Tutorial with Angular Material
published: true
tags: Angular 9|8|7, Software Development, Angular 8 Autocomple, Angular Material
canonical_url: https://www.positronx.io/angular-8-autocomplete-tutorial-with-angular-material/
---


Today we are going to create **Autocomplete in Angular 8 using Angular Material UI components**. The autocomplete is a functionality which shows the recommended options to the user when the user clicks on the input field or enters some keywords in an input field. We’ll create an Angular 8 app from scratch to show how to create the Angular autocomplete functionality.

In order to create Angular autocomplete, we will set up a basic app using Angular, and then we’ll install and configure Angular material 8 UI framework. Then, we’ll import MatAutocompleteModule in the app.

This directive is used to build autocomplete in Angular 8. It helps user to show all the possible results, when the user types something in the input box. Then it shows the recommended options to the user in a dropdown.

[click here to read more](https://www.positronx.io/angular-8-autocomplete-tutorial-with-angular-material/)
36 GraphQL Concepts: An Easy Way to Learn GraphQL!
Tags: graphql
Published: 2019-06-18 19:28:52

---
title: 36 GraphQL Concepts: An Easy Way to Learn GraphQL!
published: true
description: 
tags: GraphQL
---
We’ve compiled a list of the best articles and videos for learning the 36 most important concepts of GraphQL. With a few students on our team, we quickly realized it’s difficult for a beginner developer to distinguish what resources were accurate and actually helped them learn.

So our team decided that we wanted to make it easier for newcomers to understand GraphQL! We put together a list of helpful tutorials, examples, and articles explaining low-level and high-level concepts and tossed it on Github! 


##### Github Repo:

[https://github.com/Novvum/36-graphql-concepts](https://github.com/Novvum/36-graphql-concepts)

If you have any interesting and useful resources you’d like to add, feel free to make a pull request on our repository. We’d love to collaborate and create a reliable source of information for new or advanced developers.

###### about us: [Novvum](https://novvum.io) is a modern software development agency specializing in both engineering, strategy, & design.
How can I live with my insatiable desire of knowing everything about the web world?
Tags: discuss
Published: 2019-06-18 20:08:17

I'm a web developer and I learn every day new things about the web world: one day a new HTML element, one day a new CSS property, one day a new UX pattern, one day a new a11y rule, and so on. I strive every day to learn how to make the web a better place for everyone. But this effort is resulting in frustration. Not because I'm realizing that I don't like developing for the web, the opposite! I love this world so much that I'd like to know *everything* about it, but I know it's an impossible desire. You can't know every single thing about a topic. So I'm here to ask to this lovely community of dev.to: how can I live with this frustration? How can I manage it? Have you ever had this feeling before?
VSCode Settings Sync
Tags: vscode
Published: 2019-06-21 15:10:26

---
title: VSCode Settings Sync
published: true
tags: vscode
canonical_url: https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
---

[VSCode Settings Sync](https://smw.fyi/6F)

Not as easy as just backing up your dotfiles with Vim, but still nice to be able to reload everything with a click or two.
Microservices: HTTP Requests vs Messaging
Tags: discuss, microservices, http, rest
Published: 2019-06-18 19:57:49

---
title: Microservices: HTTP Requests vs Messaging
published: true
description: Microservices: HTTP Requests vs Messaging
tags: #discuss #microservices #http #rest 
---

## I'm currently designing a solution using Microservices and saw both implementations (HTTP Requests and Messaging) for communication between them. Considering that theses microservices will run on the same network, in what scenarios do you recommend each one of them?
Virtual DOM Separate From React
Tags: react, vue
Published: 2019-06-18 19:56:24

---
title: Virtual DOM Separate From React
published: true
description: If you work with React, or actually any framework that uses virtual dom, like vue, preact, inferno or whatever, or you are currently learning one of those frameworks - it will probably be interesting for you.
tags: react, vue
---

If you work with React, or actually any framework that uses virtual dom, like vue, preact, inferno or whatever, or you are currently learning one of those frameworks - it will probably be interesting for you.

It is a Virtual DOM implementation separate from any framework. It's heavily inspired by Virtual DOM implementation from React. Great learning material for ones who want to understand React or Vue rendering process better.

[Subscribe to my channel](https://www.youtube.com/channel/UC5hby9iDkwOTQM7PIjyjbgw?sub_confirmation=1)
Solving 8 puzzle problem using  A* algorithm
Tags: react, algorithms, 8puzzle, astar
Published: 2019-06-18 19:45:01

---
title: Solving 8 puzzle problem using  A* algorithm
published: true
description: React web app which solves 8 Puzzle problem using A* algorithm
tags: react, algorithm, 8puzzle, astar
cover_image: https://thepracticaldev.s3.amazonaws.com/i/jawzxcckru9fbtnvqgap.gif
---

This is a **react** web app which solves 8 Puzzle problem using A* algorithm. Maybe someone will find this project useful for his  university homework.

See the github repo below 👇


{% github kaxi1993/8puzzle %}
I'm launching Menu Launcher - Declutter status bar, dock and desktop
Tags: macos, swift, launcher
Published: 2019-06-18 19:35:25

---
title: I'm launching Menu Launcher - Declutter status bar, dock and desktop
published: true
description: 
tags: macos, swift,launcher
---

Website https://onmyway133.github.io/apps/menulauncher
Product Hunt https://www.producthunt.com/posts/menu-launcher
Gumroad https://gumroad.com/l/VTddV

---

Hi, I'm thrilled to announce Menu Launcher that I've been developed and used for a long time. Being a macOS user, I constantly try to find ways to stay productive, and those cluttered desktop and menu bar always bother me. Having many icons in the dock make me sometimes accidentally open unwanted apps. There are also some files, folder and apps that I want to open from time to time, that are ofteeen hard to remember with Cmd+Space.

I like the convenience of menu bar, and with all status icons, dock app and file/folders in one place, we can manage and launch them any time with just a click. 

Menu Launcher is a convenient macOS menu bar application that allows launching any file, folder and apps from a single place. Get rid of cluttered desktop, dock and system status menu bar. With Menu Launcher, you have easy access and can customize what you want to show and open.


🚀Detect and show all available items on system status menu bar

🔥You can drag anything, from file, folder, app and they will be available under file section

👍Convenient scrolling with helpful guide section beneath

💪 You can enable Accessibility to enable activating status menu icons

☂️ Make a patch over system status icons

🗳Persist your favorite apps and folders

⛱Instruction to open Login Items where you have control over whether you want Menu Launcher to be open at login

🌂Right click on app icon to remove

Hope you find it useful and help spread the words
JustGraphQL: Your One-Stop-Shop for GraphQL Resources, Tools, & Articles
Tags: graphql
Published: 2019-06-18 19:29:21

---
title: JustGraphQL: Your One-Stop-Shop for GraphQL Resources, Tools, & Articles
published: true
description: All the best learning tools, all in one place.
tags: GraphQL
---

As part of our mission to make GraphQL more accessible and easier to learn we a have created [JustGraphQL](https://www.justgraphql.com/): a website that will bring together the best of the GraphQL community in an easy to navigate way. If you would like to contribute or spotlight your projects or resources feel free to [reach out](https://www.novvum.io/contact-us).

###### about us: [Novvum](https://novvum.io) is a modern software development agency specializing in both engineering, strategy, & design.
Find the largest number in an Array - one line
Tags: javascript, polacode, codeisbeautiful
Published: 2019-06-18 19:27:00

---
title: Find the largest number in an Array - one line
published: true
description: 
tags: #JavaScript #Polacode #CodeIsBeautiful
---

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

Spread that out !
Help come up with a term to describe a product targeted at developers and testers?
Tags: discuss
Published: 2019-06-18 18:44:18

We (zebrium.com) would love some help in coming up with a term that describes what we do. 

We are building a product that helps developers and testers find, triage and fix issues across the CI/CD pipeline. Our technology works by using machine learning to perfectly structure log data. From there we can perform effective anomaly detection of log data (a good proxy for finding problems), and suggest signatures that allow you to “fingerprint” a sequence of events (including values of parameters in the events) that identify the issue if it happens again. Since the underlying data is structured, we also make it very easy to navigate and build queries of arbitrary complexity.

We have been experimenting with the terms “CI/CD Forensics”, “Dev/Test Forensics”, “CI/CD Verification”, etc. Do any of these terms resonate (i.e. would you as a developer or tester be intrigued by the name and does the name capture what is described above)?

Any suggestions would be greatly appreciated!
Ruby already has pipeline functionality
Tags: ruby
Published: 2019-06-18 18:15:28

---
title: Ruby already has pipeline functionality
published: true
description: A tidbit about ruby 2.6's functional composition
tags: ruby
---

There's a big fuss going on in the ruby world about an upcoming operator inappropriately named "the pipeline operator".

A traditional pipeline operator lets you unwrap nested function calls like `a(b(c(5)))`, by writing it in pipes. `5 |> c |> b |> a`

The ruby one, however, just lets you do this:

```ruby
1..5 
|> map { |i| i * 2 }
|> reduce(0) { |i, s| s + i }
```

rather than

```ruby
(1..5)
.map { |i| i * 2 }
.reduce(0) { |i, s| s + i }
```

Brandon Weaver talks about it here: {% link https://dev.to/baweaver/ruby-2-7-the-pipeline-operator-1b2d %}

I wanted to expand on a comment from that thread from Johan Wentholt: {% devcomment bpdg %}

The feature that Johan Wentholt is using is called `functional composition`, and ruby 2.6 shipped with 2 operators for it. `<<`, for `a(b())`, and `>>` for `b(a())`. These operators allow you to compose procs out of existing procs. He's combining this feature with `#then`, which yields `self` to the given block.

For example, if you had the following procs

```ruby
double -> { @1 * 2 }
add_two -> { @1 + 2 }
```

Then you could create a new proc, `add_two_then_double`

```ruby
add_two_then_double = add_two >> double
# OR
add_two_then_double = double << add_two

add_two_then_double.call(5) #> 14
```

Up above, I gave an example of the pipeline operator by simplifying `a(b(c(5)))`. With functional composition, you can write this as:

```ruby
(c >> b >> a).call(5)
```

Of course, you can also apply ruby's new pipeline operator to this, to get `c >> b >> a |> call(5)`

So as a tl;dr:

```ruby
double = -> { @1 * 2 }
add_two = -> { @1 + 2 }

# these are all double(add_two(5))

(add_two >> double)[5]
(add_two >> double).call(5)
add_two >> double |> call(5)
5.then(&add_two >> double)
```
Hello, is there any (java) body out there?
Tags: java, discuss
Published: 2019-06-18 18:06:10

---
title: Hello, is there any (java) body out there?
published: true
description: Where have all the Java devs gone?
tags: java, discuss
---

I'm seeing a decreasing or just out right distinctive lack of any Java or even sensible backend post or discussions going on.
A quick search for the Java tag on Dev.to reveals less than a handful of posts in 2019 and the majority of those are interview questions and techniques. This seems to be the theme across development communities.

Are we experiencing a backend (I say java as an example because that is my bread and butter) resource shortage? Are backend Devs less communal about knowledge sharing? What gives?
What decisions unexpectedly changed your life?
Tags: discuss
Published: 2019-06-18 18:03:15

It seems like the most arbitrary decisions we make are the most likely to radically change everything. It's impossible to know how an action will impact your life, but it's always fun to look back and point out life changing choices, especially when they seemed so random and trivial at the time. The more we understand that any decision has the potential to impact our lives, the more prepared and encouraged we will feel as opportunities present themselves. 

What is your example of a decision that changed everything?
What do you do if you're in the middle of a project and you realize it already exists in the world?
Tags: discuss
Published: 2019-06-18 17:54:35

I got this question in a DM and I thought it made for a good community discussion (of course anyone is welcome to make a post like this, but I'm happy to take the mantle for reach).

How do you react in the situation? Is it appropriate to keep going, if so what should you be mindful of?