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

Create your own Covid-19 data tracker

posted in JavaScript on 2020-03-30   covid-19 tracker virus api zeit covid https data github data tracker thevirustracker time johns hopkins university code back end endpoints react created recharts beginning tags tag link countries package sh https c19stats

I'm continuing to experiment with React and TypeScript. The weekend-long project this time was a Covid-19 data tracker. In this blog post I will share how I built c19stats.now.sh. I exposed the data as a public API at the same URL. I guess you, as many other people, follow the situation so you may want to glue your fingers on the keyboard and create something useful around the data. I got lots of fun playing with the diagrams.

read more

Post-transpilation or what is the real face of your code

posted in JavaScript on 2017-10-10   function user return firstname lastname var person object constructor greeting

If you write JavaScript today you probably use some sort of a transpilation tool. A tool that reads your hipster code and convert it to code that works in the browser. In this article we are going to see what is actually send to the browser and how exactly libraries like Babel polyfill some of the ES6 features.

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

Constructive destructuring

posted in JavaScript on 2016-02-24   var destructuring function object data enabled files options attachments

Destructuring is one of my favorite ES6(ES2015) features. It just shortens my code and helps me be more explicit with my statements. Let’s see it in action.

read more

Unexpected usage of Array.length

posted in JavaScript on 2016-01-14   arr length array b c d string undefined elements c d arr var arr words text

I like reading code of other developers. It’s a nice way to learn patterns, techniques and small tricks. Recently I found something about Array.prototype.length which caught my attention.

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

Twitter streaming API, NodeJS and 401 Unauthorized error

posted in JavaScript on 2013-07-17   found server twitter streaming api

I'm working on a year old application written in node. There is twitter streaming API implemented and it worked before a couple of months. These days we moved the site on another server and I found that it is not working anymore.

read more

Javascript string replace and regular expression

posted in JavaScript on 2013-06-15   word git replace string innerhtml text replace element innerhtml text changetext function word creator linus torvalds linux creator linus source project started

The replace method in JavaScript is pretty much the same as in the other languages. Replace part/s of a string with something else. However, there are some tricky moments and I wanted to write this article, because I met this problem several times in the past. Actually, very often I use my blog as a documentation for myself and this is one of those cases. Probably I'll be in the same situation after week or so and I'll just check here for the proper solution.

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

Simple command line parser in JavaScript

posted in JavaScript on 2013-06-11   long parameter param3 var parse command param1 commandparser parse command param3 commandparser parse param1 param2 param3 command param1 param2 param3 command param1 string function

There should be some super cool RegEx, which I can use. However after short research I wasn't able to find it. So, I created a simple function which does the job.

read more

Web Highlights #5

posted in HTML5 on 2013-05-30   http web design article unnecessary paints adobe device google street view code organizing javascript css paint times http www html5rocks

Everyday I'm reading or watching something which I find helpful. Normally I bookmark those things, but at the end I have dozen of folders and subfolders which I never check. So, I decided to make such blog post where I'll share valuable things in the net.

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

HTML slicing the site of VarnaLab using LESS and Twitter Bootstrap

posted in HTML5 on 2013-02-23   varnalab site bootstrap html slicing twitter bootstrap html

HTML slicing the site of VarnaLab using LESS and Twitter Bootstrap

read more

sugru - self-setting rubber that can be formed by hand

posted in Inspiration on 2013-02-20   setting rubber hand formed sugru silicone rubber overnight flexible silicone rubber strong flexible silicone play dough bonds turns moulds exciting

sugru is the exciting new self-setting rubber that can be formed by hand. It moulds like play-dough, bonds to almost anything and turns into a strong, flexible silicone rubber overnight.

read more

Chrome Devevelopment Tools could be really helpful

posted in HTML5 on 2013-02-09   detecting memory leaks network performance rendering analyze network performance instrumented development platforms googledevelopers channel strongly recommend ilya grigorik nice screencast build faster javascript code

