Articles



JavaScript's Asynchronous Power: Promises and Async/Awaito translation... yet!

JavaScript's Asynchronous Power: Promises and Async/Awaito translation... yet!
One of the most compelling features of JavaScript is its support for asynchronous programming. This is a method of handling operations that allows other tasks to...
Show full article

One of the most compelling features of JavaScript is its support for asynchronous programming. This is a method of handling operations that allows other tasks to continue running in the background while awaiting the operation's completion.

In JavaScript, Promises and async/await syntax are two features that make asynchronous programming more manageable.

A Promise is an object representing a value which may not be available yet but will be resolved at some point in the future. Promises can help you manage asynchronous operations without getting stuck in callback hell.

Async/await is a syntactic sugar built on top of Promises, introduced in ES2017, which makes asynchronous code look and behave more like synchronous code. The async keyword makes a function return a Promise, and the await keyword can be used inside an async function to wait for a Promise to be resolved.

These features have dramatically improved JavaScript's ability to handle complex operations without blocking the main thread, thereby enhancing the user experience on JavaScript-powered websites and applications.

Show preview
Leave a comment




The Ruby Object Model by Dave Thomas

The Ruby Object Model by Dave Thomas
Quite interesting and useful talk from Dave Thomas, back from 2009.  Self - if you understand "self", and if you can work out what "self" is, at any point in your...
Show full article

Quite interesting and useful talk from Dave Thomas, back from 2009. 

Self - if you understand "self", and if you can work out what "self" is, at any point in your running code, you basically understand all there is to know about metaprogramming.

If your doing metaprogramming, whenever you get stuck trying to work out "How come thats nil", I guarantee, if you track the value of self, you'll understand it"

  • Instance variables: look up in "self"
  • Methods:  look up in self's class

Youtube link to his speech.

Show preview
Leave a comment




Ruby is Back! All hail Ruby! - programming language rating TIOBE

Ruby is Back! All hail Ruby! - programming language rating TIOBE
Because Ruby is the most convenient programming language, and while people are programming - convenience means a lot! Ruby вернулся в первую десятку рейтинга...
Show full article

Ruby вернулся в первую десятку рейтинга TIOBE, и аналитики считают это хорошим знаком. Язык появился очень давно, но оставался в тени до релиза Ruby on Rails в 2006 году. Фреймворк подкинул его на тридцать позиций вверх до топ-10 и обеспечил звание «Язык 2006 года».

После пика популярности в 2008 году Ruby начал сдавать позиции под натиском новых языков, но теперь постепенно взбирается обратно. По мнению экспертов, подобная динамика свидетельствует о естественном росте популярности.

Because Ruby is the most convenient programming language, and while people are programming - convenience means a lot!

Show preview
Leave a comment




SOLID - Simply about D - Dependency Inversion Principle

SOLID - Simply about D - Dependency Inversion Principle
Depend on abstractions, not on concretions. Модули верхних уровней не должны зависеть от модулей нижних уровней. Оба типа модулей должны зависеть от...
Show full article

Depend on abstractions, not on concretions.

  • Модули верхних уровней не должны зависеть от модулей нижних уровней. Оба типа модулей должны зависеть от абстракций.
  • Абстракции не должны зависеть от деталей. Детали должны зависеть от абстракций.

Что такое модули верхних уровней? Как определить этот уровень? Как оказалось, все очень просто. Чем ближе модуль к вводу/выводу, тем ниже уровень модуля. Т.е. модули, работающие с BD, интерфейсом пользователя, низкого уровня. А модули, реализующие бизнес-логику — высокого уровня.


Что такое зависимость модулей? Это ссылка на модуль в исходном коде, т.е. import, require и т.п. С помощью динамического полиморфизма в runtime можно обратить эту зависимость.

Источник

Show preview
Leave a comment




Another modest(but useful) contribution to Open Source, about vulnerability CVE-2017-17405

Another modest(but useful) contribution to Open Source, about vulnerability CVE-2017-17405
Недавно столкнулся с неприятным сюрпризом. Неочень приятно видеть непрошенных гостей из Китая у себя на сервере)) Решил что русскоязычному сообществу следует знать об...
Show full article

Недавно столкнулся с неприятным сюрпризом. Неочень приятно видеть непрошенных гостей из Китая у себя на сервере)) Решил что русскоязычному сообществу следует знать об этой уязвимости и перевёл статью для сообщества.

Ссылка на переведённую мною статью про уязвимость CVE-2017-17405

Show preview
Leave a comment