teleren/devto huggingface dataset:
11ty Feedback: A starter project for exchanging meaningful feedback
Tags: html, css, netlify, showdev
Published: 2021-04-04 18:52:53

---
title: 11ty Feedback: A starter project for exchanging meaningful feedback
published: true
description: Company ran feedback processes are often less than ideal. Why not run our own?
tags: html, css, netlify, showdev
//cover_image: https://direct_url_to_image.jpg
---

[Show me the demo!](https://11ty-feedback.netlify.app/)
[Show me the code!](https://github.com/tmns/11ty-feedback)

## What's all this ruckus?

Corporate style feedback processes can often be cold, invasive, and ultimately unfulfilling. 

Typically feedback gets collected in the form of a _performance review_, which your manager, along with your manager's manger, and you manager's manager's manager (you get the point) have access to, even though it may be something you consider quite personal. 

Further, the possibility that those in positions of power may read this feedback can influence both what the feedback-giver writes and how the feedback-receiver copes with the process as a whole. Reviews can cause anxiety, stress, and fear.

In a sentence: traditional reviews can be awful.

Giving and receiving feedback should be a sincere moment of mutual exchange, support, and learning! Both sides should feel as comfortable and safe as possible while fulfilling their parts.

## So...

I put together a lightweight [11ty starter project](https://www.11ty.dev/docs/starter/) that gets you up and running with a way of carrying out your own (better) feedback process! 

All you need to do is set your goals, deploy to [Netlify](https://netlify.com), and send the link to those you would like feedback from.

You can check out a [live demo here](https://11ty-feedback.netlify.app/).

This project in turn hopes to provide a quick-and-easy means of attracting and receiving sincere, helpful feedback.

While ideally such a process would take place in person, for a lot of us that isn't an option these days. Using this site over a video call however could be a decent alternative.

## How?

The feedback process implemented is inspired by an [amazing post by Chelsea Troy titled Attracting Feedback](https://chelseatroy.com/2018/11/26/leveling-up-skill-14-attracting-feedback/), in which she goes into great detail explaining the benefits of using a goal-based feedback process. 

If you haven't read this post yet, I highly  encourage you to do so before the next time you plan on asking for feedback. Also note, if you're preparing to give feedback, Chelsea has written [other in-depth posts that look at all sides of the feedback process](https://chelseatroy.com/tag/feedback/).

Finally, if you're more interested in the technical bits, you can see some relevant info at the [template's repo](https://github.com/tmns/11ty-feedback).
Isolate and Dart Http Server 
Tags: dart, isolate, dartlang
Published: 2021-04-04 18:34:31


I have explained various things so far. how to start http server and to start https server and to get SSL and to run isolate.

In this time,  I want to explain, how to run http server with isolate.  



# Hello Isolae Http Server 

But, it is not so difficult, because Dart 's HttpServer class support isolate.

you can do it just by seting shared option is true,    

```dart
import 'dart:io' as io;
import 'dart:isolate' as iso;

onIsolateMain(message) async {
  var server = await io.HttpServer.bind("0.0.0.0", 8080, shared: true);
  await for (var request in server) {
    print("${request.uri}");
    request.response.write("${message}");
    request.response.close();
  }
}

main() async {
  var server = await io.HttpServer.bind("0.0.0.0", 8080, shared: true);
  server.listen((request) {
    print("${request.uri}");
    request.response.write("parent");
    request.response.close();
  });
  //
  for (int i = 0; i < 10; i++) {
    iso.Isolate.spawn(onIsolateMain, "${i}");
  }
}
```

```
$ curl http://tetorica.net:8080/
parent
$ curl http://tetorica.net:8080/
1
$ curl http://tetorica.net:8080/
0
$ curl http://tetorica.net:8080/
4
```

Dart's HttpServer distribute access to server object.
Travailler avec les dates en Python
Tags: python, programming
Published: 2021-04-04 18:16:22

La gestion des **dates** est sujet qui peut devenir complexe en programmation. Vous aurez certainement besoin de gérer les dates dans vos applications. Ainsi une bonne maîtrise est un atout pour le développeur.

Dans cette article article, je vais vous montrer de façon simple comment manipuler les dates dans le langage Python. Pour ce faire, nous allons supposer que nous voulons afficher dans le terminal la date actuelle et ensuite séparer cette date en année, mois et jour.

# Importer le module `datetime` de python

Importer le module `datetime` de python et renommer le en `dt` (ce serait pénible de devoir à écrire datetime à chaque fois)

```
import datetime as dt
```

Pour obtenir la date actuelle, il nous suffit de faire:
```
// dans le module dt on appelle la classe datetime et sa fonction // now
now = dt.datetime.now()

// On affiche le résultat dans la console
print(now)
```

Si nous voulons l'année, le mois et le jour séparément, on tape juste les ligne suivante:

```
year = now.year
month = now.month
day = now.day

print(now.year)
print(now.month)
print(now.day)
```

Si nous exécutons tous ce code en console, on obtient le résultat suivant:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4ova30achg1n2t46er1.png)


### Code complet

```
import datetime as dt

now = dt.datetime.now()
print(now)

year = now.year
month = now.month
day = now.day

print(now.year)
print(now.month)
print(now.day)
```
Comment faire des get request en python
Tags: python
Published: 2021-04-04 18:14:15

Savoir faire des requêtes HTTP est une compétence importante en développement informatique. les API sont partout et dans vos travaux de développement, vous aurez à les utilisées constamment.

Dans cette article je vais vous montrer comment faire des **get request** en python.

Nous utiliserons l'api [kanye.rest](https://kanye.rest/) qui renvoie une citation de kanye.


# Faire une get request

les **get request** sont des requêtes qui permettent d'obtenir quelque chose du serveur.

Pour faire un **get request**, nous pouvons suivre les étapes suivantes: 

1.**Importer la librairie `requests`**

```
import requests
```
1.**Effectuer la requête**

Nous appelons la méthode **get** de la librairie **request** et passons en paramètre notre endpoint (url) `https://api.kanye.rest/`

nous stockons ensuite la réponse de cette requête dans la variable response.

```
response = requests.get(url='https://api.kanye.rest/')
```

si vous ouvrez cette url, vous verrez la réponse suivante dans votre navigateur

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc7jf6tk2ssxgevtujvn.png)

cette url renvoie une citation en format json. Donc ce que nous devons faire c'est de convertir ce json en donnée compréhensible.
Cela se fait avec la commande suivante:

```
data = response.json()
```

nous stockons le résultat dans la variable data.

Mais avant cela, il est important de ce rassurer que notre code gère les erreurs, car il peut arriver que nous n'ayons pas de connection internet ou que le serveur qui héberge notre api tombe en panne. En python, cela se fait de la manière suivante:

```
response.raise_for_status()
```

L'élément qui nous intéresse dans cette api est `quote` tel que vu dans l'image précédente. Nous accédons à cette donnée de la façon suivante:

```
quote = data['quote']

// On affiche cette variable dans la console
print(quote)
```


Voilà, maintenant vous savez faire des *Get request* en python.

Dans les prochains articles, nous verrons comment faire d'autres requêtes notamment des **Post request**.
Shortcuts can take you longer
Published: 2021-02-26 19:13:56

![Shortcuts can take you longer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6sc98v6a2zzlxlp1nb22.png)

Yesterday my manager pinged me at 5pm about an urgent task. He's a big advocate of work life balance, so if he asks you something at 5pm, it must be important.

The task was straightforward. To not revealing anything about the business, all I could say is that it's an analogy of "for all tables, find all rows where column `fruit` = `BlueBerry`".

"The task is urgent. It's 5 pm. What's the *shortcut*?" - I thought.

"No way I would write a script now. Let's get the task done." - I reminded myself of [that xkcd](https://xkcd.com/1205/).

Since the query was simple, and not all tables contain the column `fruit`, so my shortcut was opening DataGrip, visually checking each table to see if they have that column, and executing this query `select count(*) from <table> where fruit = 'BlueBerry'`.

It sounded easy-peasy and it just required some patient, right? Turned out it was not a shortcut at all.

As we didn't create index for those columns, the query took 2 minute per table. I had to open many DataGrip query consoles and fired up a spreadsheet to keep track of the progress.

And worse, half way done I noticed that there was a table where the column was `fruit_code`, not `fruit`. Shoot! I must have missed similar columns. Now I had to restart the progress. And it was officially a big mess.

If I had not made a shortcut, if I had put more thoughts and "over-engineered" it, I would've written a script that queried the catalog to find the tables containing `%fruit%`-like column, then ran the `select count(*)` for each of those tables. I would be able to run the select queries in parallel after I realized they were slow. If I made a mistake, I would be able to correct it by modifying and re-running the script. These were many benefits of a proper script, and I haven't talked anything about reusability.

This was not the first time my short term solutions had caused more harm than good. There's nothing wrong with taking shortcuts when the timeline is tight. My mistakes are setting completion time expectation too tight, and letting that fake urgency affects my judgements.

Let's talk about deadline. Almost all deadlines in American corporates are artificial. Teams delay their projects all the time, and even if they deliver it's usually a simplified version compared to their plan. If I had to simplify my job descriptions, it would be displaying some data from a database to some business persons' screens. What could go wrong if I take several more hours to complete a task? If a task were that important and urgent to them, they would have create a high severity ticket and escalate it.

Urgency does have benefits. For me it could ignite some fire and make me focus easier. But be mindful when you start taking shortcuts. It's not the shortcuts that are harmful, it's the lazy thinking you start having when you say yes to shortcuts. Lazy thinking could lead you to the longer roads, and sometimes the wrong ones.
Javascript Timer APIs
Tags: javascript, webdev, beginners, programming
Published: 2021-04-04 18:12:17

Hello Developers!! Today we will discuss the different timers API used in Javascript

- setTimeout
- setInterval

## setTimeout

It delays an operation for a certain amount of time which is passed as a parameter.

It takes two parameters:
- a function
- delay time in millisecond

```javascript
setTimeout(()=>{
    console.log("setTimeout in action");
}, 2000)
```

In the above code snippet, it will print to the console after 2000 ms.

Now look at another example of `setTimeout`:-

```
let myFunc = (num1, num2) => {
    console.log(num1, "---", num2);
}

setTimeout(myFunc, 2000, 2, 3);
```

![setTimeout2.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1617552533014/PsMaFdsen.gif)

If you pass more than 2 parameters in the `setTimeout` then this will eventually become the parameters of the `myFunc`.


## setInterval

It puts a delayed operation in a loop

```javascript
setInterval(()=>{
    console.count("setInterval in action")
},2000);
```

![setInterval.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1617554182926/ZxxSsrBG0.gif)

## Wrap Up!!

Thank you for your time!! Let's connect to learn and grow together.

[LinkedIn](https://www.linkedin.com/in/anuradha-aggarwal-4a2751107/) [Twitter](https://twitter.com/Anuradh06359394)
[Instagram](https://www.instagram.com/blogcode404/)

[![Buy-me-a-coffee](https://cdn.buymeacoffee.com/buttons/v2/default-blue.png)](https://www.buymeacoffee.com/anuradha2612)
How to Become a Mobile App Developer by the end of 2021
Tags: reactnative, mobile, career, onlinecourses
Published: 2021-04-04 17:52:20

By the end of this article, you will know a definite path, courses, techniques, and tools to become a mobile app developer. Today to become a mobile app developer there are multiple programming languages/frameworks available to learn. But in this article, I am going to focus on learning one programming language and its framework – JavaScript and React Native.


### The Path
Let me introduce you to the technologies/programming language/framework need to learn to become a Mobile App Developer.

* JavaScript – Programming Language
* React Native – Mobile App Framework
* React Navigation – Routing, and navigation for your React Native apps
* React Hooks – Allow you to access state in functional components
* React Context APIs or Redux – State Management

If you already have experience in JavaScript, you can directly start to learn React Native Course(which I am going to suggest later in this post )

### Courses
[Link to the complete blog post] (https://peerup.online/how-to-become-a-mobile-app-developer-by-the-end-of-2021/)
Contributing to Open Source
Published: 2021-04-04 17:51:42

Over the past two weeks, I've made my first 3 commits to a real, open source project. Open source has been something I've been passionate for around 2 years now, and its one of the trends in technology right now that I really enjoy learning more about. Today, I'm going to talk about what it's like to contribute to open source software, and how you can get started.

## The First Commit
I think the easiest way to get started is do something completely irrelevant to the code. Let's say you find a cool project on GitHub, and you want to get involved. Don't start by trying to find the biggest software bug in their system or trying to solve an issue that's been in the queue for months with no one being able to fix it. These bugs will kill your spirit, since you have no idea what the intricacies of the project are. Start by finding a super simple issue in the queue that no one wants to waste time on, or even fix a typo in the README or on one of the pages. For example, my first commit to [HAX](https://github.com/elmsln/lrnwebcomponents) was changing the word "You're" to "Your" in one of the demos. Stuff like this will help you get your name on the project, and you'll begin to understand the layout of the project and the other contributors.

## Get Connected
I can't really say much about this, since the founder of the project I worked on is my professor. However, if you can find someone to message that is a consistent developer on the project, you will save yourself a lot of trouble. People who are passionate about a project will want to help you. They'll tell you what issues to go after, what future development tasks you could start, or help you when you get stuck. Don't be afraid to reach out, because developers need help on these things. Open source relies on the idea that your project can get contributions from people outside your team.

## Big Projects are Fun to Work On
If you can find a sizable project that really interests you, you'll get a ton out of it. I love personal projects and creating random ideas that I have, but these things are short lived usually. I don't work out all the kinks. I hack it together, and go "Look what I made! Click that! Whoa nice transition!" and then forget about it. With a real project, you can get your hands dirty, mess with the code, add a cool feature, and people will actually use it. There's a different kind of joy you get, cause you know the project won't be a forgotten graveyard in someone's GitHub. Find something you love and dive into it when you start to get comfortable. I promise you'll enjoy it more than work and more than your other projects, because it's some of the most meaningful code you'll ever write.

So that's my introduction to contributing to open source. I'm still new, but this certainly won't be the end of my open source development journey. I hope you enjoy working on this stuff as much as I do!

## The Repo and My Recent Contribution
{% github elmsln/lrnwebcomponents %}
{% youtube 5XL7ecQXUh8 %}
3-2-1 Newsletter: Javascript array methods, productivity tools & a telegram bot!
Tags: javascript, node, programming, productivity
Published: 2021-04-04 17:41:58

### Hi There!👋🏾

Welcome to my blog newsletter where every week, I share a 3-2-1 **curated list** consisting of my content and also what resonated with me over the last week. In this week's post, we have **3 tweets**, **2 tools** that I use regularly, and **one video** that I am sure you would like to explore!

#### 3 tweets

1] Use the array **splice** method to delete items from an array and also add other elements in that position.

{% twitter 1376910263333515278 %}

2] The **unary + operator** in Javascript can be used to convert strings into numbers

{% twitter 1378055770500079619 %}

3] **Comparing two arrays** in Javascript and check for their equality

{% twitter 1377320319363342336 %}

#### 2 tools

1] Ever wondered how you could create **beautiful-looking** code snippets? Carbon is your tool!

👉🏾 [Carbon for code snippets](https://carbon.now.sh/)

2] Want to organize all your **links, bookmarks, unread articles** in one place? Pocket app to the rescue!

👉🏾 [Pocket - save for later](https://getpocket.com/)

#### 1 video
This will help you create your own telegram bot and monitor your deployments in less than 8 minutes!

{% youtube C2XolTulVlI %}

If you liked that curated list, make sure you **follow me** on [Twitter](https://twitter.com/Kokaneka) so that you get the code snippet in your feed the day I post it, instead of later down the week as a part of this newsletter.

[![My Twitter profile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkll7la8e4thkpqi44wt.png)](https://twitter.com/Kokaneka)

Hope that helped! As always, keep rocking.
Cheers :)
About Dart's  Isolate (1)
Tags: dart, isolate, dartlang
Published: 2021-04-04 17:39:09

I want to explain about How to distribute the load with Isolate.
And  In this Document, I'll confirm about isolate basic usage before explain it.


# Hello Isolate 

We can write multi-threads like programming code to use Isolate.

```dart
import 'dart:isolate' as iso;

onMain(message) async {
  //
  print("child:arg:${message}");
  for (var i = 0; i < 5; i++) {
    await Future.delayed(Duration(milliseconds: 100));
    print("child:print:${i}");
  }
}

main() async {
  iso.Isolate.spawn(onMain, "Hi");
  for (var i = 0; i < 5; i++) {
    await Future.delayed(Duration(milliseconds: 100));
    print("parent:print:${i}");
  }
}
```

```
$ dart bin/main_example_isolate_01.dart 
child:arg:Hi
parent:print:0
child:print:0
parent:print:1
child:print:1
parent:print:2
child:print:2
parent:print:3
child:print:3
parent:print:4
```

- code   
https://github.com/kyorohiro/hao_dart_server_and_systemd/blob/master/bin/main_example_isolate_01.dart


# Communication For Each Isolate

Parent Isolate and Child Isolate can not share memory.
if you want to share data both isolate, you must to use SendPort and ReceivePort.
 

```dart
import 'dart:isolate' as iso;

onMain(message) async {
  //
  print("child:arg:${message}");
  iso.SendPort sendPort = message['p'];
  for (var i = 0; i < 5; i++) {
    await Future.delayed(Duration(milliseconds: 100));
    print("child:print:${i}");
    sendPort.send("hi${i}");
  }
}

main() async {
  iso.ReceivePort receivePort = iso.ReceivePort();
  receivePort.listen((message) {
    print("parent:onMessage: ${message}");
  });
  iso.Isolate.spawn(onMain, {"v": "Hi", "p": receivePort.sendPort});
  for (var i = 0; i < 5; i++) {
    await Future.delayed(Duration(milliseconds: 100));
    print("parent:print:${i}");
  }
  receivePort.close();
}

```

```
$ dart bin/main_example_isolate_02.dart 
child:arg:{v: Hi, p: SendPort}
parent:print:0
child:print:0
parent:onMessage: hi0
parent:print:1
child:print:1
parent:onMessage: hi1
parent:print:2
child:print:2
parent:onMessage: hi2
parent:print:3
child:print:3
parent:onMessage: hi3
parent:print:4
child:print:4
parent:onMessage: hi4

```


- code   
https://github.com/kyorohiro/hao_dart_server_and_systemd/blob/master/bin/main_example_isolate_02.dart

# Next

More Isolate
https://github.com/kyorohiro/hao_dart_server_and_systemd/blob/master/bin/main_example_isolate.dart
Quick Update on Flutter Webview - (PART 5) & Migration to Null Safety.
Tags: flutter, techwithsam, beginners, tutorial
Published: 2021-04-04 17:35:19

In this video, I am going to do a quick update on the flutter webview tutorial series  and migrating our project to null safety
We're going to learn how to convert a website to an app using flutter, part four of the series - Flutter webview tutorial.

Thanks for watching, please do subscribe, like, comment, and share. If you have any complaints kindly comment below and if you also want us to make any adjustments let us know in the comment section below. Thanks

[Subscribe to my Youtube Channel](https://youtube.com/c/TechWithSam): https://youtube.com/c/TechWithSam

Full Flutter Webview Tutorial Playlist:
https://youtube.com/playlist?list=PLMfrNHAjWCoB6roLO1soz6RMc5BdnU9pk

Source Code - Show some ❤️ by starring the repo and do follow me 😄
https://github.com/techwithsam/custom-icon-with-bottom-navigation-in-flutter

Read Article ✍:
Hashnode - https://techwithsam.hashnode.dev/
Medium - https://techwithsam.medium.com/
Techpadi - https://techpadi.africa/author/acctgen1/

🔗 Social Media / Let's Connect 🔗
📂 GitHub: https://github.com/techwithsam
📱 Twitter: https://twitter.com/techwithsam_
📱 Facebook: https://facebook.com/techwithsam
📝 LinkedIn: https://linkedin.com/in/techwithsam
📸 Instagram: https://instagram.com/techwithsam_
⭐ WhatsApp: https://wa.me/message/JLGQNNTPG64IH1
daily.dev --- dev.to --- hackernon = @techwithsam

Join the Flutter Developer's Community 
Facebook - https://www.facebook.com/groups/flutterdevsgroup
WhatsApp - https://chat.whatsapp.com/Cns1jo7dc5dCNrg6aG44My
Telegram - https://t.me/flutterdevsgroup
Signal - https://signal.group/#CjQKILccbSu9GnMF_qVrkdCFVQ_i2gmnigPDvweCy86JGpL3EhBg39kp1rftGQgZDYXLty7t

Subscribe to my Telegram channel: https://t.me/techwithsam1

**#flutter #bottomnavbar #techwithsam**
Optional values in EJS templates
Tags: ejs, web
Published: 2021-02-19 14:46:14

---
title: Optional values in EJS templates
published: true
date: 2021-02-19 13:07:11 UTC
tags: ejs,web
canonical_url: https://www.solarwinter.net/ejs-and-optional-values/
---

For my current tinkering project I'm using [EJS](https://ejs.co/) with [hapi](https://hapi.dev/). Up until now I've been writing front-end code with [Vue](https://vuejs.org/) (or occasionally [Svelte](https://svelte.dev/)) with an Express back-end, so this is a change for me. There are downsides but definite upsides - I'll try and write about those another time.

In the meantime, one difference I found is how they handle optional values. In the case of (for example) Vue a `v-if` handles both undefined and "falsy" values.

```vue
<router-link v-if="!loggedIn" to="/register">Register | </router-link>

```

But that doesn't work for EJS - the equivalent template throws an error:

```ejs
$ cat test.ejs
<% if (message) { %>
  <h3><%= message %></h3>
<% } %>

$ npx ejs ./test.ejs
ReferenceError: ejs:1
 >> 1| <% if (message) { %>
    2| <h3>Message: <%= message %></h3>
    3| <% } %>
    4|

message is not defined

```

Instead, what you need to do is check for `locals.message`:

```ejs
<% if (locals.message) { %>
  <h3><%= locals.message %></h3>
<% } %>
```

and all is well, both with no value and with a value:

```sh
$ npx ejs ./test.ejs

$ npx ejs ./test.ejs message="Hello world"
<h3>Message: Hello world</h3>

```