teleren/devto huggingface dataset:
Job Search Week 19
Tags: makers
Published: 2020-06-30 13:03:36

This week I worked on another API thoroughly testing it with Jest and supertest. I found jest easy to use and I think I'll use it from now on.

Day 1

I had started this project over the weekend so I had got a little bit of it done already. On Monday I connected the project to the database and started debugging using a VScode extension "Jest Runner" I was able to use the breakpoints to view the code at certain stages of the test which made debugging a lot easier.

Day 2

On Tuesday I started with a test for error handling using a try/catch block as well as adding a middleware for the error message. I also added the getAllTodos function for the todos, I had already done the post function over the weekend.

Day 3

I decided to update some of my readmes and my projects guide repo on Wednesday to show off some of the other projects I've been doing. Next week I'm gonna be doing job applications so it's best to be prepared.

Day 4

I then handle the getTodoById function adding in the error handling for if you try to get a todo with an invalid ID. I was quite familiar with Jest at this point as some of the tests were quite similar.

Day 5

 On Friday I continued working on my todo API adding the update function for while making sure it was returning soon and errors were being caught and displayed.

Summary

Overall I was happy with this week I'm significantly more comfortable using jest and I'm confident to start building a full-stack project using an API. Next week I plan to do a lot of cover letters and job applications.
Very simple mesh service for Kubernetes 
Tags: kubernetes, servicemesh, armv7, amd64
Published: 2020-06-30 12:56:00

---
title: Very simple mesh service for Kubernetes 
published: true
description: Very simple mesh service dedicated to Kubernetes and Rest API service.
tags: kubernetes,servicemesh,armv7,amd64
cover_image: https://blog.medinvention.dev/content/images/2020/06/sms-3.gif
canonical_url: https://github.com/mmohamed/k8s-sms
---
OMDb-search (JS code demo)
Tags: javascript, async, json, xhr
Published: 2020-06-30 12:52:10

JavaScript demo: search for movies in The OMDb (The Open Movie Database).

So finally I "finished" one of my learning projects in a way it can actually be useful to someone.

It uses some important features of ES6, namely JS modules and asynchronous XHR. I intentionally avoided using the new Fetch API to show how the old good XHR can be transformed into async mode, it shows nicely how promises work in modern JS. It also uses the WebStorage API (localStorage - for storing the API key to browser) and the Web Animations API for the loader animation.

GitHub project page: https://github.com/Amarok24/OMDb-search

