Open in app

Sign in

Write

Sign in

Pavel Saman
Pavel Saman

87 Followers

Home

About

Sep 29

ack = grep for programmers

I’ve recently found ack which seems like an interesting tool that can, in some situations, save a bit of time. $ sudo zypper in ack (or whatever your package manager or means of installing new software is) The man page says: NAME ack — grep-like text finder SYNOPSIS ack [options]…

Tools

2 min read

Tools

2 min read


Sep 13

Code Coverage In Different Tools

Here’s a short rant about code coverage. I have a project in TypeScript. It’s a tiny tool to calculate code coverage from LCOV files. I’ve written unit tests to check it’s functionality and handling of various types of data. Now it’s time to execute the tests and maybe get some…

Code Coverage

2 min read

Code Coverage In Different Tools
Code Coverage In Different Tools
Code Coverage

2 min read


Sep 3

Quick Tip: refactoring.guru

Here is a quick tip if you want to become a better coder. Refactoring.guru is a great resource for learning about refactoring or design patterns. There are some free resources and two paid courses about the two topics. I’ve bought the one about refactoring and it’s worth the price. Enjoy…

Coding

1 min read

Coding

1 min read


Jan 21

Scopes and Variable Shadowing in JS

If I give you the following example code: const age = 30; function func() { const age = 31; console.log(age); for(let i = 0; i < 2; i++) { const age = 32; console.log(age); } } func(); console.log(age); What will be printed to the console? Try to answer before you…

JavaScript

2 min read

JavaScript

2 min read


Jan 19

Postman — Covert String to base64

Sometimes you need to get base64 encoded string inside Postman. Or decode a base64 encoded string. I think two easy ways are: const base64encoded = btoa('stringToEncode'); // c3RyaW5nVG9FbmNvZGU= const decoded = atob(base64encoded); // stringToEncode Another way to encode might be: Buffer.from('stringToEncode').toString('base64'); // c3RyaW5nVG9FbmNvZGU=

Base64

1 min read

Base64

1 min read


Jan 18

Get All NPM Scripts from package.json

When working with package.json files, I often need to get all scripts to find the one I want to run. To do that, I can either open the file and find the script I need, which is slow, or I can use jq to get all the NPM scripts right…

NPM

1 min read

NPM

1 min read


Jan 2

Send Mocha Test Result to New Relic

I’ve talked about Mocha test results a few times — in Mocha JSON Report(er) and Cache Mocha Test Results And Run Only Failed Test Files On Re-runs. Today I’ll add one more piece — sending Mocha test results to New Relic. New Relic is a monitoring platform that can gather…

Mocha

3 min read

Send Mocha Test Result to New Relic
Send Mocha Test Result to New Relic
Mocha

3 min read


Dec 26, 2022

Cache Mocha Test Results And Run Only Failed Test Files On Re-runs

Mocha can generate a JSON file with test results. It might be sometimes useful to find all failed test files, e.g. when I want to re-run only tests from such test files. Running all automated tests might be time-consuming, so you might want to look for various ways to run…

Mocha

5 min read

Cache Mocha Test Results And Run Only Failed Test Files On Re-runs
Cache Mocha Test Results And Run Only Failed Test Files On Re-runs
Mocha

5 min read


Dec 25, 2022

Keep Git Authors in Order With Gitmailmap

Gitmailmap is a good way to keep the git authors in order. The official git documentation says: If the file .mailmap exists at the toplevel of the repository, or at the location pointed to by the mailmap.file or mailmap.blob configuration options (see git-config[1]), it is used to map author and…

Git

2 min read

Git

2 min read


Dec 24, 2022

Channel Notifications Are Not Always Useful

I see a lot of content online about creating channel notification about the results of automated checks. I don’t think this is as useful as such posts sometimes try to portray. What I have experienced is that there’s usually too many (Slack) channels that it is impossible and ineffective to…

Data

1 min read

Data

1 min read

Pavel Saman

Pavel Saman

87 Followers

SW Tester

Following
  • Andrey Enin

    Andrey Enin

  • SatoshiLabs

    SatoshiLabs

  • Melissa Fisher

    Melissa Fisher

  • Scott H. Young

    Scott H. Young

  • Brijesh Deb

    Brijesh Deb

See all (17)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams