Categories
Node.js

Easing pain of asynchronous programming

Actually, programming in Node.js is painless as long as you keep things simple, limited to one layer of async/await. Things get complicated when you have deeper structures, using at the same time modules with async/await functionality. In general it is better to stick to one or maximum two levels of callback. If you need more, […]

Categories
Moodle Development

How to use Moodle block plugin for SQL output.

Categories
Moodle Development

How to create tables in Moodle with XMLDB Editor

Categories
Moodle Development

How to Create simple block plugin in Moodle

Categories
Node.js

Node.js and Express.js on Heroku – deploying node.js application

The main description how you should properly deploy your app on Heroku is here: Heroku – deploying node.js. However, what is there is truth, albeit not the whole truth and following the description can make you frustrated with – for instance – something like: heroku[router]: at=error code=H10 desc=”App crashed” The initial problems are partly related […]

Categories
Node.js

How to install Node.js on Cpanel hosting

The take off your node.js app from localhost on laptop into the Internet can be a bit painful. In general shared web hostings don’t allow for hosting node.js apps. You can use however AWS, VPS, dedicated servers, Digital Ocean, A2 Hosting, NodeChef, Heroku etc, but interfaces there can be a bit confusing at start, if […]

Categories
Laravel Development PHP Development

PHPUnit Test – does it make any sense?

Problem with most simple examples showing how to use PHP Unite Test is that the examples are – well – simple. It looks like – yes, PHPUnit Testing is working, but not worth using (too simple scenarios). The reality is, that for simple interfaces, simple scenarios PHPUnit Test is a kind of overkill – it […]

Categories
PHP Development

Useful PHP Functions, Arrays, array_filter()

The below code probably shows example of the most useful usage of array_filter() function, where you can use both associative array key and value, and on top of that, also inject external parameter to callback function. $score = 150; $players = [ ‘john’ => 92, ‘adam’ => 150, ‘kate’ => 138, ‘robert’ => 150, ‘sylvia’ […]

Categories
Vuejs

Vue.js vs jQuery

First of all – there is nothing wrong with jQuery, especially that it comes with Bootstrap adding interactivity. The main question is: is it worth to learn Vue.js, something totally new, with new style of workflow, new tools, new ecosystem, having still available what jQuery offers? Well, the answer depends on another question: would you […]

Categories
AI and ML

Dynamic self-organising chaos patterns in nature

Self-organising dynamic patterns – chaos in action. Every several seconds the stream water is more turbulent, but every time in a bit different way. Llangrannog Beach, Wales