teleren/devto huggingface dataset:
Vue.js vs React.js
Tags: react, vue, discuss, spanish
Published: 2022-04-03 04:55:24

¡Hola Comunidad!

Esta semana estaba aprendiendo Vue.js, y he notado que muchas veces me puede resultar tedioso construir una aplicación con este framework debido a la repetición de estar definiendo templates y además etiquetas script.

Yo soy team React.js porque me gusta tener componentes reusables en un solo archivo que es claro lo que renderizan.

Ahora bien, quiero preguntarte a ti, ¿qué team eres y por qué? (entre más simple la respuesta, mejor)

Gracias por leer, este, mi primer micro-post.
I Created an Template for Django project for Running Under Services like replit, heroku etc
Tags: django, shriekdj, python, webdev
Published: 2022-04-03 04:48:41

## Preface

There are many Online Services Out There and We Want to Test or Run Our Django Project On There, But There are Some Issues Occurred For Running On Them.

## Details

### For Replit Online IDE

Like for Replit it is by default supported with Poetry Virtual Environment and Project Runs on 0.0.0.0 instead of localhost and Changes in Django Project Settings.

### For Heroku : Platform as a Service

For Heroku It Needs an Procfile which is like runner file for heroku.

This Is an GitHub Repo Which Can You Use it as Starter for Running Under Replit, Heroku and More(In Future).

## This Repos is Able run Under Services Like

- Replit : An Online IDE
- Heroku : Platform as a Service

## GitHub Repo : shriekdj/django\_project\_template

{% github shriekdj/django_project_template %}

***

## Conclusion

If you found this useful then please share this and follow me! Also check out Buy Me A Coffee if you want to support me on a new level!

