teleren/devto huggingface dataset:
Resources for planning a web application?
Tags: question, discuss
Published: 2020-01-27 14:05:01

---
title: Resources for planning a web application?
published: true
description: 
tags:
---

Hi All,

Does anyone have some great resources on planning a web application. Currently it will just be me on the project so if anyone has some great resources for that I would really appreciate it!

Keep coding along my dudes/dudettes 👏
To Be Or Not To Be
Tags: testing, webdev, javascript, jasmine
Published: 2020-01-27 13:54:28

---
title: To Be Or Not To Be
published: true
description: Using `toBe` or `toEqual` ... my assumption was that they were the same, one aliasing the other. This is absolutely not true.
tags: Testing, WebDev, JavaScript, Jasmine
series: Front-End Testing
cover_image: https://thepracticaldev.s3.amazonaws.com/i/g32wn132zuttf9haedqd.png
---

In a discussion with a client about testing, the question came up about using `toBe` or `toEqual`. The assumption was that they were the same, one aliasing the other. This is absolutely not true.

## Primitive Types

For primitive types such as numbers, booleans, or strings, there is no difference between `toBe` and `toEqual`; either one will work for values such as ... `5`, `true`, or `"this is a string"`.

## Non-Primitive Types

To understand the difference between `toBe` and `toEqual`, start with some objects.

```javascript
var a = { item: 'item-a' };
var b = { sub: a };
var c = { sub: a };
```

Using a strict comparison (===), some things in this scenario "the same":

```javascript
b.sub.item === c.sub.item; // true
b.sub.item === a.item; // true
c.sub === b.sub; // true
```

But some things, even though they are "equal", are not "the same", since they represent objects that live in different locations in memory.

```javascript
b === c; // false
```

Jasmine's `toBe` matcher is nothing more than a wrapper for a strict equality comparison.

```javascript
// These are the same
expect(c.sub).toBe(b.sub);
expect(c.sub === b.sub).toBe(true);
```

But `b` and `c` represent functionally equivalent objects; they both look like ...

```javascript
{ foo: { bar: 'baz' } }
```

It would be great to be able to say that `b` and `c` are "equal" even if they do not represent the same object?

Enter `toEqual`, which checks "deep equality" (does a recursive search through the objects to determine whether the values for their keys are equivalent). Both of the following tests will pass:

```javascript
expect(b).not.toBe(c);
expect(b).toEqual(c);
```

## More Detail

`toEqual`  has special handling for built in objects like `String`, `Number`, `Boolean`, `Date`, `Error`, `Element` and `RegExp`. For other objects it recursively compares properties.

This is very different from the behavior of the equality operator, ==. For example:

```javascript
var simpleObject = { item: 'simple' };
expect(simpleObject).toEqual({ item: 'simple' }); // true
simpleObject == { item: 'simple' }; // false

var castableObject = { toString: function(){ return 'cast' } };
expect(castableObject).toEqual('cast'); // false
castableObject == 'cast'; // true
```

## Reference

