teleren/devto huggingface dataset:
First impressions on Flutter as a React Native dev
Tags: flutter, reactnative, react, dart
Published: 2020-01-24 02:53:14

I have heard a lot of Flutter since a few months ago, as a React Native developer I was not sure on what Flutter was, I literally just knew the basic stuff: google's open source framework for mobile development. So I decided to give it a try just to check out on why there is so much hype about it.

I want to make it very clear that we, as devs, can't rely on just one technology, language or framework and see it as the only thing we need to defend and fight for, no! Frameworks and programming languages are just tools that are out there to serve us and we have to be open-minded towards new ones! That's a vital thing for devs to stay up to date with what's new!

Even though I know that, I can't deny I kind of have a special passion for React Native, so I also knew that that might cause me to have a not-so-good impression on flutter. 

It's important to note that I have studied Flutter for just a few days, like 2 or 3 so my opinion may change completely from today on (and it probably will). I learned the most simple things in Flutter, like how to create a screen, how to set state variables and so on.

With that being said, I'd like to mark a few things that grabbed my attention about it:



# MESSY
I found the dart/flutter code to be very messy and confusing, everything just appears to be a long and endless tree of code and the pieces of code call for other pieces of code from different parts of this tree.
I had that feeling probably because I'm jut not used to how the code is implemented and all the widget thing (EVERYTHING turns out to be a widget and inside a widget you can create other widgets and so on).
__________

# Yaml?
So I had never heard of this yaml type of file, which is basically like the package.json that you get to see in React. The difference is that it looks like a mix of Json and Python. Seriously, I had never heard of that extension, for some reason that shocked me.
_____________

# It's like a puzzle
At some moments I felt like I wasn't doing anything but finding the correct pieces of a puzzle and having them displayed in the screen. It gives you a sensation that everything is already previously made, like all the widgets are already made and you just have to use them, you kind of miss out on the fun of having to create a whole component.
Even though I know that frameworks serve the purpose of doing exactly what I just described above, I did lack the feeling of figuring out how to implement a 'floating action button' for example. 
______________________

# Mixing the UI and state variables
You simply mix both state variables with the code that draws the screen! That seems so wrong to me.
__________________

I obviously came up with a few things that I found intriguing or weird in Flutter but I think that's the reaction when you get exposed to a whole new thing, it definitely will look awkward at first glance. On the other hand I also enjoyed some aspects of Flutter and I'm considering on writing a new post on that soon.


What are your views on Flutter?
Getting Started Using TypeScript with Node.js and Express
Tags: typescript, node, javascript, express
Published: 2020-01-24 02:44:03

In this article, I am going to explain the typescript with nodejs and express.

Setup new project:

npm init

Install typescript package

Node.js engine runs Javascript and not Typescript. The node Typescript package allows you to transpile your .ts files to .js scripts. Babel can also be used to transpile Typescript, however, the market standard is to use the official Microsoft package.

npm install typescript

Update package.json file by adding ‘tsc’ in scripts tag to call typescript functions from the command line.

“scripts”: {
........,
 “tsc”: “tsc”
}

Now run below command:

npm run tsc — — init

This command initializes the typescript project by creating the tsconfig.json file.
Install Express

npm install express @types/express

By default Typescript does not “know” types of Express classes. There is a specific npm package for the Typescript to recognize the Express types.
Create Server.js file(server/server.js)


import express = require(‘express’);
// Create a new express app instance
const app: express.Application = express();
app.get(‘/’, function (req, res) {
res.send(‘Hello World!’);
});
app.listen(3000, function () {
console.log(‘App is listening on port 3000!’);
});


Compile the above code by running below command:

npm run tsc



After running above command a new file is created in server folder named server.js(Mainly Ts code is converted in Js)
Run the app:

node server/server.js

Check on the browser on URL: http://localhost3000


GitHub Link: https://github.com/pankajkrr/nodejs-express-ts


I hope this article will remove the fear of TypeScript to get started in Node.js Express Application.
Thanks!
Event loop in nodejs
Published: 2020-01-24 02:19:11

