teleren/devto huggingface dataset:
HFOSS Literature Review 2
Tags: rithfoss
Published: 2019-02-13 03:06:30

---
title: HFOSS Literature Review 2
published: true
description: Blog post for HFOSS Literature Review 2
tags: #rithfoss
---

# Roads and Bridges
I recently read the first half of Roads and Bridges: The Unseen Labor Behind Our Digital Infrastructure by Nadia Eghbal as an assignment for my FOSS course, and I really enjoyed it. I plan on finishing the other half of the paper when I find time next week, but for now I have to focus on my schoolwork. Eghbal is a software developer and an advocate and researcher for open source software.

Her paper is all about the influence of open source software and the world's reliance on the tools made by unpaid programmers making a project as a passion or by necessity. It's a great read on the prevalence of FOSS, as well as the benefits and shortcomings that come along the way. I really enjoyed the articles discussion of the lack of organization and contributors as well as the small figures describing different open source tools with short bios of how they were developed and by who. While it is very verbose, I really think that this article was worth the read.

Eghbal posses some really interesting questions about the future of open source software, that she doesn't provide a clear answer to in the sections that I've read thus far. How do we plan on incentivizing more people to contribute and maintain code to help fix the offset between contributors and users? She points out that the large number of people now using open source tools greatly outweighs those contributing to it, leaving the owners of the project with too much work to do. She also asks whether its ethical or logical for open source projects to take large amounts of money from ventures without plans for return on investment, describing a lot of these projects as 'loss leaders'. She paints a bleak picture for projects like OpenSSL and other projects that are soon to run out of funding or have maintainers retire.  

