teleren/devto huggingface dataset:
Science communication is the key
Tags: writing, productivity
Published: 2021-02-07 22:24:02

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hrol2s20hi4l585pzyo3.jpg)

Science communication is the key.
Creativity is the fuel to send your words across to wide range of people who different from you. Brings you excitement like nothing before.

It benefits them.

Journal article is just a small part.
Coming from a boring daily routine.
It covers only small groups of people similar to you, talk like you, think like you, dress like you. No fun at all.

It benefits you. And you only... rank, position, incentive, fame.

#365figures #scicomm #visualthinking #academicdrawing

08-02-21
Change a website favicon dynamically using JavaScript
Tags: javascript, tutorial
Published: 2021-02-08 22:01:11

Today we’ll be using JavaScript to change a website favicon dynamically. There are a number of reasons for wanting to do this but for the purposes of this tutorial we’ll be creating a script that changes the favicon on certain days of the year.

First thing we need to do is get the current month and day:

```javascript
const [month, day] = new Date().toLocaleDateString("en-US").split("/");
```

This returns a 2-4 digit string containing the month and day which we’ll use to check against a series of predefined dates using the same date format:

```javascript
let favicon;
switch (month + day) {
  case "214":
    favicon = "💕";
    break;
  case "1031":
    favicon = "🎃";
    break;
  case "1225":
    favicon = "🎅🏼";
    break;
  default:
    favicon = "🌐";
}
```

The dates used are Valentines Day (Feb 14th), Halloween (Oct 31st), and Christmas (Dec 25th). If the current date doesn’t match any of these it’ll fall back to a default favicon.

Now we just need to insert the favicon into the `<head>` of the document:

```javascript
const dynamicFavicon = (favicon) => {
  const link = document.createElement("link");
  link.rel = "shortcut icon";
  link.type = "image/svg+xml";
  link.href =
    "data:image/svg+xml,
    <svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22>
    <text y=%22.9em%22 font-size=%2290%22>" +
    favicon +
    "</text></svg>";
  document.head.appendChild(link);
};
dynamicFavicon(favicon);
```

As we’re using emojis for the favicon they must be within a SVG `<text>` element to render correctly. You can test each of the different favicon’s by switching out the holiday date with the current date. More emojis can be found at [Emojipedia](https://emojipedia.org/).
CSS Battle #1 - Horizon
Tags: css, html, webdev, tutorial
Published: 2021-02-08 09:53:32

I used to be not so long back ago a person who was scared of CSS until I used to treat CSS as a game. Treating it as a game made me feel more attracted to dive into it and I enjoyed it. Flexbox froggy and Grid Garden Css game made me feel good about CSS and by the magic of a google search I came to know of Cssbattle It was the challenging platform that gave me intristic joy of achieving CSS Targets. 
I want to bring the same joy to you. Here We will achieve targets on CSS battle for our happiness.
#Thanks
I thank Olzhas Askar due to whom I got the idea of writing this series. He has written a series of CSS Batlle solutions with different solutions for each problem giving you a wider perspective and practically demonstrating that in code you can achieve your goal in multiple ways. 
Link to Olzhas amazing series: https://dev.to/pheeria/css-battle-1-simply-square-c19

#Goal
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mrohayulmnwjoogh0bk3.png)
From careful observing the target, we can guess some attribute for the target which are :-
1 The flow of rectangles in the normal document flow which is top to bottom.
2 Body tag adds some margin which should be zero for the above goal.
3 We also realize that boxes are 100% width with varying heights so We need to determine the heights of 4 rectangles. As per CSS battle, the height is 300px of the target which is divided between 4 rectangles. With Basic Maths we can make a fair guess about height which is
```
50px+50px+100px+100px = 300px
```

Combining the above insights we can figure out the code looks similar to it

```
<div></div>
<div></div>
<div></div>
<div></div>
<style>
body {
	margin: 0px
}

div {
	width: 100%
}

div:first-child {
	background: #F7EC7D;
	height: 50px
}

div:nth-child(2) {
	height: 50px;
	background: #E38F66
}

div:nth-child(3) {
	height: 100px;
	background: #AA445F
}

div:nth-child(4) {
	height: 100px;
	background: #62306D
}
</style>
``` 
Question after who had achieved your target:-
How much time did you take to achieve the target and did you feel good after its achievement?
Trafalgar (Figma Project)
Tags: html, css, javascript, 100daysofcode
Published: 2021-02-09 10:29:22

After completing the Museum of Candy Project, I felt like I needed more practice with HTML and CSS before moving on to JavaScript. So, a friend of mine shared a Figma webpage design and suggested that I clone that webpage as close as possible. I took up the task and started writing the HTML for that webpage section by section and I also kept styling it simultaneously so that I would have a better idea of my progress. I stumbled across many small issues when cloning that webpage. The issue that had me scratching my head was that I couldn't center some of my content but after revisiting some of the lectures about bootstrap grid, I finally figured it out. Beside that, I also got a bit familiar working with SVGs that I exported from Figma to use in my webpage. After adding all the content and styling it properly, I made my webpage responsive across multiple breakpoints by using the bootstrap grid system.

I have deployed that webpage on Netlify under the link zealous-jang-e14cfe.netlify.app. You can also find the source code on Github.

Github link: github.com/saqibs3291/trafalgar

Orignal Figma design: figma.com/file/s69MNKYf4OEwrhqPPo5aQL/trafa..
Redux vs Mobx: Which is the Better?
Tags: webdev, programming, javascript
Published: 2021-02-09 04:00:21

<a href="https://www.w3schools.com">Redux vs Mobx</a> have been the hot topic in the development world ever since their arrival. Both of them are compared with each other very strictly for every single discussion. Because of this, it becomes very difficult for people to choose which one is the best for them. Whenever there exists an alternative, people are curious what's the best way to solve their problem. To help you with that, we have made a comparison of how they are different from one another and what should be the go-to option for you.

<h1>Redux or MobX for Newcomers?</h1>

Once you are familiar with React components and internal state management, you can choose a state management library to solve your problem. After I used both libraries, I would say MobX can be very suitable for beginners. We could already see that MobX needs less code, even though it uses some magic annotations we may not need to know about yet. 

In <b>MobX</b> you don't need to be familiar with functional programming. Terms like immutability might be still foreign. Functional programming is a rising paradigm, but novel for most people in JavaScript. There is a clear trend towards it, but since not everyone has a functional programming background, it might be easier for people with an object-oriented background to adopt the principles of MobX.

<h2>Learning curve</h2>

The popular opinion that developers have about <b>Redux</b> is that it is not easy to learn. It takes some time to understand its patterns and paradigms. It is a combination of the Flux architecture and functional programming concepts. If you are a functional programmer, you may find it easier to grasp Redux, whereas if you come from an object-oriented programming background, Redux code initially looks complex and hard to understand.

<b>MobX</b> is known to be much easier to grasp when compared to Redux. Most JavaScript developers are well versed in object-oriented programming, which makes learning MobX simple. Also, there are a lot of things that are done behind the scenes in MobX, creating a better learning experience for the developers. You wouldn’t need to worry about normalizing the state or implementing concepts like Thunks.
Data Storage

In Redux, there is only one store, and it is the single source of truth. The state in the store is immutable, which makes it easier for us to know where to find the data/state. In Redux, although there is one giant JSON object that represents the store, you can always split the code into multiple reducers. This way, you can logically separate the concerns with multiple reducers.

<b>MobX</b>, on the other hand, allows multiple stores. You can logically separate stores, so all of the application’s state is not in one store. Most applications are designed to have at least two stores: one for the UI state and one or more for the domain state. The advantage of separating the stores this way is that you can reuse the domain in other applications as well.
Go R1 Day 27
Tags: tech, development, 100daysofcode, go
Published: 2021-02-09 22:53:35

---
title: Go R1 Day 27
published: true
date: 2021-01-22 21:54:21 UTC
tags:
- tech
- development
- 100DaysOfCode
- golang
canonical_url: https://www.sheldonhull.com/microblog/go-r1-day-27/
---

