Pull to refresh
149.89

JavaScript *

High-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm

Show first
Period
Level of difficulty

Cracking Reduce Concept In Just 10 Minutes

Reading time3 min
Views1.4K


Being a developer, I love to code especially in JavaScript. As per my experience, using reduce function is one of the toughest tasks in JS. Let me first elaborate on the Reduce concept!

In Wikipedia, it has many names viz.

Reduce
Fold
Accumulate
Aggregate
Compress

It is a function that folds a list into any data type. It's all about breaking a structure down into a single value. It's like folding a box! With reduce, you can turn an array [1,2,3,4,5] into the number 15 by adding them all up.
Read more →

Now is the time to make a fresh new Windows Terminal profiles.json

Reading time3 min
Views7.7K
I've been talking about it for months, but in case you haven't heard, there's a new Windows Terminal in town. You can download it and start using it now from the Windows Store. It's free and open source.

At the time of this writing, Windows Terminal is around version 0.5. It's not officially released as a 1.0 so things are changing all the time.

Here's your todo - Have you installed the Windows Terminal before? Have you customize your profile.json file? If so, I want you to DELETE your profiles.json!

Read more →

Memoization Forget-Me-Bomb

Reading time10 min
Views1.1K


Have you heard about memoization? It's a super simple thing, by the way,– just memoize which result you have got from a first function call, and use it instead of calling it the second time - don't call real stuff without reason, don't waste your time.


Skipping some intensive operations is a very common optimization technique. Every time you might not do something — don’t do it. Try to use cache — memcache, file cache, local cache — any cache! A must-have for backend systems and a crucial part of any backend system of past and present.

Got the idea? Forget it!

Puppeteer CAPTCHA bypass by Token or Clicks: Which is Faster? A Practical Comparison

Reading time4 min
Views1.2K

In my work, I often encounter various services designed to simplify tasks across different areas. I’m not talking about tools like GSA or A-Parser but about Zennoposter or BAS. I am no professor in automation, so I’ll explain in layman's terms: these services are essentially complex, multi-layered platforms that allow the creation of bots and scripts to perform almost any task without human intervention—a sort of “basic neural network.” By the way, such services existed long before neural networks became mainstream for everyday use.

While exploring BAS, I encountered a situation where many developers creating BAS scripts (ironically, developers developing) idealize CAPTCHA solving using clicks.

Read more

How to Build an AI Image Analyzer with Project IDX and Gemini API: A Simple Guide

Level of difficultyEasy
Reading time3 min
Views837

Do you want to know how to build an AI image analyzer? Then read this article till the end! I'm going to show you how to build AI analyzer tools really simply, so you almost don't have to have any prior knowledge. I will take you step by step, and we will use Project IDX and the Gemini API. This means you don't have to set up anything; everything we will do is on the cloud. If you're ready, then let's get started!

Read more

The new code as the side effect

Level of difficultyMedium
Reading time4 min
Views1.3K

The new code as the side effect

If we use the reducer function for form data handling It has an infinite list of returned values, which expands when the next development iteration updates the interface defining the form and implements a new field. So the reducer pattern is procedure code, not a functional

Read more

React Global State Management: A Brief History and a Quick Guide

Level of difficultyEasy
Reading time9 min
Views3.7K

If you’re a React developer, you know how important state management is. State is the data that powers your UI, making it interactive and dynamic. But managing state in React can be tricky, especially when you have to share it across multiple components or deal with complex and asynchronous logic.

That’s why over the years, React developers have come up with various solutions for state management, each with its own advantages and disadvantages. In this article, we’ll take a look at some of the most popular ones and how they evolved. We’ll also review some of the current state-management libraries and how to choose the best one for your app.

Read more

Crafting Enhanced Dropdown Interactions with Svelte: Constructing an Advanced Dropdown Component with Svelte

Level of difficultyMedium
Reading time3 min
Views793

In the realm of frontend development, the quest for enhancing user interaction remains a constant pursuit. Developers, inspired by innovation, often seek solutions to refine components for a seamless user experience. Today, we delve into the construction of an advanced dropdown component using Svelte — a framework known for its simplicity and effectiveness.

Read more

Creating a mini-game with a drip effect and moving circles. Part 1

Level of difficultyEasy
Reading time7 min
Views1.1K

Hello, dear users of the IT world!

In modern web development there are many ways to make your website interesting and attractive to users. And even using simple techniques you can achieve great results!

I suggest you to create a mini-game from scratch yourself. And then, you can use it to liven up and add interactivity to any web page.

Read more

React Custom Hook: useDebounce

Level of difficultyMedium
Reading time2 min
Views3.1K

This custom hook is particularly beneficial in scenarios where you need to handle user input, such as search bars or form fields, where you want to delay the execution of an action until the user has finished typing or interacting. It's also useful for optimizing network requests, ensuring that requests are sent only after the user has stopped typing or selecting options.

Read more

You don't know Redis (Part 2)

Reading time4 min
Views2.7K

In the first part of You don't know Redis, I built an app using Redis as a primary database. For most people, it might sound unusual simply because the key-value data structure seems suboptimal for handling complex data models.

In practice, the choice of a database often depends on the application’s data-access patterns as well as the current and possible future requirements.

Redis was a perfect database for a Q&A board. I described how I took advantage of sorted sets and hashes data types to build features efficiently with less code.

Now I need to extend the Q&A board with registration/login functionality.

I will use Redis again. There are two reasons for that.

Firstly, I want to avoid the extra complexity that comes with adding yet another database.

Secondly, based on the requirements that I have, Redis is suitable for the task.

Important to note, that user registration and login is not always about only email and password handling. Users may have a lot of relations with other data which can grow complex over time.

Despite Redis being suitable for my task, it may not be a good choice for other projects.

Always define what data structure you need now and may need in the future to pick the right database.

Read more

$mol_func_sandbox: hack me if you might!.

Reading time6 min
Views1.9K

Hello, I'm Jin, and I… want to play a game with you. Its rules are very simple, but breaking them… will lead you to victory. Feel like a hacker getting out of the JavaScript sandbox in order to read cookies, mine bitcoins, make a deface, or something else interesting.



https://sandbox.js.hyoo.ru/


And then I'll tell you how the sandbox works and give you some ideas for hacking.

Read more →

About integration tests

Reading time2 min
Views2.1K
[Previously] I was talking about combinatorial complexity of integration tests in multicomponent systems, so let me remind. Let's build a simple system with only 3 components inside. It can be three independent modules and we want to provide some communication between them (message passing good enough for the purpose of the example) So we have 3! = 6 possible configuration to test. Before going deeper lets see how Quicksort fights a combinatorial complexity.

[Quicksort] reduces complexity on each pass of a given input. So far so good. Let's imagine example with 10 elements. How many possible permutations do we have? you are right: 10! ~= 3,6 * 10^6. So on the first pass the complexity will be reduced: 5!*5!, on the next pass it will be further reduced till 2!*3!*2!*3!… after logn times we will have 1!*1!*1!...1! = 1 possible position, and our given input is sorted. Gotcha. (attentive reader can mention about worst case scenario of quicksort, but lets discuss it someday) Coming back to our example…
Read more →

Quick Sort Algorithm in JavaSript (pivot as the first element + pivot as the random element)

Reading time5 min
Views21K

Introduction


Quick Sort is one of the most famous and effective Sorting Algorithms. The comprehension of how it works will undoubtedly help you in your JavaScript learning. Also, questions on algorithms are popular in job interviews, so there is a big chance you will be asked to describe how Quick Sort works.

I’m sure that I convinced you that Quick Sort is important. Let’s start!


Read more →

Authors' contribution