* [https://stackoverflow.com/a/27929503/3390364](https://stackoverflow.com/a/27929503/3390364)
* [https://stackoverflow.com/a/27929503/3390364](https://stackoverflow.com/a/30502357/3390364)

## Conclusion

While there are similarities between `toBe` and `toEqual`, they are clearly do not provide the same functionality.
Mentoring? Would you be interested?
Tags: discuss, typescript, javascript
Published: 2020-01-27 13:54:23

Want to know your opinion if such thing like mentoring online, when you buy 1 on 1 call with some senior dev would be interesting product for you? Would you buy such? What would you want to discuss? Your current problems in work, learning, or would like to take some kind of classes from some topic. What would you require from such mentoring? 

Or maybe its not a thing for you, and if so why? Maybe you tried, and it doesn't work for you? I would like to know your opinion.
Consulenza SEO: perchè è fondamentale?
Tags: seo, html, wordpress, searchengineoptimization
Published: 2020-01-27 13:45:02

<p>Il&nbsp;<strong>90% degli italiani utilizza internet per effettuare una ricerca di un bene o di un servizio</strong>, il 96% di questi utilizza Google. Proprio per questo motivo essere presenti e visibili online oggi &egrave; di fondamentale importanza. Attraverso le tecniche SEO &egrave; possibile ottenere visibilit&agrave; all&rsquo;interno dei motori di ricerca, ma occorrono molte&nbsp;<strong>competenze tecniche e strategiche</strong>&nbsp;per comprendere al meglio i <strong>continui aggiornamenti di algoritmo</strong>&nbsp;e quindi come ragiona Google.</p>
<p>Un consulente SEO Specialist esperto in grado di pianificare <strong>interventi mirati sui fattori che influenzano maggiormente l&rsquo;algoritmo</strong>&nbsp;e sviluppa la&nbsp;<strong>migliore strategia per il tuo business</strong>&nbsp;al fine di ottenere la massima visibilit&agrave; all&rsquo;interno dei motori di ricerca.</p>
<p><strong>SEO&nbsp;</strong>&egrave; un acronimo inglese che sta per &ldquo;<strong>Search Engine Optimization</strong>&rdquo;, tradotto &ldquo;<strong>Ottimizzazione per i motori di ricerca</strong>&rdquo;. La SEO &egrave; l&rsquo;insieme di strategie e azioni necessarie volte ad&nbsp;<strong>aumentare la visibilit&agrave; di un sito all&rsquo;interno dei motori di ricerca</strong>, nei risultati organici non a pagamento.</p>
<p>Il&nbsp;<a href="https://consulenteseospecialist.it/posizionamento-seo/">posizionamento SEO</a>&nbsp;di un sito all&rsquo;interno dei motori di ricerca dipende da pi&ugrave; di&nbsp;<strong>200 fattori differenti</strong>, una&nbsp;<strong>consulenza SEO efficace</strong>&nbsp;prevede:</p>
<h3><strong>SEO Audit</strong></h3>
<p>Analisi dettagliata di ogni <strong>aspetto tecnico e contenutistico del sito</strong>&nbsp;e pianificazione di interventi tecnici mirati per migliorare la scansione ai motori di ricerca.</p>
<h3><strong>Analisi parole chiave</strong></h3>
<p>Individuazione delle<strong> parole chiave strategiche del settore</strong>&nbsp;per comprendere al meglio l&rsquo;intento di ricerca degli utenti per quel determinato prodotto o servizio.</p>
<h3><strong>Analisi dei competitor</strong></h3>
<p>Analisi dei <strong>competitor</strong> per apprendere la competitivit&agrave; del settore e individuare le strategie adottate e sfruttare i punti di debolezza.</p>
<h3><strong>Analisi dell&rsquo;autorevolezza</strong></h3>
<p>L&rsquo;analisi dell&rsquo;<strong>autorevolezza</strong> permette di pianificare una strategia SEO off-site di link building efficace.</p>
<h3><strong>Strategia SEO</strong></h3>
<p>Dopo aver effettuato tutte le analisi necessarie, la&nbsp;<strong>strategia SEO &egrave; il punto fondamentale dell&rsquo;intera consulenza</strong>&nbsp;per definire la pianificazione di tutti gli interventi per raggiugnere gli obiettivi e la visibilit&agrave; all&rsquo;interno dei motori di ricerca.</p>
How to start using Styled Components in React
Tags: javascript, beginners, webdev, react
Published: 2020-01-27 13:34:31

If you use ReactJS, styled-components is a great library to help you perform CSS-in-JS. They have tools that making coding easier by letting you dynamically update styling via props, easy to use CSS syntax, browser compatible, and more more. This tutorial on styled components will cover all the basics to get you up and running.

We will take a look at:
* Creating styled components
* Using css in javascript
* Passing props to change the styling
* Using state to dynamically change styling
* Extending styled components

{% youtube eQkkoUEVY-Q%}
OncreateView in Fragments(Android) has been deprecated
Tags: android, kotlin, todayilearned
Published: 2020-01-27 13:26:29

Hello guys, ummm basically fragments can work fine without the 'OncreateView' method.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2qgno62i6wnypxbg1b2g.png)

Remove the OncreateView method and inflate your layout in the "Fragment()" and it will be "Fragment(R.layout.activity_main)".

Try that and it works fine. that's all.
Me and My First and Always Passion
Tags: career, webdev
Published: 2020-01-27 13:23:59

To talk about a brief about myself, I would like to start by saying that gladly every move I am going trough has helped me in the past and toward my future, started out as in my life teaching computer science for more than ten years in Saudi Arabia and teaching has showed me the benefits of how to move on but never the choice I wanted to go for. After choosing to immigrate to Canada where it took me to another level with tension, with moving to a higher step, with achieving a new thing and forward.

As I expected it was one of the hardest choices when I have moved to Canada in the beginning where I am a single mom taking care of a child and very difficult to move around. As much as I handled, I used to get devastated after taking the hardest steps. I made a decision out of a background field that I do not  want to teach anymore or move on with teaching and this is the moment where I realized that I should take my studies to the highest level and continue with coding and searching for colleges that would believe in me and give me the things I need. by that time I started looking right and left, getting in contact with people in Canada who are web developers and has the experience in the same field and this is when everyone started to giving me an opportunity and replied to me with different ideas, with great comments and with an excellent sense of integrity.

People gave me different choices, different places, different locations where I went in a loop that I have no idea where to go. I had to go for a decision as I am short of time and must move forward with what I get, until the moment a person contacted me on LinkedIn giving me the best advise regarding where to study .This is where Juno college (HackerYou) became a choice and one of the top choices available. In the matter of location, studies, reviews, people recommendations, so I took the decision and never looked back, and until this moment I regret nothing of a move I made after my life has been settled down and with the best choices taken.

Abir Halwa
Daily Developer Jokes - Monday, Jan 27, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-01-27 13:00:08

---
title: "Daily Developer Jokes - Monday, Jan 27, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Monday%2C%20Jan%2027%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12592cb43a5.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What did the Class say in court when put on trial?

___A:___ I strongly object!
 -->
Developer Spotlight @ FOSDEM 2020
Tags: opensource
Published: 2020-01-27 13:22:32

This weekend I'll be at FOSDEM conference in Brussels, Belgium.
I will be looking for open source developers who want to share the story behind their project(s) and willing to interview on camera.
We will produce 60-second spotlights about each developer and his/hers project, which will be promoted on our Youtube channel, social pages and more.
If you are interested in participating and talking about your open source project, contact me at elad@xscode.com for more information.
Or fill in the form here:https://valueopensource.github.io/DeveloperSpotlight/

See you all at the event,
Elad
Dear junior developers
Tags: developers, android, productivity, codenewbie
Published: 2020-01-27 13:14:51

Dear junior developers, i know the journey isn't easy, that burning desire to grow and learn more, that feeling that you aren't good enough. i totally understand but trust me, if you keep pushing,

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/4w9mypw5hrmsyev5nn6d.jpeg)

