Канал простого веб разработчика. Делюсь тут мыслями, мемами, кодом, лайфхаками и всем чем можно
Цель: Набрать 1 млн подписчкиов, подрубить монитезацию, сделать курсы про это и пересылать новости из других каналов, отдыхая где-то на море
Всем добра)
Please open Telegram to view this post
VIEW IN TELEGRAM
#dailyDS #datastructure
На повестке дня "Связанный список" (Linked list)😑 .
Базовая структура данных, состоит из так называемых узлов, где хранятся данные и ссылок на последующие узлы.
Преимущества✔️
- Разный порядок элементов в памяти, в то время как порядок списка задается явно;
- Динамичность размера. В некоторых языках программирования при создании массива, нужно задавать его размер.
Недостатки❌
- Время доступа к элементу ленейное;
- Дополнительный расход памяти. На каждое значение прикрепляется указатель на след. узел.
p.s. следующие посты будут на английском. слишком сложные термины на русском, простите
@islombe_dev
На повестке дня "Связанный список" (Linked list)
Базовая структура данных, состоит из так называемых узлов, где хранятся данные и ссылок на последующие узлы.
Преимущества
- Разный порядок элементов в памяти, в то время как порядок списка задается явно;
- Динамичность размера. В некоторых языках программирования при создании массива, нужно задавать его размер.
Недостатки
- Время доступа к элементу ленейное;
- Дополнительный расход памяти. На каждое значение прикрепляется указатель на след. узел.
p.s. следующие посты будут на английском. слишком сложные термины на русском, простите
@islombe_dev
Please open Telegram to view this post
VIEW IN TELEGRAM
For true gamers 💃
Playing Minecraft in the browser. Moreover, you can play in localhost with your budies🍺
Playing Minecraft in the browser. Moreover, you can play in localhost with your budies
Please open Telegram to view this post
VIEW IN TELEGRAM
ASHALET' gpt 4 omni is legit
Check this out:
- Trained on images, audio and text at the same time. Means you can interact in the same way🤯
- Assistent understands your emotions, jokes🖤
- Super smooth language translations💡
- Has a desktop version, which can assist you with your shitty code, explain whats on your display, etc.⌨️
- 128k tokens😵
Going to test it now....
Check this out:
- Trained on images, audio and text at the same time. Means you can interact in the same way
- Assistent understands your emotions, jokes
- Super smooth language translations
- Has a desktop version, which can assist you with your shitty code, explain whats on your display, etc.
- 128k tokens
Going to test it now....
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
My inner lazy developer saying "Mazza" 😱
Code generation seems faster. You can check it here.
Just copy-pasted generated code.
@islombe_dev
Code generation seems faster. You can check it here.
Just copy-pasted generated code.
@islombe_dev
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
#longread #goodtoknow #performance
This post is about Cumulative Layout Shift(CLS) in browsers.
1. Whats this?
2. Why affects to performace?
3. How can be improved?
1. Cumulative Layout Shift (CLS) is a performance metric that quantifies how much content on a webpage shifts unexpectedly during the loading process. These shifts can affect not only the user experience but also the site's SEO and performance😐
2. A high CLS score indicates a poor user experience, as frequent content shifts may lead users to click on unintended elements. This instability can increase bounce rates and negatively impact search engine rankings, making it crucial to optimize.
3. Optimization has varios strats, but coomon are:
- Reserve Space: Specify the width and height, reserve space for images and other interactive elements. If its not specified browser calculates its size after this content loaded and this leads to shifting the entire page😧
- Avoid Dynamic Content Above Static Content: DO NOT INSERT DYNAMIC CONTENT ABOVE EXISTING!!!🔫 Common mistake, you can meet it on different pages, where ads pushed into some block and this block shifts all stuff below 🔫
- Font Loading Strategies: Use CSS's `font-display: swap` to ensure text remains visible during font loading, or preload fonts to avoid FOIT (Flash of Invisible Text)👍
Further Reading:
1. here
2. here
3. and here
@islombe_dev
This post is about Cumulative Layout Shift(CLS) in browsers.
1. Whats this?
2. Why affects to performace?
3. How can be improved?
1. Cumulative Layout Shift (CLS) is a performance metric that quantifies how much content on a webpage shifts unexpectedly during the loading process. These shifts can affect not only the user experience but also the site's SEO and performance
2. A high CLS score indicates a poor user experience, as frequent content shifts may lead users to click on unintended elements. This instability can increase bounce rates and negatively impact search engine rankings, making it crucial to optimize.
3. Optimization has varios strats, but coomon are:
- Reserve Space: Specify the width and height, reserve space for images and other interactive elements. If its not specified browser calculates its size after this content loaded and this leads to shifting the entire page
- Avoid Dynamic Content Above Static Content: DO NOT INSERT DYNAMIC CONTENT ABOVE EXISTING!!!
- Font Loading Strategies: Use CSS's `font-display: swap` to ensure text remains visible during font loading, or preload fonts to avoid FOIT (Flash of Invisible Text)
Further Reading:
1. here
2. here
3. and here
@islombe_dev
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Any programming language is just a tool. And saying "java sucks, c# is better" is a teenage level thinking. 👎
Each language is a tool, which reveals itself depending on the skill of its over.
java sucks tho
@islombe_dev
Each language is a tool, which reveals itself depending on the skill of its over.
@islombe_dev
Please open Telegram to view this post
VIEW IN TELEGRAM
#lifehack #js
If you are using JavaScript, you know that importing code from different directories can be a pain in the butt🥺
Example:
You can end this madness with relative paths with a simple solution (if you use VSCode).
1. Add `jsconfig.json` in the root of the project
2. Add "paths" config and define your needed paths with any keyword
3. Change relative paths to keyworded paths. Update the code from the example above to:
@islombe_dev
If you are using JavaScript, you know that importing code from different directories can be a pain in the butt
Example:
// some js file
import add from '../../utils/add.js'
import java from '../../lowiq/java.js'
import { brain } from '../../../lib/brain.js'
You can end this madness with relative paths with a simple solution (if you use VSCode).
1. Add `jsconfig.json` in the root of the project
2. Add "paths" config and define your needed paths with any keyword
{
...
"paths": {
"@utils": ["./utils/*"],
"@sht": ["./lowiq/java.js"],
"@lib": ["./lib/*"]
}
...
}
3. Change relative paths to keyworded paths. Update the code from the example above to:
// some js file
import add from '@utils/add.js'
import java from '@sht'
import { brain } from '@lib/brain.js'
@islombe_dev
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
#datastructure
In the post, I wrote about linked lists. Now let's review the upgraded version of it.
Meet the Doubly Linked List😎
A doubly linked list consists of a sequence of elements, each containing two pointers. One pointer links to the previous node, and the other points to the next node. It supports the following operations: insertion, deletion, and traversal.
Pros✔️
- Badass name🖕
- Traversing in both directions🃏
- More efficient operations (delete, insert)👍
- Dynamic size💪
Cons ❌
- Extra pointers lead to more memory consumption🥰
- Time complexity is still O(n)🐌
- Implementation is harder, with more edge cases to consider😓
Use Cases
Doubly linked lists can be used when you need bidirectional traversal, such as in browser history, music playlists, blockchain, undo/redo functionality in text editors, etc.
p.s. trying to write notes by hand in digital, get used to it
In the post, I wrote about linked lists. Now let's review the upgraded version of it.
Meet the Doubly Linked List
A doubly linked list consists of a sequence of elements, each containing two pointers. One pointer links to the previous node, and the other points to the next node. It supports the following operations: insertion, deletion, and traversal.
Pros
- Badass name
- Traversing in both directions
- More efficient operations (delete, insert)
- Dynamic size
Cons ❌
- Extra pointers lead to more memory consumption
- Time complexity is still O(n)
- Implementation is harder, with more edge cases to consider
Use Cases
Doubly linked lists can be used when you need bidirectional traversal, such as in browser history, music playlists, blockchain, undo/redo functionality in text editors, etc.
p.s. trying to write notes by hand in digital, get used to it
Please open Telegram to view this post
VIEW IN TELEGRAM
This post is directed to haters who say:
1. Encapsulation? GET THIS🍑
2. Wanna abstract something? Easy😋
3. JS inherits from JAVA not only name, but 'extends' too🗑
4. Polymorphism. say less😋
Now you know your place, have a good one🤔
#OOP #stophating
there is no OOP in JS
1. Encapsulation? GET THIS
class Person {
#name;
constructor(name) {
this.#name = name;
}
getName() {
return this.#name;
}
}
const person = new Person('Alice');
console.log(person.getName()); // Alice
2. Wanna abstract something? Easy
class Car {
constructor(make, model) {
this.make = make;
this.model = model;
}
start() {
console.log(`Starting ${this.make} ${this.model}`);
}
}
const myCar = new Car('Toyota', 'Camry');
myCar.start(); // Starting Toyota Camry
3. JS inherits from JAVA not only name, but 'extends' too
class Animal {
constructor(name) {
this.name = name;
}
speak() {
console.log(`${this.name} makes a noise`);
}
}
class Dog extends Animal {
speak() {
console.log(`${this.name} barks`);
}
}
const dog = new Dog('Rex');
dog.speak(); // Rex barks
4. Polymorphism. say less
class Animal {
speak() {
console.log('Animal makes a noise');
}
}
class Dog extends Animal {
speak() {
console.log('Dog barks');
}
}
class Cat extends Animal {
speak() {
console.log('Cat meows');
}
}
const animals = [new Dog(), new Cat()];
animals.forEach(animal => animal.speak()); // Dog barks, Cat meows
Now you know your place, have a good one
#OOP #stophating
Please open Telegram to view this post
VIEW IN TELEGRAM