teleren/devto huggingface dataset:
Create a new GitHub Repository from the command line
Tags: github, git, beginners
Published: 2022-02-22 20:03:20

It can be frustrating when you are working on a project on your local machine and need to commit some changes to GitHub, but you haven't set up that repository. 

The GitHub CLI can help in this situation, from your terminal you can create that repository and commit your project without leaving your terminal or Integrated development environment (IDE).  If you haven't got the GitHub CLI installed, do [check out my blog post](https://www.techielass.com/install-github-cli-on-windows/) that covers the best ways to do that. 

## Convert a directory to a Git repository
So, you've been working on a project on your local machine for the last few hours and you want to commit that project to a GitHub repository.  The first step is to [convert the directory to a Git repository](https://www.techielass.com/convert-a-folder-to-a-git-repository/).  The command to use is: 

```powershell
git init
```

## Stage the files
The next step would be to stage the files so they can be committed to your GitHub repository: 

```powershell
git add .
```

## Commit the files
Now commit the files:

```powershell
git commit -m "initial commit"
```

## Authorise GitHub CLI
If you have never used the GitHub CLI tool before, you need to authorise it with your GitHub account.  If you type in the following command it will walk you through allowing your terminal to make changes to your GitHub account. 

```powershell
gh auth login
```

## Create your GitHub repository 
Your directory is Git ready and your terminal is authorised to make changes to your GitHub account.  The next step is to create that GitHub repository and push your files into that repository. The command you want to use is **gh repo create**.  This command has a lot of switches you can use for different reasons. 

The command below will create a repository in GitHub called _"My-NewRepo"_.  It will be a public repository.  The directory you are in will be source for that GitHub repository and the push the files in the directory to it. 

```powershell
gh repo create my-newrepo --public --source=. --remote=upstream --push
```

Your directory is now Git initiated, you have a GitHub repository to store your project and the files are stored there. 😊
Enjoy this new found joy of being able to create GitHub repositories using the GitHub CLI tool!

_Command Line icon by Icons8_
Recommend me the best phone for productive mobile app development!
Tags: flutter, xamarin, reactnative, android
Published: 2022-02-22 20:59:29

My phone just died on me. I am in the hunt for a new phone.

I've always been an Android User but wouldn't mind moving to iOS. 

However, my main concern is development speed. Particularly a phone that is able to power up and launch debug mode of an app in a few seconds. I develop apps mostly in C# Xamarin & Flutter.

Some suggest CPU is most important. Others suggest using a Stock Android Phone like Pixel. Some even say if you are doing React or Xamarin Dev, always start with IPhones as they tend to launch faster in debug mode.

Has anyone ever looked into these dichotomies?

Any suggestions?
Usa console.table en lugar de console.log
Tags: javascript, tips, spanish, logging
Published: 2022-02-22 22:51:30

Una forma interesante de mostrar los resultados de un array o un objeto es utilizar `console.table`. Esta función toma un argumento obligatorio: `data`, que debe ser un `array` o un `objeto`, y un parámetro adicional: `columns`.

## Colecciones de tipos primitivos
```javascript
// Array de string
console.table(['Manzana', 'Pera', 'Melón']);
```

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1645472655115/WDgKzSjm4.png)

```javascript
// Objeto con propiedades de tipo strings
function Persona(nombres, apellidos) {
  this.nombres = nombres;
  this.apellidos = apellidos;
}

var yo = new Persona("Fernando", "Barrios");

console.table(yo);
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1645472681381/Q4nwYb5s3.png)

## Colecciones de tipos compuestos

Si `data` es un `array` y sus elementos son `array`, o bien cuando `data` sea un objeto y sus propiedades sean un `array` sus propiedades o elementos se enumerarán en la fila.

```javascript
// un array de arrays

var personas = [["Fernando", "Barrios"], ["Juan", "Carlos"], ["Carmen", "María"]]
console.table(personas);
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1645472977487/dX1V6mO36.png)

