teleren/devto huggingface dataset:
Create a JavaScript Promise
Tags: javascript, devops, tutorial, beginners
Published: 2021-05-01 00:38:52

A promise in JavaScript is basically what it sounds like. You use it to make a promise to do something. When the task completes, you either fulfill your promise or fail to do so. Promise is a constructor function, so you need to use the new keyword to create one. It takes a function, as its argument, with two parameters - resolve and reject. These are methods used to determine the outcome of the promise. 
* Ex:
```
const makeServerRequest = new Promise((resolve, reject) => {

});
```

#### Complete a Promise with resolve and reject
A promise has three states: `pending`, `fulfilled`, and `rejected`. The promise you created in the last challenge is forever stuck in the `pending` state because you did not add a way to complete the promise. The `resolve` and `reject` parameters given to the promise argument are used to do this. `resolve` is used when you want your promise to succeed, and `reject` is used when you want it to fail. These are methods that take an argument, as seen below.
```
const makeServerRequest = new Promise((resolve, reject) => {
  let responseFromServer;

  if(responseFromServer) {
     resolve("We got the data");
  } else {  
     reject("Data not received");
  }
});
```
Here we just made the promise handle success and failure. If responseFromServer is true, call the resolve method to successfully complete the promise. Pass resolve a string with the value We got the data. If responseFromServer is false, use the reject method instead and pass it the string: Data not received.

#### Handle a Fulfilled Promise with then
Promises are most useful when you have a process that takes an unknown amount of time in your code (i.e. something asynchronous), often a server request. When you make a server request it takes some amount of time, and after it completes you usually want to do something with the response from the server. This can be achieved by using the `then` method. The `then` method is executed immediately after your promise is fulfilled with `resolve`.
* Like so:
```
makeServerRequest.then(result => {
   console.log(result);
});
```
`result` comes from the argument given to the `resolve` method.

#### Also, Handle a Rejected Promise with catch
`catch` is the method used when your promise has been rejected. It is executed immediately after a promise's `reject` method is called. 
* Like so:
```
makeServerRequest.then(result => {
   console.log(result);
});

makeServerRequest.catch(error => {
  console.log(error);
});
```
`error` is the argument passed in to the `reject` method.
Mystery github build check
Tags: github, help
Published: 2021-05-01 01:13:03

