DEV Community

Lukáš Zahradník profile picture

Lukáš Zahradník

💻 Software development | 🧠 Machine Learning

Location Czech Republic Joined Joined on  github website

Education

Czech Technical University in Prague

Work

Fullstack developer

All 130 comments

Improve your JS skills with those tips #2

Can you provide some benchmarks for you approach of property ...

Big-O Notation from a Non-CS Perspective

Hey, glad my feedback helped at least a little bit. It looks ...

Big-O Notation from a Non-CS Perspective

Hi, good article. I have some points that I don't really agr...

Formatting strings in Python

Hi, look into f-strings (python.org/dev/peps/pep-0498/) if yo...

Python Lambda functions

One small detail - your two approaches do not have the same r...

Algorithms are ruining our lives 😒

I mostly agree with you that YouTube has those issues and get...

Algorithms are ruining our lives 😒

They use machine learning, which I would describe as using m...

Algorithms are ruining our lives 😒

Can you share with us what the "real AI" is then? And why the...

Algorithms are ruining our lives 😒

Can you define what the "real AI" is and why their AI isn't o...

JS interview in 2 minutes / value vs reference

You are correct. But the behavior I described is what the pas...

JS interview in 2 minutes / value vs reference

What you described is "call by sharing" (en.wikipedia.org/wik...

JS interview in 2 minutes / value vs reference

There is no "passed by reference" in JavaScript.

What is your Linux distribution of choice and why?

How does building it yourself make it "solid stable"?

✔||🤢 Commit or Vomit | Switch(true)

I wanted to react to Siddhart's code and I don't see any reas...

✔||🤢 Commit or Vomit | Switch(true)

Well I wouldn't commit your code, because it had inlined bloc...

The 3 ways to make an asynchronous method in JavaScript

Your "The callback method" example is fully synchronous, not ...

Pure vs Impure Functions

Nice. Yes, that's what I am saying. For example fetching dat...

Pure vs Impure Functions

A side-effect is any operation your function performs that i...

Introduction to Functional Programming

Agree, I don't find using map for it to be the best and clean...

Introduction to Functional Programming

Is that really a valid point? Both indexOf and map in those c...

Introduction to Functional Programming

The immutation example can be achieved with Array.prototype....

Rate my resume out of 10.

I would put freelancing experience and internships into the "...

Rate my resume out of 10.

The proportions of the resume looks weird. Make sure it's A4 ...

Why you should drop ExpressJS in 2021

Express is aiming to be minimal and there are frameworks with...

⚡️Reactend "The story of react.js on backend"

It's not really a fair comparison. Your XML-like syntax is us...

⚡️Reactend "The story of react.js on backend"

Nope, you can go back to year 2000 and use xml instead, if yo...

⚡️Reactend "The story of react.js on backend"

Why do you think this is a great idea? You are introducing an...

If you've tried Linux and opted against using it, tell us why for the chance to be featured on our podcast!

Visual Studio is not Visual Studio Code

Best Programming languages in 2021

One detail, Flutter is not a language.

Why I think Python is not the best starting language

You don't need anything (not even package.json) to run JS in ...

Python VS Nodejs witch is best?

Node.js isn't language in the first place.

17 Pro JavaScript tricks you didn't know

I'm not sure you can call your first example as something a p...

Transforming data with Array.reduce

Hi, I would recommend using approach bellow instead of yours...

Completed this year's Hacktoberfest 2020 challenge!

He implemented those encryptions in c++, but it's not part of...

Chat Application using PHP

You can do the same in every other language. Yours points are...

Stop Using React

Parsing few thousands of markdown is unrelated to React. Also...

Best practices for reversing a string in JavaScript, C++ & Python

or spread [...string]

Understanding Arrays in JavaScript...

let keyword isn't a variable

Capitalize the first letter of every word

Your algorithm will not reduce the complexity to O(n), becaus...

[Challenge] log("this") or log("this").withData({})

Problem with your solution is the setTimeout and how it sched...

[Challenge] log("this") or log("this").withData({})

I don't think this is really possible in vanilla JS.

JavaScript Katas: Higher Version

There are cases where it wouldn't work. For example 1.0.1 and...

The button does not work #345

You should require proper description of the task you are sup...

What´s wrong with Array.reduce ?

Can't you just modify linting rules so that reduce is allowed...

What´s wrong with Array.reduce ?

Math.max exists

Daily Challenge #273 - Remove Duplicates

This isn't O(1)

Two Sum Solution in JavaScript

It's happening in two loops - one in your function and the s...

Two Sum Solution in JavaScript

The most important thing is in this scenario the Time Comple...

Why I Converted from Vue to React

Hi, the code in the first point for Vue isn't equivalent to t...

Project: COVID 19. 😷

They won't, because those are symptoms of every other disease...

Project: COVID 19. 😷

Those features of your data are very general and you are basi...

JavaScript: How to Remove Duplicate Values from Arrays

Hi, your benchmark is wrong for indexOf where you are taking ...

JavaScript: How to Remove Duplicate Values from Arrays

Hi, you are missing return in the reduce approach.

Fired for Agility

You were not fired for "agility", also putting all blame on t...

Switch is ok

Hi, cool article. What do you mean by "It is not pure, and e...

Clean JavaScript - 10 Tips

Replacing conditions with array methods is a bad idea in gene...

Where’s the Sleep Function in JavaScript?

You are promoting that function as a hacky alternative slee...

Where’s the Sleep Function in JavaScript?

Nonsense. It depends on a lot of attributes (engine, hardwa...

The beauty of Functional Programming

Author asked for example of impure function so it's obvious...

#100DaysOfVanillaJS: What is JavaScript, Primitive Data Types & Let, Var and Const

I get what you mean, it just sounds like we should still care...

#100DaysOfVanillaJS: What is JavaScript, Primitive Data Types & Let, Var and Const

C++ has also type inference and it still contains falsy sta...

#100DaysOfVanillaJS: What is JavaScript, Primitive Data Types & Let, Var and Const

TypeScript or C++ where you must declare the value type when...

Clean Code Applied to JavaScript - Part VII: Practical Refactoring Example: Ceaser Cipher

Nice refactor. I would refactor it even more because cipher ...

Tell us what your top unpopular tech opinion is 😈

You can actually use braces with custom encoding. Also lamb...

Tell us what your top unpopular tech opinion is 😈

Ok, so it's overrated because it forces you to make your co...

What’s your alternative solution? Challenge #6

Well, it is inefficient as well. In this example the map i...

What’s your alternative solution? Challenge #6

This is an example of wrong usage of map.

How to scale attributes with normalization and standardization

It does Xstd=X−μσ X^{std} = \frac{X - \mu}{\sigma} Xs...

The dangers of async/await

Well in that case you would use Promise.allSettled, which i...

Stop using for loops. Here's why.

But array prototype functions shouldn't be the first soluti...

Stop using for loops. Here's why.

Yeah, I wasn't specific, but I mentioned that loops are mor...

Stop using for loops. Here's why.

Stop using for loops is really bad advice. You don't event h...

Stop using for loops, here are other cool options

You don't understand. I'm not skeptical at all, I'm using t...

Stop using for loops, here are other cool options

It says that they have these advantages over for loops and ...

Use comments to unit test your code.

Rust has doc examples that can be used as tests

Creating a React code editor and syntax highlighter

I absolutely agree with you, just the "from scratch" hints ...

Creating a React code editor and syntax highlighter

Building the React code syntax highlighter from scratch ...

Immutability, Map, Filter

Your usage of async/await is wrong. First of all, you are a...

Prime numbers

Nice! Thanks for tagging, it wasn't really needed. I just w...

Prime numbers

It doesn't replace the conditional which checks if the numb...

Prime numbers

Easy improvement would be skipping even numbers for (let ...

What the Hex!? (how to generate random hex color codes in javascript)

That's in case of Math.floor, not Math.round as is in the a...

What the Hex!? (how to generate random hex color codes in javascript)

Fair point, easy fix const generateHex = () => `#${Mat...

What the Hex!? (how to generate random hex color codes in javascript)

How? You generate random number and convert it to string of...

What the Hex!? (how to generate random hex color codes in javascript)

Hi, I just wanted to point out small bug. hexCode += digi...

🚀 5 Reasons Why You Should Bet on JavaScript in 2020

First of all, C# has async/await and it had it even before ...

🚀 5 Reasons Why You Should Bet on JavaScript in 2020

Your arguments are misleading. It's quite common for progr...

🚀 5 Reasons Why You Should Bet on JavaScript in 2020

How is that a problem?

Advanced TypeScript Exercises - Answer 2

Yes, it's not valid. But admin should always be type of Adm...

Advanced TypeScript Exercises - Answer 2

But admin should have type Admin. Argument of the function...

🔥 What's Hot in Web Development? — Weekly Picks #112

Stop using for loop, here are other cool options I would...

JavaScript concepts I want to understand (JS event loop)

Fetch - is a set of interfaces for managing fetching resour...

JavaScript concepts I want to understand (JS event loop)

Both are correct definitions of Web API, but each describes...

Stop telling people what are the "best" programming languages to learn

Yes, people should use what they want, but that doesn't mea...

Stop telling people what are the "best" programming languages to learn

not the best idea

The dangers of async/await

Hi, your usage of Promise.all is wrong. You are using Promi...

Check if key exists in Dictionary/Object in Python vs Javascript

The JavaScript version is wrong. The object can contain pro...

Design Patterns: Factory

I think your implementation of the CoolBookFactory is wrong...

How do you write an empty array?

It's not an empty array. It' array of empty arrays.

Vue composable - array pagination

Thank you for your reply. I appreciate that you didn't just...

Currying in JS 🤠

Currying isn't about the content of function (where side ef...

Currying in JS 🤠

Currying is a function that takes several parameters as in...

Vue composable - array pagination

Hello, how is this example more maintainable and/or predict...

The beauty of Functional Programming

Sure let result = 0 function myCount() { for (let i = ...

The beauty of Functional Programming

Well, it is a pure function. What is wrong with accessing ...

The beauty of Functional Programming

The non recursive myCount is a pure function.

Daily Challenge #135 - The Wide Mouthed Frog!

It's used to match any pattern and ignore the value. Right ...

Daily Challenge #135 - The Wide Mouthed Frog!

I don't know much about Haskell, but isn't it more "proper"...

Handling async await

It would require only adding async keyword to your function...

Handling async await

Why cannot be function _verifyUser async? Just make it asyn...

9 Extremely Powerful JavaScript Hacks

Polyfills exist. We cannot be stuck in the past so just we...

9 Extremely Powerful JavaScript Hacks

Hi, good article. I just wanted to point out, that there is ...

Removing duplicates from an array

I thought you meant the way I'm updating accumulator. I ag...

Removing duplicates from an array

I think it's fine and that is still pure. It creates new ob...

Web Assembly from zero to hero - Part 1

One of the main proofs that web assembly's goal isn't to rep...

Removing duplicates from an array

Slightly different version without creating n objects. Prob...

JavaScript: Map an array of objects to a dictionary

The same thing using reduce let dictionary = data.reduce((...

loading...