teleren/devto huggingface dataset:
Quick Programming Tip: The Silver Searcher
Tags: productivity, beginners, opensource, programming
Published: 2019-04-14 20:19:47

---
title: Quick Programming Tip: The Silver Searcher
published: true
description: How to search your code base more efficiently.
tags: productivity, beginners, opensource, programming
---

[The Silver Searcher](https://github.com/ggreer/the_silver_searcher) is a code searching tool, it searches your entire code base in a very fast and efficient manner and it supports regex. I often use it when my IDE’s search capabilities are slow or can’t find what I’m looking for. You don’t have to use it exclusively, you can combine it with your IDE’s search capabilities to do your job faster, and most of the time it is also much easier to search using ag.

For example, In Pycharm, I can open up the integrated terminal (`ALT+F12`) and type `ag my-query` to get the list of files and lines which match my query, this is much faster than trying to search via the IDE.

Thanks for reading!
Who even needs QA now adays?
Tags: qa, testing, advice, programming
Published: 2019-04-14 20:00:47

---
title: Who even needs QA now adays?
published: true
description: 
tags: QA, testing, advice, programming
---
Now, I want to be crystal clear here, **I very much respect** the job profession of **Quality Assurance** *(QA's)*. I think, without having a QA watching your back, you are screwed. And if you are lucky enough to have a QA watching out for you, it is in your best interest to be respectful and appreciative to him or her.
I have seen too many developers make fun or tease QA, and guess what happens, *they test someone else's code, and **you** leave out to dry*.
Don't be stupid, respect your QA.

However, QA's **do have less expectations** placed on them. They are not required to know half a dozen programming languages, design systems, debug software nor are they having to coordinate their efforts with other programmers. 

**Their job is to assure the quality of the system, and to verify it is working correctly.**

I think it is of the upmost important, that we, as IT professionals understand that **QA's and Dev's are two sides of the same coin**. We fundamentally want different things, and that is perfectly fine.

To the **developer** reading this, I want to say. It might feel like your QA is calling you out, and making you look bad by pointing out your mistakes, but understand he or she is watching out for you. QA is responsible for making sure your software is bug free, the faster they find them, the sooner both of you can move on. Debugging issues in production sucks. Don't be a dick.

To the **QA** reading this. Part of your job is telling programmers they are wrong, and their code doesn't work correctly. Now, that being said, there isn't a person on the planet who enjoys knowing there are flaws in something they have built. 
If a developer seems to gets irritated with you, maybe try to understand it's really an insecurity.
If a developer ignores you, they might just be busy, but you need to make sure he or she understands the issue you discovered, and he will probably tell you are wrong, and you aren't. You have to stick to your guns, and make he or she understand, because it is your job.

And to **Anyone else** reading this.
If you hear a developer call a QA stupid, or even if you hear a developer make a "light-hearted joke". I encourage you to take it seriously, it may look innocent, but it isn't. You need to step in, call the developer out, and mention that the QA is doing their job, and it is not the developers job to question the accurately of the quality assurance specialist.
Iteration with the Previous Result
Tags: dlang, algorithms, ranges
Published: 2019-04-14 18:09:25

---
title: Iteration with the Previous Result
published: true
description: 
tags: dlang, algorithm, ranges
---

I am working with zip archives and wanted to create an archive for my unittesting. This creation does no touch the file system so I need to specify the structure. 

To facilitate directory structure I'll need to archive the directory tree. Actually for my purposes it looks like I don't but that isn't the point. 

I put together this range which allow for create each stage of directory, [With Previous](https://run.dlang.io/gist/JesseKPhillips/9fe592976261db05c7a83d4d631f74ef?compiler=dmd&args=-unittest%20-MAIN).

```dlang
    import std.path;
    import std.algorithm;
    static assert(r"foo/bar/foobar".pathSplitter
         .withPrevious!buildPath
         .equal([
                buildPath("foo"),
                buildPath("foo","bar"),
                buildPath("foo","bar","foobar")]));

```

I specify a path as a string and use pathSplitter to provide each part of the path. 

I feed this to my withPrevious range and utilizes buildPath to create a OS specific path from components.

The result is equal to each part built on the previous. I don't think I will utilize this for my unittests, but I do like what this provides and is not specific to paths or strings.
Respond to and remediate security issues
Tags: azure, security
Published: 2019-04-14 17:21:40

---
title: Respond to and remediate security issues
published: true
description: Manage security operations 
tags: #Azure, #Security
---
**Investigate escalated security incidents**
- The investigation feature in Security Center allows you to triage a potential security incident, understand its scope, and discover its root cause
- This feature facilitates the investigation process by linking all entities: security alerts, users, computers and incidents
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/5rcb2m0vcw7x3z28inqz.png)
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/mv4pa3mqg67ybhbfeeec.png)
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/j7vqvqnzrnecbfxe7uuc.png)
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/wx8qfhbcnqflckt30n82.png)
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/gwcbwokpjzno15d7aamd.png)