I've got a github PR check that I don't recognize, it never reports back and prevents my PR's from being mergeable without admin rights. Anyone have an idea how to disable this check? Here's the [repo](https://github.com/omawhite/portfolio) and an example [PR](https://github.com/omawhite/portfolio/pull/38) where the "build" check is hanging. Also here's a screenshot: ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzq90s9018w238t6ojz0.png)
How Coding and Programming becomes a Passion
Published: 2021-05-01 01:10:42

My name is John oluwatobi Abidoye, Presently am a Junior Frontend developer and am aspiring to be a better programmer each and every day not more a cider.. smiles to that...😁😁.. 
But come to think of it, when everybody around you have no interest in programming and thinks it is something very hard.. seriously I think it was hard but it is and it is not again. While did I say this, it really can be define by your passion for something. While I really have interest was that the moment I see those code on the system(A Laptop or a PC) I just have this kind of passion to know it, But my environment is another negative factor... I know you really want to know why I chose to be a programmer and not any other thing.. hmm watch out for the next Article.. Stay tuned
Programming Case Types !Explained
Tags: programmingtips, camelcase, pascalcase, programming
Published: 2021-05-01 08:36:24

---
title: Programming Case Types !Explained
published: true
date: 2021-05-01 00:57:46 UTC
tags: programmingtips,camelcase,pascalcase,programming
canonical_url: https://medium.com/nerd-for-tech/programming-case-types-explained-143cad3681e3
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rvx1a9rpckunsks3r00q.png
---

No matter how well you are at Coding. Name Conventions can be a pain in the A\*\*.

In the programming world, languages use some specific pattern in naming variables, functions

[Jeff Atwood (Stack Overflow Co-founder )](https://twitter.com/codinghorror/status/506010907021828096?lang=en) says

> “Naming Conventions is one of the two hard things in Computer Science”

**Why Case Type?**

we all use naming to things we define in the program from variables to functions. In Programming, if you want to name a thing with more than one word you can’t name it with added space or without space directly some times it might mislead the code reviewers/ code readers like therapists can sound like `therapists` or `the rapists`.

Here comes the Case Type with a solution where it has different ways to name a thing that has more than one word.

Today, we will look into the Different Case Types in the Programming World

1.**camelCase**

Camel Case is actually inspired by the animal “Camel”. Where the first word will be small letters and from the second word, the first character will be capitalized like camelCase.

Some of the big companies also inspired by this. Example like iPhone, eBay

Generally, Camel Case is used for Variable Naming

2.**snake\_case**

Snake Case is naming with words separated by \_ ( underscore ) and all small letters

Generally, Snake Case is used for Variable Naming

Ex :- snake\_case, new\_word

3.**kebab-case**

Kebab Case is naming with words separated by — ( hyphen ) with all small letters

Generally, Kebab Case is used for CSS naming

Ex :- new-word, kebab-case

4.**PascalCase**

Pascal Case is naming with the First letter of each word is Capitalized.

Generally, Pascal Case is used for Class Naming

Ex :- NewWord, PascalCase

5.**MACRO\_CASE**

Macro case is naming with all letters Capitalized but the words are joined with \_ ( underscore)

Generally, Macro case is used for Preprocessor and constants

Ex :- NEW\_WORD, MACRO\_CASE

6.**Train-Case**

Train Case is naming with the first character of every word of the name is Capitalised and words are connected with — ( hyphen ).

Ex :- New-Word, Train-Case

* * *
A hidden realm new on Youtube
Tags: machinelearning, biology, python, opencv
Published: 2021-05-01 00:18:42

---
title: A hidden realm new on Youtube
published: true
description: Art&Science from a software engineer
tags: machinelearning, biology, python, opencv
---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02c086dvjj1944z7kumn.jpg)

I have opened a Art&Science channel on Youtube in which I try to provide mini-experiences based on microscopy and data science. Level of geeking, off-the-counter.
Read video's description to enter the realm.

https://youtu.be/PczEN0HohaU

Please subscribe and like if you want more.
Indie game dev photoshoot
Published: 2021-05-01 00:13:57

This dress + leggings are my new most comfortable clothes!

I love the fit, fabric, cut, quality!

All new clothes I buy for a while will be from BlackMilk!

Dress, leggings, & rainbow top = https://blackmilkclothing.com/

Corset = https://draculaclothing.com/black-satin-extreme-waist-cincher.html

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbom2y0t62537g439t6l.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bx1o1smrzlkvkyac9rdo.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q2tnlsei27ly3vawq8ig.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo4sjzxy664n5u70jds4.png)
The API Economy
Published: 2021-05-01 00:04:54

API stands for Application Programming Interface. It is the software technology that allows two applications to talk to each other. It describes the code of connectivity between applications. Anytime you check the weather on your phone, or look for a cheap flight on a booking site, for example, you are using an API. As you can tell from simply using the internet, APIs are an integral part of our online experience. 

Today, modern APIs have become extremely valuable both figuratively speaking as well as literally. APIs allow companies to easily include certain features in products that would otherwise take a long time to build by themselves.  Uber, for example, uses the Google Maps API to pull your location data.

The phrase the “API economy” is widely used because today's APIs comprise a major portion of business revenue. Google and Amazon are examples of major companies that now make a significant amount of money from their APIs. 

Moreover, modern APIs adhere to standards that are developer-friendly, easily accessible and understood broadly like HTTP and REST. 

They are also  treated like products, designed for consumers. Because of this characteristic, APIs are well-documented, standardized, and constantly versioned. Due to their standardizations, companies can easily monitor their APIs, as well as keep a level of security and governance.

