Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

How I wrote and published my 5th technical book

posted in JavaScript on 2021-12-19   how-to book 50tipsonjs

I like to write. It's not happening often, but I do. A couple of weeks ago, I finally finished my 5th book, "50 Tips on JavaScript". I decided to use Amazon as a distributing mechanism. In this article, I'm sharing my journey. From the idea, through the writing and the publishing.

read more

Build your own interactive JavaScript playground

posted in JavaScript on 2018-11-13   code function const console exports editor require file error js

Recently I spent some time working on my own JavaScript playground called Demoit. Something like CodeSandbox, JSBin or Codepen. I already blogged about why I did it but decided to write down some implementation details. Everything happens at runtime in the browser so it is pretty interesting project.

read more

A story about React, Redux and server-side rendering

posted in JavaScript on 2018-06-29   server app store react js data users content div redux

Long long time ago in a kingdom far far away there was an app. The app was supported by the well known React and Redux families but there was a problem. It was damn slow. People started complaining and the app had to do something. It had to deliver its content quickly so it provides better user experience. Then the server-side rendering was born.

read more

Markup as function

posted in JavaScript on 2017-12-01   ischristmas user state function children component props greeting redux userdataprovider jsx

If you are writing React applications you probably know about higher order components or render props (which by the way I think is kind of a form of higher order component pattern). In both cases we have a component that encapsulates logic and passes props down to children. Recently at work we came to the idea that we may push this further and represent some functionalities which are out of React in the same fashion - with a single tag in our components tree.

read more

8 Years of blogging

posted in Must-see on 2017-01-02   javascript top year years pseudo elements css visits blog convert html string practice node js

The first article on this blog is published on 22th of August 2008. It’s about a website which I saw at FWA. Eight years later I’m still publishing stuff here and because it is the beginning of a new year I decided to give you some statistics.

read more

Start your own JavaScript library using webpack and ES6

posted in JavaScript on 2015-12-30   library js webpack babel true var file module exports eslint function build

Two months ago I published a starter pack for React based on webpack. Today I found out that I need almost the same thing but without the React bit. This simplifies the setup but there are still some tricky parts. So, I made a brand new repository webpack-library-starter and placed all the stuff that we need for creating a JavaScript library.

read more

Using Mocha with ES6 spec files

posted in JavaScript on 2015-12-23   mocha babel es6 package json file es5 babel preset es2015 tests test results javascript mocha reading spec files written

The new ES6 specification of JavaScript simply works better for me. It helps expressing my ideas in a shorter and cleaner way. So, I want to write ES6 everywhere. Even while I’m testing my applications.

read more

Distributing React components

posted in JavaScript on 2015-11-23   js react component file build react place src jsx browserify babel js map

While I was open sourcing react-place I noticed that there is some complexity around preparing the component for releasing. I decided to document the process here so I have a solid resource next time. You may be surprised but writing the working jsx file doesn’t mean that the component is ready for publishing and is usable for other developers.

read more

A modern React starter pack based on webpack

posted in JavaScript on 2015-10-01   webpack karma js var config dev plugins loader file react

Checkout React webpack starter in GitHub.

You know how crazy is the JavaScript world nowadays. There are new frameworks, libraries and tools coming every day. Frequently I’m exploring some of these goodies. I got a week long holiday. I promised to myself that I’ll not code, read or watch about code. Well, it’s stronger than me. React werbpack starter is the result of my no-programming week.

read more

How require/import may decrease your testability

posted in JavaScript on 2015-08-23   login http js function var module password username login js user promise

When CommonJS was announced we all thought “Finally something that will organize our code”. However, there are some cons that we should be aware of. It’s not only unicorns and rainbows. In this article we will see how a simple require line makes our code difficult to test.

read more

Fun playing with npm, dependencies and postinstall script

posted in Nodejs on 2015-01-07   c module package json npm runme js node_modules b installed index dependencies

I like npm and the fact that I can install tons of stuff. It’s great piece of software and helps me solve problems everyday. Yesterday I had to use a postinstall script and hit a problem.