*Pun Intended*, *drop a comment if you get it*.

 you'll defintely get to that part where you smile and beat your chest for writing that code you think you couldn't write some time ago.

Don't forget to live as well, being a developer doesn't mean you don't have a life. Some advice i can give are

1. Eat healthy

2. Go to the gym

3. Make good friends

4. Set aside time to catch up with the world( a movie or song or sport)

5. Code for an hour at least every day.


That's all. Have a wonderful week
Code Newbie web devs, what do you want to read about?
Tags: discuss, codenewbie
Published: 2020-01-27 13:14:15

One of my New Year goals is to write more, specially technical posts.
But I am a CodeNewbie so I can just write some a limited number of topics, sorry 😅

What I can talk about: HTML, CSS, Vanilla JavaScript, maybe some Gatsby and React.

So, what YOU would like to read about?
Atlas VPN launched!
Tags: vpn, privacy, onlinesecurity
Published: 2020-01-27 12:50:53

Atlas VPN was started with one goal in mind – to bring a free VPN service to the market.

Our vision for Atlas VPN is to provide high quality VPN service that helps you stay private and access all the content you want in a most easy way possible. Moreover, we are doing our best to deliver a product that users love, therefore we value every feedback we receive. We are here to make your life easier.

In a world where privacy concerns, censorship is growing we want to give you back the internet you used to know. Thank you for trusting us with your privacy.
Which tool/language documentation do you have a strong confidence in?
Tags: documentation, discuss, stackoverflow
Published: 2020-01-27 12:39:33