"Your browser is one of the most and best instrumented development platforms -- you may just not realize it yet. In this episode we'll take a whirlwind tour of how to analyze network performance, rendering and layout pipeline, as well as detecting memory leaks in your Javascript code, and using audits and extensions to build faster and better apps!". A nice screencast by Ilya Grigorik. I strongly recommend the subscription to GoogleDevelopers channel.

read more

Cleaning up <pre> tag content

posted in PHP on 2013-02-02   code newstr pre parts2 code str_replace br parts str code code str_replace br code code

I'm blogging for different technologies, but very often I need to add some code in my articles. This little PHP function helps me to keep the text in my

 tags clean for prettify. It simply removes the 
's and keeps the html tags.

read more

The Principles of Agile Development

posted in Architecture on 2012-07-10   agile development principles http net tutsplus sides http net fun developing software agile development agile articles general communication easy business people constructive

Agile or Agile Development – we hear these words more often these days. But do we really know what it is all about? How can it help us become more effective, while having lots of fun developing software? How can we use it to communicate with business people and make this communication easy and constructive for both sides?http://net.tutsplus.com/articles/general/the-principles-of-agile-development/

read more

PHP: the right way

posted in PHP on 2012-07-09   php bad http www phptherightway web http www accepted coding standards practices accepted coding read quick reference propagating bad practices astray propagating bad users astray propagating

There’s a lot of bad information on the Web (I’m looking at you, W3Schools) that leads new PHP users astray, propagating bad practices and bad code. This must stop. PHP: The Right Way is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web.http://www.phptherightway.com/

read more

API Design by Matt Gemmell

posted in Architecture on 2012-05-25   strongly recommend helpful article check class write

Did you ever wonder how to write your class. That's a very helpful article. I strongly recommend it. Check it here.

read more

PEAR PHP Coding Standarts

posted in PHP on 2012-02-29   pear en standards php manual en standards net manual en php net manual pear php net http pear php folks http pear pear folks http distribution coding standards

The PEAR Coding Standards apply to code that is part of the official PEAR distribution. Coding standards often abbreviated as CS among developers and they aim to keep code consistent to be easily readable and maintainable by most of PEAR folks.http://pear.php.net/manual/en/standards.php

read more

The Dependency Inversion Principle

posted in Architecture on 2012-01-24   depend abstractions dependency inversion principle abstractions b abstractions low level modules high level modules higher level components inversion principle relates abstractions read details details

The Dependency Inversion Principle relates to the stability and reusability of higher-level components within an application. The principle states:_A. High-level modules should not depend on low-level modules. Both should depend on abstractions.B. Abstractions should not depend upon details. Details should depend upon abstractions._Read more here.

read more

Finally! My Pomodoro Robotlegs timer is here

posted in Inspiration on 2011-09-29   pomodoro timer break method pomodoro robotlegs timer pomodoro technique task stray

Today I received my Pomodoro Robotlegs timer. Special thanks to Stray and Robotlegs team for this little gem.

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

AS3: Tracing in Flash/Flex

posted in ActionScript on 2011-08-16   import flash public str function debug movieclip void trace swf class

Inspired by the article of Dru Kepple I decided to share my experience in Debugging processes in flash/flex enviroment.

read more

AS3: Dealing with multi-language data in your application

posted in ActionScript on 2011-06-16   language storage key class text key string static storage addvalue http www site trace storage getvalue

I'm a big fen of the MVC pattern. I like the idea to store my data in one place and be able to get it fast. In most of my projects I used a class called Storage for similar purpose. It supports a multi-language data saving, so I decided to share it with you.

read more

AS3: runtime font loading (embedding)

posted in ActionScript on 2011-04-25   font field loader import flash swf public static const format font_export_name string font_file_name class