# npm
I was also required to read an [issue thread](https://github.com/npm/npm/issues/19883) on npm 5.7.0 as well. The post is very clear on what issues the user had and what they did to cause the issue. npm 5.7.0 was causing file permission changes and the user was simply reporting the issue and telling the team how to reproduce it, but the comment thread was a huge dumpster fire. Apparently people trying to update the the npm package were getting a pre-release that clearly wasn't working. The thread quickly turns into a huge argument over whether or not it was the user's fault for negligence, or the maintainter's fault for not clearly labeling that it was a pre-release (running `npm install` would install 5.7.0). People began discussing a topic that Edgal discussed in her paper: that there are only two people maintaining this critical tool used by countless numbers of people. The thread got so bad that the maintainers had to restrict access to the thread. The new repo for npm doesn't even have an issues section to post on, while the old one is sitting at a cool 2000+ issues right now. No wonder they seemed overwhelmed.
NULS Developers Workshop - Silicon Valley
Tags: blockchain, javascript, smartcontracts, dapps
Published: 2019-02-13 04:09:14

---
title: NULS Developers Workshop - Silicon Valley
published: true
description: Developers Workshop
tags: #blockchain #javascript #smartcontracts #dApps  
---

📣Join us in Silicon Valley for our first #NULS Developers Workshop in the USA. 🇺🇸 https://www.eventbrite.com/e/nuls-blockchain-developers-workshop-tickets-55750547388
I Quit My Software Project To Get Healthy!
Tags: personal, consulting, career
Published: 2019-02-13 02:46:51

---
title: I Quit My Software Project To Get Healthy!
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6ykpruad2hs0y2offtjq.png
description: Ever had to quit a good software project because you couldn't be successful in your role?
tags: #personal #consulting #career
---

Have you ever had to quit a good software project...because you figured out **you weren't going to be successful in your role**?

I had the opportunity to help two consulting companies try and rescue a troubled software project for a client.

Though I was originally brought in to help figure out how much work was left to do, I found myself in the position of being "the expert" once again.

Because of politics, deadlines, and challenges with the maturity of the companies understanding agile - I found myself overwhelmed.

Though I continually tried to reset expectations and get help, I decided eventually that it was better to move on.

Have you ever been on a good project, with good people, only to find when you really think about it you're not effective in your current role?

Did you have a hard time getting support from management to make the changes necessary?

How did you deal with it?

Visit my site to watch the video (or listen as a podcast):

# [📺 Watch or 🎧 Listen](https://jaymeedwards.com/2019/02/12/i-quit-my-software-project-to-get-healthy/)<hr />
[🔔 Subscribe for over 100 videos on healthy software development](https://YouTube.com/c/JaymeEdwardsmedia?sub_confirmation=1)
Monkey Patch Rails validators
Tags: monkeypatching, rails, ruby
Published: 2019-02-13 01:59:41

---
title: Monkey Patch Rails validators
published: true
tags: monkey-patching,ruby-on-rails,ruby
canonical_url: 
---

[Devise](https://github.com/plataformatec/devise), an authentication solution for Rails, gives some modules that add some cool functionalities to the models, one of them is [Validatable](https://github.com/plataformatec/devise/blob/master/lib/devise/models/validatable.rb) which adds the validations needed for emails and passwords. One of those validations is _validates\_uniqueness\_of_ which is in charge of checking that the email address is unique.

I have been working on a Rails API since 2016 and it uses Devise; users are required to give unique emails. But something change: now the API supports a Chatbox which will be added on many websites, we want to get those visitors and we have to support duplicate emails.

The best approach is to make a new model for those users, but because of the impact to the application (which is a chat application) we don’t have the time to make it happen.

Another alternative may be this [Validatable should allow email uniqueness to be scoped#4767](https://github.com/plataformatec/devise/issues/4767) but the discussion is still open. Maybe removing the _Validatable_ module and implement everything but it will generate extra work and will increase the probability of failures (remember always TDD). Instead of that I followed a different approach.

Taking advantage from Ruby, I get the model validators for the _email_ attribute and I find the _UniquenessValidator_. Then I redefine the _validate_ method of the validator.

At a Rails model:

{% gist https://gist.github.com/pablomarti/947a1b0554ac71bd270e78d19872fed9 %}

This is called [Monkey Patch](https://en.wikipedia.org/wiki/Monkey_patch). It is a vague term, the best definition is **dynamic modification of a class on runtime** , and in this case specifically it is redefining an instance method on runtime. Here are some good explanations at [this StackOverflow thread](https://stackoverflow.com/questions/394144/what-does-monkey-patching-exactly-mean-in-ruby), and citing Patrick Ewing:

> Well, I was just totally sold by Adam, the idea being that if it walks like a duck and talks like a duck, it’s a duck, right? So if this duck is not giving you the noise that you want, you’ve got to just punch that duck until it returns what you expect.

Kind of cool but something you want to avoid. Personally I believe that a good design will avoid these kind of things. But for those hard moments or for well designed solutions keep this in mind.

Good material for reading:

[Redefining Instance Methods at Runtime](http://ndlib.github.io/practices/redefining-instance-methods-at-runtime/) by Jeremy Friesen

[Understanding Ruby Singleton Classes](https://www.devalot.com/articles/2008/09/ruby-singleton) by Peter J. Jones

[3 Ways to Monkey-Patch Without Making a Mess](https://www.justinweiss.com/articles/3-ways-to-monkey-patch-without-making-a-mess/) by Justin Weiss

[Refinements](https://ruby-doc.org/core-2.5.3/doc/syntax/refinements_rdoc.html) at Ruby Docs
a great youtube channel to learn web design
Tags: html, css, webdesign
Published: 2019-02-12 23:26:29

---
title: a great youtube channel to learn web design
published: true
description: you are a web designer and you want more inspiration visit this youtube channel
tags: HTML, CSS, Web Design
---
hi every one and how are you because i feel great, i am here to present a you a great youtube channel to learn web design ( actually it's my youtube channel :p )
but please subscribe and if you like the videos please share and tell me how to improve it i will be thankful 
link is here <a href="https://www.youtube.com/channel/UCCkjYARLbR1ws4_lMuvJ2vg">Doctor Code</a>
HOW TO START WEB DEVELOPING 
Tags: beginners, html, css3, web
Published: 2019-02-12 23:06:20

---
title: HOW TO START WEB DEVELOPING 
published: true
description: learning web design is not difficult , it's a matter of motivation and time
tags: Beginners,HTML5,CSS3,Web
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/gkv8cnml2re563kqb664.jpg">

want to start web developing and don't know how to start let me introduce you my article where i explain every thing about beginning and how to stay motivated 
nice reading ^_^
https://doctorcodetutorial.blogspot.com/2019/02/how-to-begin-web-developing.html
useDumbHooks
Tags: discuss, react, javascript
Published: 2019-02-12 23:01:12

---
title: useDumbHooks
published: true
description: Some ideas to practice React hooks
tags: [discuss, react,js]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/j3bcasr6n10ahhduutoi.jpg
---


This article inspired by Sara Vieira's talk "Build dumb sh*t".

Best way to learn something is to use it, to play with it (primitive interpretation of Piaget's constructivism theory), right? But don't build yet another todo app, because it is boring, and when something boring it is harder to learn, you need forcefully push it in your brain. Instead, find some fun task in which you can practice new technology along the way. Build something fun and useless.

So I want to get a better understanding of React's hooks and I wonder what is the most absurd idea for the hook you can come up with?

I already got some ideas:

- useFaviconProgress - show progress in favicon, see [faviconx](https://github.com/nicolasbize/faviconx)
- useProgressBar - show youtube-like progress bar, see [nprogress](https://github.com/rstacruz/nprogress)
- useGreenlet - run function in a web worker, see [greenlet](https://github.com/developit/greenlet)
- usePopup
- useSocket - subscribe to websocket

**Build fun, dumb, simple hooks. Share your ideas and/or implementations in comments.**

_Photo by Cristina Gottardi on Unsplash_
If you're building for 'scale', what would your approach look like?
Tags: discuss, learning, help, career
Published: 2019-02-12 21:49:56

---
title: If you're building for 'scale', what would your approach look like?
published: true
description: Do you even scale, bruh?
tags: discuss, learning, help, career 
---

Recently, I was overlooked for an opportunity because they wanted someone with production experience of building something out at scale for a user base of 100k or more. While that's good feedback to start with, I had trouble visualizing 'scale'. I mean, I currently work for a company with a user base of approx. 300k but I didn't build its frontend/backend that got it this far.

What does building for scale even mean? What does it look like on the front-end vs back-end?

When I think of scale, I'm thinking DevOps and ensuring your servers can handle 'scale' and setting up distributed databases, using caching (Redis).

So if tomorrow you were to start up a project, full stack work, how would you ensure it's scalable so that it can handle a mass influx of users the next day (extreme example much)?
Go zero values finally hit me
Tags: go, learning
Published: 2019-02-12 20:44:41

---
title: Go zero values finally hit me
published: true
description: Go zero values finally hit me and I continue to learn how to learn.
tags: go, learning
---

I decided to learn Go (not my first language) by opening the docs and an editor and just Going for it. After 2 weeks and a few hundred lines, I had a functional and useful tool and am mostly enjoying working with Go. 

I had seen references to "zero values" here and there but didn't pay much attention. My variable definitions, assignments, flow control, and such were all working as expected so I didn't feel I was missing anything.
Then, suddenly, the idea of a Boolean variable's _zero value_ being `false` penetrated my willful ignorance and I re-examined my code. What I found were lots of familiar patterns like this:

```
type Test struct {
    Pass    bool
}


if len(test.Passes) > 0 && len(test.Fails) == 0 {
    test.Pass = true
} else {
    test.Pass = false
}
```

But if a "zero value" means that simply declaring a variable name and type guarantees it gets initialized with a known value, then `test.Pass` was already `false` as soon as it existed. Meaning that all those `else` branches were redundant.


```
type Test struct {
    Pass    bool
}


if len(test.Passes) > 0 && len(test.Fails) == 0 {
    test.Pass = true
}
```

I was able to cut out a large portion of lines and simplify logic just by knowing and using the zero values of all the basic types.

After this I decided to not learn solely by the language specification and bought a book. The Go Programming Language book covers "zero values" within about the first dozen pages. (`palm.Smack(&forehead)`)

The lesson here isn't only that Go's zero values make Go code more succinct, safe, and readable, but... well, I'm pretty sure there is another lesson in here. Maybe someone can spot it and explain it to me? ;)
Magento 2: cache clean vs cache flush
Tags: magento, development, cli
Published: 2019-02-12 20:40:49

---
title: Magento 2: cache clean vs cache flush
published: true
description: Do you know the difference between cache:clean and cache:flush on Magento 2? In this post I'll explain the main difference and when is the best moment to use each one.
tags: Magento, development, CLI
canonical_url: https://blog.rafaelcg.com/magento-2-cache-clean-vs-cache-flush
---

During the development we constantly use the Magento feature to clean or flush the cache, but do you know the difference? Check it out this difference based on DevDoc.

**php bin/magento cache:clean**

Cleaning a cache type deletes all items from enabled Magento cache types only. In other words, this option does not affect other processes or applications because it cleans only the cache that Magento uses.

> Disabled cache types are not cleaned.

**php bin/magento cache:flush**

Flushing a cache type purges the cache storage, which might affect other processes applications that are using the same storage.

**Reference:** [DevDocs Manage the cache](https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cache.html)
When you want to learn C in 2019
Tags: linux, c, systemprogramming
Published: 2019-02-12 20:30:33

---
title: When you want to learn C in 2019
published: true
description: With so many awesome languages (I'm looking at you Rust!) why C? 
tags: linux, C, system programming
---

How many of us have those fond memories of daring to write more than 20 lines of code without compiling just to get a taunting blinking cursor of bash right below `segmentation fault`. Oh, the nostalgia! 

But for real, C seems to work against you! It lures you with its minuscule 32 keywords and then it shoots you on the back with `*` and `&`.

I don't know if it's because I like pain or I still idolize the time of `vi` running on Slackware back in the day of Kernel 2.2 and ext2 constantly breaking but I finally decided to take the jump into C.

What I've been "discovering" is that the beauty of C is that it doesn't try to hide many details from the system you are running the program. It assumes you know what you are doing, and my that, you know what things can be stored on L1 or in RAM! I guess it is true that with greater power comes greater responsibility.

The reason why I'm learning C (I'm a web dev in love with JS and React, and Rust makes my heart flutter!) is because Linux. I have used Linux for years and now I want to go deeper, syscalls and kernel and such. And even in higher levels we are still C territory with gstreamer and Glib and Gtk+ and libssl, and readline and wayland and...

C is still King and Lord in many low level Linux world.

Learning it in 2019 seems kind of like a challenge since you seems to find two camps, one says "C is Punk Rock" (21st Century C) while the other camps says to not dare a keyboard before reading K&R2. One wants you to develop high-level stuff with C and a bunch of libraries, while the other tells you how to store things on L1, which is 200x to RAM.

Anyways, I'm really enjoying learning more about systems from the amazing tlpi book. Any suggestions, ideas or resources would be more than welcome!

Thanks for reading :-)
Shorthand comparisons in PHP
Tags: php
Published: 2019-02-12 20:01:09

---
title: Shorthand comparisons in PHP
published: true
description: A closer look at PHP's comparison operators.
tags: php
---

There are the ternary, shorthand ternary, null coalescing, null coalescing assignment and spaceship operators. Do you know all of them? 

[https://stitcher.io/blog/shorthand-comparisons-in-php](https://stitcher.io/blog/shorthand-comparisons-in-php)
0x Development course | Build your own relayer on 0x / Ethereum
Tags: ethereum, 0x, solidity, blockchain
Published: 2019-02-12 19:14:32

---
title: 0x Development course | Build your own relayer on 0x / Ethereum
published: true
description: 
tags: Ethereum, 0x, Solidity, Blockchain
---

Hi Dev.to community!

I am preparing a course on [0x development](https://mailchi.mp/bea52f47140b/0x-development-course), to build your own relayer (backend and frontend). Will use Typescript / ES6 / React.

if you want to receive exclusive previews and be notified when the course is out, [signup here](https://mailchi.mp/bea52f47140b/0x-development-course).


For those who dont know me, I am Julien of [EatTheBlocks](https://www.youtube.com/c/eattheblocks), a channel on Ethereum Dapp development
Finding the right coding partner? 
Tags: discuss, askdev, partners
Published: 2019-02-12 18:40:02

---
title: Finding the right coding partner? 
published: true
description: Have you found yours? 
tags: discuss,askdev,partners
---

Have you found your coding partner? One who you can code with, enjoy the time, but spar with on critical decisions to make the best decisions?

If so, how did you meet and why do you feel it works great?
Slack Meets The Coding Love
Tags: slack, app, gif, coding
Published: 2019-02-12 18:17:58

---
title: Slack Meets The Coding Love
published: true
description: TheCodingLove for Slack is finally here.
tags: slack, app, gif, coding
---

Any [Coding Love](https://thecodinglove.com/) fans out there? For those who don't know it yet, it's basically a website that contains coding-related GIFs for all kinds of situations. They have a large community and everyone is welcome to submit posts.

In my team we use Slack to communicate, and as I'm sure some of you do too, we send quite a lot of GIFs in a daily basis. The only thing missing was a Slack app that integrates with TheCodingLove to allow us to search through their database to find the right GIF. Until now...

As a side project I started playing around with Slack and learning about their API, so I created a simple app that lets you search for a phrase, shuffle the results and post the final image on the channel you are on. The app is fully reviewed and approved by Slack already and I'm looking for some initial feedback from you guys, all you have to do is install it on your workspace and give it a go!

Here's the app in the directory - https://slack.com/apps/AFNEWBNFN. Let me know what you think! We are using it at work quite a lot already ;)
Compress image in browser? Easy!
Tags: javascript, image, webdev, opensource
Published: 2019-02-12 16:31:42

---
title: Compress image in browser? Easy!
published: true
description: Compress image in browser
tags: javascript, image, webdev, opensource
---

First of all I want to thank people who are interested in the project MySigMail - UI Email Signature Generator.

In repo came an interesting PR where it was implemented a way to compress the image in the browser, without using the server.

I would like to share the code:

```js
function compressImage (base64) {
  const canvas = document.createElement('canvas')
  const img = document.createElement('img')

  return new Promise((resolve, reject) => {
    img.onload = function () {
      let width = img.width
      let height = img.height
      const maxHeight = 200
      const maxWidth = 200

      if (width > height) {
        if (width > maxWidth) {
          height = Math.round((height *= maxWidth / width))
          width = maxWidth
        }
      } else {
        if (height > maxHeight) {
          width = Math.round((width *= maxHeight / height))
          height = maxHeight
        }
      }
      canvas.width = width
      canvas.height = height

      const ctx = canvas.getContext('2d')
      ctx.drawImage(img, 0, 0, width, height)

      resolve(canvas.toDataURL('image/jpeg', 0.7))
    }
    img.onerror = function (err) {
      reject(err)
    }
    img.src = base64
  })
}
```

Thanks [@mykeels](https://github.com/mykeels)

MySigMail always happy to have contributors :)

Now I am working on version 2 in which there will be a WYSIWYG email editor.

Therefore, I would be happy if there are willing to help me in the development of templates for signatures in version 1.

https://github.com/antonreshetov/mysigmail
Memes - A JavaScript memes parser
Tags: memes, javascript, reddit, parser
Published: 2019-02-12 18:03:05

---
title: Memes - A JavaScript memes parser
published: true
description: A JavaScript memes parser - images, videos and gifs
tags: memes, javascript, reddit, parser
cover_image: https://thepracticaldev.s3.amazonaws.com/i/2ylbjax8j39oyh4nv1wb.png
canonical_url: https://github.com/victorqribeiro/memes
---

# Memes

A PWA app with memes, videos and gifs in JavaScript. (Reddit parser)

Live version [here](https://victorribeiro.com/memes)

# About

A PWA app that parses [Reddit](https://www.reddit.com) for content, without ads or comments.
Since the app runs on the client side, there's virtually no costs with servers (trafic and storage).

# How to add subs

Modify the *subs* variable on the main.js file to add or remove any sub you want.

```javascript
let subs = [
	"funny",
	"dankmemes",
	"videos",
	"gifs"
];
```

# Disclaimer

I do not own or host any of the content featured on the app and I do not share from the content creator's opinion.
All of the content comes from Reddit and it's community.
I'm not responsable for any offensive material that you'll eventually see on the app.


Take a look at the code [here](https://github.com/victorqribeiro/memes)
A Tour of Angular Console
Tags: angular, javascript, angularconsole
Published: 2019-02-12 17:53:05

---
title: A Tour of Angular Console
published: true
description: 
tags: #angular #javascript #angularconsole
canonical_url: https://auth0.com/blog/how-to-use-angular-console/
---

In this article, we’ll explore Angular Console. Angular Console is a desktop application that provides a graphical UI for the Angular CLI. It is packed with features like code generation, task running, and a simple interface for installing CLI extensions like schematics. Angular Console is a great tool for Angular developers of all skill levels!

[Read on 🅰️](https://auth0.com/blog/how-to-use-angular-console/?utm_source=dev&utm_medium=sc&utm_campaign=howto_angularconsole)

![A Tour of Angular Console](https://thepracticaldev.s3.amazonaws.com/i/tlzdjezh5hjl48qzelde.png)