APIs enable companies to turn their businesses into platforms, exposing important data and features to their customers without building those resources from scratch. Because of this significant ability, APIs are not only a technology tool, but a business one. The new age of APIs is certainly here and businesses are becoming aware of its colossal financial potential.
How to be a 10x developer
Tags: teaching, mentoring, 10x, practices
Published: 2021-05-04 16:03:10

---
title: How to be a 10x developer
published: true
date: 2021-05-01 00:00:00 UTC
tags: teaching,mentoring,10x,practices
canonical_url: https://jhall.io/archive/2021/05/01/how-to-be-a-10x-developer/
cover_image: https://jhall.io/images/bn-10x-developer.jpg
---

Every once in a while, someone says something about a 10x developer, and right on queue someone else pipes up and says the 10x developer doesn’t exist.

I want to skip the debate about whether or not the 10x developer truly exists and just tell you how to be one:

**Teach someone what you know.**

Whether or not it’s literally possible for _you_ to be 10x more productive than you are today, if you teach 10 people to do something they don’t know today, then you’ve contributed 10x to “developerness.”

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
How to check if a string starts with a specific string or a character in JavaScript?
Tags: javascript
Published: 2021-05-01 00:00:00

---
  title: How to check if a string starts with a specific string or a character in JavaScript?
  published: true
  tags: JavaScript
  date: Sat May 01 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/check-if-string-starts-with-specific-string-character-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-193dec00dd7e20575ed34b26e4ae0362.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/check-if-string-starts-with-specific-string-character-javascript)
  
To check if a string starts with another string, you can use the `startsWith()` string method in JavaScript.

For example, let's say you have a string called `Hello World!` and wants to check if the string starts with the word `Hello`, you can pass this string as an argument to the `startsWith()` method like this,

```js
// a string
const str = "Hello World!";

// string to check
const strToCheck = "Hello";

// use startsWith() string method to check
// if string starts with another string
str.startsWith(strToCheck); // true
```

- The method returns a boolean value `true` if it starts with the supplied string and `false` if not.

