CuriousCoder

@chopsueey
15 Followers
18 Following
99 Posts
Posting webdev related things
linktreehttps://linktr.ee/curiouscoder

Typeface or Font?

The #typeface is the overall design style.

The #font is a complete set of characters that share the same typeface with specific variations like weight, size, and style.

Typeface: Times New Roman, Arial

Font: bold 12pt, italic 20pt

#typography #webdev

What is Currying?

#currying, named after Haskell Curry (1900-1982), is a technique of transforming a function that takes multiple arguments into a sequence of functions, each taking a single argument. For example, a function f(a, b, c) becomes f(a)(b)(c).

This is accomplished using closures. When you call f(a), it returns a new function that "remembers" the value of a. When you then call that returned function with b, it returns another function that remembers both a and b, and so on. This ...

Closure Explained!

It simply means a function can access variables from its outer function, even after the outer one finishes running. This "closed-off" space with remembered variables is the #closure.

#programming #javascript #webdev

What is TanStack?

#TanStack is a collection of #JavaScript libraries that provide convenient tools for common problems when building a web application, such as data fetching and caching, client-side routing, state management and more.

They're also working on a full-stack React framework called 'TanStack Start', which is currently in beta. It will include SSR, Streaming, Server functions, bundling (Vite) and more.

https://tanstack.com/

#react #framework #webapp

TanStack | High Quality Open-Source Software for Web Developers

Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.

Merry Christmas everyone! 🎄 🎅

#santa #programming #christmas

What is a Generator in #JavaScript?

A #generator is like a regular function, but with stepwise execution control. Instead of executing from start to finish in one go (like normal functions), a generator can pause and resume its execution, remembering its state and continue evaluating from there.

To do that, we must use the 'yield' keyword. If we use 'return', we will stop our Generator and can return a final value.

So a Generator can 'generate' something on demand, which can be...

What is a First-Class-Citizen in Programming?

When an entity (like a function) is considered a first-class citizen, it means that it can be used just like other fundamental data types (e.g., numbers,
strings):

#programming #javascript #python #webdev

When to use Normal Functions in #JavaScript?

In general, normal functions are a bit more verbose and readable compared to Arrow Functions.

Function declarations are fully hoisted, meaning you can call them before they are defined in your code. This is useful for #code organization.

Their this binding is dynamic - so "this" depends on where we call the function, not where we wrote them - which is perfect for using them as object methods and referring to specific class instances.

So, as a ...

What is a Web Worker?

Web workers are a powerful feature in #JavaScript that allow you to run scripts
in the background, separate from the main thread of your web application.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API

#webworker #webdev #performance

Web Workers API - Web APIs | MDN

Web Workers makes it possible to run a script operation in a background thread separate from the main execution thread of a web application. The advantage of this is that laborious processing can be performed in a separate thread, allowing the main (usually the UI) thread to run without being blocked/slowed down.

MDN Web Docs