read more

Unit test your client-side JavaScript

posted in JavaScript on 2014-11-20   var register test function message password username js directive jsdom angularjs

I don’t think that we have to discuss the importance of having tests. That’s not something that we add to the project in addition. That’s something that the project is based on. And because testing is so important we have bunch of tools in our disposal. We all know (I hope) how to test our back-end code. However, once we move to the front-end is a bit different. At the moment we are working on a big single page application and testing is one of our main focuses. In this article you will see how to unit test our client-side JavaScript.

read more

Win Free Copies of my new book – Node.js Blueprints

posted in Nodejs on 2014-08-12   node js book array top winners writing users tmp var array current array

Readers would be pleased to know that I have teamed up with Packt Publishing to organize a Giveaway of a new book written by me - Node.js Blueprints. And three lucky winners stand a chance to win 3 e-copies of this book. Keep reading to find out how you can be one of the Lucky Winners.

read more

Node.js Blueprints book - second chapter's clarification

posted in Nodejs on 2014-07-30   express version book app chapter node js blueprints var bodyparser code

Before a couple of months my first book Node.js Blueprints was published by Packt. There are a couple of reviews in Amazon about chapter two. It’s about Express. One of the most popular frameworks in the Node.js ecosystem. The book mentions version 3.0 but the truth is that the code samples are for version 4.0. I feel that I still have to point out the differences and mark these parts of the chapter that are not valid for the newest version of the library.

read more

ToDoMVC with AbsurdJS

posted in JavaScript on 2014-07-26   model function js todos app main css component absurdjs event

You've probably heard about ToDoMVC project. It's same ToDo application made with different frameworks. It's interesting how the same problem is solved by different programmers following different concepts. This article is about making the ToDoMVC application with AbsurdJS.

read more

Usersnap - the holy grail of bug reporting

posted in Must-see on 2014-07-15   usersnap data xmlhttp json function script project client s page

The bug reporting is something very important for us. As developers, we produce code that should work everywhere. Not only on our machines. No matter how many times we test our application it often happens that it does not work properly for the client. We all know how helpful is an email with text “It does not work. Fix it ASAP!”. Usersnap is amazing tool that removes the gap between you (the developer) and the non-techy guy from the other side.

read more

Hungry for knowledge - Scotland JS 2014 talks

posted in Must-see on 2014-06-22   javascript neo uk vimeo talk web js ll code build

These are screencasts from the this year's Scotland JS conferences. It happened on 9th and 10th of May. If you are a JavaScript developer you will probably want to see the talks.

read more

Stop autoplaying your Gifs

posted in JavaScript on 2014-06-19   gifffer image library page gifffer min js animated gif

This blog has 460 posts. In some of them, I need to show video clips demonstrating some feature or browser behaviour. I found that it was much better to do that in an animated Gif. However, they play automatically which is kinda annoying. Imagine that we have ten Gifs on the page and while you are reading they all blink or show moving content. It's like having a page full with banners.

read more

Developing Node.js applications with Google Chrome

posted in Nodejs on 2014-06-09   node js yez page git terminal browser chrome console url http var

Google Chrome is my favorite browser. I'm spending a big part of my working hours there, so it makes sense to use it for everything. Last week I posted "Sorry, Chrome killed the terminal". The article was about Yez!, an extension that brings terminal-liked functionalities to the browser. Today, I'll show you how I use Chrome in my Node.js development workflow.

read more

Node.js application made with Express and AbsurdJS

posted in Nodejs on 2014-06-07   html js function css express content styles absurdjs app

Node.js is one of those new technologies, which are attracting more and more developers every day. Mainly, because it's JavaScript driven, a lot of people are interested working with it. In this tutorial, I'll show you how to use AbsurdJS together with Express. Express is one of the popular Node.js frameworks. However, the other instrument is really fresh one and I hope that you will find it useful.

read more

Sorry, Chrome killed the terminal