Analyze threat protection and manage actionable recommendations by using Azure Security Center
- Security Center constantly reviews your active recommendations and calculates your security score accordingly
- Security Center derives the score of a recommendation from its severity and from the security best practices that will most affect your workload security
- Security Center also provides you with an overall security score, which is an accumulation of all your recommendation scores
- You can fix the unhealthy resources by following the remediation steps in the recommendation
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/9pjisd7zhgv1bjfv8hc6.png)
Interviewing Against OOP (Object-Oriented Programming) Questions
Tags: interview
Published: 2019-04-14 17:13:27

---
title: Interviewing Against OOP (Object-Oriented Programming) Questions
published: true
description: Interview questions to prepare for you for OOP based interviews
tags: Interviews
---

It’s never a good idea to go into an interview unprepared. While you may have the best experience and a portfolio showing that you’re an expert, the more information you have on the questions you may be asked, the better. This is especially true when it comes to [object-oriented programming (OOP)](https://www.algrim.co/posts/173-object-oriented-programming-interview-questions) interview questions.

While some OOP interview questions may seem unnecessary, they actually tell the interviewer that:
• You came prepared
• You know how to relay your knowledge
• Your understanding is at a certain level (e.g. expert, intermediate)

Ultimately, the manner in which you answer these questions will determine whether you’ll get the job, and/or what kind of position you’ll get. To help you prepare as much as possible, we’ve compiled all the possible questions you may be asked in your next OOP interview. Let’s take a look!

## 1. WHAT ARE OBJECT-ORIENTED PROGRAMMING, A CLASS, AND AN OBJECT?
Object-oriented programming is a programming language model that relies on objects (as opposed to actions), and data (as opposed to logic). These objects typically contain data and interact with one another, which is why they often have self-modifying features once the proper procedures have been put into place. Classes are representations of object types, and objects are instances of class with their own state, behavior and identity.

## 2. WHAT ARE THE MOST COMMON OOP LANGUAGES?
Java, C++, C#, Python, PHP, Ruby.

## 3. WHAT CAN OOP BE BASED ON?
Typically, it’s based on classes, which are representations of object types. However, OOP can also be prototype-based.

## 4. WHAT’S THE DIFFERENCE BETWEEN CLASS-BASED AND PROTOTYPE-BASED OBJECTS IN OOP, AND WHAT’S AN ABSTRACT CLASS?
When OOP is class-based, we create objects and then sort them into appropriate classes with shared attributes. For example, if we have apples and oranges, we can expect both to have the attributes of fruit (have a color, taste, etc.). However, when we use the prototype-based objects, the objects are our main point of focus. There are no classes, and we observe objects as standalone entities. Finally, an abstract class is a class that can’t be instantiated.

[Continue reading on Algrim.co](https://www.algrim.co/posts/173-object-oriented-programming-interview-questions)
How much of a page is occupied by images?
Tags: javascript, html
Published: 2019-04-14 16:41:51

I was curious how much of a page's area was occupied by images. So I hacked together a rough approximation:

```javascript
function PercentOfPage(selector) {
    return [...document.querySelectorAll(selector)].reduce(
            (a, i) => a + i.offsetWidth * i.offsetHeight,
            0
        ) / (document.body.offsetHeight * document.body.offsetWidth);
}
```

For my purposes I'd use `const imgArea = PercentOfPage('img');`.

It doesn't take into account whether the target elements are actually visible (for example, they might be positioned off-page or behind another element). But it's good enough for my purposes.

Please offer suggestions! I'd love to fine-tune this utility a bit more.

P.S.: this page is ~1% images.
Interviewing QA Engineers
Tags: jobadvice, interview
Published: 2019-04-14 16:10:13

---
title: Interviewing QA Engineers
published: true
description: How to interview and get interviewed for the QA Engineer position
tags: Job Advice, Interviews
---

If you’re a part of a software enterprise, you’ve probably heard about how effective [QA engineers](https://www.algrim.co/posts/237-qa-engineer-interview-questions) can be during the release of an innovative new product. A lot of the time, the difference between a financially profitable application launch and a failed application launch lies in whether or not a QA engineer is part of the production team.

The following is a list of QA engineer interview questions and answers that hiring managers can use to properly interview for potential QA engineers.

First, what exactly is a QA engineer, and why do digital companies need at least one on their payroll? Let’s take a look.

# WHAT IS A QA ENGINEER?
A quality assurance engineer, also known as QA engineers, are niche engineers that track the process of a product’s creation from the very beginning to the very end. They typically manage production and test every part of a product to make sure it meets company standards before moving on to the next step in the manufacturing processes.

# THE ROLE OF A QA ENGINEER
The ultimate goal of a QA engineer is to protect the product (and ultimately the company) from issues related to government regulations. They make sure the product is market-ready and ready to be released to the public. QA engineers are primarily a part of manufacturing and software teams.

Hiring a QA engineer for any size of a digital software company is a really wise idea. They are an additional safeguard against any faults, failures, or malfunctions that could happen when developing a digital product.

[Continue reading on Algrim.co](https://www.algrim.co/posts/237-qa-engineer-interview-questions)
Interviewing Candidates On SSRS
Tags: interview
Published: 2019-04-14 16:07:11

---
title: Interviewing Candidates On SSRS    
published: true
description: How to interview against SSRS and get a job
tags: Interviews
---

SQL Server Reporting Services is a vital reporting aspect of website and application creation. Still, not many hiring managers for technical enterprises know enough about SQL Server Reporting Services (or [SSRS](https://www.algrim.co/posts/260-ssrs-interview-questions) in order to interview prospective engineers about it.

This is a grand mistake. All software engineers in any size of a company should know quite a bit about SQL Server Reporting Services and implement that knowledge into working on software products.

We’ll be dividing into some SQL Server Reporting Services interview questions and answers that hiring managers should be asking prospective developers in this guide. First, let’s take a look at what SQL Server Reporting Services is in depth and why engineers and developers use SQL Server Reporting Services in the first place.

# WHAT IS SQL SERVER REPORTING SERVICES?
SQL Server Reporting Services stands for “SQL Server Reporting Services.” It is a solution that users, namely businesses in the software industry, can use to deploy their own premises for managing, publishing, and creating reports. It is also used for delivering reports to the correct users in a variety of ways, including via web browser, via a mobile device, or via email.

[Continue reading on Algrim.co](https://www.algrim.co/posts/260-ssrs-interview-questions)
Interviewing Candidates On JSON
Tags: interviewing
Published: 2019-04-14 16:05:52

---
title: Interviewing Candidates On JSON
published: true
description: How to interview candidates for JSON
tags: Interviewing
---

JSON is commonly covered in technical interviews as it relates to common web development practices for modern applications. JSON objects are an easy way to share data between two applications or between models. It is also considered a fairly lightweight way to pass data. Lastly, the increased usage of JavaScript-based applications has made [JSON](https://www.algrim.co/posts/226-json-interview-questions) a more popular file type for passing and parsing data.

# WHY IS JSON COVERED IN TECHNICAL INTERVIEWS
JSON is covered in technical interviews because it is fairly standard practice for sending data between backend and front-end applications and frameworks. For example, if you are a backend engineer and wanting to work with a front-end engineer, you will need to create the logic that serves up the front-end JSON objects. This is known as an API-driven development framework and in recent years (2013 — now) has become far more popular than what used to be standardized (sending all available data to the front-end controller in order to be parsed by that controller). If you are going to be working with teams, knowing JSON is going to be essential. Whether you are on the front-end or backend team, this is something you will need to know.

[Continue reading at Algrim.co](https://www.algrim.co/posts/226-json-interview-questions)
How to send emails that are not marked as SPAM?
Tags: email, mailchimp, mailgun
Published: 2019-04-14 16:05:13

---
title: How to send emails that are not marked as SPAM?
published: true
description: When you are using third-party service like MailChimp and with your own domain to send your emails you have to do several steps to prove all mailboxes that you are you and that you are not some spammer.
tags: email, mailchimp, mailgun
cover_image: https://thepracticaldev.s3.amazonaws.com/i/fo5x2p24ydsmnmzatekp.jpg
canonical_url: https://lyubomir-angelov.com/how-to-send-emails-that-are-not-marked-as-spam/
---

Recently I helped one company to prevent common emails for registrations and etc. to be marked as SPAM automatically from users mailboxes.

When you are using third-party service like MailChimp and with your own domain to send your emails you have to do several steps to prove all mailboxes that you are you and that you are not some spammer.

To do that all services will have instructions on how to set DKIM and SPF records to your domain name that you will be using for sending the email. Usually, I create a subdomain like `mail.example.com`, then we have to add those DKIM and SPF records provided by the service.

They represent texts which tell to mailboxes that you are using different service for sending emails then your own server

MailChimp examples are:

```bash
    • DKIM:
    Create a CNAME record for k1._domainkey.yoursite.com with this value: dkim.mcsv.net.

    • SPF:
    Create a TXT record for yoursite.com with this value: v=spf1 include:servers.mcsv.net ?all
```

If you follow all the instructions of the service you will have a subdomain with DKIM and SPF records and then you should be ready to send all your newsletters and common emails with no problems.

Despite the above configurations, mailboxes like Gmail might mark your emails as SPAM. Why? Because there is one last step that you have to configure when sending emails.
Your **From** record have to match the sender, otherwise, it is not trusted.

Let's give an example:

```bash
    Received: by mail.example.com
    From: info@example.com
    To: someuseremail@gmail.com
```

In that example, the domain that the service is using for sending the email is different from the domain that is used in the *From*.

But if you change that to:

```bash
    Received: by mail.example.com
    From: yourfriends@mail.example.com
    To: someuseremail@gmail.com
    Reply-to: info@example.com
```

Emails won't be marked as spam because sender domain and email *From* domain are the same.
With **Reply-to** when the user wants to reply to our email, he will write not to *yourfriends@mail.example.com* but to what we defined in *Reply-to*.

Hope that will help someone with his emails. :)
Manage security alerts 
Tags: azure, security
Published: 2019-04-14 16:03:59

---
title: Manage security alerts 
published: true
description: Manage security operations 
tags: #Azure, #Security
---
**Create and customize alerts**
- Azure Security Center automatically collects, analyzes, and fuses log data from your Azure resources, the network, and partner solutions
- It can detect events such as:
    - Compromised VMs communicating with known malicious IP addresses
    - Advanced malware detected by Windows error reporting
    - Brute-force attacks against VMs
    - Security alerts from integrated partner security solutions, such as antimalware or web application firewalls
- When Security Center detects a threat, it creates a security alert
- Security Center logs individual security alerts and combines individual alerts into incidents
- An incident is a collection of related individual alerts

**Manage security alerts**
- In the Azure portal, the Overview page for Security Center displays an at-a-glance view of your environment 
- The Detection area of the Overview page displays a graph of your current alerts, colored according to severity level (high, medium, or low)
- The bottom part of the blade displays details for each alert
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/j4y1yol60131id3buwr6.png)
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/2kxjvy7luprtxk9m40fn.png)

**Configure a playbook for a security event by using Azure Security Center**
- A security playbook can help automate and orchestrate your response to a specific security alert that Security Center detects
- Security playbooks in Security Center are based on Azure Logic Apps
- The Security Center team has set up a GitHub repository with instructions on how to create a security playbook 
- In Security Center, you can add actions or conditions to an existing playbook
Some Thoughts on Code Review
Tags: generalstuff, git, codereview, pullrequest
Published: 2019-04-14 17:51:31

---
title: Some Thoughts on Code Review
published: true
tags: general stuff,git, code review, pull request
canonical_url: https://zeitschlag.net/some-thoughts-on-code-review/
---

A few days ago, Max and me recorded a new episode of the German [Codestammtisch-podcast](https://codestammtis.ch). We talked about [code review](https://en.wikipedia.org/wiki/Code_review) and [pull requests](https://help.github.com/en/articles/about-pull-requests). In the last couple of days I witnessed again, how useful these two can be. The full episode will air on March 22nd — I still have to produce it.

Half a year ago, my team moved from [Subversion to git](https://zeitschlag.net/all-things-version-controlled/). And we used that opportunity to introduce code reviews and pull requests as well.

They do not only serve as a tool to spread knowledge accross the team and increase the [bus factor](https://en.wikipedia.org/wiki/Bus_factor), but they also serve as a safety net: They've helped us to catch a lot of these tiny quick-fix bugs I mentioned in my [last article](https://dev.to/zeitschlag/quickfix-quickfix-nil-2369), especially last week. These things happen easily, if your mind is somewhere else when you work, but hey, code review is here to save the day!

Last week was a bit stressful in the office. As a team of three, we're handling multiple projects at the same time. Although it's not a good idea in general to tackle more than one thing at once, it's not possible to fully concentrate on only one of these projects, unfortunately. And therefore it's a bit stressful at the moment.

But we don't want to get rid of code reviews, as they've turned out to be incredibly useful for us. Even if that means that we have to switch projects multiple times a day, it's totally worth the effort. The earlier we catch bugs, the better (and cheaper). Despite the stress, I consider it crucial to review code thoroughly, but respectfully:

- Whenever I find a code change I appreciate, I take the time to write that down and thank the author.
- If I don't see or understand the reason for a change, I just ask, so that the author can explain it to me. Before I suspect a mistake, I want to make sure, that I didn't miss something.
- And if I find a tiny bug that slipped in, I respectfully ask the author to fix it, too.

**Nice things don't take a lot of time, are mostly free and (hopefully) improve everybody's mood.**

A few days ago, I read a German article on [heise.de about pull requests](https://www.heise.de/developer/artikel/Nachgebessert-Pull-Request-Workflows-in-der-Praxis-4341944.html?seite=all). It came to my mind then, that we didn't talk about the task of a reviewer. Should they only do the code review? Should they run and test the app as well?

In the end we came to the conclusion, that a thorough code review and a short manual test should be sufficient for us. But nevertheless, we talked about it and killed another assumption. Feels good!
[C++ CODE] Roman to Integer
Tags: thetealpickle, algorithms, coding, challenge
Published: 2019-04-14 15:45:50

---
title: [C++ CODE] Roman to Integer
published: true
description: Given an roman numeral convert it to an integer 
tags: #thetealpickle #algorithms #coding #challenge
cover_image: https://thepracticaldev.s3.amazonaws.com/i/etkgnxlrwf7oznvuuxz1.png
---

THE TEAL PICKLE CODING CHALLENGE!! Given a roman numeral convert it to an integer. I solved this problem with bae (C++). TRY IT 👀

<img src="https://thepracticaldev.s3.amazonaws.com/i/tm318rayk2eyj2boiw81.png" />


Check out my solution and share yours!! ~ 💻 💻 

<img src="https://thepracticaldev.s3.amazonaws.com/i/miad3f1z7o0n66frwr2b.png" />