teleren/devto huggingface dataset:
The return of goto 
Published: 2020-07-31 09:36:17

The goto statement is one of the most obscure statements in C and C++. 
This could be due to the fact that not a lot of tutorials and books teach about it. But mainly it's due to the mishandling of the goto statement by our ancestor programmers.
This all began when C language had just gained traction. Many assembly programmers hopped on to the C ride and began building complicated programs with the goto statement in C which was more familiar to the goto statement in assembly.

goto statement works in such a way that it tells your program to execute the section of code that the goto statement points to. This statement may be with in any scope of the code being executed. 
The goto statement represents how the CPU actually performs some of it's execution, hence it's more close to the machine.

However, due to the mishandling of the goto statement by our ancestor assembly programmers, goto was generally shunned by the developer community and it's currently considered bad coding practice to use it.

But it doesn't have to be that way. In fact all the C and C++ compilers in existence support it anyway, so why not use it. We just have to provide Standard means on how to use them.

First, among the confusing things done by the ancestor programmers was to declare labels within other functions and have goto statements point to them. This was generally confusing because the function declares it's own local scope, so having another function point to that functions scope was confusing. Mostly because it was hard to find where the goto statement was actually pointing to.
So generally it would be better to make all labels as globally scoped.

Secondly, the labels themselves should have a standard notation. Pointers in C and C++ are written with _ptr as a suffix and it's a generally accepted notation. Labels can also be written with a _lab suffix to denote that it's a label, for example endProcess_lab could be a label for a section of code that closes a process when an error is encountered.

I can give many reasons as to why goto statement should return, but it would make this article longer and more tedious to read than it already is. 
It's just a polite suggestion to the developer community that I hope shall be put into consideration.
Minimal reproducible repo
Tags: discuss, github, asking
Published: 2020-07-31 09:32:16

How do you create a minimal reproducible repo, especially when submitting a bug report on GitHub, or asking on StackOverflow.

I have heard about <https://repl.it> for a long time, but I have really installed a package inside it today (from NPM)...

However, more ideal would be a Docker-like environment, for Linux. (You can pin OS and programming runtime, as well as binaries.) For Windows and macOS would be harder; I wonder if some kind of CI is possible?