[![Buy me a coffee](https://cdn.buymeacoffee.com/buttons/default-yellow.png)](https://www.buymeacoffee.com/shriekdj)
How to login to a ssh server from Windows
Published: 2022-04-03 04:16:36

---
title: How to login to a ssh server from Windows
published: true
description: Steps for logging in to a ssh server
tags: 
//cover_image: https://direct_url_to_image.jpg
---

In windows you need to install a tool like WSL or Git Bash to gain access to ssh or install it by some other ways to your default command prompt like cmd or powershell. I am using the ssh client by [MobaXterm](https://mobaxterm.mobatek.net/).

Accessing your linux server via ssh is super easy.
<pre>
ssh <em>remote_host</em>
</pre>
where `remote_host` is the ip address or domain name of your server.

This assumes that your username on the remote system is the same as your username on the local system

To login with a different username on the remote system use
<pre>
ssh <em>remote_username</em>@<em>remote_host</em>
</pre>
where `remote_username` is the username on the remote system

Additionally we can disable password based authentication, disable login with root account, add login to SSH with our public and private keys. 

For further info see [this](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-to-connect-to-a-remote-server).
For understanding how ssh works see [this](https://www.digitalocean.com/community/tutorials/understanding-the-ssh-encryption-and-connection-process).
Spent Too Much Time on Dev.to?
Tags: mentalhealth, devto, pomodoro, breaktime
Published: 2022-04-03 04:05:31

I love (and hate) that the team has this built in. Let me explain why that is.

At around 5 am one morning, I was up doing some research on certificates online when this window popped up:

![You've been working hard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bee7tvs9s00eco06941i.png)

Having not been paying attention how many windows I had opened nor how long I had been typing away at my computer that morning, I smiled before clicking on the link. The link led me here where some soft, calming music played:

![beach and soft music page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cqipriaakki4qe4g9ol3.png)

I'll admit, this made me completely forget what I had been currently doing. I had just copied something into my clipboard, which took me a minute to remember what I was planning to do with. It was a very nice lullaby which almost dozed me off back to sleep, even. I adored the idea of the team implementing a technique to remind their users to take a break from their screens, their workflows, and simply take their eyes off the screen and have a mental break.

What I do not like about this pop-up is that it kept. popping. up. For the rest of the day, whenever I would come back to dev.to, there it was reminding me to take a break and break a breather. I'd want to look up an article or just check in on the comments of mine but there it was again blocking my passage way. At a certain point, it was not a reminder of taking some time for myself but to get off the website/app in general - a very helpful resource in that matter.

Sure, there are plenty of other resources out there to turn to when this comes up. And you can simply click on the exit button, whenever it permits you to - each and every time it appears on your screen. But I wonder why the window appears so often during one day after being ignored, or even interacted with, by the user.

Any thoughts or opinions?

Happy coding!
Getting Started With Python PyStart(Data Types)
Published: 2022-04-03 03:38:20

**1.0 DATA TYPES**
In programming, data type is an important concept. Just as we discussed previously on variables, Variables can store different types. 
Python has many built-in data types, such as 

1. Text type : str

2. Numeric type : int, float, complex

3. Boolean type : True or False

4. Set  

5. Sequence type : List, Tuple, Range


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlghrwakp5845r973mj6.jpg)

```
x = "Davis"
# x is a string data type
```

```
y = 4; 
# y is an int data type
```

```
z = 7.5;
# z is a float type
```


To display the result of this, We make use of the print() built-in function;

```
print(x)
```

```
print(y)
```

```
print(z)
```

**Output**
`Davis`
`4`
`7.5`

**Note:**
We defined a var x = "Davis"; just as we have in other programming languages like Java, Python automatically detects the data type of the value)

**Also,** when declaring variable names, we take note of keywords, there are some reserved keywords in python that shouldn't be used as a variable name, some of such keywords includes **return**, **is**, **continue**, **def**, **finally**, and a few other words. Read further on Python keywords  [Click here for Python keywords](https://docs.python.org/2.5/ref/keywords.html)

**1.1 Checking the data type of the variable**
It is important that we know how to check data types in Python, this is a basic concept that will come in handy when we get to more advanced topics like Data Preprocessing and Analysis. 
We check the type of our data by using the type() method.

```
print(type(x))
```
```
print(type(y))
```
**Output**
`int`
`str`
Do You Want to Improve Your Code Quality in Java?
Tags: java, performance, codequality, learn
Published: 2022-04-03 01:43:34

After working in multiple companies, I realized that lots of Devs are really good and have the potential but they lack knowledge of best practices that can make their life and their colleagues' lives much easier. Therefore, I decided to put in the effort to spread the knowledge to help the Devs around the world improve their skills through a simple basics course in Java on Udemy.com:

**My course achieved a striking success with a total of 30+ students within only 1 month due to it's unique structure that focuses on quality instead of how to write "hello world" and so far has a ranking of 5/5. I'm adding new contents from time to time and the course contains fun quizzes after each lesson, so you can test your understanding.**

**If you use the link below, you will get a special discount for the course as a promo from the instructor directly:**

**[https://www.udemy.com/course/java-best-practices-performance-quality-secure-code/?couponCode=JAVA_QUALITY](https://www.udemy.com/course/java-best-practices-performance-quality-secure-code/?couponCode=JAVA_QUALITY)**

If you are unable to get the discount using the link above, you can add the course to your cart and then apply the promo code[JAVA_QUALITY] to get a good discount.

Your support will enable me to maintain the course, add new contents and donate part of it for people suffering from cancer.

Happy coding with love
Fixing "Require statement not part of import statement.eslint[@typescript-eslint/no-var-requires]"
Tags: typescript, eslint, javascript
Published: 2022-04-03 01:27:43

When you run ESLint through a typescript file, you may run into this warning.

```bash
Require statement not part of import statement.eslint[@typescript-eslint/no-var-requires](https://typescript-eslint.io/rules/no-var-requires)
```

# History

JavaScript from ES2015 onwards uses imports as part of the language specification. TypeScript will compile them into environment specific forms as needed. The reason for this is because require([]) and require(””) are environment specific and are more difficult to statically analyze. 

# Severity

This is for the most part only a syntactical rule. If you don't care about TypeScript module syntax, then you will not need this rule.

# Solution 1: Remove the variable

### ❌ Incorrect

```jsx
var foo = require('foo');
const foo = require('foo');
let foo = require('foo');
```

### **✅ Correct**

```jsx
import foo = require('foo');
require('foo');
import foo from 'foo';
```

# Solution 2: Ignore the instance

Solution 2 is a band-aid solution that tells TS to simply ignore the part of the file that is giving the warning. 

Place this line right before the require statement:

```bash
/* tslint:disable no-var-requires */
```

# Solution 3: Ignore at file level

Ignore *all* instances of var requires at the file level.

At the top of the file, place one of the below two lines:

```bash
/* eslint @typescript-eslint/no-var-requires: "off" */
```

OR

```bash
/* eslint-disable @typescript-eslint/no-var-requires */
```

# Solution 4: Ignore at project level

Ignore every instance of variable requires usage

In your `eslintrc.js` file, make your own rule to disable it:

```bash
module.exports = {
  ...
  rules: {
    ...
    '@typescript-eslint/no-var-requires': 0,
  }
}
```

Happy ESlinting
How to release 2 years of unfinished code, the "Agile way"
Tags: agile, estimation, flow, noestimates
Published: 2022-09-25 09:55:34

---
title: How to release 2 years of unfinished code, the "Agile way"
published: true
date: 2022-04-03 00:00:00 UTC
tags: agile,estimation,flow,noestimates
canonical_url: https://jhall.io/archive/2022/04/03/how-to-release-2-years-of-unfinished-code-the-agile-way/
---

I was recently conversing with someone who just joined a new team. This new team has been working on a new software project for about 2 years, and they haven’t released anything yet. Now management has decided it’s time to release something, and the team has 8 weeks to get _something_ out the door.

How would you address this situation?

Take a moment and consider, if you like. I’ll wait.

 ![I'll wait...](https://jhall.io/images/waiting-fingers.gif)

So what did you come up with?

I, and the others talking with this person, came up with a few pieces of advice. I’ll mention some of them briefly. Let me know if you agree or disagree, or what you might do differently.

- Release _something_ ASAP.

- Treat the last 2 years worth of code as “warehouse of old parts”

- Don’t make an 8-week plan.

There’s a ton more that could be said. Unless/until I hear back from this person in 8 weeks time, it’s a hypothetical from my standpoint. So it’s fair game for any other suggestions. I’d love to hear yours!

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Learning Swift Basics
Tags: ios, swift, swiftui, mobile
Published: 2022-04-02 23:54:58

I've started a new journey in becoming a mobile software engineer, specifically I'm learning Apple's **Swift**, a language used in their mobile app development, (and also their other platforms). I briefly started in Kotlin (used for Android app development), but I see a lot of overlap between the two languages. 

Swift has some interesting ways to store and access data, including arrays, sets and dictionaries, to just name a few. We'll walk through the aforementioned datatypes, and explore their differences. 

**Array:** Arrays should be a familiar topic, since every language seems to have this datatype. Arrays in Swift stores data **in order**, and allows for duplicates. Arrays **only** allow one type data, whether it's String, Int, Bool, etc.

**Creating empty Arrays:**
```
var array1: [String] = [String]()
var array2: [String] = []
var array3 = Array<String>()
```

**Set:** Sets are very similar to arrays; both store only one type of data at a time, but some key differences are that sets have no set order in how they store data, and duplicates **are not** allowed in sets. 

**Creating empty Sets:**
```
Var set = Set<String>()
```

**Dictionary:** Dictionaries allows for customization in how data is stored in what is called "key: value" pairs. These pairings can be stored in a number of ways, such as [String: String], [Int: String], [Int: Bool]. Since Swift doesn't know how far any given dictionary extends, one extra step needs to be taken in case the key being accessed doesn't exist. When attempting to access the value of a key, a **default** value needs to be set: ```dic["color", default: "Unknown"]```

**Creating empty Dictionaries**
```
var dic1 = [String: String]()
var dic2 = Dictionary<String, Int>()
```
Learn Markdown with Scrimba 🧠
Published: 2022-04-02 22:46:34

## Intro
Currently taking the course  Learn Markdown on [Scrimba.com](https://scrimba.com/).

---

## Playground 1
Hi, it's really a **pleasure** to meet _you_.

Chuck, Chuck, its' your __cousin__. Your cousin *Marvin Berry*, you know that new sound you're lookin for, well listen to this.

I noticed you band is on the roster for dance auditions after school today. Why even bother Mcfly, you haven't got a chance, you're too much like your own man. ~~No McFly ever amounted to anything in the history of Hill Valley~~.

---

## Playground 2

>"Okay, okay you guys, oh ha ha ha very funny. Hey you guys are being real mature. Well, I guess that's everything. Quiet down, I'm sure the car is fine. Don't worry, I'll take care of the lightning, you take care of your pop. By the way, what happened today, did he ask her out? Let's get him."

---

## Lists

### Some characters
1. Doc
2. McFly
3. Biff

### Some modes of transportation
- Delorean
- Covered wagon
- Hoverboard

---

## Code Blocks

```js
const martyMcfly {
    instrument: 'guitar';
    band: 'The Pinheads';
    hobby: 'skateboarding';
    girlfriend: 'Jennifer Parker';
    bestfriend: 'Doc';
}
```

---

## Images

![Doc and Marty McFly](https://cdn.vox-cdn.com/thumbor/iXlaC9fjNJ0XBV3t7_qNLBKBol8=/148x0:1768x1215/1200x800/filters:focal(148x0:1768x1215)/cdn.vox-cdn.com/uploads/chorus_image/image/46650366/bttf.0.0.png)

---

## The Franchise

| Movie                       | Year | 
| :---------------------------|:------:|
| Back to the Future          | 1985 |
| Back to the Future Part II  | 1989 | 
| Back the Future Part III    | 1990 |

---

## References
* 🧠 emoji from [emojipedia](https://emojipedia.org/brain/).

* Text from [Delorean Ipsum](https://satoristudio.net/delorean-ipsum/).

* [Basic Syntax](https://www.markdownguide.org/basic-syntax)

* [Extended Syntax](https://www.markdownguide.org/extended-syntax/)

* [Markdown Cheat Sheet](https://www.markdownguide.org/cheat-sheet/)

* [GitHub Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
Attempted to deploy Next.js app with Docker to Heroku
Tags: nextjs, heroku, docker, deployment
Published: 2022-04-02 22:04:07

[Updated on 11/23/2022: Because Heroku is going to remove free dynos, I deleted my app on Heroku]


Last week, I was able to deploy a simple Express server to Heroku with Docker after struggling for an almost entire day. And this time, I wanted to try the same deployment method, [Container Registry & Runtime (Docker Deploys)](https://devcenter.heroku.com/articles/container-registry-and-runtime) for a Next.js app.

For the sake of simplicity, I used `create-next-app` command to create a sample Next.js app and used the generated code as is. Here is [the source code](https://github.com/Lulkafe/Nextjs_and_Docker) just in case.

Here are steps I took after I built the app.

**1. Add Dockerfile (and .dockerignore)**
This is from my Dockerfile:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx2qaoqeq1c7rdixs9a1.png)

Nothing special but I needed to do little research on the last line. Since Heroku doesn't allow us to publish a particular port, I had to make my Next.js app listen to the environment variable `PORT` to which Heroku assigns a random port number.

**2. Create a Heroku app on Heroku**
I made an app "docker-test-with-nextjs" through Heroku GUI.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vzl7njlqt0tikhtlauf.png)


**3. Log in Heroku on terminal**
by the following commands: 
`heroku login`
`heroku container:login`

**4. Add a remote to my local repository**
My heroku app name is "docker-test-with-nextjs", so I typed
`heroku git:remote -a docker-test-with-nextjs` 

**5. Build, push and release an image**
Build an image and push to Heroku:
`heroku container:push web`

Release the image:
`heroku container:release web`

**6. Wait for seconds and the app is deployed**
At last, I could see the app on Heroku👍

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c22c1mfpnpyv8nkfhau3.png)](https://docker-test-with-nextjs.herokuapp.com/)

Overall, I was able to complete the deployment much quicker than I thought. This was a good experiment and now I can move on deployment of a real Next.js app.
Como trabalhar com Switch no Golang
Tags: go, linux, switch, developer
Published: 2022-04-02 21:51:12

Ola devs e devas.

Para ilustrar esses exemplos de `switch` em golang, iremos usar como exemplo dia da semana.

Esse primeiro exemplo iremos definir uma function para obtermos a resposta do dia da semana:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ypgde73dvon4j74ryqvv.png)

Nesse exemplo iremos usar o switch com o `fallthrough`;
O que seria a palavra-chave `fallthrough` é usada na instrução `switch` em golang. Esta palavra-chave é usada no bloco `switch` case. Se a palavra-chave de fallthrough estiver presente no bloco case, ela transferirá o controle para o próximo caso, mesmo que o caso atual possa ter correspondência:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/arbe5qexro37gnauvjtv.png)

Nesse exemplo iremos definir uma variavel com inferencia de tipo `var dayWeek string`:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1l7t6kc1zabgl4q90yk.png)

Nesse exemplo podemos utilizar o `switch` desta maneira:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3habjg0lfiiufnxf0s6w.png)

Para executarmos cada exemplo, ficaria assim:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ae2kc46qg7ufiylxyfn8.png)

E como respostas, ficaria assim:

`go run main.go`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6rws0dpiwnx6vhbcewg.png)

**Um ponto importante**, _no caso do golang nao precisamos usar o palavra-chave break apos o retorno do case. Pois o go ja faz isso automaticamente_.

Notamos que podemos usar os 4 exemplos diferentes de `switch` em go.

Espero ter ajudado.
Part 2: I'm building a telegram bot to remind me changing my car oil
Tags: tutorial, node, programming, productivity
Published: 2022-04-02 21:46:46

Part 2 of my journey to create a telegram bot that will remind changing my car oil for me.

Today was productive. 
- I were able to produce some basic output. 
- I figured out the stack I'm going to use.

I decided to use for the backend nodejs since it is the easiest to get started with.

For the database I decided to go with firebase for the generous free tire and realtimeness.

npm package: node-telegram-bot-api as the wrapper to work with the telegram bot api.

I wanted to use Vercel for development but it kinda sucks with debuging so I used ngrok to tunnel requests to my local node server.

Didn't want to use frameworks or complicated file structure I stucked with the simplest working structure 👇


![Project structure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9s8v7uwwksolddgo3rdr.png)

Spent most of the day lurking around telegram bot API, understanding how to send simple messages and get responses. 

https://core.telegram.org/bots/api/

Firebase will store the state like only display welcome message once to the users.

EasyCron will hit the server every 3 hours to calculate how needs to be reminded

https://easycron.com

I see piece falling into their place, It's been only a one day and I could tell that I finished 50%. 

I'll keep posting about the details of this light piece of software.

Follow for more...
Hello World: Emojicode
Tags: helloworld, esolang, emojicode
Published: 2022-04-02 21:43:16

---
title: Hello World: Emojicode
published: true
description: Coding in emojis
tags: helloworld, esolang, emojicode
canonical_url: https://viviandai.hashnode.dev/hello-world-emojicode
series: Hello World
cover_image: https://hashnode.com/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1648934013652%2FPyMBV7mqU.png%3Fw%3D1600%26h%3D840%26fit%3Dcrop%26crop%3Dentropy%26auto%3Dcompress%2Cformat%26format%3Dwebp&w=3840&q=75
---
Now let's take a look at [Emojicode](https://www.emojicode.org/). Emojicode was built on C/C++ and like its name suggests, this is a programming language that uses emojis.
## Code
Call the file `hello.🍇` or `hello.emojic` if your computer doesn't have emoji support.
```emojicode
💭🔜
Hello World
First Emojicode program
🔚💭
🏁 🍇
  😀 🔤Hello, World!🔤❗️💭 Prints "Hello, World!"
🍉
```
## How Does This Work?
Let's break this code down step by step: 
### Comments
The first part
```emojicode
💭🔜
Hello World
First Emojicode program
🔚💭
```
is a multiline comment. Emojicode does have a [documentation style](https://www.emojicode.org/docs/reference/documentation.html) for classes, protocols, etc. Multiline comments usually are put at the header of a file to give a quick description of the file.
`💭` is the symbol for a single line comment so `💭 Prints "Hello, World!"` is ignored by the compiler.
### The Start of a Program
Each Emojicode program has `🏁` to mark the starting point of the program. `🍇` is pretty much the equivalent of `{` and `🍉` is the equivalent of `}`. An Emojicode program should have the format of 
```emojicode
🏁🍇
    💭code here
🍉
```
### Printing
`😀` indicates the start of a print  
`❗️` indicates the end of a print  
`🔤` indicates the stuff in between is a string (basically “ in common programming languages)
## Conclusion
Emojicode can actually be used to do a surprising amount of things. While I personally have not tried, the language does support object oriented programming, threading, potentially some functional programming as well. Hello, World! is far from reaching the full potential of Emojicode but it's somewhere to start.

Comment a language you'd like to see next!