teleren/devto huggingface dataset:
YOUR CLIENTS ONLY CARE ABOUT WHAT WORKS.
Published: 2021-01-25 15:32:40

When I started learning how to build websites and develop Applications, I got overwhelmed with the number of Technologies that were at my disposal to choose from. I spent 12 months jumping around different technologies without mastering any. Don't repeat my mistake if you are just starting. Lol
I took pride with the fact that I could easily play around HTML and CSS, then JavaScript came with it headache and I contemplated dumping programming, I felt it probably wasn't meant for people like me, Lol. that story is for another day though.
Along the journey in my career, I came across Technologies that made things even much simpler. Bootstrap (a CSS framework developed by Twitter) for instance will save you the stress of hard coding responsive designs. CMS frameworks like WordPress will save you from hard coding PHP and MySQL database. 
In summary, there are several technologies available at your disposal such that you may have headache of which technology to choose from. Before now, I was fond of using the hardest technologies just to boost my ego that, hail, I build this from scratch without any framework. But right now, I go for the simplest technology that can get the problem solved. 
Fellow developers might praise you but your client doesn't care or even know about all these technologies. All they want is workable product with nice User Interface. No doubt, all technologies have their advantages and disadvantages, but go for what is simple. If you can access a beautiful template, go ahead and edit it instead of building from scratch.
Ushahemba Shir
🦕Deno: REST API + MongoDB + Linux
Tags: deno, mongodb, linux
Published: 2021-01-25 15:30:39

This time we will implement something more interesting than yet another bot. Today, we'll develop a REST API using Deno and connect it with the MongoDB database. To make things even cooler, we'll develop and run it on Linux (Ubuntu).

{% youtube Gmb0yJKkBWM %}
Format Chat Message
Tags: typescript, npm, messenger, whatsapp
Published: 2021-01-25 15:27:01

Precisamos tratar algumas mensagens vindas da API do WhatsApp através da Botmaker e a partir disso extraímos essa lib. Aproveitem.

https://www.npmjs.com/package/format-chat-message

