teleren/devto huggingface dataset:
Applying artificial intelligence in software engineering - our status and the future?
Tags: ai, software, development, survey
Published: 2021-03-15 19:05:24

---
title: Applying artificial intelligence in software engineering - our status and the future?
published: true
description: This survey is an anonymous 15-min questionnaire to understand how Artificial Intelligence and automation tools help software engineers in their daily activities.
tags: ai, software, development, survey
//cover_image: https://direct_url_to_image.jpg
---

I know everyone's time is precious so I’ll cut to the chase:
I am doing a PhD research related to the future of AI-based tools in software engineering. 

But to do this, I need experiences of my fellow software engineers, QAs, POs and managers.

Could you give 15-min of your attention and fill-in anonymous survey:
https://www.milanlatinovic.com/survey-artificial-intelligence-tools-in-software-engineering/

Almost all questions in the survey are optional, so you can skip those that do not interest you. Also, there are open-discussion fields where you can write longer comments if you find something that is very interesting for you.

This is a follow up on research which is already published at HICSS-54 http://hdl.handle.net/10125/70628 

Thank you very much!
How do you test code that uses browser api's?
Tags: javascript, testing, webdev
Published: 2021-03-15 18:57:40

I've been working with the [Web Payment Request API](https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest) recently and have found that its kind of a pain to test my code. The solution i've come to is writing wrapper functions for the browser API calls and mocking those in my tests. This allows me to isolate the browser API code and test around it, but i'm wondering if there is a better way. I would appreciate any insights.
Setting up GitHub Actions with Rails 6.1 and MySQL 5.7
Tags: github, rails, mysql
Published: 2021-03-15 18:50:07

I'm actually new to this technology, but I've been working with it for a week and I have to say it's really handy. When you integrate [GitHub Actions](https://docs.github.com/en/actions) into your workflow, you can stop worrying about setting up your own custom CI server, at least for testing. 

I've been working it with a [Rails 6.1](https://rubyonrails.org/) and a [MySQL 5.6](https://hub.docker.com/_/mysql) database engine.

It takes little time and effort and in return you have a full testing environment ready to work on the same place you have your code. So no need for API keys, no integrations with other systems, keeping everything **simple**.

I've done this setup with **Rails & Postgres** and had no issue, but had a hard time looking how others have done it with **Rails & MySQL**. Because of this I thought of sharing how I did it.

# My working [example](https://github.com/lortega/github-actions-rails-mysql)

**.github/workflow/ci.yml file:**
```yaml

name: github-actions-rails-mysql

on:
  pull_request:
    branches: ['*']
  push:
    branches: [master]
jobs:
  test:
    runs-on: ubuntu-latest
    services:
      mysql:
        image: mysql:5.7
        env:
          MYSQL_HOST: 127.0.0.1
          MYSQL_DB: github_actions_test
          MYSQL_USER: root
          MYSQL_ALLOW_EMPTY_PASSWORD: yes
          MYSQL_PASSWORD:
        ports:
          - "3306:3306"
    steps:
      - uses: actions/checkout@v2
      - name: Setup Ruby 2.7
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          bundler: default
          bundler-cache: true
      - name: Run tests
        env:
          RAILS_ENV: test
          DATABASE_PORT: 3306
        run: |
          bin/rails db:create
          bin/rails db:schema:load
          bin/rails test

```

**My config/database.yml file:**
```yaml
default: &default
  adapter: mysql2
  encoding: utf8
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  username: root
  password:
  socket: /tmp/mysql.sock

development:
  <<: *default
  database: github_actions_development

test:
  <<: *default
  database: github_actions_test
  host: 127.0.0.1

production:
  <<: *default
  database: github_actions_production
```
Awesome Kubernetes Resources
Tags: resources, kubernetes, cloud, reference
Published: 2021-03-15 18:41:27