See the code live in [JSBin](https://jsbin.com/kikecaxigo/2/edit?js,console)

### Feel free to share if you found this useful 😃.

---
Tackling My First Lambda Labs Project 
Published: 2021-04-30 23:43:15

**Background**
For this project I worked with my Lambda School Labs team. The websites purpose was to allow users to decide which cities they want to live in based on many aspects, such as rent prices, crime rate, etc. Our team was broken up into 4 parts; Web(Frontend and Backend), IOS, and Data Science. I was apart of the Frontend Web team. My main responsibility was to make sure components of the frontend part of the website were running correctly, alongside my other teammates on the web team. 

**Technical Challenge**
The team closely followed the trello board we created, mapping out every part of the site carefully and assigning each other tasks. My main task was to be able to pin cities and save them. 

This was the first task I tackled and I definitely ran into some issues. My biggest problem was figuring out the previous teams' code, because they had already begun this ticket, it just didn't actually work. 

The first problem I ran into was trying to access the cities correctly. Once you got to a city page, there was a pin icon, and when you would click it, it would bring you to an error page. 

My solution was to completely start from the beginning and backtrack completely. This solution worked, and I discovered that I was just calling it wrong. The component name was cityInfo, and I was just calling it city. 

While this solution worked, it was very frustrating since I had worked on this for weeks, all to find out 4 letters was the solution to my problem.
 
**Future of the project and reflection**
I am happy to see how this project came out and I am excited to see the development of this project go even further in the future. There is a lot of room to add new features and add-ons to the site. 

I learned a lot from my teammates and received a lot of good feedback from them. This was one of my few experiences of peer programming and I really enjoyed it and learned a lot.
Use getters and setters to Control Access to an Object
Tags: javascript, tutorial, beginners, devops
Published: 2021-04-30 23:40:00

You can obtain values from an object and set the value of a property within an object.

These are called *getters* and *setters*.

Getter functions are meant to simply return (get) the value of an object's private variable to the user without the user directly accessing the private variable.

Setter functions are meant to modify (set) the value of an object's private variable based on the value passed into the setter function. This change could involve calculations, or even overwriting the previous value completely.

#### Let's Challenge ourselves:
* Use the class keyword to create a Thermostat class. The constructor accepts a Fahrenheit temperature.

* In the class, create a getter to obtain the temperature in Celsius and a setter to set the temperature in Celsius.

* Remember that C = 5/9 * (F - 32) and F = C * 9.0 / 5 + 32, where F is the value of temperature in Fahrenheit, and C is the value of the same temperature in Celsius.
```
// Only change code below this line

// Only change code above this line

const thermos = new Thermostat(76); // Setting in Fahrenheit scale
let temp = thermos.temperature; // 24.44 in Celsius
thermos.temperature = 26;
temp = thermos.temperature; // 26 in Celsius
```
* Answer:
```
class Thermostat {
  constructor(fahrenheit) {
    this.fahrenheit = fahrenheit;
  }
  get temperature() {
    return(5 / 9) * (this.fahrenheit - 32);
  }
  set temperature(celsius) {
    this.fahrenheit = (celsius * 9.0) / 5 + 32; 
  }
}

const thermos = new Thermostat(76); // Setting in Fahrenheit scale
let temp = thermos.temperature; // 24.44 in Celsius
thermos.temperature = 26;
temp = thermos.temperature; // 26 in Celsius
```
Know the type of Variable in JS!

Tags: javascript, showdev, webdev, frontend
Published: 2021-04-30 23:29:25

[![promo](//rollercoin.com/static/img/referral/banners/ref_72890.gif) ](https://rollercoin.com/?r=kl3gfn3b)

Many times (...I guess) you have wanted or tried to want to know what type is a variable, and most likely you know it since 98% of the times you are the one who declares them.

But imagine to find yourself with an API or a third party code which you have to manipulate, that already becomes more complex, since you are only there to use that little world of variables, functions, texts and others...

Although also many times it is useful to know what type are the variables in order to create conditionals that are prepared to manipulate and to maintain your code stable and that it does not crack your code of "Hello World".

For that reason I offer you a small example of functions that you can use for those occasions (I know that it is little, but it is honest work).

{% codepen https://codepen.io/soyleninjs/pen/yLgjLWg %}

Basically, these are functions to which you pass your variable to indicate whether it is of a certain type or not.

It can work, for example, in some function in which you pass parameters, but you have to do different things if the parameter receives an Object or an Array.

At first sight it could not seem very useful, but at least to me, with certain code that I had to make, it helped me.

<center>
If you liked the content you can follow me on my social networks as @soyleninjs  
</center>

[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/G2G42SCZF)

[![promo](//rollercoin.com/static/img/referral/banners/ref_72890.gif) ](https://rollercoin.com/?r=kl3gfn3b)
How the covid-19 pandemic will define what is otherwise, a really bad moment
Published: 2021-04-30 23:25:57

My grades are out. They're really good. Considering I took way too many classes than I really needed to, I'm happy with my results overall. So what's with the title?

Well, this summer is supposed to be an internship moment for myself and many others in my position. We should be gaining valuable experience in the industry. This is mostly to learn and to grow, even if it's a requirement for us to graduate. For many like me, however, graduation may not ever happen.

The covid-19 has hit every person in the world hard, especially the young folks. Businesses especially are having to make very tough decisions. I don't envy the business owners that have had to cut costs by laying off employees, but they should at least be aware of the consequences that will have. In my attempts to search for a co-op opportunity, I have applied to over 50+ jobs, both on my job board that my school has, and on other external sites such as linkedin, indeed, talent.com, and etc. I have only received 2 interviews. The first 1 rejected me after about 2 weeks. The second one is a pending rejection at this point, because internships start on May 3rd, and I don't anticipate an offer on the weekend. For students like us, it's very depressing. I know so many individuals that are uniquely qualified, and yet, aren't ever given a chance to shine. I don't want to be doing a minimum wage job for the rest of my life. That's why I came back to school in the first place. The reality is that this pandemic may not even end, anytime soon.

Although vaccines are starting to ramp up, the damage that has been done to the economy will be ever-lasting. I'm now left to ponder what to do next. I'm almost finished school at this point, but the amount of companies that have not said a word to me is astonishing. Consider this:

![Rejection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjkhe1ol0zy3rqnv8tkc.png)

I don't want to show my resume, but I highlighted my skills in web-development as well as what I've done in the past 2+ years. Yet, that still is not enough.

Or even this:

![Ridiculous offer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvvj7tshtk4wkhbdojce.png)
This is a junior data scientist co-op job, and needs 1 co-op under their belt. I look at jobs like this and just get demoralized. 

At this point, I don't even know what to do. I'll more than likely have to exercise the exempt option to have this co-op not count towards graduation, but that just means that those that were quite literally lucky enough to get a co-op will be more valuable due to their experience as opposed to someone in my shoes. 

More scary, however, is that I still am required to have at least 1 co-op under my belt. How is this even possible when most companies aren't willing to take a chance at people like us? All this does is push my graduation date further, and I'm not getting younger. I want experience, a chance to grow. Telescope was exactly that chance. Now, I want to know if anyone else out there in the world would be willing to do the same
Using the Spread Operator to Evaluate Arrays In-Place
Tags: javascript, devops, tutorial, beginners
Published: 2021-04-30 23:23:00

ES6 introduces the spread operator, which allows us to expand arrays and other expressions in places where multiple parameters or elements are expected.

* Math.max() expects comma-separated arguments, but not an array. The spread operator makes this syntax much better to read and maintain. 
```
const arr = [50, 10, 23, 234, 54];
const maxNum = Math.max(...arr);

 console.log(maxNum); will display 234
```
 ...arr returns an unpacked array. In other words, it spreads the array. However, the spread operator only works in-place, like in an argument to a function or in an array literal.

```
const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];
let arr2;

arr2 = [...arr1];  
```
```
console.log(arr2);
[ 'JAN', 'FEB', 'MAR', 'APR', 'MAY' ]
```

Here we copied all contents of arr1 into another array arr2 using the spread operator.
Which CRM Is Best For Your Business
Tags: odoo, crm, erp, opensource
Published: 2021-04-30 23:20:06

Business means customers and customers mean data. Today, a manager who wants to manage his company and develop his sales team performance can not ignore CRM. the necessity for strong customer management software isn't up for debate, however, deciding which CRM is best fitted to your company needs are often more complicated


In this article, we've gathered four prominent CRMs (in our opinion) currently available on the market. The objective? to offer you a quick overview of every tool in order that you've got the proper information available once you make your decision.

**SalesForce: The Heavyweight**

While the CRM landscape has grown in recent years, Salesforce remains one of the heavyweights within the industry. With several advanced features, it's still a really attractive SaaS solution for giant companies or companies with specific challenges. additionally, it's an easy interface and its operation is quite intuitive. In terms of budget, the entry ticket is $25 per month and per user. That said, the functionalities of this version are very limited and you'll need to quickly switch to the upper tiers, starting at $75 all the high to $300 per month, so as to start out taking full advantage of the software.


Also, note that the variability of features offered by Salesforce is rarely relevant to small to medium-sized businesses. They generate additional costs that are often unnecessary when considering the number of modules that will not even be in use, albeit the essential rates are already relatively high.

Read more> [https://www.techultrasolutions.com/blog/our-blog-1/which-crm-is-best-for-your-business-15](https://www.techultrasolutions.com/blog/our-blog-1/which-crm-is-best-for-your-business-15)