I have gone as far as [creating a Dockerfile repo as well](https://github.com/patarapolw/docker0000), at some point...
Collection Functions
Tags: aws, terraform, cloud, codenewbie
Published: 2020-07-31 09:26:36


The next in line is TF Collection Functions and they are very useful in day to day use for writing TF code.

* concat

`concat` functions take 2 lists as an input and returns a new list.

```hcl
concat(aws_vpc_endpoint.sts.*.id, [""])[0]
```


* contains

`contains` functions checks for the element in the given list or set and returns a boolean.

```hcl
contains(["a", "b", "c"], "a")
true
```


* element

`element` functions return the item from the list given the index 


```hcl

element(var.azs, count.index)
```


The above code will return an `availability zone` at index start with `count.index` usually start from 0 and so on depending upon the count you set.


* flatten

`flatten` takes a list and replaces any elements that are lists with a flattened sequence of the list contents.


```hcl
flatten(module.nginx.vpc_security_group_ids)
```

With the above code, we can flatten the list of lists.


* map

`map` takes an even number of arguments and returns a map whose elements are constructed from consecutive pairs of arguments.

```hcl
map('BusinessUnit','XYZ')
```


* merge

`merge` takes an arbitrary number of maps and returns a single map that contains a merged set of elements from all of the maps.

If more than one given map defines the same key then the one that is later in the argument sequence takes precedence.

```hcl
tags = merge(
    {
      "Name" = format("%s-%03d-%s", var.namespace, count.index, var.environment)
    },
    var.tags,
  )

  volume_tags = merge(
    {
      "Name" = format("%s-%03d-%s", var.namespace, count.index, var.environment)
    },
    var.volume_tags,
  )
```

In the above code, we are merging all maps and passing them as a single map. 

The above listed functions are few of the many Collection Functions Terraform have and are opiniaoted depending on my usage.
How to set up binfmt_misc for qemu the hard way
Tags: tutorial, qemu, linux
Published: 2020-07-31 09:09:18

I recently discussed about options to run x86 binaries on a pantavisor powered ARM system and since we already did similar things in one-off projects, I thought it would be good time to look a bit closer on how binfmt_misc interpreter magic works so we can make this a trivial experience every pantahub user.

Let's take a look ...

## binfmt_misc registrations are global

After some reading I found that the kernel does not care about the namespace for finding the binfmt_misc definitions (meaning there is only one global knowledge about binfmt_misc wrappers).

If you have permissions you can mount in every container the special binfmt_misc filesystem and you will always see the same, e.g.

```
# on my system its already mounted
$ mount | grep binfmt_misc
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)

# and loaded
$ ls /proc/sys/fs/binfmt_misc
python3.7  qemu-mips  qemu-mipsel  qemu-riscv32  qemu-riscv64  qemu-x86_64  register  status
```

You can see that i have a few qemu magics registered. Lets take a look:

```
$ cat /proc/sys/fs/binfmt_misc/qemu-x86_64 
enabled
interpreter /usr/local/bin/qemu-x86_64-static
flags: 
offset 0
magic 7f454c4602010100000000000000000002003e00
mask fffffffffffefe00fffffffffffffffffeffffff
```

A good place to get info what those fields mean you can find on wikipedia actually: https://en.wikipedia.org/wiki/Binfmt_misc

## binfmt_misc interpreter lookup is namespace-local

However, as expected, Binfmt_Misc does honor the mount namespace of the calling process when searching for the actual interpreter configured.

This allows you to have different versions of python registered depending on the container you are in etc.

## Setting up the binfmt_misc handlers

The magic (literally) for identifying elf binaries for each arch is available in the following qemu script:

   https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh

We did a small change to that script so we could limit the architectures registered (as we do really just need arm, x86_64, mips(el) and riscv.

In our script you can also overload the default arch list by setting the `qemu_target_list` env:

   https://gitlab.com/pantacor/pv-platforms/wifi-connect/-/blob/master/files/opt/binfmt-misc/qemu-binfmt-conf.sh

And ... it works. \o/
The appeal of low-code application development platform to businesses
Tags: lowcodeplatform
Published: 2020-07-31 09:00:27

The time savings brought about by low-code application development platform are very important for companies that are trying to stay ahead of competitors or want to update traditional applications. For example, 31% of application developers surveyed by Forrester pointed out that for applications built using traditional coding methods such as programming languages, frameworks, and middleware, there are challenges in meeting business needs in a timely manner.
low-code application development platform eases the pain of mergers and acquisitions
As NTT Data Services learned when it acquired Dell Services for $3 billion in 2016, a low-code approach may be a boon in M&A. Barry Shurkey, chief information officer of NTT Data, said that low code helped NTT reduce the number of Dell Services applications from 1,000 to 122, adding, “This is a problem that doesn’t bring things we don’t need.”

Shurkey told reporters at IDG's CIO 100 seminar in 2019 that NTT's method is very novel. It identified several "one-off" legacy financial and human resources applications that needed to be modernized, but it didn't make sense to rewrite investment resources from scratch. Then, it held a week-long "baking" event between several low-code platform vendors—essentially a competition between superiors and inferior—to see which one can best update the application.
for more details, you can open the following link 
https://www.yeeflow.com/enterprise
what is the diffrence between these if else condition
Published: 2020-07-31 08:56:11

React js
when we fill the value in first input is condition ok 
if(values.fname.length < 3 && values.lname.length < 3 ){
    btnAction = true;
}else{
    btnAction = false;  
}

this condition work proper
if(values.fname.length < 3 ){  
  btnAction = true   
}else if(values.lname.length < 3 ){
  btnAction = true;
}else{
    btnAction = false;
}
The future trend of low-code application development platform
Tags: lowcodeplatform
Published: 2020-07-31 08:51:19

Most low-code application development platform provide services to developers in the form of SaaS (Software As A Service). Developers only need to apply for a developer account to use the online development environment, sandbox test environment, and commercial deployment provided by the low-code platform. surroundings. Developers can compile and package online after the development is completed. Through the automatic assembly line provided by the low-code application development platformthe software package can be deployed from the development environment to the test environment and the commercial environment. Developers can develop, test and release their own applications at any time
However, it should also be noted that low-code is not directly to build houses, but to build a set of engines and systems that can repeatedly build various types of houses. The requirements for platform technology are very high. Foreign low-code developers have experienced years of experience. development of. With the continuous improvement of technology and the increasing demand for software in the digital transformation of various industries, the low-code application development platform reduces the uncertainty of software development by lowering the threshold of development work, alleviating costs, and talent demands. The result of effective software development is closer to linear, and the efficiency of software development is greatly improved, and it will certainly embark on the road of vigorous development.
How to reactjs publish on plesk obsidian
Tags: react, node
Published: 2020-07-31 08:50:31

i have a windows server VPS. I installed plesk obsidian. I am having trouble publishing my react application.

My build folder https://prnt.sc/trkj64

Plesk wants node.js project startup file on the panel. I don't have any startup files. How can I run my application with plesk?
About the simplest thing a Ruby dev can do with Docker
Tags: docker, ruby, beginners, webdev
Published: 2020-07-31 08:37:46


Docker, in the beginning, can be overwhelming. Tutorials often focus on creating a complex interaction between Dockerfiles, docker-compose, entrypoint scripts and networking.

It can take hours to bring up a simple Rails application in Docker and I found that put me off the first few times I tried to play with it.

I think a rapid feedback loop is essential for playing with a piece of technology.

If you've never used Docker before, then this is the perfect post for you. I'll start you off on your docker journey and with a few simple commands, you'll be in a Docker container, running ruby interactively.

You'll need to install Docker. On a Mac, I prefer to install Docker Desktop through homebrew:

```shell
brew cask install docker
```

If you're running Linux or Windows, [read the official docs for install instructions](https://docs.docker.com/engine/install/).

On your Mac, you should now have a Docker icon in your menu bar. Click on it and make sure it says "Docker desktop is running".

![Docker context menu in Mac menu bar](https://dev-to-uploads.s3.amazonaws.com/i/jfo023rdqhbdbicksqb9.png)

Now open a terminal and type the following:

```shell
$ docker run -it --rm ruby:2.7.1-buster
```

You should be dropped into an irb session:

```ruby
> docker run -it --rm ruby:2.7.1-buster
irb(main):001:0> puts "Hello from inside a Docker container"
Hello from inside a Docker container
=> nil
irb(main):002:0>
```

That should return you to your normal command prompt.

It doesn't look like you've done much - bringing up an irb session isn't groundbreaking. You can do the same by typing irb at your usual prompt.

Breaking down the command used:

`docker run` runs a command in a new container

`-it` these two options that tell docker to run in interactive mode and to allocate a pseudo-TTY

`--rm` instructs docker to automatically delete the container when we exit

`ruby:2.7.1-buster` theimage that we want to run.

You'll notice that none of those commands actually tried to execute irb to run the Ruby REPL. So how did we end up in an irb session?

The answer is that the Docker image we used defined a default step for us to start irb.
A Barbaric Yawp
Tags: coach, leadership, trust
Published: 2020-07-31 08:16:34

A different kind of post on my blog. One about leadership. Or what I consider leadership. Maybe not even that, this post is about trust, coaching, comfort zones and letting go. And for me these are the words that come to mind when you lead someone. My friend [Devon Burriss](https://www.linkedin.com/in/devon-burriss-4720ab1a/detail/recent-activity/shares/) already [posted](http://devonburriss.me/leader-archetypes/) on different arch types of leadership if you want to know more. For me any leader needs to be able to (help) grow his team, regardless of his or hers arch type.

So why do I think, no believe, trust, coaching, comfort zones and letting go are part of leadership? Let me first introduce you to John Keating (played by Robin Williams) in the movie [Dead Poets Society](https://www.imdb.com/title/tt0097165/). In the following scene John is interacting with one of his students, and just watch what happens:

{% youtube S6xyHna-NuM %}

From a leadership perspective, what you see here is a classic case of pulling someone from his or hers comfort zone, coaching them to push further and see growth almost immediatly.

**Comfort Zone**; John pulls the student in front of the class. We all have been here, slouching so we are not picked right? But he is doing this because he wants to push him beyond his comfort zone. The student is a bit self aware, and does not want to try this poetry thing.

**Trust**; John is trusting that the student will be ok and will succeed outside of his comfort zone. And with that trust the student is actually trying to do the task he thought he could not do.

**Coaching**; As the student is trying, still not sure if he can do what his teacher is asking, John is pushing him gently and creating an environment where the student is safe and secure enough to keep trying. Maybe thinking he is failing, while in fact he is growing, right there in front of his peers.

**Letting go**; And the most powerful part of this scene is when John takes two steps back and watches his student do something amazing. And the letting go, by stepping back and stop the coaching, is key here. Trust your student, give him or her the space they need to grow and excel.

From personal experience this “letting go” is such a wonderful and thankful feeling and great to witness. I have not had that many experiences on this, but when it does happen, it is something you will hold dear forever. Not sure why I wrote this post, felt like something nice to do.

And as a final note, if you have not seen this movie, go [watch](https://www.amazon.co.uk/Dead-Poets-Society-Robin-Williams/dp/B00ET1X0TO) it.

[from my weblog](https://stefvanhooijdonk.nl/2018/06/26/a-barbaric-yawp/)
What Projects are needed to land a job in Web Dev?
Published: 2020-07-31 08:01:34

I am a newbie to Coding and have started with Web Development .
I aspire to land a project/internship by learning in this domain.
This question is to all the esteemed developers out there,
"What Projects should I make and include in my Portfolio so as to get selected for a job?"

I prefer developing the Back-end With MONGODB ,NODEJS and EXPRESS.
What other stack should I also learn??

Times are such that Courses and certificates are loosing there value. Copying what an instructor tells you is simply not learning but rather a job a kid can do.

Thanks for your time
Codr July update
Tags: javascript, computerscience
Published: 2020-07-31 07:55:31

Today we finally reached Genius rank on Codr in our road to genius series. As a result I am adding more challenges to higher ranks (genius rank in particular) because they contain less challenges than the lower ranks.

I've also lowered the barrier for beginners, only 1000 points are now required to reach the Smart rank (instead of 1800).

Have a great day everybody <3
Ilya
Queppelin's AR/VR Newsletters
Tags: newsletters, ar, vr, queppelin
Published: 2020-07-31 07:51:11

We are excited to bring our monthly newsletters that feature the latest Augmented and Virtual Reality industry news, reports and insights. Important information will also include company insights, new product launch, awards and articles. This newsletter is valuable for us as it keeps us connected with our customers.
If you interested in getting our newsletters then download it from the link: https://www.queppelin.com/newsletters/
Github Profile App
Tags: vue, buefy, github, vuex
Published: 2020-07-31 07:48:16

Hello, I created a github profile app, which uses github search API. You can search a user, view user's own profile or change application theme. 



**Application Screenshots**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xzwcct9boaddu6cnr989.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e3hbv8232fz1n6y2s5vg.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/bxppsq1g4hszr9aeb6z3.png)


**New Feature Ideas**
- Pagination in User Repositories
- Adding routing to repositories like `/user/afozbek/repos/:id`
- Authentication
- Pagination in the Search Page
- Filter/Sorting in pages like name, star_count

You can contribute the project and apply specific feature to the application or you can add new feature ideas.

**Github**: https://github.com/afozbek/github-profiles

**Demo**: https://afozbek-github-profiles.netlify.app/
Create a Slack clone with Next.js and Supabase
Tags: postgres, supabase, javascript, react
Published: 2020-07-31 07:35:41

In this post we're going to show you how to deploy a fully functional Slack clone in less than 2 minutes.

See the final result here: https://supabase-slack-clone.vercel.app/

(:point_up: You should probably use a fake email when you sign up)

## Intro

The video shows all the steps so in case you haven't already watched it, here's what you need to know! 

This is a real-time Slack clone built with Postgres' Row Level Security. It's a simple POC, and you can deploy your own, which takes a few minutes. The database, auth, real-time, and APIs are handled by Supabase, which is an open source Firebase alternative. The front end is built with Next.js, deployed on Vercel.

## Show me how

You can also find these instructions in the [project repo](https://github.com/supabase/supabase/tree/master/examples/slack-clone).

**1. Create new project**

Sign up to Supabase - [https://app.supabase.io](https://app.supabase.io) and create a new project. Wait for your database to start.

**2. Run "Slack Clone" Quickstart**

Once your database has started, run the "Slack Clone" quickstart.

![Slack Clone Quick Start](https://user-images.githubusercontent.com/10214025/88916135-1b1d7a00-d298-11ea-82e7-e2c18314e805.png)

**3. Get the URL and Key**

Go to the Project Settings (the cog icon), and find your API URL and `anon` key.

![image](https://user-images.githubusercontent.com/10214025/88916245-528c2680-d298-11ea-8a71-708f93e1ce4f.png)

**4. Deploy the front end**

Click this button to deploy the front end:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?s=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Fslack-clone&env=NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_KEY&envDescription=Find%20the%20Supabase%20URL%20and%20key%20in%20the%20your%20auto-generated%20docs%20at%20app.supabase.io&project-name=supabase-slack-clone&repo-name=supabase-slack-clone)

You will be asked for a `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_KEY`. You can use the keys in step 3.

## Conclusion

Congrats! You just deployed a functioning Slack clone, without writing a line of code. Feel free to hack the frontend and share your own slack URL in the comments.
How to use .map() method in ReactJS?
Tags: react, tutorial, beginners, webdev
Published: 2020-07-31 07:33:50

This article was originally published at https://www.blog.duomly.com/6-most-popular-front-end-interview-questions-and-answers-for-beginners-part-2/#how-to-use-map-method-in-react-js

---

{% youtube Fbc4BvYc4ec %}

In the previous step of the React.js interview questions, we talked about iteration methods where we have put some lights on the for-loop and forEach methods.

We can now focus on the most popular method that we use to render the same elements from the lists, the map method.

Even if the map method is not the fastest, it is very popular, and you can see that method in most projects.

If you’re performance-oriented, don’t worry, it still is faster than forEach.

And has one more exciting feature when we compare that method to forEach, map method returns array when forEach returns an undefined value.

I’d say the map method is straightforward to use as well. Anyway, many tutorials recommend using the “index” value as the unique key of your element.

To care about performance, we shouldn’t do it, and we should use randomly generated id instead of the index one. Otherwise, our virtual DOM will re-render.

To see how to create a few same elements from the list, you can look at the code example:

```js
function Welcome(props) {
  const products = ['orange', 'apple', 'watermelon'];
  return products.map(product=><li>{product}</li>)
}
```

<a href="https://www.duomly.com/?code=lifetime-80">![Duomly - Programming Online Courses](https://dev-to-uploads.s3.amazonaws.com/i/bde89cw4h64z765g2l4r.png)</a>

Thank you for reading,
Radek from Duomly