Screenshot:
![OMDb-search](https://dev-to-uploads.s3.amazonaws.com/i/sxhodtfveojo6sld9lh0.png)
What is the Procedure of Setting Up a Schema Markup?
Tags: typescript, startup, showdev
Published: 2020-06-30 12:51:54

Hello, I want to creat a schema Markup for my website https://www.amogue.com/ 

I'm still finding it some issue regarding the uploading of the schema markup as the schema which I've added doesn't show the elaborated structure. If you have any suggestions regarding this, please let me know.
Vim Survival Toolkit
Tags: cheatsheet, vim, linux, devops
Published: 2020-06-30 12:48:28

TL;DR Skip to the <a href="#commands">commands</a>.

---

I used to hate Vim. 

Back when I was in CS school, teachers took great pleasure in forcing us to use this dinosaur tool that you can only despise after 5 minutes of use. But nowadays I can thank my teachers for getting all this knowledge into my head.

Indeed, you don't always have the opportunity to have an Atom, a VSCode or a PHPStorm to edit a file.
Sometimes, you have to log in with SSH on a production server to remove a "," from a configuration file that is currently rendering the said server unusable.
And then the ony editor at your disposal might be Vim.

There are people who use Vim as an IDE, but I'm not among them. Instead, I have a basic knowledge of it that allows me to do only
the very necessary and most simple stuff. Editing, moving around, saving, and most importantly when it comes to Vim: quitting.

The commands below are, in my humble opinion, the only essential commands you need to know in order to survive with Vim.

<a name="commands"></a>

## Editing

- <kbd>i</kbd> 👉 start editing at the current position
- <kbd>a</kbd>  👉 same but moves the carret to the next char

## Exiting

- <kbd>ESC</kbd>  👉 gets you back in "command" mode and stops edition of the file
- <kbd>:</kbd><kbd>q</kbd><kbd>↩️</kbd>  👉 quit
- <kbd>:</kbd><kbd>q</kbd><kbd>!</kbd><kbd>↩️</kbd>  👉 quit even if changes were made
- <kbd>Z</kbd><kbd>Z</kbd><kbd>↩️</kbd>  👉 save and quit

## Searching

- <kbd>/</kbd><samp>something</samp><kbd>↩️</kbd> 👉 Finds "something" in the file and moves the carret to the first found occurrence
- <kbd>n</kbd> 👉 Finds the next occurrence of the word you searched for and moves the carret to it
- <kbd>N</kbd> 👉 Previous

## Undoing

- <kbd>u</kbd> 👉 Undo
- <kbd>Ctrl</kbd> + <kbd>r</kbd> 👉 Redo

## Moving

- <kbd>G</kbd> 👉 Go to the end of the file
- <kbd>g</kbd><kbd>g</kbd> 👉 Go back to the start of the file

## Playing with lines

- <kbd>o</kbd> 👉 Insert a new line below the carret
- <kbd>O</kbd> 👉 Insert new line above the carret
- <kbd>d</kbd><kbd>d</kbd> 👉 Remove the current line
- <kbd>5</kbd><kbd>d</kbd><kbd>d</kbd> 👉 Remove 5 lines starting from the current line (but you can enter any number you want)

These commands have allowed multiple production servers to be saved over the last 15 years 😁
NetSquid: The Network Simulator for Quantum Information using Discrete events
Tags: quantum, network, simulator, release
Published: 2020-06-30 12:41:06

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

We're happy to announce that a beta release of the quantum network simulator NetSquid has just been made freely available for non-commerical use! :tada:

NetSquid -- *the Network Simulator for Quantum Information using Discrete events* -- is a software tool for the modelling and simulation of scalable quantum networks developed at QuTech. The goal of NetSquid is to enable scientists and engineers to design the future quantum internet as well as modular quantum computing architectures. One of NetSquid’s key features is its ability to easily and accurately model the effects of time on the performance of quantum network and quantum computing systems. This forms an essential ingredient in developing scalable systems which require a design that can mitigate the limited lifetime of quantum bits processed by quantum devices.

Please see the NetSquid website for information (https://netsquid.org) and feel free to leave questions or comments on our user forum (https://forum.netsquid.org).

QuTech news items:
https://qutech.nl/new-software-brings-quantum-network-design-to-users-around-the-world/

*on behalf of the NetSquid team at QuTech* :heart:
Website for a Rapper/Song writer(Hindi) using HTML, CSS and Vanilla Javascript
Tags: html, css, javascript, webdev
Published: 2020-06-30 12:34:55

Hello people, 
So, I was working on this web-app for my brother who writes poems and songs in Hindi.(Not promoting 😅, just need reviews on UI.) 

I have now turned it into a PWA.
 
Here's the link:

> https://insane.netlify.com

Your feedback and reviews will be appreciated. 😊
For people wondering about PWA,
Read here : [PWA](https://www.freecodecamp.org/news/progressive-web-apps-101-the-what-why-and-how-4aa5e9065ac2/)
Also, you can turn your own website into PWA with the help of this site:
[PWA Builder](https://www.pwabuilder.com/)

And again, if any one of you is just starting out and is from non-tech background, feel free to connect on twitter or linkedIn and i'll try my best to help you with learnings from my journey. 

Thanks in advance. :)
(Not) Finally Tagless in Rust
Tags: rust, functional
Published: 2020-06-30 12:27:27

[Tagless Final](http://okmij.org/ftp/tagless-final/JFP.pdf) is a style of programming derived first by Oleg Kiselyov to be used in ML for embedding domain specific languages (DSL), but from ML point of view every API is a DSL so really it is a style to write APIs ergonomically.

The name "Tagless Final" is probably foreign to most programmers. "Tagless" means without tag, which is usually an allocation to store the abstract syntax tree of the language. Without this allocation means less overhead. To do so, instead of constructors, which is theorized by the "initial" algebra of the λ-calculus, this style uses functions, which is theorized by the coalgebra of the λ-calculus, and thus named "final". No, I do not understand what I just wrote.

What is fun with this style is that it achieves the best separation of specification and implementation bar none. In Rust each part of the specification is a `trait`, like so:

```rust
trait Prim {
    fn int(v: i64) -> Self;
    fn bool(v: bool) -> Self;
}
trait AddOp {
    fn add(x: Self, y: Self) -> Self;
}
trait IfOp {
    fn leq(x: Self, y: Self) -> Self;
    fn if_<'a>(cond: Self, x: Box<dyn Fn() -> Self>, y: Box<dyn Fn() -> Self>) -> Self;
}
```

The program is then written only in terms of the traits:

```rust
fn prog<S>() -> S
where
    S: Prim + AddOp + IfOp
{
    S::if_(
        S::leq(S::int(5), S::int(9)),
        Box::new(|| S::add(S::int(3), S::int(8))),
        Box::new(|| S::int(7)),
    )
}
```

When executing the program, you just supply the implementation as the type parameter:

```rust
fn main() {
    println!("{:?}", prog::<P>());
    println!("{:?}", prog::<R>());
}
```

Here I implemented `P` as a pretty printer and `R` as a simple evaluator. The printed results are:

```rust
P("if 5 <= 9 { 3 + 8 } else { 7 }")
Int(11)
```

This style also is claimed to have solved "the Expression Problem", a dilemma created by module boundaries and orphan rules which have forced us to trade-off between a closed set of operators for stricter checks or an open set of operators for easier extensions. With this style, sets of operators and interpreters can be defined at will, while the set of operators is closed by the trait bounds attached to the program. Best of both worlds! Hopefully.

Unfortunately when used in Rust, this style cannot reach its full potential. In an ML with higher kinded type (HKT), Tagless Final can do the following things that in Rust I have not found a way to do:

- Enforce the types of the operators
- Enforce the parametricity of the operators
- No tags for primitive types in the implementation

If you are curious, the code is in the gist below.

{% gist https://gist.github.com/louy2/d62c289679ffd85dc70e7e6abd81672f %}
Use ";" or not in Javascript
Tags: asi
Published: 2020-06-30 12:26:07

Almost all programming languages have a concept of semicolon, but in javascript, it is in different manner.

We think that ";" is optional in JS, but it is not like that.

If we don't put ";" at the end of the statement, the ASI concept of JS will automatically insert ";" but not places in source code.

BUT, 
In JS at certain places, it is mandatory to put semicolons manually otherwise the program will go wrong.

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

Semicolons and "Automatic Semicolon Insertion" are two of the most misunderstood topics in JavaScript. 

For more deeply knowledge go to below link

https://medium.com/javascript-in-plain-english/automatic-semicolon-insertion-asi-in-javascript-made-simple-19c48d179494
Best way to earn reputation on Stack Overflow in 202X
Tags: stackoverflow, thoughts, watercooler
Published: 2020-06-30 12:12:30

I'm working [my ass](https://stackoverflow.com/users/750510/madhead?tab=answers&sort=votes) off to get 25K reputation on Stack Overflow:

![SO profile](https://dev-to-uploads.s3.amazonaws.com/i/ui93z7oz9ydrscvmbpgb.png)

I want to check out the ["access to site analytics"](https://stackoverflow.com/help/privileges/site-analytics) privilege and impress my potential employers. And, of course, I like to help others and share my experience.

Back in 2011, when I joined Stack Overflow, earning reputation was easy: the site was relatively new, there were a lot of unanswered questions about very basic things, and users were highly motivated to accept answers with an "accept rate" metric. Does anybody remember it?

Now it's different. There are millions of users who generate millions of questions. Some questions are highly specific and require digging into the problem. Specific questions do not gather a lot of upvotes because they are… specific. Some questions are literally poor. Users are not motivated to accept unswers and upvote.

So, how to earn reputation fast?

I came up with two strategies.

# Become a bounty-hunter

Bounty hunting is a complicated profession. Though interesting and highly paid.

{% youtube aOC8E8z_ifw %}

Bounties are rare. Usually, there are [about 500 questions with bounties](https://stackoverflow.com/?tab=bounties) on the site at a single moment. Some tags have more bounties than others.

One good bounty can be worth a day of answering low-quality questions in the hope of a single upvote (or even being accepted!)

Hunt for bounties!

# Watch the trends

Try to answer questions about trending technologies. I tried with [#flutter](https://dev.to/t/flutter) and it worked really well. Trending technologies are similar to traveling back in time: there are a lot of basic questions to answer. The more mature the technology is, the more specific and hard to answers questions become.

Answering basic questions about new technologies is a good investment as well: they attract views and reactions later for a long period of time. Five of my best answers are about AngularJS and Git. AngularJS was popular in 2013, and I had a project on it. I've just [told](https://stackoverflow.com/a/18303310/750510) the OP how to delete an item from an array in AngularJS and got more than 100 upvotes!

So, by watching the trends you're killing two birds with one stone. You're gaining rep fast. You're gaining more rep later. And, hey!, you're learning something new!

---

Unfortunately, I can't say that I'm successfully using both strategies myself today. I still answer a lot of question with zero or one upvotes. I have only three successful bounties. I don't always use trending technologies in the development, so I don't usually answer questions about them.

But when I do follow them, earning 100+ rep in a single day becomes an achievable task.

What do you think?
Connect Web Forms to your Airtable Database with WayScript
Tags: webdev, tutorial, database, wayscript
Published: 2020-06-30 12:04:57

Introduction
------------

Collecting data from forms and saving it manually can be a harassed task. If you are sick at manually collects data, integrate Wayscript Forms with Airtable can save you a lot of time.  
Today, we’ll collect data from Wayscript Form and seamlessly save it in Airtable.

Prerequisites
-------------

No prerequisites but here are some contents you might find useful :

*   [](https://docs.wayscript.com/library/triggers/form-trigger)Working with Form Trigger
*   [Working with Airtable](https://docs.wayscript.com/library/modules/airtable)

Trigger
-------

Wayscript platform comes with a Form trigger. Working with this, we can build any forms with any fields to collect what we want. Add it as Trigger and let’s add a title and a description to create context for the users.

![Configuring Form Trigger](https://cdn.wayscript.com/blog_img/111/1.png)

After this, we are going to add Form inputs.  
You can add as many Form Element you want. Wayscript allows you to choose the type of input. Here we’ll work with radio input only.

![Radio input](https://cdn.wayscript.com/blog_img/111/2.png)

![Radio input](https://cdn.wayscript.com/blog_img/111/3.png)

![Radio input](https://cdn.wayscript.com/blog_img/111/4.png)

After finishing the forms, be sure the password protection is on, so anyone can access the form without a password.  
Here is how the page should look.

![Form Page](https://cdn.wayscript.com/blog_img/111/5.png)

The next step will be to configure Airtable.

Airtable
--------

To use the Airtable module, we need to configure it.  
You’ll provide your API key, Base Key, and the name of the Base. Check the documentation [here](https://docs.wayscript.com/library/modules/airtable#setting-up-your-airtable-account) to see how to configure it.

![Airtable API](https://cdn.wayscript.com/blog_img/111//6.png)

We want to write data, that’s why we’ve chosen the Submission Type to Build Data.  
The next step is to add the inputs. My table looks like this.

![Table Image](https://cdn.wayscript.com/blog_img/111/7.png)

We must add the columns and link them to each related inputs in the form.

![Fields inputs](https://cdn.wayscript.com/blog_img/111/8.png)

Done. Be sure the trigger is on, and now you have a form integrated with Airtable ready to collect data.

Conclusion
----------

Check the form of this article [here](https://23015.wayscript.io/). Questions about this script or anything else? Join our [discord](https://discord.gg/VWbXSbj). We're always around to help. If you want to work the full script template, just find it [here](https://wayscript.com/user/mangabo_kolawole/5OKNaT47).
Daily Developer Jokes - Tuesday, Jun 30, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-06-30 12:00:22

---
title: "Daily Developer Jokes - Tuesday, Jun 30, 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=Tuesday%2C%20Jun%2030%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/5e125975d389d.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:
___-___ Knock Knock!

___-___ An async function

___-___ Who's there?
 -->
Things will break on your websites. Get Notified!
Tags: saas, website, monitoring, free
Published: 2020-06-30 11:43:48

UptimeMate helps you to find technical issues on your websites. We let you know when something breaks. Reliable monitoring for Uptime, Speed and Health performance.

Receive notifications when: 

✅ Your website is offline. 
✅ Your website is slow
✅ Your website contains 404 errors.
✅ Your SSL certificate is not valid.
✅ Plus 30 more notification types. 

In recent months we have been busy developing UptimeMate. More than 600 people worldwide have registered for our Beta.

Until September 1, you can use UptimeMate for free when we are processing your feedback.

👇 Register for free
https://app.uptimemate.com/register
Day 2: Testing & Edge Cases
Published: 2020-06-30 11:39:15

The first main task of the day was to test that everything I'd written yesterday worked the way I expected. Of course it didn't but that's what testing is for after all.

The main gist of everything was working as expected, except that I'd forgotten to add localisation text for a lot of what I'd coded in, so all the game text just referenced my variable names. Embarrassing, but a very easy fix.

What I really got from my tests, though, was a feel for the edge cases that I hadn't been considering, or that I knew I'd need to come back to later.

## Dealing with edge cases

The first edge case was non-standard empires. My code was written on the presumption that all empires in Stellaris are created equally (i.e. all go through the same setup method) but of course, that's not true at all. Some empires skip over the rules that I'd implemented, so I needed to find out where they were created, and alter their rules separately.

The second edge case, and the one that has had me pulling my hair out all morning, was the secondary species that might exist for an empire. Although the main species is very easy to scope to, because it's a vital part of an empire, the secondary sort of floats around in the background and doesn't fully exist until the game starts (by which time I'd hope to have already altered it).

I haven't actually solved this problem fully, but put together a clunky solution that works on first glance. That means more testing required. The sort of ethereal quality of secondary objects that don't fully exist until they're created (and thus can't be altered until they exist) may be more than my limited skills/tools can handle, but it's not going to stop me from trying.

## DRY coding

The other use of my time today has been figuring out how to code DRY for Paradox modding purposes. Since most of what I'm doing is the same code in different places, I figured there must be a way of shortcutting it all.

Without fully understanding how the code was compiled or read, I hadn't realised that a lot of the code I was reading was already a good example of how to code DRY, but once I did, everything clicked into place, and now I can just re-use the same bits of code again and again, which will save me some headaches in future.

## Scope

Of course, the core thing to watch out for here is scope: I need to always be making sure that whatever I'm writing is looking at the right objects, otherwise it's just not going to work. This has already caused a few issues for me, where seemingly functional code hasn't been working because it's been looking at a planet instead of a species. When trying to use DRY code it's going to be even more important to know where my code is being called and what it's expecting to see there.

Overall I'm enjoying a very different way of coding at the moment, and it's good experience for OOP which is likely something I'll end up doing a lot more of if I get my way.

Tomorrow is further testing, perhaps more rigorously than today, and perhaps learning to use some more useful console commands. But we'll see what problems the testing dredges up for me to solve, first.