```javascript
// un array de objetos

console.table([{
    nombre: "Fernando",
    apellido: "Barrios"
}, {
    nombre: "John",
    apellido: "Doe"
}])
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1645473295171/uvxmrnE5k.png)

## Restringiendo las columnas mostradas
```javascript
// un array de objetos, donde se mostrará solo la columna apellido

console.table([{
    nombre: "Fernando",
    apellido: "Barrios"
}, {
    nombre: "John",
    apellido: "Doe"
}], ['apellido'])
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1645473387454/tID3Hq0Kv.png)
I made a Hacker News reader with Flutter
Tags: flutter, engineering, android, ios
Published: 2022-02-23 01:04:30

---
title: I made a Hacker News reader with Flutter
published: true
description:
tags: Flutter, engineering, android, iOS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/albjomq6nm9sfjdxbwoq.png
---

Here is the GitHub repo: https://github.com/Livinglist/Hacki
Remind Solution (Australia) - It Helps You Remember All Details Well!
Published: 2022-02-23 09:24:11

This is not simple that buds are more interested in [Remind Solution](https://ipsnews.net/business/2021/09/18/remind-solution-real-brain-booster-or-a-scam-read-ingredients-and-side-effects-reports/) than in Brain Booster Supplements. There have been several new Brain Booster Supplements endorsements. It is a worthwhile cause. When push comes to shove, these thought provoking viewpoints as that relates to my tactic. A standard Brain Booster Supplements can be substituted for Brain Booster Supplements. I daresay that most of the skillful people who are serious dealing with that proposal aren't the kind of folks who would turn to using this. That was how to have a Remind Solution of your very own. This is how that's positioned in the market so you may have to take note this. I had occasionally considered this. Which organization do you belong to? Fellow travelers that buy these budget imitations don't realize this until it's too late. I've been looking for the malarkey with precision quality. It also can get very dull. Quite a few of these tricks can be absorbed rather easily. 

Visit Hare=> [https://ipsnews.net/business/2021/09/18/remind-solution-real-brain-booster-or-a-scam-read-ingredients-and-side-effects-reports/](https://ipsnews.net/business/2021/09/18/remind-solution-real-brain-booster-or-a-scam-read-ingredients-and-side-effects-reports/)
Module 2 | React BillsApp Project with Material Ui and Context Api

Tags: javascript, react, webdev, devops
Published: 2022-02-23 14:06:19

Just Released the Second Module of BillsApp Project on My Channel
Do Check it out and Provide your feedback :)
[Link for The Video](https://youtu.be/T6XM7uI3138)
Do check it out and Share :)
How to POST and Receive JSON Data using PHP cURL
Tags: php, webdev, beginners, tutorial
Published: 2022-02-23 19:21:09

**JSON** is the most popular data format for exchanging data between a browser and a server. The JSON data format is mostly used in web services to interchange data through API. When you working with web services and APIs, sending **JSON data via POST** request is the most required functionality. PHP cURL makes it easy to POST JSON data to URL. In this tutorial, we will show you how to **POST JSON data** using PHP cURL and **get JSON data** in PHP.


## Send JSON data via POST with PHP cURL

The following example makes an HTTP POST request and send the JSON data to URL with cURL in PHP.
- Specify the URL `($url)` where the JSON data to be sent.
- Initiate new cURL resource using `curl_init()`.
- Setup data in PHP array and encode into a JSON string using `json_encode()`.
- Attach JSON data to the POST fields using the `CURLOPT_POSTFIELDS` option.
- Set the Content-Type of request to `application/json` using the `CURLOPT_HTTPHEADER` option.
- Return response as a string instead of outputting it using the `CURLOPT_RETURNTRANSFER` option.
- Finally, `the curl_exec()` function is used to execute the POST request.
```php
// API URL
$url = 'http://www.example.com/api';

// Create a new cURL resource
$ch = curl_init($url);

// Setup request to send json via POST
$data = [
    'username' => 'saymon',
    'password' => '123'
];
$payload = json_encode($data);

// Attach encoded JSON string to the POST fields
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);

// Set the content type to application/json
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json'
]);

// Return response instead of outputting
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the POST request
$result = curl_exec($ch);

if($result === false) {
    exit('Curl error: ' . curl_error($ch));
} else {
    echo $result;
}

// Close cURL resource
curl_close($ch);
```
## Receive JSON POST Data using PHP
The following example shows how you can get or fetch the JSON POST data using PHP.

- Use `json_decode()` function to decoded JSON data in PHP.
- The `file_get_contents()` function is used to received data in a more readable format.
```php
$data = json_decode(file_get_contents('php://input'), true);
```
* * *
I hope you enjoyed the read!

Feel free to follow me on [GitHub](https://github.com/saymontavares), [LinkedIn](https://www.linkedin.com/in/saymon-tavares/) and [DEV](https://dev.to/saymontavares) for more!
cryptocurrency Coinmarketdo news
Tags: cryptocurrency, crypto, bitcoin, ethereum
Published: 2022-02-23 22:04:08

---
title: cryptocurrency Coinmarketdo news
published: true
date: 2021-07-23 21:36:50 UTC
tags: Cryptocurrency,crypto,Bitcoin,Ethereum
canonical_url: https://coinmarketdo.com
---

Coinmarketcap has been the leader in tracking cryptocurrency prices in real time. It was founded in May 2013 and has been a well-known brand in the fast-growing crypto-space.

Website and mobile apps aim to make cryptocurrency accessible to everyone. To empower investors every day with accurate, high-quality information.

Coinmarketcap is still the best source for institutional investors, retail investors, and media to compare the prices of crypto-assets.
Longest Palindromic Substring - Leetcode #5
Tags: career, interview, programming, python
Published: 2022-02-23 21:56:45

https://www.youtube.com/watch?v=Aiw3m8EK0rs&t=8s


Verdict: Pass
Score: 5/5

Coding: 5
Communication: 5
Problem Solving: 5
Inspection: 3
Review: 5

Leetcode #5 - Longest Palindromic Substring (https://leetcode.com/problems/longest-palindromic-substring/)

The candidate did an excellent job. He had seen the problem during his practice, but was still able to explain the details of an optimal solution and bring the interviewer along for the ride. He coded the solution fluently, and reviewed thoroughly. Excellent work.

## What they did well
- Able to code the optimal solution quickly
- Explained his thinking 
- Drew out an example and walked me through it
- Was able to deduce the runtime and space complexity confidently
- Handled questions from the interviewer really well

## What could be better
- Nothing significant that needed to be improved on.
- As an interviewer, I would have loved to see more of the problem solving process involved with coming up with the solution with more questions about the inputs and outputs. But since the candidate was able to so clearly articulate the solution I disregarded this.


The candidate very thoroughly tested his code.  Be sure to check out that part of the vid
Build a Next.js Website in 4 Steps

Published: 2022-02-25 17:21:52

Carson Gibbons is the Co-Founder & CMO of Cosmic JS, an API-first Cloud-based Content Management Platform that decouples content from code, allowing devs to build slick apps and websites in any programming language they want.
In this blog I will show you how to pick up an existing website example and curtail it into your own, beautiful Next.js website for publishing content and easy updates. This React Universal Website is built using the Next.js framework. Code is shared between the client and server making development a breeze. Add Cosmic JS-powered content and you’re taking your website to the Next.js level.
Next.js is an amazing new addition to the React open-source ecosystem. It is “a minimalistic framework for universal server-rendered React applications” that makes the process of building these types of applications much faster and easier.
If you haven’t already, get started by Signing Up for Cosmic JS. Helpful resources are provided below to streamline your development operations.

1. CREATE A NEW BUCKET
Your bucket’s name is the name of your website, project, client or web application that you are building.

2. INSTALL THE NEXT.JS APP
Once you’ve signed up and named your bucket, you’ll be prompted to start from scratch or “see some apps”. For this blog I simply clicked the right button to “see some apps” so that I could begin the installation process for the Next.js Website.

3. DEPLOY TO WEB
I clicked “Deploy to Web”. I can then start editing my Global Objects, Object Types and Pages while my web application is deploying. You will receive an email confirming the deployment of your web application. If you encounter any issues during deployment, you may be routed to the Cosmic JS Troubleshooting Page.

4. EDIT GLOBAL OBJECTS, OBJECT TYPES AND OBJECTS
Editing is a dream come true in the Cosmic JS Dashboard. To read more about how Cosmic JS was built with editing content in mind, read Building With the Content Editor in Mind.
Python for everyone: Mastering Python The Right Way
Published: 2022-02-27 09:01:08

We all know that food, shelter and clothing are the basic needs in live and are essential for survival. Similarly in being a developer especially now in web3, python is more like a basic need. With the ever evolving changing and new advancements in technology, python is the present and the future.

Many will argue that there are many languages in the market (which is a fact) and thus we can not isolate python as the god of all. This is a valid argument but what really makes python stand out is that it is a language for everyone and can be used almost everywhere in technology. Why am I saying python is a language for everyone?
First, python is very easy to learn even for people with very little experience in programming languages due to its easy syntax. 
Second, python is a multipurpose programming language and is fields such as:

- Game development
- Machine learning and Artificial intelligence
- Data science and data visualization 
- Web development
- Web scrapping
- Desktop GUI and many more.
Third, most organizations and employers are switching to python thus making it a very marketable language and skill.

## Mastering Python
There are people who prefer to learn with documentation while others understand better with video tutorials. Use whatever works for you since the end goal is to master the language and make a living out of it. There are a lot of resources on the internet for you to choose from. You can also attend one of the many boot camps which are mostly instructor-led.

How do you master python is not an easy question to answer since we all have different approaches when learning a new skill. How fast one masters a skill is also unique. The most helpful answer one can give is providing a roadmap for python that will guide a learner as they try to master the language like the one below;

1. Python basics
2. Data structures in python 
3. Objected oriented vs functional programming
4. Modules and packages
5. File and exception handling
6. Important libraries

You need an IDE (Integrated development environment) where you will write and run your codes after having installed the python bundle in your pc. 
You can now start working with python by writing short codes based on your road map and the kind of tutorials you are using. With time you can advance to frameworks which help you minimise the amount of code you write and also save you quite a lot of time.

One key thing that many beginners the for granted is practice. Practice makes perfect is not a myth since it has been proven by professionals from all walks of life to be true. The more you code, the more you master the skill, the more you are conversant with the language, the more you know how to avoid errors, the more you understand shortcuts and ways to make your coding easier and more enjoyable.
if I was to restart my programming journey, python would definitely be the first object oriented language I would learn.
How do I keep my devs busy while waiting on code review?
Tags: agile, flow, flowengineering, scrum
Published: 2022-08-13 11:41:25

---
title: How do I keep my devs busy while waiting on code review?
published: true
date: 2022-02-28 00:00:00 UTC
tags: agile,flow,flowengineering,scrum
canonical_url: https://jhall.io/archive/2022/02/28/how-do-i-keep-my-devs-busy-while-waiting-on-code-review/
---

I was recently involved in a discussion with a Scrum master who asked this question.

“Last sprint, most of our stories were stuck in queue, waiting for seniors on another team to review them. How can I keep my devs busy while they’re waiting?”

This type of question is extremely common in my experience. Whatever’s causing a delay, we look for ways to stay busy while waiting for delayed items.

Unfortunately, this is _the wrong approach_.

This is what I told this distressed Scrum master:

**Don’t worry about the devs not having enough work.**

If every dev is always busy, you’ll have a traffic jam. A highway at full capacity is called a parking lot.

Instead, worry on the smooth flow of work through the system.

If you solve the flow problems, all the devs will have enough work to do anyway. If you focus on giving them work, though, you’ll end up with even more work stuck in queue,causing more blockage, and even more problems than you’re facing right now.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Next.js + Tailwind CSS
Tags: javascript, nextjs, react, tailwindcss
Published: 2022-02-28 14:41:10

## Create your project
Start by creating a new Next.js project if you don’t have one set up already. The most common approach is to use [Create Next App](https://nextjs.org/docs/api-reference/create-next-app).

```
// Terminal

$ npx create-next-app my-project
$ cd my-project
```



## Install Tailwind CSS
Install `tailwindcss` and its peer dependencies via npm, and then run the init command to generate both `tailwind.config.js` and `postcss.config.js`.

```
// Terminal

$ npm install -D tailwindcss postcss autoprefixer
$ npx tailwindcss init -p
```



## Configure your template paths
Add the paths to all of your template files in your `tailwind.config.js` file.

```
// tailwind.config.js

module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
```



## Add the Tailwind directives to your CSS
Add the `@tailwind` directives for each of Tailwind’s layers to your `./styles/globals.css` file.

```
// globals.css

@tailwind base;
@tailwind components;
@tailwind utilities;
```



## Start your build process
Run your build process with `npm run dev`.

```
// Terminal

$ npm run dev
```



## Start using Tailwind in your project
Start using Tailwind’s utility classes to style your content.

```
// index.js

export default function Home() {
  return (
    <h1 className="text-3xl font-bold underline">
      Hello world!
    </h1>
  )
}
```
4 Errors I Made When Building A Financial Application
Tags: webdev, php, finance
Published: 2022-06-20 12:40:56

## 1. Not knowing which datatype to use in MySQL

I once heard it’s better to use integers when handling financial data. You convert a price like €10 to its lowest unit (cents in this case). This way you end up using 1000 as the amount to work with. This way you avoid the floating-point problem. The floating-point problem is best shown by typing the following in your Google Chrome console:

> 0.1 + 0.2 > 0.30000000000000004 

If you want to learn more about this problem visit this website. Working with integers is dramatic for readability (how much is 13310 in euros?). The disadvantage of working with integers is also that it has a limit of 2147483647 which is roughly € 21,474,836.47. Although with the euro you probably wouldn’t run into this issue quickly but with the Vietnamese Dong, this wouldn’t work. Learnings: use decimals (not floats!) in MySQL to store monetary values. Depending on how many decimals you need decimal(15,2) oftentimes is enough.

## 2. Not having something to fact-check the numbers

Imagine we have a shopping cart where there’s 1 product for € 100, the VAT of € 21 and a total of € 131. The first time you’re sharp and you immediately see your mistake. After the 100th time, you start to be blind to those mistakes.

That’s why you need something to fact-check the numbers if they’re correct. I’ve created a Google Sheet for me and my team where we can all fact-check this. Especially if you work with people who test your product but don’t have access to the code this is crucial. How should they know if the price displayed is the correct one?

## 3. Not splitting the price into all the components

Every part of a price should be stored separately. If not, there’s no way to reproduce the components if you need to later on. So save the VAT amount, the discount amount, the base price, and the total all separately. Big chance there are gonna be more price components in your app in the future.

## 4. Using foreign keys in the ‘orders’ table

One of my dumbest mistakes. I had an ‘orders’ table where all the orders of an e-commerce store were placed. Unfortunately, it had a reference to the actual products which I got the product price from. Everything was fine until one of the product prices changed and older orders were affected by it😅

I’ve made many mistakes even though I have been developing applications for years. But without resistance, there’s no growth, so I tend to share my mistakes so you might prevent them.

I’m planning on writing an ebook on developing applications where you work with money. If you’re interested you might wanna subscribe to get free access to the first chapter.

[Subscribe here](https://sjorsvdongen.gumroad.com/)