---
title: Which tool/language documentation do you have a strong confidence in?
published: true
description:
tags:  documentation, devdiscuss, stackoverflow
---

While developing anything, we are often faced with challenges on achieving what we want. At this point, a lot of us immediately search and visit the first stackoverflow link related to the challenge 👩‍💻👨‍💻..

<center><h2>BUT</h2></center>

is there a language or tool which whenever you have challenges building something with it, you will check its documentation first before stackoverflow and why?
FastAPI + Heroku + Gunicorn + Uvicorn
Tags: fastapi, heroku, python
Published: 2020-01-27 12:36:04

---
title: FastAPI + Heroku + Gunicorn + Uvicorn
published: true
description: The video tutorial concentrates on deploying the FastAPI app without using docker to Heroku http://bit.ly/3aO1g35
tags: fastapi, heroku, python
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mvaqjvucxj5fgm2576bp.jpg
---
In the mentioned video tutorial, a sample hello world REST API will be deployed to Heroku that was implemented with python based FastAPI. FastAPI is a framewrok to build robust APIs with autogenerated swagger documentation for its endpoints.
The video tutorial concentrates on deploying the FastAPI app without using docker to Heroku http://bit.ly/3aO1g35

In case you are interested in a detailed walkthrough on how to create FastAPI and deploy it to Heroku, you may want to refer to this article http://bit.ly/2RD68jM
Data Engineering vs Data Science
Tags: python, datascience, career
Published: 2020-01-27 12:12:23

I was in a local technology Slack and saw the question:

> Tell me, what is data engineering and how is it different than data science? What [Python] tools do you use?

It's a good question and it's worth considering. Here's what I think:

![https://media.giphy.com/media/4WF7SSNIxQMRMflOAE/giphy.gif](https://media.giphy.com/media/4WF7SSNIxQMRMflOAE/giphy.gif)
<figcaption>Ted Danson reading a slip of paper. Caption: "Okay, here we go"</figcaption>

Data engineers are concerned with how data:
* Lands in a system
* Moves through a system
* Interacts with business processes and application logic
* Is stored
* Is governed

Definitions differ, but I think that's a good starting place.

There is a huge and diverse ecosystem of tools out there. I would highlight the following as tools with strong Python tooling:
* Kafka (for pub/sub)
* Spark for data processing (including the Spark Streaming API for stream processing)
* Airflow for workflow management
* Pandas for data "wrangling"

And you can find tons of tools on the [awesome list](github.com/igorbarinov/awesome-data-engineering).

Lastly, how do data scientists differ from data engineers? I would argue that they're both roles that are concerned with connecting data to business processes. They differ the same way their names differ:

* A data engineer is concerned with designing and building systems that make data available and actionable in a cost-effective manner.
* A data scientist performs experiments, the results of which are (sometimes) actionable insights or automation.

I hope that explanation helps you. If you see something I didn't explain very well, or got wrong, please chime in with that 👇
How to write a callback function in Java
Tags: java, beginners
Published: 2020-01-27 12:10:55

This is my first article on dev.to and programming in general. I recently developed an app for my company after completion, i was trying to clean up my code and do some refactoring, when i hit a block where i have two similar codes the only difference was calling a different method, me being a bit of newbie in Java but familiar with JavaScript was puzzled on how i can refactor this line into a method pass a method reference as a method parameter, it was a little bit tricky to get but i was able to get it to work using interface. a little snippet can be found below on how i implemented this.
```
public class MyClass {
    public static void main(String args[]) {
      myMethod(new GenericMethod(){
          public String call() {
              return "One";
            }
      });
       myMethod(new GenericMethod(){
        public String call() {
          return "Two";
        }
        });
        
        myMethod(() -> {
                return "Three";
        });
    }
    
    public static void myMethod(GenericMethod g) {
        System.out.println("This method called " + g.call());
    }  
    public interface GenericMethod {
        public String call();
    }
}
```
I created an interface *GenericMethod* with just one method *call()* then created a method *myMethod* with *GenericMethod* as a method parameter, I called *GenericMethod.call()* inside my method. to call the *myMethod* I simply pass a new instance of *GenericMethod* and override the *call()* method. You can make the code cleaner by using arrow notation instead of the *new* keyword as seen in the code above. The code above output the following to the console
```
This method called One
This method called Two
This method called Three
```
What the hell is object deconstructing?
Tags: csharp, dotnet
Published: 2020-01-27 11:24:52

Remember last time I found a handy feature of __C# 7.0__? For those who don't, you can find my blogpost about it [here](https://dev.to/alexdhaenens/what-the-hell-is-pattern-matching-4an8). Well once again, I found something very interesting! It is called object deconstructing, and in short words, it is the same as destructuring in javascript (e.g. https://wesbos.com/destructuring-objects/), but in C#!

Just as in my post about pattern matching in __C# 7.0__, I'll be using the _Elf_ class which has two properties: _Age_, which is the age and _ElfishName_, which is the elfish name of the elf.

# What is it?
Object deconstructing makes it possible to do this:

```c#
static void DeconstructingElf(Elf elf)
        {
            (int age, string elfishName) = elf;

            Console.WriteLine($"Age: {age}");
            Console.WriteLine($"Name in elfish: {elfishName}");
        }
```

Pretty cool right? You can extract properties from the object without actually accessing the properties by the get methods! What is even better, you can discard properties you don't need. You can do this with the discard operator (which is just a plain underscore) like this:

```c#
(int age, string _) = elf;
```

What actually happens is that _ variables are discarded and thus can't be accessed. On a side note: you can use multiple discard operators in one deconstructing statement.

#Enabling object deconstructing
There is a catch however: object deconstructing does not come out of the box. On the bright side, you only need to implement one method to be able to deconstruct objects of a specific type. This is how you do it:

``` c#
public void Deconstruct(out int age, out string elfishName)
        {
            age = Age;
            elfishName = ElfishName;
        }
```

This method is called the deconstructor which is always named _Deconstruct_ and always returns void. The parameters are all out variables which, inside the method, you assign values to. When actually deconstructing, the values that are returned are always in the order you coded (in the _Deconstruct_ method). So in this case the first variable is an int (the _age_) and the second a string (the _elfishName_.

The actual usage of deconstructing depends on your personal style (and the one of the company you are working for). I do like it but, I don't use it. This is because you need the deconstructor.

# Sources
https://docs.microsoft.com/en-us/dotnet/csharp/deconstruct
Demo project: https://bitbucket.org/aldhaenens/p-d-demo/src/master/
TrackIt - Open Source Lead Management Tool
Tags: opensource, angular, sales
Published: 2020-01-27 11:01:11

Yesterday was a Sunday and a platform I have been using to manage my leads started to want to make me pay for it. Obviously that's not something I am too keen to do except if I have a super good reason for it. So I figured, let's build my own!

I decided to create an Open Source project on Github which you can find here: [github link](https://github.com/mikgross/TrackIt---Lead-Tracking-Platform). It is a one day of work project, so do not expect the moon! However it will be constantly enhanced and I welcome contributions.

## Features
* Pipeline customization
* Lead adding
* Lead drag and drop between pipeline's steps

## Future features
* Aggregated stats and graphics
* Better layout for mobile (it's very buggy) and animations
* Lead categorization
* Sharing pipeline with people
* User role management

## Specificities
* Angular CLI: 8.2.2
* Node: 10.16.2
* OS: linux x64
* Angular: 8.2.14
* @angular/material@8.2.3
* @angular/fire@5.3.0
* lodash@4.17.15
* all the other packages should be default

I have deployed a free to use version (personal and professional) at https://leads.mmpg.xyz and if you feel like deploying it yourself just fork the repo and do whatever you want with it! Don't forget to mention me though :)

Thanks for the read and enjoy tracking those leads down!
Which would be the best tool for, load-recording-testing?
Tags: help, testing
Published: 2020-01-27 10:52:50


In my company, we need to start to make some big performance test. And we need to record the traffic in the production-environment (monolithic java application).

We are using Gatling for some performance-tests. 


Does anyone have any suggestions? 
We are studying tools like: GoReplay, BlazeMeter, Gatling recorder ..