teleren/devto huggingface dataset:
How would you tell friends that you're a backend developer? 
Tags: question
Published: 2020-04-02 22:21:01

---
title: How would you tell friends that you're a backend developer? 
published: true
description: Please feel free to Share your opinion
tags: question
---


Hello,

I realize that it is sometimes difficult to convince friends that you're a backend engineer. Like they always want to see the website you built, and the likes.

 So how do you tell them and what are the project you've worked on?
C# - Asserting a value is not null in null-aware code
Tags: csharp, dotnetcore
Published: 2020-04-02 22:14:20

C# 8.0 introduced the long desired ability to annotate reference types as potentially having a `null` value. There is a lot to digest when [making code _null-aware_](https://docs.microsoft.com/en-us/dotnet/csharp/nullable-attributes). Some of it is straightforward, other times, not so much.

One attribute, I found puzzling was the [[NotNull]](https://docs.microsoft.com/en-us/dotnet/csharp/nullable-attributes#specify-conditional-post-conditions-notnullwhen-maybenullwhen-and-notnullifnotnull), which is described as applying to return values. However, it also has a great use for parameters. Specifically, for `null` assertion methods.

Consider the following definition of `AssertIsNotNull()`.
```csharp
void AssertIsNotNull([NotNull] object? nullableReference) {
    if(nullableReference == null) {
        throw new ArgumentNullException();
    }
}
```

With this annotated version, we can now write the following code and get no compiler warnings on potential null access. (NOTE: this code is just for illustration purposes)
```csharp
int MyMethod(string? text) {
    AssertIsNotNull(text);
    return text.Length;
}
```

Effectively, the `[NotNull]` attribute tells the compiler that the `text` value is not null once it has passed the `AssertIsNotNull()` invocation. Since the method throws an exception otherwise, this is a safe statement to make about the `text` parameter.

The motivation for `AssertIsNotNull()` is to avoid using the [null forgiving operator (!)](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-forgiving), which can be hard to track down when used as a suffix.

I've found this pattern quite useful and wish it had been included as an example, but at least, it's easy enough to share here with fellow coders.

Happy hacking!
Using Autofac on Azure Functions
Tags: dotnet, autofac, azure, azurefunctions
Published: 2020-04-02 22:04:37

Reasons to use DI on a software project are numerous, and while one can argue that a micro-service should be so small that no IoC is needed, others may have their reasons to use it. 

Not here to judge which approach is the best, but if you decide that DI is a must on your azure function project, you may find that the native support for DI does not allow you to use a third-party container as easy as you can see on a regular asp-net project. There are some libraries out there, but most uses some different techniques (such as DI using attributes) not alike to the code style on asp-net projects.

That is the reason I decided to write a library to fill this gap, and create an easy DI setup code as similar to asp-net as possible. That means you will be able to create classes with interfaces as parameters of a constructor, without the need of anything else but registering dependencies accordingly. 

Find below a basic function example, observe that classes and functions are not declared as static, and dependencies are passed to the constructor just like in a regular asp-net project. 

```C#
    public class Function1 : Disposable
    {
        public Function1(IService1 service1, ILogger logger)
        {
            // ...
        }

        [FunctionName(nameof(Function1))]
        public async Task Run(
            [QueueTrigger("myqueue-items", Connection = "AzureWebJobsStorage")]
            string myQueueItem
        )
        {
            await Task.Delay(2000);
            _logger.LogInformation($"C# Queue trigger function processed: {myQueueItem}");
        }

        // ...
    }
```

You will also find in the github project, a sample project that demonstrates the `IDisposable` classes being disposed at the end of a function run.

Head to the project's read-me and check out code examples. 

Please feel free to contribute creating issues with feedback and pull requests. 

{% github https://github.com/junalmeida/autofac-azurefunctions %}
Building a better JIRA
Tags: showdev, react, javascript
Published: 2020-04-02 21:04:29

Our next product will be a better version of jira. We are looking into how that will look and how we can make the software place a better world. Yes, we know that this is a big challenge and there will be many bugs and things that need worked on. We also, want some opinion. If you think this is a great product/project to work on what are some things you dislike/like about jira that you would like to see in our new product?
🚀 NEW Launch! NEW UI and more podcasts
Tags: showdev
Published: 2020-04-02 20:57:10

Check out our new look of netcastly.com today! New styling and many more features added! We also added more podcasts and in the future will be adding linking ability to listen to these new podcasts! Any features you want to see? contact us here, twitter, or through info@jhobbie.com! 

Also, do you want to contribute? Were looking for contributors to our awesome platform! let us know on here or email us with resumes and linked to info@jhobbie.com
Collection of Button Hover Effects
Tags: codepen, html, javascript, css
Published: 2020-04-02 20:37:14

---
title: Collection of Button Hover Effects
published: true
tags: codepen,html,javascript,css
---

<p>1. A few examples of flashy hover effects. Currently updating this pen. Work in Progress</p>

{% codepen https://codepen.io/davidicus/pen/emgQKJ %}

<p> 2. Visual rapresentaion of bruteforce hacking (letter per letter), as seen in Hollywood.</p>

{% codepen https://codepen.io/marco_fugaro/pen/XbxNVx %}

<p>3.A discreet twitter button, hidden beneath the icon. Hover to reveal</p>

{% codepen https://codepen.io/tholman/pen/BLeJs %}

<p>4.Button Hover Effects</p>

{% codepen https://codepen.io/aaroniker/pen/bGGVMbY %}

<p>5.These are ten buttons with css hover effects. For the effects are used transitions, text-shadows, animations  and transforms. </p>

{% codepen https://codepen.io/woodelf/pen/JNmaZV %}

<p>6.Awesome button hover effects</p>

{% codepen https://codepen.io/wisnust10/pen/grpaZb %}

<p>7.Six Pure CSS Button Hover Animations</p>

{% codepen https://codepen.io/CTNieves/pen/pbLGZW %}

<p>8.Watch interactive video on Scrimba: <a

{% codepen https://codepen.io/comehope/pen/qJEdKb %}

More Example [gscode.in](https://gscode.in/css-button-hover-effects)
Don't worry about HOW long it takes you to become a programmer!
Tags: webdev, career, javascript, codenewbie
Published: 2020-04-02 20:23:48

The only journey in tech that matters, is your own. Stop comparing yourself to these developers on social media. Some of them are fast learners, Some had a head start. Also, some lie! Stop using social media as the ruler to which you gauge and measure your life on.

A good friend of mine took 6 years to become a software engineer. It took me a little less than a year. Want to know something interesting? Both of our titles are "Software Engineer". His title isn't "Took 6 years Engineer". No. Same title. Same paycheck. There is no reward for rushing through and there is no punishment for taking longer. The ONLY  journey in tech that matters, is your own!

![Teaching developers](https://dev-to-uploads.s3.amazonaws.com/i/9ngj9x5fam0efrb7bdpj.jpg)

The only path that matters is your own. So many people get caught up in the idea of "I need to become a developer in 6 months!", "90 days until I make 6 figures!", "6 weeks until I change my life!". This isn't real. Sure there are some cases where someone really did well and got a job quickly, but for each one of those cases there has to be hundreds that took ten times longer to achieve the same.

Stop under valuing yourself! You are amazing and valuable! You are truly great! Bring value to the table and companies will want you. Increase your skill set and they will be drawn to you and your abilities!

I look forward to seeing you grow.

You may be down, but you haven't sung your last song yet. You haven't shown your best talent yet, you haven't tapped into your abilities yet. It is time YOU shock yourself! Show yourself how great you are!


Follow me on Twitter @DThompsonDev
Hope I can keep motivating and inspiring you.
Gain performance by inline
Tags: android, kotlin, performance
Published: 2020-04-02 19:41:59


Recently watched a video by `Florina Muntenescu` [here](https://youtu.be/wAQCs8-a6mg), regarding `Inline` functions in Kotlin. Wanted to share something I learned here:

A function can be `inlined` with inline keyword. e.g.
```kotlin
inline fun foo(){
}
```

When a function is marked as `inline` it is compiled to the call site . This will decrease memory allocation especially when using lambda expressions in kotlin. If a function is not marked as inline , the compiler will create new function object for it. By inlining the function, compiler will copy the implementation to the call site avoiding the requirement to create new function objects. 

However, we should be careful when using `inline` functions. Inlining large functions increases the size of generated code.
For further reference please watch the video on the link.

Thanks!!
Materiais de apoio para desenvolvimento Java
Tags: java, junior, career, developer
Published: 2020-04-02 19:48:05

Escrito por @leilasoliveira especialmente para @elasprogramam

{% link https://dev.to/leilasoliveira/materiais-de-apoio-para-desenvolvimento-java-4jd8 %}

Olá, meninas!

Prometi um artigo com uma lista de materiais para estudar Java e cá estou eu para cumprir a missão. 😄

Quando comecei a programar em Java, eu fucei a internet atrás de material de apoio, conteúdos gratuitos para iniciantes e me apeguei a alguns materiais que hoje, infelizmente, não estão mais disponíveis. 😩

Porém, fiz uma listinha de alguns locais onde você pode dar seu start pra depois, seguir a minha dica do primeiro post [clica aqui pra ver a dica](https://dev.to/leilasoliveira/como-comecar-a-estudar-java-omh).

Então, bora pra lista!

* [Documentação oficial da Oracle](https://docs.oracle.com/javase/tutorial/)
Claro que esse material é o primeiro da lista. A Oracle é a responsável pela manutenção da linguagem Java e ela disponibiliza todo material possível sobre a linguagem. Muito bom para quem está iniciando e para quem está revendo conceitos para fazer a prova de certificação (falarei sobre isso nos próximos posts). Conteúdo em inglês.

* [Alura](https://www.alura.com.br/)
Artigos free de Java e outros assuntos de tecnologia. Eles também disponibilizam cursos básicos de Java, mediante pagamento. Conteúdo em português 🙌.

* [School of Net](https://www.schoolofnet.com/cursos/programacao/java/)
Alguns dos seus vários cursos são gratuitos, mas precisa de cadastro para acessar. Conteúdo em português 🙌.

* [Baeldung](https://www.baeldung.com/java-tutorial)
Esse site reúne uma série de tutoriais de Java e Spring! Vira e mexe, quando tenho alguma dúvida, caio nesse blog com tutoriais práticos e ajuda muito no dia-a-dia. Essa dica vale para todos os níveis técnicos. Conteúdo em inglês.

####Dica bônus: *HackerRank*
Descobri esse site por acaso e ele é muito legal porque você consegue praticar vááááários conceitos de programação Java (e de outras linguagens de programação) e ainda te coloca num ranking de usuários que conseguiram responder às questões de cada assunto. Para cada assunto há um texto contextualizando o problema a ser solucionado e embaixo há um editor de texto onde você coda e pode rodar alguns testes prontos antes de enviar sua resposta. Depois que você envia seu código de resposta, o site roda vários testes em cima do seu código e te dá um feedback sobre o resultado. Vale muito a pena conhecer para complementar os estudos. Há também uma aba de discussão sobre cada exercício onde a comunidade discute as questões, sanando dúvidas inclusive. Conteúdo em inglês.

Já viu que o inglês é importante, né? Pratique principalmente o inglês técnico, que é esse aí de compreender artigos técnicos.

Tem mais algum material pra indicar? Comenta aqui para eu e outras meninas conhecerem! ❤️
Amazon S3 File Upload using Node.js
Tags: node, react, aws, webdev
Published: 2020-04-02 19:46:04

Amazon Simple storage service(AWS S3) is a popular web service that provides highly scalable,durable and secure file storage system on web. We can use AWS S3 web Services to store files, and it is easy to retrieve from anywhere.
In my Github i upload how to use Amazon S3 file upload using Node.js.
This is my Github Repo  https://github.com/TANTANMOY/AWS-S3
GoStack: E lá vamos nós
Tags: react, reactnative, node, rocketseat
Published: 2020-04-02 19:15:47

Esta semana começou o GoStack da <a href="https://www.youtube.com/channel/UCSfwM5u0Kce6Cce8_S72olg" target="_blank">Rocketseat</a> - "fala dev, blz?" -, e, como parte do projeto, organizar e publicar as anotações faz parte do processo de retenção do que foi aprendido.

Nesta primeira semana foi um aquecimento:
###Preparando os estudos:
1. Faça anotações (recomendo o <a href="https://notion.so/" target="blank_">Notion</a>).
2. Tenha paciência, pois aprendizado é um processo.
3. Mude hábitos (criar um cronograma de estudos e **segui-lo**)
4. Se está fazendo um curso, siga o plano de estudos, não pule aulas.
5. Se possível, ensine o que foi aprendido, isso ajuda a fixar e ver outras dúvidas e perspectivas.
6. Não fique só no mínimo que o curso vai passar (mesmo esse mínimo não sendo pouco), faça um projeto pessoal em paralelo aplicando o que foi visto na aula, leia uma parte da documentação.
7. Faça prototipação (desde mapas mentais até wireframes). No curso foi apresentado o <a href="https://whimsical.com/7ULLoz2uHwLaydFb7NZQbS" target="_blank">Whimsical</a>


###Ambiente de desenvolvimento:
1. <a href="https://nodejs.org/" target="_blank">Nodejs</a>
2. <a href="https://yarnpkg.com" target="_blank">Yarn</a>
3. <a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
4. <a href="https://git-scm.com/" target="_blank">Git</a>


E é isso por hoje =D
Why should one use multiple Variables when you could store everything in an array?
Tags: beginners, javascript, webdev, explainlikeimfive
Published: 2020-04-02 19:11:34

So I just started learning JavaScript (using Angela Yu's Udemy course) and I'm presently learning arrays. So I'd like to know why one would use variables when you could store all the data you need in one array and use the .push to always add since it looks as though JavaScript doesn't have size limit for arrays.

Thanks
NGRX Workshop Notes - Selectors
Tags: angular, javascript, webdev, ngrx
Published: 2020-04-02 19:10:48


- Allow us to query our store for data
- Recompute when their inputs change
- Fully leverage memoization for performance
- Selectors are fully composable

#### Notes

* They are in charge of **transforming the data** to how the UI uses it. State in the store should be clean and easy to serialize and since selector is easy to test this is the best place to transform. Is also makes it easier to hydrate 
* They can transform to complete "View Models", there is nothing wrong about naming the model specific to the UI that they are using
* "Getter" selectors are simple selector that get data from a property on the state

```typescript
export const selectAll = (state: State) => state.collection;
export const selectActiveBookId = (state: State) => state.activeBookId;
```

* Complex selectors combine selectors and this should be created using `createSelector`. The function only gets called if any of the inputs selectors are modified

```typescript
export const selectActiveBook = createSelector(
    selectAll,
    selectActiveBookId,
    (books, activeBookId) =>
        books.find(book => book.id === activeBookId)
);
```

* Selectors can go next to the component where they are used or in the reducer file located in the `state` folder. Local selectors make it easier to test

* Global selectors are added in the `state/index`.

```typescript
export const selectBooksState = (state:State)=> state.books;
export const selectActiveBook = createSelector(
    selectBooksState,
    fromBooks.selectActiveBook
)
```

* When using the selector in the component is recommended to initialize in the constructor. If using the strict mode in TypeScript, the compiler will not be able to know that the selectors where initialized on `ngOnInit`
NGRX Workshop Notes - Reducers
Tags: angular, javascript, webdev, ngrx
Published: 2020-04-02 19:09:26


- Produce new states
- Receive the last state and next action
- Switch on the action type
- Use pure, immutable operations

#### Notes

* Create separate reducer per feature
* Should live outside the feature because the state it is shared in the whole application
* State should save the model as it comes from the API. This can be later transformed into the selectors.
* Combine actions that can use the same reducer

```typescript
  on(BooksPageActions.enter, BooksPageActions.clearSelectedBook, (state, action) => ({
          ...state,
          activeBookId: null
   })),
```

* Only reducers can modify state and it should do it in an immutable way
* Create helper functions to handle the data manipulation of collections.

**_Example_**

```typescript
const createBook = (books: BookModel[], book: BookModel) => [...books, book];
const updateBook = (books: BookModel[], changes: BookModel) =>
    books.map(book => {
        return book.id === changes.id ? Object.assign({}, book, changes) : book;
    });
const deleteBook = (books: BookModel[], bookId: string) =>
    books.filter(book => bookId !== book.id);
    
...

    on(BooksApiActions.bookCreated, (state, action) => {
        return {
            collection: createBook(state.collection, action.book),
            activeBookId: null
        };
    }),
    on(BooksApiActions.bookUpdated, (state, action) => {
        return {
            collection: updateBook(state.collection, action.book),
            activeBookId: null
        };
    }),
    on(BooksApiActions.bookDeleted, (state, action) => {
        return {
            ...state,
            collection: deleteBook(state.collection, action.bookId)
        };
    })
```
#### Feature reducer file
  * Declares a `State` interface with the state for the feature
  * Declares an `initialState` that included the initial state
  * Declare a feature reducer that contains the result of using `createReducer`
  * Exports a `reducer` function that wraps the reducer created. This is needed for AOT and it is not needed when using Ivy.

**_Example_**

```typescript
export interface State {
    collection: BookModel[];
    activeBookId: string | null;
}

export const initialState: State = {
    collection: [],
    activeBookId: null
};

export const booksReducer = createReducer(
    initialState,
    on(BooksPageActions.enter,
        BooksPageActions.clearSelectedBook, (state, action) => ({
        ...state,
        activeBookId: null
    })),
    on(BooksPageActions.selectBook, (state, action) => ({
        ...state,
        activeBookId: action.bookId
    })),
);

export function reducer(state: State | undefined, action: Action) {
    return booksReducer(state, action);
}

```

- The index file defines the state and assigns each reducer to a property on the state

```typescript
import * as fromBooks from "./books.reducer";

export interface State {
    books: fromBooks.State;
}

export const reducers: ActionReducerMap<State> = {
    books:fromBooks.reducer
};

export const metaReducers: MetaReducer<State>[] = [];
```
Got a "TypeError: 'get peerIdentity'" in EmberJS and not in Svelte. Do you know why?
Tags: javascript, webdev, help
Published: 2020-04-02 18:55:48

Hi! This is the first time I'm asking a question here at DEV :) Hope you can shed some light on this thing.

## Context

I'm working on a personal project that uses the [Twilio Video API](https://github.com/twilio/twilio-video.js). This project was started using [Svelte](https://svelte.dev/) and everything was really fine and working.

However, I had to move the project to another JavaScript framework/library after facing issues related to Webpack and the most up to date Svelte router libraries I could find.

I decided to move the code to EmberJS. At first, it was going good BUT

![now what](https://media.giphy.com/media/c5gKu4AQ4Y64g/giphy.gif)

when I imported the `twilio-video` package in a class file, this error appeared in the browser and halted the execution of the app:

```
TypeError: 'get peerIdentity' called on an object that does not implement interface RTCPeerConnection.
```

Of course, I [found a related issue](https://github.com/twilio/twilio-video.js/issues/811) in the library GitHub page and it suggested upgrading to a recent version. I did it but the error didn't go away. I even downgraded the library to the same version I was using in the Svelte project but it kept happening.

{% github https://github.com/twilio/twilio-video.js/issues/811 %}

## Funny Thing is...

Just out of curiosity, I tried the complaining version `twilio-video 2.0.0-beta16` in the Svelte project and guess what? It worked!

With Svelte the error doesn't happen!

![wizard](https://media.giphy.com/media/KG6HkaEDB7bDG/giphy.gif)

But I'm still stucked in the EmberJS app so I need a solution to keep going.

Fortunately, the Twilio Video library can be used with a CDN and I proceeded to use it that way. The error keeps showing up but it doesn't halt the normal execution of the EmberJS app.

## Questions

So now I face the question Why does this happen in EmberJS and not in Svelte? To my knowledge, Svelte is kind of a compiler and that could be related.

Is there a way to keep using the NPM version of the library in a way that the error doesn't break the app?