posted in Nodejs on 2014-06-04   yez extension browser terminal node js chrome shell commands running task

That's right. I'm not using the terminal anymore. Instead of that I'm using Chrome. Yes, the Google's browser. There is an extension called Yez! that connects to a Node.js module via web socket. It executes the shell commands and returns the result. And even works under Windows.

read more

Node.js: managing child processes

posted in Nodejs on 2014-05-21   error stdout js exec console log stderr visits function var module

These days I spent some time working on Yez!. Chrome extension whose main role is to replace the annoying switching between the terminal and the browser. It uses Node.js module to run shell commands. So, I had to deal with child processes, and I decided to document my experience.

read more

Look ma, JavaScript only Off-Canvas menu

posted in JavaScript on 2014-03-25   menu content css links function html position absurdjs isopen

The off-canvas menu is pretty popular nowadays. You know, the little button in the right upper corner which opens the navigation with a slide-in effect. That's what we are going to build in this article. The interesting things is that we are not going to use CSS neither HTML, only JavaScript.

read more

Using media queries in JavaScript (AbsurdJS edition)

posted in JavaScript on 2014-03-04   media css function var width window matchmedia dom html mq absurdjs

If you believe in responsive design you probably use a lot of media queries. That's a CSS feature which gives us the power to add something like if statements. We are able to apply rules only if the current page meets certain conditions. In this article I'll show you how I use media queries in JavaScript.

read more

Simple, good looking separator made with pure CSS

posted in CSS3 on 2014-02-12   jsbin translate 95px 12px transform translate 95px line small link top solid 1px border top solid block border top display block border content display block

I'm currently working on the official site of AbsurdJS. There are a lot of code samples out there and I wanted to present them in JSBins.

read more

SASS and Gruntjs (Node.js setting up)

posted in Nodejs on 2014-01-14   grunt sass compass css add based gruntjs grunt contrib compass

I'm writing a lot of JavaScript these days. Even if the project is not Node.js based I'm using it for processing some tasks. At the moment most of my projects use GruntJS. Today I spend some time adding SASS to my workflow.

read more

AbsurdJS fundamentals

posted in JavaScript on 2013-11-11   css api color styles var function absurd absurdjs javascript

AbsurdJS became one of my favorite projects. I spent a good amount of time developing it and it's getting more and more interesting. I also received some positive feedback, so I think it is time to write a bit more about the module and explain how it actually works and what exactly is made for.

read more

JSConf EU 2013

posted in Must-see on 2013-10-12   jsconf eu

An amazing talks from JSConf EU this year.

read more

AJAX request doesn't work in IE (url encoding problem)

posted in JavaScript on 2013-08-08   url api works json stringify parameter fixed

The good old Internet Explorer. It's full with surprises. I just fixed a bug happening only in IE. Everything works just great in every other browser.

read more

DalekJS - Automated cross browser testing with JavaScript!

posted in JavaScript on 2013-08-02   dalekjs

If you like instruments like Selenium or Phantomjs you should definitely check DalekJS. Written by Sebastian Golasch this nodejs module could help you to test your front-end.

read more

A strange IOErrorEvent.IO_ERROR event dispatched

posted in ActionScript on 2013-06-11   urlrequest var urlloader addeventlistener json encode obj string http site urlstring string http var urlstring string problem

Really simple GET request from a flex based application. However it fails if GET parameters are passed.

read more

Make the web faster

posted in HTML5 on 2013-03-31   faster browser applications underlying problem tune slow javascript code js profiler chrome tracing ll talk structural profiler pages chrome devtools built build

Slow JavaScript code on your pages? Chrome provides both a sampling, and a structural profiler to help you track down, isolate, and fix the underlying problem. Tune in to learn how to use both profilers, and how to improve your own workflow to build better, faster browser applications! We'll talk about chrome://tracing, the built-in JS profiler in DevTools, and much more.

read more

AssetsPack - a friend of the front-end developer (pack your assets with NodeJS)