O que entra:
```js
const message =
    "Olá, o item *cenoura orgânica 01 bandeja* está em falta*.\n\nIremos* realizar a troca por:\n*Cenoura Palito Processado* e também _italico_ e ~tachado~. https://market.com.br/simple/5b6f-11eb-952f-e51d98fc81fe e um trecho de código ```code is very beautiful```.\n\n\n_*Produtos em falta podem podem variar a cada turno._\n\n\nVocê pode falar conosco no www.nossosite.com ou no telefone 21123456454\n ou no 112232432343.";
```
![After](https://dev-to-uploads.s3.amazonaws.com/i/05kqgcdu9rk7meojhlty.png)

O que sai:
```html
<div class="text">
  Olá, o item <strong>cenoura orgânica 01 bandeja</strong> está em falta*.<br />
  <br />
  Iremos* realizar a troca por:<br /><strong>Cenoura Palito Processado</strong>
  e também <em>italico</em> e <strike>tachado</strike>.
  <a
    href="https://market.com.br/simple/5b6f-11eb-952f-e51d98fc81fe"
    target="_blank"
  >
    https://market.com.br/simple/5b6f-11eb-952f-e51d98fc81fe
  </a>
  e um trecho de código <code>code is very beautiful</code>.<br />
  <br />
  <br />
  <em>*Produtos em falta podem podem variar a cada turno.</em><br />
  <br />
  <br />
  Você pode falar conosco no
  <a href="www.nossosite.com" target="_blank">www.nossosite.com</a> ou no
  telefone <a href="tel:21123456454" target="_blank">21123456454</a><br />
  ou no <a href="tel:112232432343" target="_blank">112232432343</a>.
</div>
```
![After](https://dev-to-uploads.s3.amazonaws.com/i/pk294wfyutw0duhdpf0p.png)
Day 32 Of 100DaysOfcode: Learned More About Database on Python
Tags: 100daysofcode, codenewbie, beginners, python
Published: 2021-01-25 15:16:27

Today is my 32 days of #100Daysofcode and #python. Today also continue to learned more about database on python with the help of coursera. Prepared some table. Tried to made some database to read data from file.

Here is one code which made database for file.
 In the code below code start with import sqlite3 library. We make the connection with emailbd.sqlite. If there Counts table already exist then first drop it out and recreate that table. After there is loop for find number of counts of emails. If row is not exists then we insert value in that row .If row already exists then we update value in that row.

```python
import sqlite3

conn = sqlite3.connect('emailbd.sqlite')
cur = conn.cursor()

cur.execute('DROP TABLE IF EXISTS Counts')

cur.execute('''CREATE TABLE Counts(email TEXT,count INTEGER)''')

fname = input('enter file name:')
if(len(fname)<1): fname = 'mbox-short.txt'
fh = open(fname)
for line in fh:
    if not line.startswith('From:'):continue
    pieces = line.split()
    email = pieces[1]
    cur.execute('SELECT count FROM Counts WHERE email = ?',(email,))
    row = cur.fetchone()
    if row is None:
        cur.execute('''INSERT INTO Counts(email,count)VALUES(?,1)''',(email,))
    else:
        cur.execute('''UPDATE Counts SET Count = Count + 1 WHERE email = ?''',(email,))
        
    conn.commit()
    

sqlstr = 'SELECT email, Count FROM Counts ORDER BY Count DESC LIMIT 10'
for row in cur.execute(sqlstr):
    print(str((row[0]),(row[1])))
    
cur.close()
```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 32 of <a href="https://twitter.com/hashtag/100DayOfcode?src=hash&amp;ref_src=twsrc%5Etfw">#100DayOfcode</a> and <a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <br>learned More About Database And Made Few Tables.<a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> ,<a href="https://twitter.com/hashtag/CodeNewbies?src=hash&amp;ref_src=twsrc%5Etfw">#CodeNewbies</a> ,<a href="https://twitter.com/hashtag/beginners?src=hash&amp;ref_src=twsrc%5Etfw">#beginners</a> <a href="https://t.co/sfk25byLR5">pic.twitter.com/sfk25byLR5</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1353719233159581702?ref_src=twsrc%5Etfw">January 25, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Writing Arrow Functions in Modern JavaScript
Tags: javascript, es6, arrowfunctions
Published: 2021-01-25 15:14:36

### **Background**
When I started learning JavaScript, one of the most confusing things -- especially when I was looking at snippets of code online -- was understanding how arrow functions are composed.

If you haven't written JavaScript code in a few years, or are new to functional programming, this may look strange at first, but don't let that intimidate you!

I hope this post serves as a quick and useful reference.

While a traditional function in JavaScript will look like this:

```
function(a,b){
  return a+b;
}
```

Writing that as an arrow function would take that code snippet down to one line, as you'll see shortly.

How do you convert traditional functions to arrow functions? Just remember FABR!

1. Functions - Drop the word "function"
2. Arrow - Add the arrow
3. Brackets - Remove the brackets
4. Return - Remove the word "return"

### **Step 1: Drop the word "function"**

The first thing you'll want to do is drop the word "function" from the word, as the ==> characters imply this is already a function.

### **Step 2: Add the arrow**

Once you drop the word "function" then you'll also want to add ==>.

Continuing to work with the function we started with, it would look like:

```
(a,b) ==> { 
return a+b;
}
```

### **Step 3: Remove the brackets**

After this step, our almost-complete arrow function will look like:

```
(a,b) ==> return a+b;
```

### **Step 4: Remove the word "return"**

Finally, all that's left to do is take out the word "return" and we're done converting this to the arrow function syntax!

```
(a,b) ==> a + b;
```

### **Conclusion**

I hope this post serves as a quick reference or good refresher if you're new to the world of JavaScript / web development.

For more examples, the MDN Web Docs are a great place to look: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions.

Stay safe, and stay curious!
2021 Planning
Tags: beginners, tutorial, challenge
Published: 2021-01-25 15:01:55

I'm reading the book Ultralearning by Scott Young, before that i read Atomic Habits, and A Mind for Numbers. I'm always trying to create efficient methods of study so i can have more time for the things that matter to me. Despiste this i must use about ten percent from what i read, they simply don't work for me.

I changed jobs and i don't feel ready or that i have sufficient knowledge for the job. But that's life, and it made me promise myself something.

These methods may not work for me but i can make them mine and become the best software developer i can. This is a call for myself, that this is the first day of a long year plan to learn the most important skill i can have. Solving problems.

I will make a roadmap from what i will be learning this year. From solving skills, to debugging efficiently, refactoring, design patterns and more.

For anyone interested i will be posting my development every friday in here. This week i will be studying metalearning which is searching efficiently how to learn something.
Crio Winter of Doing: My Journey
Tags: cwod, crio, node, portfolio
Published: 2021-01-25 13:16:38

Recently I got this wonderful opportunity to be a part of Crio Winter of Doing — Stage 1. The program has been a great learning experience for me. We were required to complete some milestones and tasks to enter the next stage, and those have been the foundation of my journey so far.

Out of all the tasks that we have had to complete, the QProfile task has been my personal favorite. In this milestone, we had to create our portfolio. Having a professional portfolio is quite important and this task gave us the perfect opportunity to customize our portfolio. The frontend part of the project was made using ReactJS and Gatsby. For the backend we used NodeJS, ExpressJS and LowDB as our database.

First we had to clone a repository in Crio GitLab and then we had to pull the contents of another repository through which we could access all the files and folders. Setting up the local development environment was somewhat challenging for me. We had to run the frontend files on our local machine in the beginning. The frontend portion was divided into three parts — the header, the projects section and the contact section. We were free to customize the portfolio the way we wanted it to be. The projects section was missing so we had to make changes to the files accordingly by integrating the server with our GitHub profile. Also the contact form was not submitting the contents anywhere so we had to integrate it with the backend and we had to validate the email field as well. Similarly in the backend we had to populate the entries from the contact form after running it on our local machine.

We had to deploy the frontend part on Netlify and the backend on Heroku. Lastly we had to connect the frontend with the backend so they could talk to each other. The link to my portfolio is provided below:
https://abhipsaguru-profile.netlify.app/

The overall experience with Crio Winter of Doing has been great and filled with fun as well. We got to learn a lot of new things from the documentation and modules provided to us. We also had to give self assessment tests at the end of each byte. All our doubts were solved on the Crio Community channel on slack. Throughout the program, the Crio team had organized live sessions with various industry experts that motivated us to work hard on our respective fields of interest.

A famous quote from the Harry Potter series goes like this: “Working hard is important but there is something that matters even more; believing in yourself.” With Crio, the belief in one’s own self was instilled by the learnings from the mentors and the Crio Community. I got the chance to learn something new everyday and I am immensely grateful for getting an opportunity to be associated with the Crio Community.
Which one is the right way to maintain the UI and back-end code for an open-source project?
Published: 2021-01-25 14:56:03

I have been working on an [open-source project](https://github.com/neel1996/gitconvex) for almost a year now and since the beginning I have been maintaining the front-end and the back-end codebase as two separate repos on github.

This is because the front-end is based on React JS and the server code is based on golang. So I assume that if I coupled both into a single repo, then it could overwhelm the contributors. I have a github action which binds the UI and back-end during the build stage, and pushes each commit to a unified repo, which can be used for building the application from source. 

I have taken a look at a few similar projects on github and all have a single unified repo, with both the front-end and back-end under a single tree. 

Is my 2-repo approach right or do I need to maintain it as a single repo with a clean documentation to guide the contributors. Please share your thoughts.
Is django underrated and node.js(express.js) overrated ?
Tags: discuss, django, javascript, python
Published: 2021-01-25 14:54:19

I was recently working on a project recently and one of my friend asked have you ever used express.js ? While I have asked node/express vs django question before also this time I was really interested in checking out what am I losing/missing by not using express.js because I have been working on django for nearly 2 years now I have faced this question several times. 

Hence, I decided to give it a spin and guess what my experience was...I was like what the heck is this. I was shocked with the amount of the configuration that was required just to get the project to basic working condition with authentication and user creation.

I also used typeorm to generate a default template for starting a express project with typeorm and experess Router.

I tried passport.js for the auth and the setup required for that was way more than what I would expect and configure for any django project.

Yes, I felt the amount of flexibility that it offered but also felt the amount of work that each response required to get desired result.

While this is only my experience I don't know if it is that people who know frontend and just preferred to use the same JavaScript or TypeScript for backend and made node.js or express.js popular or is there something that I am missing or  have I taken a wrong approach or did I choose it for a wrong project (my project relies too heavily on database transaction and updation).

Maybe I am too comfortable with django but I felt that anyone would be way faster and also would write more DRY and modular code wile using it but I can see a lot of people learning node.js and that population is way higher than what I can see for django.

So, is there any aspect that I am missing ? or was my application domain not suitable for node.js because I can see Coursera using it and at the same time I can see Udemy using django for almost a similar application domain of video tutorials and courses.

While there were many tutorials for auth and middleware for express.js those weren't as simple to implement as they were on django.

And yes I missed the inbuilt admin panel very badly while trying to build express.js let alone the class views and viewsets which handled a lot of error handling by default for me.

If I was wrong on any approach somewhere or __if someone has worked on both technologies can they please share their views and experience in the comments.__
How to effectively and completely delete a git submodule
Tags: git, github
Published: 2021-01-25 14:49:32

I have been working on multiple projects included as Git submodules in a parent repository. Recently, I had to remove one project that we did not need anymore. 

**Side note** : This parent repository is used to easily clone multiple projects in the same directory for new employees at our startup. The different projects are linked together and interact to each other as their code is executed in separate Docker containers.

**Example project structure** :

```
|- blog_main
    |- blog_api
    |- blog_frontend
    |- local_dev_infrastructure
```

Here is the way I could remove a submodule and commit the changes to the parent directory. 

```bash
git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit -m "Removed submodule"
rm -rf .git/modules/<path_to_submodule>
```
Useful development utilities you can use every project
Tags: development, javascript, discuss, frontend
Published: 2021-01-25 14:38:31

There are a lot of utilities and tools to make life of developers and designers easier or giving them more opportunities. Think of frameworks like Vue.js, libraries like React, content management systems like Wordpress, tools like LocalTunnel and so on. 

Some of them I use every project and some determine of the type of project. That's why i made a Github Repo with an overview of the utilities I commonly use:
## Development Utilities
https://github.com/dennisfrijlink/development-utilities 

Let me know that you think about the utilities I use, which one you often use in programming and are not present in my overview or which one you maybe advise to not use. Let me know in the comments below:
How To Unmint Token From Sollet.Io
Tags: webp
Published: 2021-01-25 14:27:00

In This New Article, I Am Going To Show You, How To Unmint Tokens From Sollet.Io ( <a href="https://cryptowalletsx.com/how-to-recover-sol-fees-from-sollet/" target="_blank"> unmint sol tokens</a> ) And How To Recover Sol Fees That You Have Wasted To Mint Tokens. You Can Recover Your Fees With 1 Click. I Have Already Made A Video On This Topic On My Youtube Channel. You Can Watch That Video Too For A Better Understanding.

If You Are Able To Understand All The Steps In The Video, You Can Skip The Article. <a href="https://CryptoWalletsX.com/" target="_blank"> CryptoWalletsX </a>

How To Recover Sol fees from sollet.io
How To Unmint Token From Sollet.Io and Recover Sol Fees
Balance Before Unmint
To Recover Sol Fees, You Need To Go To Bonfida Dex. Now You Need To Click On Connect Wallet. Images Are Included For Your Help. Here, I Am Going To Remove Joke Token From Sollet.Io.

How To Unmint Token From Sollet.Io and Recover Sol Fees
Connect Your Wallet To Sollet.Io
After Clicking On Connect Wallet, You Will Be Redirected To Sollet.Io And You Need To Approve It To Connect Your Wallet.

After Connecting Your Wallet, Click On Show Zero Balances.
Scraping the Utah Secretary of State Part 1
Tags: webscraping, javascript, puppeteer, secretaryofstate
Published: 2021-01-29 12:51:40

---
title: Scraping the Utah Secretary of State Part 1
published: true
date: 2021-01-25 14:19:00 UTC
tags: WebScraping,Javascript,Puppeteer,secretaryofstate
canonical_url: https://javascriptwebscrapingguy.com/scraping-the-utah-secretary-of-state-part-1/?utm_source=rss&utm_medium=rss&utm_campaign=scraping-the-utah-secretary-of-state-part-1
---

Here we go!

This is the first of a few parts of scraping the Utah Secretary of State.

Utah uses a pretty complicated way to deliver their secretary of state data. It’s well done, though, and doesn’t sacrifice the user experience so #respect.

https://youtube.com/watch?v=bmz-tNpgvDs

I reference 2captcha here to solve captches. Affiliate link – [https://2captcha.com?from=7390140](https://2captcha.com?from=7390140)

## Looking for business leads?

Using the techniques talked about here at [javascriptwebscrapingguy.com](https://javascriptwebscrapingguy.com), we’ve been able to launch a way to access awesome web data. Learn more at [Cobalt Intelligence](https://cobaltintelligence.com)!

The post [Scraping the Utah Secretary of State Part 1](https://javascriptwebscrapingguy.com/scraping-the-utah-secretary-of-state-part-1/) appeared first on [Javascript Web Scraping Guy](https://javascriptwebscrapingguy.com).
Testing Rails 6 Zeitwerk Autoloading
Tags: ruby, rails, ci, circleci
Published: 2021-01-25 14:17:50

---
title: Testing Rails 6 Zeitwerk Autoloading
published: true
description: How to verify Zeitwerk Autoloading on CI
canonical_url: https://marcqualie.com/2021/01/testing-rails-6-zeitwerk-autoloading
cover_image: 'https://media.graphcms.com/SObuqzISCSF58TfizHGx'
tags:
  - Ruby
  - Rails
  - CI
  - CircleCI
---
Rails 6 introduced a new autoloader called Zeitwerk. While it has many many improvements, one of the main changes is how strict it is with filenames and the constants they define. Unless you have full coverage on your application (few apps actually reach 100%) it can be quite easy to end up with an app that won't boot in your staging/production environment.

This is a welcome change from me, I believe it leads to much more stable and predictable codebases when the filenames and constants match 1:1. This can become an issue for anyone used to working with the rails classic autoloader since that allowed developers to get away with mostly anything inside their files.

Adding the following spec to any new rails 6+ project will protect from such problems, as the autoloading will be triggered in the CI environment instead; before merge and deploy. This is also perfect if you're upgrading any older Rails 5 apps and you're nervous about switching to the new autoloader.

```ruby
# spec/zeitwerk_spec.rb
require 'rails_helper'

describe 'Zeitwerk' do
  it 'eager loads all files' do
    expect do
      Zeitwerk::Loader.eager_load_all
    end.to_not raise_error
  end
end
```

> Original reference post for code snippet [Rails 6 and Rspec : How to test Zeitwerk mode](https://mvaragnat.medium.com/rails-6-and-rspec-how-to-test-zeitwerk-mode-81782b6d3388) by Matthieu Varagnat

You can take this a step further on CI and have a dedicated job that runs specifically to check the autoloading. This can be dne before the tests (to avoid wasted minutes), or in parallel to highlight an autoloading issues in your PR status checks.

The following line can run in any shell to perform the same job as the rspec snippet above:

```shell
rails r 'Zeitwerk::Loader.eager_load_all'
```

Here is an example of my CircleCI flow for a recently upgraded rails project. Notice how Zeitwerk failure prevented a ton of other jobs triggering, which would have used quite a lot of resources and failed much later.

![Screen-Shot-2021-01-20-14-02-56.26.png](https://media.graphcms.com/SObuqzISCSF58TfizHGx)

![Screen-Shot-2021-01-20-14-05-09.95.png](https://media.graphcms.com/vrfoog6yQTacEtKB7y0x)

This, of course, does not replace the need for an extensive test suite, but it can save you in the early days of prototype development where a typo or unused class can slip into the codebase when working at a fast pace.