## progress

- Iterated through AWS SDK v1 S3 buckets to process IAM policy permissions.
- Unmarshaled policy doc into struct using `Json-To-Struct`.

## links

- [JSON-to-Go](https://mholt.github.io/json-to-go/)
Rails, Relaxing & Reading
Tags: devjournal, rails, codenewbie, womenintech
Published: 2021-02-10 07:46:53

_This post was originally published on February 10, 2021 on [my blog] (https://alexlsalt.github.io/blog)._

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

Not terribly much to report today, just continuing to go through the learning and working motions! It's a fun process, but sometimes it can be more of the same, so here's a bit of an exposition of my brain in its current state.

Things on my mind today:

1) Really excited to continue working through my current GoRails tutorial and building a mini-clone of Buffer with Ruby on Rails. I'm loving learning about and getting more comfortable with the overall Rails framework, and I can't wait to really get good at it!

2) Getting better at separating work-time and relax-time - I just feel like this will always be a work in progress haha, but I am definitely getting better at turning off my computer after work and spending my time relaxing, reading, crafting, embroidering, catching up with loved ones, or anything else that doesn't require too much screen-time.

3) Currently reading The Vanishing Half by Brit Bennett and this line stuck out so much and brought tears to my eyes last night:



>"Oh, you don't even know. If I could go back, I'd do everything 
> different."
>
>"Like what?" she said.
>
>"Oh, everything." He turned back to the mirror. "This big 'ol world and we only get to go through it once. The saddest thing there is, you ask me.



Okay. Onward to a great day! Take advantage of it. Be unapologetically yourself. And watch the world open up for you.

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