posted in Nodejs on 2013-03-16   css js file assetspack pack tests data type packing html module

AssetsPack is a NodeJS module which helps in organization, compilation and minification of assets. It's meant to be used in local environment during the development process. It was made generally for HTML/CSS/JavaScript based applications.

read more

JSConf 2012 (videos)

posted in JavaScript on 2012-08-22   videos jsconf interesting conference jsconf posting videos http day

Today is a day for posting videos. Another interesting conference - JSConf 2012. The videos are available here http://2012.jsconf.us/.

read more

MySQL vs JSON file data storing

posted in PHP on 2012-02-12   records requests data json ms time request mysql res count array function

I'm not exactly a performance perfectionist, but currently I'm working on a tool which will be used in a large system. It will deliver texts to a multi-language environment and there will be several sites/apps which will performe big amount of request to it. It is the right moment for me to choose how to speed up my code and the work of the tool overall.

read more

The powerful rendering opportunities of the modern browsers

posted in Inspiration on 2011-12-21   http mrdoob github check http mrdoob webgl check http find js canvas wondering

Are you wondering what you can do with Canvas and WebGL. Check http://mrdoob.github.com/three.js/ to find out.

read more

JSConf.eu 2011

posted in JavaScript on 2011-09-11   blip tv jsconfeu http blip tv european javascript conference strongly recommend shared online s scheduled watch year happened lectures

The European JavaScript conference is really close. It's scheduled for 01 and 02 of October. I wish I could be there. I hope that the videos from the lectures will be shared online, as this happened for the last year. I strongly recommend to watch them. There are available here http://blip.tv/jsconfeu.

read more

\"This page contains both secure and non secure items\" message

posted in PHP on 2011-05-26   content problem http page featureloader js php https protocol

When you are opening a site via https protocol and there are items loaded with absolute addresses started with http some browsers, like IE, throw a message This page contains both secure and non-secure items. It is really annoying and if the user decides to can prevent these items of showing and he can brake the whole layout or some functionality.

read more

AS3: converting XML to JSON object

posted in ActionScript on 2011-04-02   label url image xml id img cdata node var version xml2json class http site int childnode object

I'm absolutely sure that you are using external data in your flash/flex applications. It is a good practice to transfer information in XML format. Most of the projects that I'm working on also use XML and in most of them I have a class that converts the data to JSON object. The problem with this workflow is that the parser's logic is always different because the XML is different. These days I wrote a class that solved this problem and directly converted every given XML file to a JSON object.

read more

PHP: Simple javascript obfuscator (merging files)

posted in PHP on 2010-12-30   jsstr jsstr jsstr str_replace jsstr str_replace jsstr str_replace jsstr jsstr js files fh file comment js core plugins

Currently I'm working on a big JavaScript project. It has a lot of files that have to be compressed. I wrote a simple php class that merges all the files into one. It has also a useful simple obfuscator method.

read more

Change the quality of all the bitmaps of your flash document

posted in ActionScript on 2010-12-15   problem bitmaps arsthanea check flash provided ve met extension jsfl solutions edit library

I know that you've met this problem. You have a lot of bitmaps in your library and you have to edit all of them one by one. There are several solutions of this problem. One of them is to use JSFL. There is another one - an extension for Flash provided by ArsThanea. Check it out here.

read more

Embed fonts in all the text fields of your flash document

posted in ActionScript on 2010-02-26   jsfl script flash embed main flash_cs3_extending pdf http livedocs adobe simply ctrl r commangs run command flash commangs run jsfl embedcharactersintextfield jsfl

Very helpful solution that will save you maybe several hours. I used JSFL language and very short script to parse all the items in the library. Then for every item just embed the characters that I wanted. Get the script from here http://www.outset.ws/files/jsfl/embedCharactersInTextField.jsfl. In flash: Commangs -> Run command (or simply Ctrl+R) and point the script file.You can download the jsfl documentation from here http://livedocs.adobe.com/flash/9.0/main/flash_cs3_extending.pdf.

read more