Nodejs is a single threaded application. That means it executes instructions or all requests with a single thread.
In node js all request or operations are served by one thread that means there is one operation being executed at time. 

So event loop is what allow nodejs to perform non-blocking operations.
Given it uses one thread in serving many requests, the request does not have to wait the completion of the first request, that's where event loop come into existence and allow one request to release the thread while waiting for I/O operations. 

When there is a request, single thread is used to serve it but does not have  to wait its completion once there are some executions being done for that request to complete like waiting for I/O inputs ,the single thread is serving another request.
Once the first request is done with other executions(I/O input are available) there is this event queue where messages notifying that data are now available go. Then the single thread will return to serve the first request.

This event loop allows non-blocking operations by offloading operations to the
kernel whenever possible.The event loop manages events(requests) by taking the first request on list and send it to be served or handled by the only one thread, also if the request is not using the thread that's when it offload event to the thread.  

references: 
https://nodejs.org/uk/docs/guides/event-loop-timers-and-nexttick/
https://nodejs.dev/the-nodejs-event-loop
https://blog.risingstack.com/node-js-at-scale-understanding-node-js-event-loop/
Configurando nome de domínio do hostinger no GitHub Pages
Tags: domínio, hostinger, dns, github
Published: 2020-01-24 01:59:56

---
title: Configurando nome de domínio do hostinger no GitHub Pages
published: true
description: Configurando nome de domínio do hostinger no GitHub Pages
tags: domínio, hostinger, DNS, github
---

Este post visa ajudar quem tiver dificuldade (assim como eu tive) na hora de configurar o nome de domínio comprado pela Hostinger com o GitHub Pages.

Eu tinha criado uma página no GitHub Pages. Para páginas pessoais, o comum é que o endereço de acesso da página seja https://usuário.github.io. Como o meu nome de usuário no github é 12afaelPereira, então o endereço de acesso seria https://12afaelpereira.github.io.

Bom, comprei um nome de domínio recentemente na Hostinger a fim de usá-lo no lugar da minha página. Dessa forma a página ainda estaria hospedada no GitHub Pages, porém agora o acesso seria dado por https://nome.dominio. O domínio comprado foi rafaelpereira.tech, então o acesso seria por meio de https://rafaelpereira.tech.

Dada essa introdução, agora chega a parte da configuração. Foi a primeira vez que fiz isso, então tive um pouco de dificuldade.

Na área Dashboard do hostinger, acesse a opção "Gerenciar" em domínio e entre na Zona DNS.