A much more comprehensive list can be found [here](https://github.com/tomhuang12/awesome-k8s-resources). This is likely a subset of the items in that repo and a few additions of tools i’ve tried out or want to try out to make my K8s life easier.

CLI Tools:

- [Helm](https://github.com/helm/helm) Kubernetes package manager
- [K9s](https://github.com/derailed/k9s) CLI management tool.
- [kube-shell](https://github.com/cloudnativelabs/kube-shell) integrated shell environment

Cluster Provisioning

- [kind](https://github.com/kubernetes-sigs/kind) Docker based kubernetes deployment.
- [minikube](https://github.com/kubernetes/minikube) VM based cross-platform kubernetes with addons support

Automation and CI/CD

- [flux 2](https://github.com/fluxcd/flux2)

Development:

- [Hephy](https://web.teamhephy.com/) Developer workflow tool
- [Skaffold](https://skaffold.dev/) client side deployment

Testing/Troubleshooting

- [Chaos Kube](https://github.com/linki/chaoskube)
- [Kube Monkey](https://github.com/asobti/kube-monkey)

Backup/Restore

- [Velero](https://github.com/vmware-tanzu/velero)

Service Mesh:

- [Istio](https://github.com/istio/istio)

Certifications

- [killer](https://killer.sh/) Kubernetes Exam Simulator
Reducing TailwindCSS's dev environment file size

Tags: tailwindcss, javascript, npm, techtalks
Published: 2021-03-15 17:59:57

Earlier today, Adam Wathan [tweeted](https://twitter.com/adamwathan/status/1371505992840663051) about the new changes coming up for TailwindCSS. In short, he announces among several things - a brand new plugin named JIT (Just In Time) for Tailwind.

The [video](https://www.youtube.com/watch?v=3O_3X7InOw8) has a neat demo where the file size in dev is brought down from a large size of 12 MB to less than 10 KB - which lines up with what I've seen on the production builds of Tailwind that I have deployed. This has been a major problem when I build [Arbeitnow](https://arbeitnow.com/) where Google Chrome's dev tools struggles to function normally with a file of 4 MB.

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

Promises are great, but does it hold up? I put it to test on my local system that I have with me - a 2012 MacBook Pro (nowhere close to the fancy M1 machines!). I pulled down the library and installed it using:

```
npm install -D @tailwindcss/jit tailwindcss postcss
```

Then instead of the default tailwindcss plugin on postcss.config.js, I replaced it with @tailwindcss/jit

```
module.exports = {
    plugins: {
      '@tailwindcss/jit': {},
      autoprefixer: {},
    }
  }
```
Then I ran my local watch server using

`npm run watch`

Voila! The file size is now similar to what production builds are. I'll keep an eye out for other changes or issues that popup - considering that this is a preview/beta of sorts, but I'll go to bed tonight as a happy person!
Kubernetes - Recreate element without error if already exists
Published: 2021-03-15 17:32:43

One thing I never realized was the power of *kubectl apply*.

---

So if you want to quickly create an element in Kubernetes and avoid the error if the element already exists, you can use the following command *(and adapt it to your needs)*

```
kubectl create namespace my-namespace --dry-run=client -o yaml | kubectl apply -f -
``` 
---

If you want more complex elements, you can use an existing file as input. 
```
kubectl apply -f myYaml.yml
``` 
---

And if you want more dynamism, you can use Helm or Kustomize!


### Links
- Helm: https://helm.sh/
- Kustomize: https://kustomize.io/

---

I hope it will help you! 😀
Operating System and services provided by them
Tags: systems, beginners
Published: 2021-03-15 17:13:49

The operating system is one of the most important part of a computer system it acts as a bridge between user and hardware devices and helps to run different application programs which are the interface for users to perform certain tasks. There are many operating systems some of the famous ones are Windows, Linux, UNIX, Mac Os, and different distributions of Linux like Ubuntu, RedHat, Kali, Opensuse, etc.

Some of the services provided by Operating Systems are-

**Program Execution** - The operating system helps to load programs in the memory and execute them.

**I/O operations** - The programs require I/O operations and Operating system manages the I/O devices for better efficiency and protection.

**File System Manipulation** - File systems are also an important part of computer software and they are managed effectively by the OS. Some famous file systems are NTFS and FAT32.

**Communications** - The communication between processes on the same system and also between processes of different systems is done by the OS. It also deals with the networking of the systems.

**Error detection** - They also find errors during the execution of programs and take necessary action for smoother functioning of systems
My first steps into learning to code
Tags: beginners, webdev, french
Published: 2021-03-15 17:12:48

My journey into coding started about 2 years ago when I realized, thanks to a coworker, that I could teach myself to code online. I know now that there are tones of free resources out there. But back then my first thought was to type into google "How to learn to code?". It lead me to Youtube where I quickly learned the very basics of html5. I was eager to learn more as moving div tags around felt like a game.

After more research I discovered FreeCodeCamp. FreeCodeCamp has been amazing for me. I followed their curriculum and started with the "Responsive Web Design Certification". This is a 300 hours curriculum that you can follow at your own pace and which will teach you the fundamentals of html5 and css3. By the end of it you will have build 5 projects in order to receive your certification. They are simple projects but will teach you loads.

Here are the 5 projects for which I received the responsive web design certification:​

https://mande-tribute.glitch.me/
https://survey-form-en.glitch.me/
https://relieved-broken-hero.glitch.me/
https://landingpagewatch.glitch.me/
https://portfolioxx.glitch.me/

Let's get in touch on twitter!
Do you ever block Javascript?! Why!?
Tags: discuss, javascript, a11y
Published: 2021-03-15 17:01:23

I've been researching reasons to make websites work without `javascript`.

Generally the reason to do this is for **reliability.** 

Unless your `javascript` is part of your `html`. It will be loaded in a seperate request — and that request can fail.

Maybe your visitor is going **through a tunnel**, there's a **network error**, or they're using a **web-extension that breaks your code**.

That's not uncommon, in 2013 the `gov.uk` did a test and found that 1.1% of their visitors weren't running the site's `javascript`.

However, only `0.2%` of their visitors were **blocking** `javascript`.

For reasons, I started building my sites with that `0.2%` in mind. To make things easy to test I've been using this firefox extension: [Disable Javascript](https://addons.mozilla.org/en-GB/firefox/addon/disable-javascript/)

*There's also a [google chrome version](https://chrome.google.com/webstore/detail/disable-javascript/jfpdlihdedhlmhlbgooailmfhahieoem)*

Anyway, I've found myself blocking javascript on the [wayback machine](http://web.archive.org/) to stop it from injecting elements onto the page that obscure the view of the archived website.

**Do you ever block javascript?**
PHP Benchmarks (2021) for 20 different PHP platforms on seven different PHP versions (5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0)
Tags: php, laravel, wordpress
Published: 2021-03-15 16:38:21

PHP 8.0 was officially released at the end of 2020. It brings with it many breaking [changes](https://kinsta.com/blog/php-8/). I was tasked with benchmarking it. It was a challenging, month-long endeavor. I hope it's helpful for the community here, and I'm excited to share it with you all.

##Quick Summary##

PHP 8.0 performs better on most platforms/configurations that do support it. It includes the most popular PHP framework and CMS like Laravel and WordPress. In some cases, PHP 7.4 still performs better. There are a few edge cases, too, where older PHP versions perform better.

You can see a compiled graph image of the top few platforms:
![Results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spgepxzx1d0rrjzcusto.png)
The whole article is too long to be put on here. I've tabulated it below, so it's easy for everyone here. But if you want more details, you can always head to the [source](https://kinsta.com/blog/php-benchmarks/).

All the benchmark results are measured in **requests per second**. The benchmark was done using the Apache Bench tool with 15 concurrent users for 10,000 requests. And just to be sure, each benchmark test was performed 3 times and their average was taken. That's the value you see in the table cells below.

For PHP CMSs, their official images were used with no customizations. For the PHP frameworks, a simple blog-like web app was built to show a huge number of posts pulled from a database—more details in the source link.
![Test results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4alqxindpyrl0q90i9cm.png)

The many x (or crosses) in the cells mean that the PHP CMS/framework version tested doesn't support that particular PHP version, or I couldn't set it up to work quickly (mainly due to dependency issues). I may update them in the future if time permits.

**One massive caveat**: As Laravel founder Taylor Otwell has [pointed out before](https://medium.com/@taylorotwell/benchmarking-laravel-symfony-zend-2c01c2b270f8), comparing benchmarks like this to pit one platform against another isn't a good idea. A web app can be optimized in so many ways that even an "unpopular" CMS/framework can be fast with skilled developer hands. Hence, this benchmark only measures how different PHP versions measure up when everything else is maintained a constant.

**Another caveat**: Though many PHP CMSs and frameworks claim to be PHP 8.0 compatible, and they are, their wider ecosystem (plugins, themes, development tools, etc.) hasn't caught up with it yet. Here's [a good piece by the WordPress Core team](https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/) explaining that.

If you have any questions or suggestions, please go ahead and let me know in the comments.

Source: [PHP Benchmarks](https://kinsta.com/blog/php-benchmark) (2021)
What are your favourite Datascience and Machine Learning blogs?
Tags: datascience, machinelearning, watercooler, discuss
Published: 2021-03-15 16:30:40

Hey DEVCommunity,

I would like to know about your favourite DataScience and Machine Learning blogs.

Some of my favourite blogs are-

[Machine Learning Mastery](https://machinelearningmastery.com/)

[Analytics Vidhya](https://www.analyticsvidhya.com/blog/)

[KDnuggets](https://www.kdnuggets.com/)

[Analytics India Magazine](https://analyticsindiamag.com/)

[R-bloggers](https://www.r-bloggers.com/)

Share your favourite blogs below in the comments.
Python3 Programming - Exercise 20 c - Continuation of OOP concepts
Tags: python3, programming, beginners, tutorial
Published: 2021-03-15 16:27:51

## Practical

> _We confidently believe that at this stage, with patience, persistence and clear mind and an intention to solve a problem, you can do so many things, now. Surely some problems will be challenging but through this difficulty, you become better._

Fixed this code. Do not panic, it is easier than you may sweat. Some little assistance.

- try to understand what every component (method) does.
  - copy the method somewhere and run it or comment some part of it out
  - or just comment the others out and run it
- run the code multiple times and write down something. Try to trace the execution of the code.
- break it and see what happens by stabbing it with various input types
  - jot something down - you are becoming a hacker.
  - stabbing means, pass some data to the method or attribute directly.
    So if there is an input, you provide the input directly.
- try negative values too - just break it and fix it
- add comments where you think necessary - try commenting on the code as you may come back in a week or more time.

> Download practical file [here][ex20x_practicals]

{% gist https://gist.github.com/Otumian-empire/ebbea0703bdf105ce1ae1ffe0f72d60a %}



## Summary

- Inheritance is an OOP Concept
- A child class inherits from a parent class
- pass the parent class as an argument to the child class
- pass multiple classes that way, for multiple inheritances
- use `super()` to access the original attributes and methods of the parent class

#

[ex20x_practicals]: https://gist.github.com/Otumian-empire/ebbea0703bdf105ce1ae1ffe0f72d60a.
Reprogram Your Mindset
Tags: culture, beginners, learning, engineers
Published: 2021-03-15 16:04:06

---
title: Reprogram Your Mindset
published: true
description: Resiliency through Learning
tags: culture, beginners, learning, engineers
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wh27g8e8sg0k38ahj6az.jpg
series: How To Level Up as an Engineer
---

Coming into learning with false notions can make the task harder. On my journey to leveling up, these were a few things I needed to reprogram in my own mind:
- programming should be easy &rarr; programming is not easy
- mistakes are fatal &rarr; there are no bad mistakes
- there is no place for emotions in learning &rarr; embrace your emotions

## Letting go of harmful assumptions
I needed to let go of the idea that programming was easy and that I should understand programming concepts straightaway.

Learning in general is an effortful, challenging task. If you believe programming _should_ be easy, then every time it is _not_ easy, you may come to the conclusion that it implies you are not capable of programming or that _you_ are the problem. The truth is, **programming is not easy** and you **are** capable of programming, but like any kind of learning, there will be challenging days and that is to be expected.

## Reframing my relationship to failure

Before babies can walk, they crawl. And part of that process includes falling down, getting hurt, and then getting back up again.

You will inevitably run into hurdles as you pursue your programming ambitions. Every time you run into a hurdle, know that you are not failing. 

Any challenge is simply an opportunity to grow. So next time you make a programming "mistake", remember: **there are no mistakes, just happy accidents**.

## Embracing my emotions

Before we are programmers, we are people with emotions. 

As you embark on our journey of leveling up, you will encounter frustrating days of learning. The key is to **acknowledge those feelings**, whether they be feelings of frustration, overwhelm, stress, or powerlessness, _before_ they turn into **hopelessness and burnout**.

In order to become the best programmer you can be, it is important to reflect on your mindset and reprogram it if you need to. 

These are three points you can keep in mind:

1. Let go of assumptions that may harm you
2. Reframe your relationship to failure
3. Embrace your emotions


As always, please share your thoughts, I would love to hear them.
Backstage Weekly 20 - Upcoming meetups and Kubernetes CRD support
Tags: devops, tooling, backstage
Published: 2021-03-15 16:02:17


Believe it or not there are **two** Backstage meetups happening over the next 2 weeks! 📅

The next official [Backstage Community Session](https://github.com/backstage/community/issues/7) will take place on March 17th. As usual, you can suggest topics for the session and vote on your favorite topics using the linked GitHub issue. The current top suggestion is a presentation on how Expedia Group are using Backstage internally. Expedia is a huge organization with many engineers employed so this could be very interesting indeed.

Roughly a week later, on March 25th, the first ever Backstage Open Mic will take place. This is a community event where anyone can talk about technical topics or their experiences with Backstage. We at Roadie will present on how we're deploying Backstage on Kubernetes using terraform and flux. RSVP [here](https://frontside-software.typeform.com/to/ICn2IRZM).

## Merged last week

61 pull requests were merged last week. Here are the highlights.

### CRD Support for the Kubernetes plugin

Spotify engineer Matthew Clarke, who you may have recently come across on [the Kubelist podcast](https://kubelist.com/issue/117/), contributed CRD support for the Backstage Kubernetes plugin. So far it supports ArgoCD Canary rollouts, with more rollout types in the pipeline. [#4892](https://github.com/backstage/backstage/pull/4892)

If you use ArgoCD Canary rollouts you'll get a view like this inside Backstage and you'll be able to see your rollout progress over time.

![A list of deployment steps with checkboxes to show which steps have completed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28r04sykxyk1jmsk44vf.png)

### Bitrise plugin

SDA SE contributed a plugin for mobile app CI/CD platform [Bitrise](https://www.bitrise.io/) this week. It can quickly show you when your mobile builds are failing and even allow you to download the artefact generated by the builds. [#4746](https://github.com/backstage/backstage/pull/4746)

![a list of builds inside Bitrise showing the date it ran, the success status and a link to download the artefact. Some portions are blurred out.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2tk9ipf968rahw2zlua.png)

### Backstage errors package

The Backstage team have started an effort to standardize error reporting in Backstage in order to improve consistency when things go wrong. There is now a `@backstage/errors` package and an error panel which shows the most pertinent information to the user immediately and can also expand to show more details. [#4903](https://github.com/backstage/backstage/pull/4903)

I've seen a number of discussions about when and how to display errors to the user in Backstage so it's good to see standardization begin in this area.

![screenshot of an error in Backstage. Orange bar with a warning about a 403 NotAllowedError inside.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfb0m5lq4kgkxw1fp7gb.png)

That's all for this week. Get upgrading folks!