Pssst! I send weekly newsletters about the self-taught coding journey and my own coding adventures (and misadventures!)  [Sign up here! >>](https://ladies-code-collective.ck.page/e53b5fca44)
What did I learn the past two months?
Tags: learning, django, webdev, showdev
Published: 2021-02-10 19:51:44

# Hi there

Awesome people in this short post I’m going to tell you about things I learned the last few moths, what did  I learn , what projects did I create,  and some useful things that I want share with you. Let’s get into it.

## Django Web Framework

One of the most important things I learned on vacations, while my whole city was in quarantine due to the pandemic, was Django.

Django is a Python web framework, that allows Python Developers to develop awesome web applications, rapidly. I learned it the hard way with youtube Videos and making Projects on my own.

### Useful Django Tips:
* Start making Projects from the start:

I think that `Project Based Learning` is the best type of learning you can do, since you apply and build something on the road, and you can actually se the applications of what you are learning.

This concept applies even more with Django, since it is a really extensive topic, and you could lost in the theory easily.

So start now and create small projects with the help of a Tutorial or a youtube video, there are plenty of it.

## Some Projects

Talking about projects, I created my first [large project](https://developerroad.herokuapp.com/) that took me to finish like one month and a half. It was a Blog Application developed with Django, Bootstrap, Django template language and a tiny amount of javascript. 

Also it was the first app that I made available on Internet. through heroku. Heroku is a specialized web hosting made for specific environments, like Django, Ruby on Rails, Node.js and more.

I'll create a Heroku Series on app deployment with Heroku and Django.

Lastly, If you are curious about the Project named **Developer Road ** (There I'll be sharing even more blog Posts), you can access it [here](https://developerroad.herokuapp.com/).
Build a simple web app with Sapper using Supabase for authentication
Tags: supabase, sapper, svelte, serverless
Published: 2021-02-10 22:16:43

**This tutorial covers building a basic authentication for your Sapper application by using Supabase, the open-source Firebase alternative.**

The tutorial is published on Medium, and you can read it here: https://msyyn.medium.com/build-a-simple-web-app-with-sapper-and-supabase-including-authentication-3935ac34aed7
Tales from the Scrum Dungeon: Coyotes
Tags: scrumdungeon
Published: 2021-02-11 23:47:40

---
title: Tales from the Scrum Dungeon: Coyotes
published: true
description: Sometimes it's the monsters in the code that get you, and sometimes it's the monsters on the way to the office that get you.
tags: scrumdungeon
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/erhyokx8boeejqg5j07k.png
---
I once worked at a small software shop that was on the edge of a large city, in an industrial park.  One day I needed some work on my car done, and there happened to be a mechanic a few blocks away from the office.  Rather than having to worry about the hassle of finding a ride, I figured I'd drop my car off in the morning, walk to work, then walk back after work to pick it up.  It was summer, and it was maybe a less than 10 minute walk from the mechanic's shop to the office.

Everything was going well until I walked past an industrial lot full of trees and tall grass.  Some distance away, I noticed a coyote.  For those not familiar with them, a coyote is similar to a wolf or a wild dog.  Most of the time they leave people alone, but there are the odd cases where coyotes have attacked people. 

Not wanting to become one of these cases, I kept my eyes on it, and hurried along.  Thankfully I made it safely to the office.  After work, I walked back to the mechanic's shop and didn't spot it.  It was the middle of the summer, and was likely too hot and too early in the day for the coyote to be out again.

Sometimes it's the monsters in the code that get you, and sometimes it's the monsters on the way to the office that get you.
Dato.RSS - RSS with Ruby
Tags: showdev, rails, ruby, tooling
Published: 2021-02-12 10:01:21


## Intro

My latest side Rails project is Search Engine.

[dato.rss](https://datorss.com) is a simple, clean and fast RSS search engine with a RESTful API.

the project is divided into

**Search Engine:** Quickly search through the millions of available RSS feeds.

**RESTful API:** Turns feed data into an awesome API. The API simplifies how you handle RSS, Atom, or JSON feeds. You can add and keep track of your favourite feed data with a simple, fast and clean REST API. All entries are enriched by Machine Learning and Semantic engines.

## Search

Search is just implemented with Full Text Search Postgres feature.

I used the *pg_search Gem*, which can be used in two ways:

**Multi Search:** Search across multiple models and return a single array of results. Imagine having three models: Product, Brand, and Review. Using Multi Search we could search across all of them at the same time, seeing a single set of search results. This would be perfect for adding federated search functionality to your app.

**Search Scope:** Search within a single model, but with greater flexibility.

for the implementation I found very useful the article https://pganalyze.com/blog/full-text-search-ruby-rails-postgres

```sql
    execute <<-SQL
      ALTER TABLE entries
      ADD COLUMN searchable tsvector GENERATED ALWAYS AS (
        setweight(to_tsvector('simple', coalesce(title, '')), 'A') ||
        setweight(to_tsvector('simple', coalesce(body,'')), 'B') ||
        setweight(to_tsvector('simple', coalesce(url,'')), 'C')
      ) STORED;
    SQL
```

## Search View

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gf9kje6y5kcumlwlxh96.png)

## Feed Rank

Feed Ranking is provided by [openrank](https://openrank.io) a free root domain authority metric based on the common search pagerank dataset. The value is normilized by 

```ruby
((Math.log10(domain_rank) / Math.log10(100)) * 100).round
```

## Machine Learning

Machine Learning is provided by [dandelion API](https://dandelion.eu) Semantic Text Analytics as a service, from text to actionable data. Extract meaning from unstructured text and put it in context with a simple API.

## RESTful API

All API documentation is in the Wiki section. Feel free to make it better, of course.

https://github.com/davidesantangelo/dato.rss/wiki

To use some features such as adding a new feed you need a token with **write** permission. Currently only I can enable it. In case contact me

## Github

{% github davidesantangelo/dato.rss %}
What's All The Flutter? 
Tags: discuss, flutter, javascript, html
Published: 2021-02-12 18:20:17

Lately, there is lots of buzz around Flutter. Some say Flutter is about to win over the web with the cross-platform framework that offers the most compelling web development experience. What are your thoughts? 

Most of the websites today are written in HTML, JavaScript, and CSS. Is it really true that I can create a website without using any of these three technologies? There has to be a catch, right?!   

So being new to the whole world of coding and know my way around the block with HTML and JavaScript, I am wondering how Google is making this possible. Made by Google, Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. Claims like productively build apps faster, layered architecture for full customization, faster rendering, expressive and flexible designs, and stateful hot reload to build native interfaces in minutes is amazing. But I am skeptical, maybe it is because I just got to know the ins and outs of HTML and JavaScript, or because as developers we are curious and look to build amazing solutions and find their potential breaks, or that our technological world is ever-changing and sometimes it hard to keep up. 

What're your two cents?  Is this the newest latest and great solution to building apps?
[BLOG] - Instalando o Laravel com Docker – sem Laravel Sail
Published: 2021-02-24 13:33:08

Se eu aprendi uma coisa durante os últimos anos é que a tecnologia nunca para de nos surpreender, tanto de forma positiva quanto negativa e o Docker foi uma das melhores coisas no meu dia a dia.

Não que o Docker seja a solução final para o meu ambiente dev ou de produção (vou falar sobre ambientes mais pra frente), mas eu realmente acho MUITO produtivo.

[Continuar...](https://blog.erikfigueiredo.com.br/instalando-o-laravel-com-docker-sem-laravel-sail/)
How to run a MongoDB instance on a specific port and activate authentification?
Tags: mongodb, authentification, server
Published: 2021-02-24 19:05:29

Sometimes you need to work on different projects that need MongoDB in differents ports /instances, We have a lot of situations for which that happens but I will not list them here. I faced that situation and I diced to share my experience on it with you.

In this tutorial you will learn how to run a specific instance of MongoDB :

* Store the database files in a specific directory
* Specify a custom port
* Activate authentification by username and password
* How to connect from mongo client directly from the terminal 

Requirement
 * Have MongoDB 3.4 or higher installed 

## Create the directories to persist your data

```
mkdir /home/memel/data
mkdir /home/memel/data/log
```
## Create a Configuration file

Everything can be done in the config file.
create a file anywhere you want and keep in mind the full path of that file.

Name it externaldb.conf : 

```
touch /home/memel/externaldb.conf
```

Put content below and adapt it to your need :

```yml
systemLog:
   destination: file
# you can put the corresponding path for the log
   path: /home/memel/data/external/log/mongod.log
   logAppend: true
storage:
   journal:
      enabled: true
# you can put the corresponding path to store the DB
   dbPath: /home/memel/data/external
net:
   bindIp: 127.0.0.1
# put the port that you want
   port: 27020
setParameter:
   enableLocalhostAuthBypass: false
```

From your terminal run the following to lunch your instance :

```
mongod --config "/home/memel/externaldb.conf"
```


To check if everything is ok, from you terminal run :

```
mongo --port 27020
```
## Create a secured account  

Select the admin database

```
use admin
```
### Create a server admin user

```js
db.createUser(
{
user: "sa",
pwd: "your password",
roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]
})
```
That user account will manage all the server, I mean all the databases.
you can create a user only for a specific database.

### Create a database admin user
Creating a specific account `myAppUser` that will acceed only your app database `myAppDB`.

```js
db.createUser(
{
user: "myAppUser",
pwd: "your password",
roles: [ { role: "readWrite", db: "myAppDB" }]
})
```

You should see a success message, close your terminal.

## Connect from mongo client

Now open a new terminal and test if the **sa** account works, run the next command line

```
mongo --port 27020  -u sa -p --authenticationDatabase admin
```

## Activate full authentification

Activate the security allow only access by password
you just need to set `enableLocalhostAuthBypass` to `true`
 your config file should look like this

```yml
systemLog:
   destination: file
# you can put the corresponding path for the log
   path: /home/memel/data/external/log/mongod.log
   logAppend: true
storage:
   journal:
      enabled: true
# you can put the corresponding path to store the DB
   dbPath: /home/memel/data/external
net:
   bindIp: 127.0.0.1
# put the port that you want
   port: 27020
setParameter:
   enableLocalhostAuthBypass: true
```

Enjoy !!!