Aqui, o que deve ser configurado é a área CNAME (Alias) e a área A (Host). Antes eu havia configurado somente o CNAME e não tinha funcionado :(

Em CNAME, para fazer o apontamento do host para sua página, deve-se adicionar um novo campo com o valor "host" igual a '@' e o valor "aponta para" igual ao nome do seu endereço de acesso GitHub Pages. no meu caso foi "12afaelpereira.github.io".

Dessa forma:

@   |   12afaelpereira.github.io

Em A, deve-se criar 4 registros (campos) que apontam para os endereços do GithubPages. Para cada um dos 4 campos, no valor host, adicione '@' e no valor "aponta para" adicione cada um dos 4 IP's do GitHub Pages,

Dessa forma:

@  |  185.199.108.153
@  |  185.199.109.153
@  |  185.199.110.153
@  |  185.199.111.153

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

Na subárea GitHub Pages, dentro da área de configuração do seu repositório GitHub, tem a opção "Custom domain". É nela onde você irá inserir o nome seu domínio. No meu caso foi rafaelpereira.tech. Se quiser também pode marcar a opção "Enforce HTTPS" para forçar seu site a ser acessado com o protocolo https ao invés de http.

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

A partir daí, é só aguardar pela propagação do DNS e poderá acessar sua página com o nome que você escolheu. Isso pode demorar algum tempinho, até algumas horas ou bem menos que isso.

Quando tiver terminado, no repositório da sua página será criado um arquivo CNAME onde irá conter o nome do seu site.

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

Aqui tem um link que me ajudou a entender um pouco
https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site

Espero ter ajudado, caso você tenha tido a mesma dificuldade que eu.
Stop Interrupting Me. 
Tags: productivity
Published: 2020-01-24 01:28:03

As a front-end developer, sometimes the hardest part about my job isn't the work, it's dealing with people and the complications that come with them. Followed by the processes that surround the work, it's a lot to deal with.

When you see me with headphones on at my desk, don't come and tap me on the shoulder unless you're telling me there is a fire and the office needs to be evacuated. If you need help, send me a Slack message or email. Better yet, wait until you see me get up from my desk for a moment.

In my long career I have worked in a wide variety of different environments. The Agile/Scrum environments, open plan offices, closed plan and offices with sales teams ringing stupidly loud bells when they make a sale to the roar of applause from the office.

Distractions are everywhere, which is why all reasonable developers will eventually realise they need to own a good pair of noise cancelling headphones. The kind that could drown out the apocalypse.

So, if you see me wearing headphones don't make me take them off, I'm most likely in the middle of something important.

Don't force me to participate in stand up meetings every morning which serve absolutely no purpose other than to give status updates to micro managing bosses wanting round the clock updates, not much changes in a day. 

Let me come in late and miss the peak hour traffic, let me finish later for the same reasons.

Don't expect me to respond to your emails as soon as you send them. 

Don't expect me to respond to your Slack messages right away either.

For an industry that has so many tools for managing work flow from project management to communication, it's still incredibly distracting. Use the tools or don't, you can't have it both ways.
Make Money with Alexa In-Skill Purchasing 2020
Published: 2020-01-24 01:24:28

Check out my latest tutoriarticle on how to make money with Alexa In-Skill Purchasing!  You'll learn the basic concepts of how to make digital products that your Alexa Skill users will love!

http://alexaskillstutorials.com/2020/01/22/make-money-with-alexa-in-skill-purchasing-2020/

Feel free to give me feedback on this article!
ms edge released - but version numbers are a bit confusing
Tags: browser, edge, beta
Published: 2020-01-24 01:18:31

MS EDGE is now at Version 79.0.309.71 (Official build) (64-bit)
MS EDGE BETA is now at 80.0.361.33 (Official build) beta (64-bit)
MS EDGE DEV is now at Version 81.0.396.0 (Official build) dev (64-bit)

DEV.TO looks fine

![edge & devto](https://thepracticaldev.s3.amazonaws.com/i/t60au5gmexnbt6sayc14.png)
Ben Kimim ?
Tags: project
Published: 2020-01-24 01:12:00

Hakkımdaki detaylı bilgileri içeren web sitemin adresi: https://www.mahmutcan.com.tr

Mahmut Can Kimdir adlı yazımda tüm detaylarıyla özelliklerimi yapabileceklerimi öğrenebilirsiniz.

https://www.mahmutcan.com.tr/mahmut-can-kimdir-neler-yapti-ne-yapabilir
How to expose a field of a child node to the parent node interface using alias on ROKU
Tags: roku, brightscript, beginners
Published: 2020-01-24 01:05:56

---
title: How to expose a field of a child node to the parent node interface using alias on ROKU
published: true
description: short "how to" article about use of alias in Roku development
tags: #roku #brightscript #beginner
---
At the beginning, I would like to say that using alias on ROKU is kinda cool thing to do. Unfortunately, the same could not be said for the title of this blog post.

Let's say that you would like to change the field value of your child component outside of his parent node.
You would also like to avoid doing that with [callFunc](https://dev.to/umitic/how-to-define-a-function-in-component-interface-on-rokubrightscriptscenegraph-dff) or with using observers due to unnecessary boilerplate code.
When you think about it, you actually don't want/need to do any extra stuff besides just changing the value of the field. 
Here is where use of alias can come into play. 

Example:

Here is our child component:
```
<?xml version="1.0" encoding="utf-8"?>
<component name="childComponent" extends="Group">
  <script type="text/brightscript" uri="./childComponent.brs"/>
  <interface>
    <field id="changeMe" type="string" />
  </interface>
</component>`

```

We have a basic `childComponent` that has a field defined on `interface` with the `id="changeMe"` and since we did not defined the value, default value for this field is an empty string.

Now let's add this child component to it's parent.

```
<?xml version="1.0" encoding="utf-8"?>
<component name="parentComponent" extends="Group">
  <script type="text/brightscript" uri="./parentComponent.brs"/>
  <children>
    <childComponent id="childId"/>
  </children>
  <interface>
    <field id="changeFieldInChildComponent" alias="childId.changeMe" type="string" />
  </interface>
</component>
```

Noticed something interesting in the `parentComponent`?
Take a look at this line:
```
<?xml version="1.0" encoding="utf-8"?>
<field id="changeFieldInChildComponent" alias="child.changeMe" type="string"/>
```

Yeah, that little thing is called `alias` and it will allow us to do exactly what we want!

Let's change the value of the `changeMe` field of the child component outside of the parent.

So in a component/node outside of parent which has access to our `parentComponent`, You should be able to to this:

```
m.parentComponent.changeFieldInChildComponent = "I'm not an empty string anymore"
```

And that's it! Field `changeMe` of a `childComponent` now should have the value of `"I'm not an empty string anymore"`.
This also works with native ROKU component fields.
How did You Get Started?
Tags: watercooler
Published: 2020-01-24 00:52:39

---
title: How did You Get Started?
published: true
description: Curious as how you got started
tags: #watercooler
---
Software development and UI work is such a vast field. You can't help to be amazed at all the opportunities and sub-topics software development and UI work offer. What is also amazing is the fact you can do either of those literally anywhere in the world and anyone can do it. Because anyone can do it, it is interesting to learn how people got started since everyone's path is different.

Back in the day, I use to work in a grocery store. I really did think I was going to work there forever. Then one day, they shut the doors for good setting off a chain reaction. A blessing in disguise. 

I then somehow ended up in construction work and after a while, became extremely unhappy. I had no degree at this time and was limited on my options. Searching for what little options that I had led me to a video (I wish I could remember it) about programming and in that moment found what I wanted to do. Interesting fact, I created a [Youtube channel](https://www.youtube.com/channel/UCABtOPMqppBzDsOXmD_Zyiw) a while back for this very reason. To maybe one day change someone's life for the better. Anyway, it ultimately led me to degree in computer science and the rest is history. 

That was my story of how I got started. Kind of wild but well worth every minute. Now that you know mine, how did you get started?
BETT 2020 Day 1 - had a #nocode day today (hehe)
Tags: watercooler, mktg, expo, edutech
Published: 2020-01-24 00:25:38

if you are in education esp tech education or edutainment industry you can check out BETT 2020 on instagram and twitter - and if you want to go its on for two more days in Excel, London, UK

BONUS look very closely at the photo of the @viewsonic stand and you might recognise the website displayed on their 40" touchscreen 

BETT 2020 on SMN & BMN
* https://www.instagram.com/explore/tags/bett2020/
* https://twitter.com/search?q=bett2020&src=typed_query

![viewsonic touch screen showing dev.to website](https://thepracticaldev.s3.amazonaws.com/i/0397qxiqzjrhwxgall6d.jpg)
Lesson 12 Discussion
Published: 2020-01-24 00:24:13

1. How is a method different from a property?


A property expresses an basic quality of an instance, while a method performs an action. Methods have parameters; properties don't. Prefer methods for any call with side effects. If a method does something (for example, it loads, parses, toggles, or prints) or has a verb name, it should not be a property.

2.What is the difference between a type and an instance?

Methods are functions that are associated with a particular type. Classes, structures, and enumerations can all define instance methods, which encapsulate specific tasks and functionality for working with an instance of a given type.
How do you implement REST in an MVC application?
Tags: help
Published: 2020-01-24 00:02:36

Heads up, I have no experience with any of the front-end stacks, I'm just aware of what's trending (React / Angular / Vue)

So far I have only worked with monolithic MVC applications, but not so long ago I learned how to do REST APIs using Spring Boot

What's the workflow to make use of external REST services in an MVC application? 

Let's say I make a basic REST API to handle CRUD

Would the REST calls have to be made in the **controller**? therefore skipping the **model**, or do I call them through the **view** by using ajax? (skipping both the **controller** and the **model**)

I'm honestly confused, I just need some guidance

Please and thank you :)
NOTE: bounded polymorphism
Tags: plt, language, haskell
Published: 2020-01-27 13:22:57

---
title: NOTE: bounded polymorphism
published: true
date: 2020-01-24 00:00:00 UTC
tags: plt,language,haskell
canonical_url: https://dannypsnl.github.io/docs/cs/note-bound-polymorphism/
---

Bounded polymorphism refers to existential quantifiers(∃), restricted to range over types of bound type. To understand it only needs a few examples. Let’s start! Take a look at the following program:

```hs
numSort :: Num a => [a] -> [a]
```

`Num a` is how we represent the bounded polymorphism in **Haskell** , the definition of `Num` was `class Num b where`(Hoogle shows `a`, just prevent to confuse reader don’t familiar with **Haskell** ) could read as **a type `b` is an instance of class `Num`**.

So `numSort` takes `[a]` only if `a` is an instance of `Num`. Now we could run down:

```hs
numSort [1, 2, 3] :: [Int]
numSort [1.1, 2, 3] :: [Double]
```

This is really a powerful feature(and you don’t need to use **Haskell** for this, **Java** also has this feature), consider the old way to do `List<A>` to `List<B>`, and unfortunately solution was to copy each element in the list.
My friend shared a great link last week, here it is...oh, wait.
Tags: discuss
Published: 2020-01-23 23:54:49

- Dude, have you had a chance to check that great UI tips website I sent you last week?
- Ugh, yeah, it's great... (Have no clue what website he is talking about)

-------------------------------------------------------------------------

- Hey, can you resend me that link to a blog about fundraising we talked about last week?
- Sure, let me see where did I send it...Slack, Telegram, Twitter, LinkedIn...?

-------------------------------------------------------------------------
- This is a great post, you gotta check it out!
- Cool, will save it for later
- Nope, check it now, you will forget!
- I won't!

(7623 days later, still haven't checked)

-------------------------------------------------------------------------

If any of these scenarios sound familiar, I think you know what's on my mind.
I think it's a serious problem that:
a) We share great content with our friends and they never check it because one cannot remember to check every link shared on each medium.

b) You remember your friend shared some great content a few weeks back but you have no idea how to find it (ok, you can spend an hour on searching the browser's history, but that's not a solution too)

c) There are no real incentives to change that habit, we got used to bookmarking and saving for later anytime we can, but rarely get back to revise it.

If you feel me, I want to hear from you. I guess I have an idea for an app that might solve it 🤭 

Or maybe you already use some system to manage things people share with you?
🤫How to handle 🗝️ secrets 🗝️ in Node.js (Video Tutorial)
Tags: javascript, beginners, webdev, tutorial
Published: 2020-01-23 23:13:18

Please drop me a line in the comments if you're interested in more video tutorials like this one!


---

Want to get better at Web Development?
[🚀🚀🚀subscribe to the Tutorial Tuesday ✉️newsletter](https://codesnacks.net/subscribe/)
$70,000 in revenue with CSS Scan browser extension!
Tags: showdev
Published: 2020-01-23 22:29:38

---
title: $70,000 in revenue with CSS Scan browser extension!
published: true
description: My browser extension https://getcssscan.com reached $70,000+ in sales! Who said that browser extensions couldn't be monetized?
tags: #showdev
---

My browser extension [CSS Scan](https://getcssscan.com) reached $70,000+ in sales!

Who said that browser extensions couldn't be monetized?

It took me 9 months to get the first $10,000 and just more 9 months to get more $60,000.

Currently has an average monthly revenue of $4,000 but January is already near $10,000!

Now I'm also trying a subscription model on browser extensions with the newest CSS Scan premium product: [CSS Scan Pro](https://cssscanpro.com) (free demo on the website)

Printscreen from Gumroad:
![Printscreen from Gumroad](https://i.imgur.com/V8hjN51.png)

Thanks, everybody, for the support! 💖
Let's make it to $100,000!