Flash is wonderful technology and has many advantages. Before a couple of years it was really popuplar to use it for displaying fonts that are not installed on the user's machine. Flash is still powerfull tool for such kind of tasks. These days I worked on a project which had to use a lot of fonts. It wasn't possible to embed all of them so I decided to implement runtime embedding.

read more

FlashDevelop scripting: open file by text selection

posted in ActionScript on 2011-03-20   file script projectpath system path text private static string plugincore

FlashDevelop is one of the most preferred editors for the flash development. I've been also using it last few years. I found it helpful for writing JavaScript, HTML, CSS and PHP code as well. I just took a big project with over 1000 php files and it is a little bit difficult to open the right file, even by using the Project panel. That's why I decided to invest time in solving this task and found that I can write my own C# script and run it.

read more

Creating simple WYSIWYG editor with AS3 (Flex)

posted in ActionScript on 2011-02-11   text str function font html string editor mx var code

There are dozen of JavaScript WYSIWYG editors available, but most of them are too complicated and a little bit buggy. From time to time I'm using my own tool to provide such kind of functionality. It accepts and exports valid html. I decided to share it with you and explain how I built it.

read more

AS3: Using custom metadata in flex (part 2)

posted in ActionScript on 2011-01-27   metadata public var data class string public var method metadataparser mycustomclass tag

Because of the huge interest in AS3: Using Custom Metadata in Flex (part 1) I decided to dig a little bit deeper in this topic. You already know how to get information about your custom metadata, so in this article I'll show you how to use it.

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

Film Inspiration

posted in Inspiration on 2010-11-25   vimeo muestra animada
read more

PHP: find links in a string and replace them with actual html link tags

posted in PHP on 2010-11-24   urlstoreplace str numofurlstoreplace urls alreadyadded numofurlstoreplace count urlstoreplace html link tags

Currently I'm working on an application that gets data from Twitter. The tweet's string contains links that have to be transformed into html link tags. Here is a simple PHP function that helped me.

read more

Remove html tags from a string wtih PHP

posted in PHP on 2010-11-12   str tag remove str return str ius str return

Sometimes you don't need any formatting. That's just a nice way to remove all the html tags.

read more

How to protect your SWF file

posted in ActionScript on 2010-10-15   function swf protect void check file import flash public ondatafiledtoload onfailed files string

Is there any way to protect your flash work? To be honest the answer is NO. As you probably know everything that is uploaded on a web server and is accessible from a web browser is downloaded to the users' computers and could be found in the temporary directories. Once someone gets your swf file he could use one of the dozen decompilers to reproduce the .fla and .as files. Anyway, there are still some ways to make stealing difficult.

read more

Trace JSON object in AS3

posted in ActionScript on 2010-07-17   str description gettypeof o spaces var object information users

I'm absolutely sure that all of you are working with JSON objects. It's pretty helpful to be able to print them and find out what exactly they contain. I wrote a simple function that makes this possible.

read more

Load MySQL data in Flash with AS3

posted in ActionScript on 2010-07-10   text data city import flash ondatafiledtoload php file onloaddata string url

There are some things that I'm doing in almost every project. Loading of data in Flash is actually one of them. In this article I'll show you how to load information from MySQL database. We will use PHP as a junction between the Flash and the database. You need an Apache server like XAMPP or EasyPHP installed or just a hosting account that supports php.

read more

Remove tags from a string in AS3

posted in ActionScript on 2010-06-30   text tags var string text replace removehtml text text replace gi text text str regexp gi text

A couple of months ago I integrated a nice WYSIWYG editor written in Flex in my CMS. It worked fine, till yesterday I needed to add more features like text formatting and font color changing. As you know the Flex RichTextEditor component adds some additional tags that I definitely don't want to send to the database. So I wrote a simple function to remove these tags.

read more

FILMEFEX Studio

posted in Inspiration on 2008-09-15   filmefex studio picture industry check motion picture industry special effects facility create effects design

Filmefex StudioFilmefex Studio is a special effects facility, where they design and create effects for the motion picture industry. Check out here

read more