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

A short introduction to CSS nesting

posted in CSS3 on 2023-09-16   css nesting modern

I did use Sass and Less in the past, and one of my favorite features was the nesting. Not only me but the whole community was asking about that constantly over the years. The browser vendors heard that plea, and today, we have CSS nesting.

read more

Anchor links pointing to a fragment fires History API's "popstate" event

posted in JavaScript on 2022-11-15   history popstate anchor javascript

I hit an interesting "bug" while working on a SPA application. Clicking an anchor link that points to a fragment on the page fires the History API's popstate event. This triggers some logic on my end, which was not my intent. I fixed that with a bit of JavaScript, and I had to share the snippet.

read more

Using web dev skills to test web dev skills

posted in JavaScript on 2022-10-30   javascript quiz exercise test

Last year or so, I worked on a platform where I would publish video courses. The first one is on web fundamentals (in Bulgarian), and it's almost ready. You can check it out here. But this article is not about that. It's about a platform feature I built - an in-house validator to exercise the gained HTML, CSS, and JavaScript knowledge. After each lesson, I give a task to the students, and they can work on it right in the browser. The small application became an inspiration for another project - iloveweb.dev. So, I decided to share how the validation works.

read more

Get to know Kent C. Dodds

posted in Inspiration on 2021-10-05   kent dodds documentary story

A short movie for Kent C. Dodds.

read more

Firebase/GCP: save money by cleaning up your artifacts

posted in JavaScript on 2021-06-06   firebase gcp budget cost

I'm working on a personal project and I'm using the awesome Google Cloud Platform. There are so many things that you can do. All the tools that you may need are probably there. This of course comes with a price. In this article I'll share a tip how to reduce your spendings there.

read more

Using JavaScript module system for state management

posted in JavaScript on 2021-03-08   javascript module state management

Hot topic last couple of years is state management. Especially in the front-end apps. There are lots of problems and lots of solutions. One thing thought is totally ignored in this context - the JavaScript module system. I'm very often reaching out to this approach and decided to share it here.

read more

Miss Piggy - a test runner for Puppeteer

posted in JavaScript on 2021-02-01   puppeteer test runner tagmanager

These days I did (again) a bunch of changes in Google tag manager. This time however was more of a refactoring exercise. So, I had to prove that the tags that were placed before the refactoring exist after the refactoring. And what we programmers do in such cases - we write tests.

read more

Mocking console methods with Jest

posted in JavaScript on 2021-01-01   jest mocking console warn

I'm recently working on two OS libraries. Both I'm unit testing with Jest. There is some logic that leads to a warning which I'm doing with console.warn. In the unit tests this is happening quite often so I want to suppress it. Also I want to verify that it happens on the right place.

read more

iPhone stuck on the Apple logo

posted in Other on 2020-11-27   iphone stuck broken apple logo

Last weekend I was helping a friend to deal with his "broken" iPhone XR. It was stuck on the Apple logo. No mather what we do the phone was just black and the apple shows up.

read more

React: 50 shades of state

posted in JavaScript on 2020-07-21   react state management form components button viewmore compound state component theme onchange application state feature state data client text span const

We all know that one of the most challenging task in software development is state management. This is especially true for the JavaScript world. There are thousands of articles on this topic and so I decided to write another one 😁. I wanted to share my current thoughts on the different state types. I found that answering "What lives where?" question is far more important than the actual state management. Which more or less is an implementation detail.

read more

Recreating Facebook's Recoil library

posted in JavaScript on 2020-07-12   recoil facebook state management mycoil facebook s recoil counter atoms atom component library formattedcountervalue selector key function javascript subscribers hook const return

This weekend I decided to play with the new kid on the block - Facebook's Recoil library for managing state. I did the trivial counter example to see how it works. It's pretty simple idea so I wondered how much it takes to replicate its features. I found the exact answer - 70 lines of code. Obviously, my implementation didn't cover everything but it was fun so I decided to share my findings.

(A side note: I did not look at the code of Recoil. I didn't want to be bias on how to write my version.)

read more

The simplest HTTP proxy with custom headers

posted in Nodejs on 2020-05-06   proxy headers authorization node local request server req http basic pass

These days I had an interesting problem to solve. At work, on our staging environment, we have basic authorization. It works really well but for some older versions of Chrome we experienced a weird issue. The browser did not pass the authorization header. The app runs fine but as soon as it does a fetch request to a local endpoint the request fails with 401 not-authorized error. In the modern browsers that's not happening because the browser kinda knows that we came here with basic auth and automatically includes authorization: basic ... header.

read more

Smart placeholders in your markdown

posted in JavaScript on 2020-05-06   markdown placeholders template annotation marked contentful https button part content stuff p p seemore const

I ❤️ markdown. I like its simplicity and minimalistic API which is good enough to cover most of needed HTML markup. At least for textual content. At work we have a small node based microservice that delivers data from Contentful in exactly markdown format. It's all working well but we started having cases where part of the text is in Contentful and the other part is in that microservice. For example when we have a button with a catchy design. We want to content manage the label of the button but the actual markup to be on our side.

read more

How Open Source Changed My Life with Max Stoiber

posted in Inspiration on 2020-04-28   max stoiber styled-components react-boilerplate

We spent a day with Open Source-“Wunderkind” Max Stoiber in Vienna. Despite his young age of only 23, Max has achieved incredible things: he's created react-boilerplate and styled-components, his start-up, Spectrum, was recently acquired by GitHub and he gives talks all over the world. Learn more about his journey - and how he dropped out of university (twice!) - in this mini-doc.

read more

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

NADCAST.24 с Радо Станков

posted in NADCAST on 2020-03-26   nadcast remote productivity work tips home working remotely separation https rstankov biz 24_radostankov mp3 cbox biz 24_radostankov host003 cbox biz ws host003 cbox outset ws host003 nadcast outset ws http nadcast outset mp3 http nadcast

В тези смутни времена се чуваме online с Радо Станков за да си поговорим за remote working. Не че по принцип не се чуваме така, но сега е малко по-различно. В този 24-ти епизод споделяме нашия опит в работа от разстояние. Приятно слушане.

read more

Pairify - how to match balanced string pairs

posted in JavaScript on 2020-03-11   pairify balanced matches javascript pairs decided type stack line starter token code const position function category https

I'm now actively working on a VSCode extension. I started it as a theme but then decided to add some more features. Like for example a tin line on the left side of the editor marking the current function scope. In order to do that I had to analyze the current file's code and find the lines that are included in that scope. The obvious approach will be to translate the code to AST and then traverse the tree finding the information that I need. This however will require the usage of a language server which now I don't want to deal with. So I decided to explore a brute force approach. Looping over the string characters and finding balanced matches. I quickly wrapped it into a library. I called it Pairify. It consumes text and returns an array of pairs. This blog post will show you how it works.

read more

GraphQL: the documentary

posted in Inspiration on 2020-03-03   graphql documentary language story

Starring Lee Byron, Dan Schafer and Nick Schrock (co-creators of GraphQL) and other big names from the #GraphQL community, "GraphQL: The Documentary" explores the story of why and how GraphQL came to be and the impact it's having on big #tech companies worldwide, including Facebook, Twitter, Airbnb and Github.

read more

Vue.js documentary

posted in Inspiration on 2020-02-28   vue documentary framework story

With the help of Sarah Drasner, Taylor Otwell, Thorsten Lünborg and many others from the Vue.js community, Evan You tells the story of how he fought against the odds to bring Vuejs to life.

read more

From 0 to 100 GitHub stars in a week

posted in JavaScript on 2020-02-27   github stars project branding promote octomments krasimir write idea https github blog align center don t easy section add https post link javascript reddit facebook make time

2020 for me started with the release of several OS projects. Two of them reached 100 stars in a week and I was thinking that would be nice sharing my workflow. Not like it is working every time, absolutely not, but leads to some good results.

read more

Webpack/TypeScript/React starter kit as of 2020

posted in JavaScript on 2020-02-23   webpack typescript starter react eslint beginning krasimir beginning npm run watch components app tsx src components app beginning https github

I just started using TypeScript. I did couple of React projects and noticed a pattern in the setup. I decided to export that to a starter kit 👉 beginning. It is based on Webpack with Babel and TypeScript loader.

read more

AST fun. Remove a function call from your bundle

posted in JavaScript on 2020-01-13   javascript ast bundle object property path callee javascript esprima node const type

I'm working on a small library that has a logger. I'm bundling the app to a single file and I want to disable the logger for the production version. In this blog post we will see how I removed the logger.log calls from my bundle using AST (abstract syntax tree).

read more

Part 2: Riew - reactive view basics

posted in Riew on 2020-01-06   riew csp routine go javascript channels channels channel const javascript function ch view console log

Riew is a library based on communicating sequential processes (CSP). It is made to help with communication and synchronization between your view and business logic. It's distributed as a npm package, it has 0 dependencies and adds ~8KBs (gzip) to your application on production.

read more

Part 3: Riew - reactive view in patterns

posted in Riew on 2020-01-06   riew csp routine go javascript channels console log yield krasimir riew https github function state const

In this article we will see some use cases of Riew. Those are patterns which I found repeating while using the library. There are other blog posts part of the same series and I will suggest checking at least this one so you get a basic understanding before jumping into the code snippets below.

read more

Reactive view - the concept

posted in Riew on 2020-01-04   riew csp routine go javascript channels kitty ch const function view https react redux

Something bugs me last couple of years. I'm using React for some time now and there is always this doubt if I'm placing the business logic on the right place. I'm trying to be pragmatic, to follow best practices and listen what the community is saying. However, I still feel that something is not ok. This blog post presents the idea of the reactive view. That is nothing new per se but I came up with this term because it fits well in my idea.

read more

NADCAST.23 с Яни и Ния

posted in NADCAST on 2019-12-10   nadcast influencer.bg remoteit world https https influencer bg world https influencer remoteit world https https remoteit world

Епизод 23 на малко позабравения NADCAST е тук. Този път гости ми бяха Яни (https://remoteit.world/) и Ния (https://influencer.bg/). Поговорихме си за маркетинг, брандинг, hiring и работа от разстояние. Приятно слушане.

read more

Make your objects iterable

posted in JavaScript on 2019-11-01   javascript iterator skills console log javascript const lastname object react parts user method

Just recently I became a fan of the iterable protocol. I knew about it for some time now but never actually integrated it on my own. I ended up using it to provide a nice API for one of my libraries and I thought that this approach worth sharing.

read more

Rethinking the Redux API

posted in JavaScript on 2019-09-10   redux const state login username password authenticated action function reducer

I really like Redux. I Love its ideas. The reducers for example - small pure functions that apply changes without side effects are nice way to model the mutations in the state. Redux also teaches us to use the one-direction data flow which makes our apps more predictable and stable. These two things fits well for what we are doing on the front-end - building user interfaces.

Of course there is nothing perfect and Redux as every other library has its own problems. In this article I want to explore some ideas for new APIs that will help solving the problems that I encounter. I’ll be happy to see your comments below.

read more

NADCAST.22 live at React.NotAConf

posted in NADCAST on 2019-05-16   https twitter nadcast

Last weekend I was part of the ReactNotAConf conference and this 22th episode was live recorded on stage there. Kudos for the organizers and the speakers. It was an awesome event and it looks like we've made a really interesting panels. Enjoy.

read more

NADCAST.21 с Радо Станков за React.NotAConf

posted in NADCAST on 2019-05-03   http react notaconf nadcast

Една седмица преди React.NotAConf с Радо обсъдихме някой важни подробности около събитието. Ако се чудите за какво точно ще говорят лекторите или ако все още не сте решили какво да правите на 11 май изслушайте епизода. Ще се радвам да се видим в Interpred WTC.

read more

Jolly Roger - a 2KB micro-framework based on React hooks API

posted in JavaScript on 2019-04-20   time roger const state return function usestate yohoho action

The hooks API is a wonderful idea. There are some slick patterns involved that push the React development to a more functional approach. I'm interested in trying that new API and decided to use it for my latest project. However, after a couple of days, it looked like I can't build my app only with hooks. I needed something else. And that's mainly because each hook works on a local component level. I can't really transfer state or exchange reducers between the components. That's why I created Jolly Roger. It has similar helpers but works on a global app level.

read more

forEach or not to forEach

posted in JavaScript on 2019-04-12   array foreach item component update react iteration position remove state

I had an interesting bug in my React application. It happened that the problem was in the fact that I was using forEach instead of for.

The bug that I was encounter was

read more

NADCAST.20 със Стефан Кънев

posted in NADCAST on 2019-02-27   https https www nadcast

Пилотния за сезон 2019 епизод е със Стефан Кънев. Поговорихме си за мениджмънт и лидерство. Приятно слушане.

read more

NADCAST.19 с Радо Станков и Минко Генчев

posted in NADCAST on 2018-12-20   https nadcast https twitter

Ето един малък коледен подарък - епизод номер 19 на NADCAST. Последните няколко месеца съм на вълна продуктивност. С Радо Станков и Минко Гечев си поговорихме за TEA framework. Или казано по друг начин, как да намерим повече време (time), енергия (energy) и фокус (attention). Приятно слушане.

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

React hooks: changing the mindset

posted in JavaScript on 2018-10-31   react function hooks count counter return useeffect state const usestate

If you use React you probably know about the so called hooks. They were officially announced at this year's ReactConf by Sophie Alpert and Dan Abramov. Their presentation could be seen here. I, same as many others got intrigued by this new feature. A little bit confused by if I like them or not but kind of excited. This article pretty much sums up my thinkings around React hooks and aims to give a balanced opinion.

read more

NADCAST.18 with Sara Vieira

posted in NADCAST on 2018-10-04   https sara vieira nadcast

This episode is with Sara Vieira. She is doing a lot of interesting things with React, GraphQL, Apollo and with JavaScript in general. She's also part of bunch of conferences doing talks and workshops which itself is a big challenge. Happy listening :)

read more

NADCAST.17 с Радо Станков

posted in NADCAST on 2018-07-26   nadcast https

След дългата, почти два месеца пауза, епизод 17 на NADCAST е с Радо Станков. Започнахме с някои много интересни новини като предстоящия NotAHackathon и VarnaConf. След това си поговорихме за различните по вид работни среди. През freelancer-ството до работата в продуктова компания.

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

NADCAST.16 с Владимир Конушлиев

posted in NADCAST on 2018-05-31   https nadcast

Много ценен разговор с Владо се получи. В този 16-ти епизод дискутираме code review процеси, навици, мотивация и като за финал малко за баланса в нашата професия. Надявам се да ви хареса.

read more

NADCAST.15 live recorded at React.NotAConf

posted in NADCAST on 2018-05-09   https twitter react nadcast https www youtube http nadcast krasimirtsonev mp3 http nadcast live recorded

Episode #15 of NADCAST was live recorded at ReactNotAConf conference in Sofia on 28th of April. After every presentation we've made a panel with the speaker and ask topic related questions. So, if you listen the whole episode you'll get a pretty good overview of what the conference was about.

read more

NADCAST.14 със Стефан Кънев и Димитър Димитров

posted in NADCAST on 2018-04-19   https nadcast

Стефан и Митьо споделиха солидни практики и опит в менторирането на по-начинаещи програмисти. Надявам се този 14-ти епизод да ви бъде полезен независимо на какво ниво сте.

MP3: http://nadcast.krasimirtsonev.com/StefanKanev_DimitarDimitrov.mp3

read more

NADCAST.13 с Радо Станков

posted in NADCAST on 2018-04-11   react https http nadcast patterns conf summit https bulgariawebsummit web summit https bulgaria web summit notaconf http react react notaconf http

Фаталният епизод 13 на NADCAST е с моя добре познат събеседник Радо Станков. Основна тема на нашия разговор беше новата версия на React и предстоящите React.NotAConf (http://react-not-a-conf.com/) и Bulgaria Web Summit (https://bulgariawebsummit.com/) конференции.

read more

My take on Redux architecture

posted in JavaScript on 2018-04-06   state action redux const visible store function return counter type

Redux is a library that acts as a state container and helps managing your application data flow. It was introduced back in 2015 at ReactEurope conference (video) by Dan Abramov. It is similar to Flux architecture and has a lot in common with it. In this section we will create a small counter app using Redux alongside React.

read more

NADCAST.12 с Димитър Димитров

posted in NADCAST on 2018-03-22   https nadcast

Епизод номер 12 е с Димитър Димитров (Митьо). Поговорихме си за менторството и за това как трябва да се подхожда към начинаещите програмисти. Имаше и малко DevOps даже :)

read more

NADCAST.11 с Мариан Игнев и Павел Иванов

posted in NADCAST on 2018-02-23   http sashido io nadcast

Първия епизод за 2018 е с Мариан и Павел. Поговорихме си за Sashido.io, инфраструктури, наемане на хора и още нещо :)

read more

Debugging your front-end like it's 2019

posted in JavaScript on 2018-01-20   kuker step answer redux state events robot event result

(If you are lazy jump to this section to learn what is this article all about.)

Remember The Island movie from 2005. I watched it again these days and I realized that the old sci-fi titles start with something really interesting. It is funny how they create a world of flying vehicles and say something like "The year is 2019 …". Well, we are 2018 and the public transport is still on the ground. We still can't clone people (I hope so) or travel in a giant spaceship which looks like a fully-functional city.

read more

NADCAST.10 с Минко Гечев и Радо Станков

posted in NADCAST on 2017-12-22   http angular nadcast https twitter

Предколеден 10-ти епизод на NADCAST е с Радо Станков и Минко Гечев. Разговора започна с малко meta теми, но после си поговорихме за Angular, React и JavaScript като цяло. Приятно слушане и весели празници.

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

Meet the JavaScript pattern of the year or how to handle async like a boss

posted in JavaScript on 2017-11-24   generator player function result return position error const console log yield call player

Sometimes when you learn something new you get really excited. Excited to that level so you want to teach it to someone. That is the case with the concept which I found a couple of months ago. It is an implementation of the command pattern using generators. Or the well known saga used in the redux-saga library. In this article we will see how the idea makes our asynchronous code simpler and easy to read. We will also implement it ourself using generators.

read more

Getting from Redux to a state machine

posted in JavaScript on 2017-11-10   state error machine const user redux credentials login submit stent

This article is about Stent - a Redux-liked library that creates and manages state machines. Stent implements some of the Redux’s core ideas and in fact looks a lot like it. At the end of this post we will see that both libraries have a lot in common. Stent is just using state machines under the hood and eliminates some of the boilerplate that comes with Redux’s workflow.

read more

You are managing state? Think twice.

posted in JavaScript on 2017-10-27   state input false state machine isinprogress request isloggedin submit states message

Recently I started questioning the state management in React applications. I’ve made some really interesting conclusions and in this article I’ll show you that what we call a state management may not be exactly about managing state.

read more

NADCAST.09 с Радо Станков

posted in NADCAST on 2017-10-23   link react https facebook license nadcast graphql http state facebook event link

Епизод 9 на NADCAST е с Радо Станков. Основно си поговорихме за React и нашумелите около библиотеката теми. Приятно слушане :)

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

NADCAST.08 с Александър Тодоров

posted in NADCAST on 2017-09-14   http nadcast

Епизод 8 на NADCAST е с Александър Тодоров. Поговорихме си за тестване, QA, release процеси, малко за React. Оказа се че тестването в компании като RedHat може да бъде доста голямо предизвикателство.

read more

README driven development

posted in Architecture on 2017-09-06   library readme driven development api code writing make documentation started helped

I was doing a podcast episode with Kent C. Dodds when he mentioned README-driven development. And so I decided to try it out with a new library which I just started. Here’s what I found.

read more

NADCAST 05 с Христо Панайотов

posted in NADCAST on 2017-06-19   nadcast

Епизод 5 на NADCAST е с Христо Панайотов. Прави доста интересни неща по доста интересен начин. Поговорихме си за това как се случват по кретивните уеб сайтове в днешно време и малко за JavaScript stack-a.

read more

The powerful higher-order component pattern

posted in JavaScript on 2017-06-10   component function props react const job dependencies h1 return state

There are lots of things which I like in React. Mostly the fact that it teaches interesting patterns. One of my favorites ones is higher-order component. In this article we’ll do a couple of experiments and will see how powerful this approach could be.

read more

NADCAST.01 с Радо Станков

posted in NADCAST on 2017-05-22   podcast nadcast

Това е един експеримент, който мисля от доста време. Първи епизод на моя podcast наречен "NADCAST". Поговорихме си малко с Радо Станков. Предимно за React.

read more

Surviving the Web

posted in Must-see on 2017-03-03   smashfind links time cool places popular stuff twitter web read

I'm a proud father of two and programmer for more then 15 years. My kids are small so I'm really into parenting right now. A bit of a problem for me is to stay up-to-date with the latest technologies in the Web. I really love my job but I just don't have enough time to look after all these frameworks, libraries or tools. I used to read Twitter, monitor RSS feeds and spend hours reading Reddit or Medium. However, no time for that anymore.

read more

Bulgaria Web Summit 2017 is just around the corner

posted in Must-see on 2017-01-30   ll day time talk nice interesting events good happy

One of my favorite conferences Bulgaria Web Summit 2017 is just around the corner. I’m happy to attend again. The organizer prepared a good set of speakers and the event is two days this year.

read more

Children in JSX

posted in JavaScript on 2017-01-06   todo header component return props children function todos classname todolist title

(This article is part of React in patterns series.)

React is highly composable. And the API that enables that is props.children. It gives us the power to create a placeholder that is later filled with content from the outside.

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

Short Film: Find my Phone

posted in Cinema on 2016-12-17   phone thief stolen

After my phone got stolen, I quickly realized just how much of my personal information and data the thief had instantly obtained. So, I let another phone get stolen. This time my phone was pre-programmed with spyware so I could keep tabs on the thief in order to get to know him. However, to what extent is it possible to truly get to know someone by going through the content of their phone?

read more

React and third-party libraries

posted in JavaScript on 2016-11-27   react tags tag render list jquery plugin extends react component props

React is probably one of the best choices for building UI. Good design, support and community. However, there are cases where we want to use an external service or we want to integrate something completely different. We all know that React works heavily with the actual DOM and basically controls what’s rendered on the screen. That’s why integrating of third-party components could be tricky. In this article we will see how to mix React and jQuery’s UI plugin and do it safely.

read more

Full Stack Fest and CSS day Videos

posted in Must-see on 2016-09-23   full stack fest

One of the ways to stay up-to-date with the latest technologies is to watch talks from popular conferences. Here are two of my favorite ones:

read more

Debugging with Node

posted in Nodejs on 2016-03-22   debugger step node text function program line run counter command

Node has a wonderful debugger. As a front-end developer I’m mainly using Chrome’s tools but sometimes I run things in Node environment and this native feature comes handy. In this article we’ll see how to debug in the terminal using Node’s debugger.

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

JavaScript's reduce could be really helpful

posted in JavaScript on 2015-12-25   testcase true patterns state reduce current cases expected return array test

I love using functions like map, filter or reduce. They are an important part of my arsenal and I simply can’t stop using them. Today I had to solve an interesting problem and I ended up using reduce.

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

Dissection of Flux architecture or how to write your own

posted in JavaScript on 2015-12-18   store function action var return consumer change dispatcher view

The Flux implementation discussed in this article is available here github.com/krasimir/fluxiny. Feel free to use it in a browser directly or as a npm dependency.

I’m obsessed by making my code simpler. I didn’t say smaller because having less code doesn’t mean that is simple and easy to work with. I believe that big part of the problems in the software industry come from the unnecessary complexity. Complexity which is a result of our own abstractions. You know, we (the programmers) like to abstract. We like placing things in black boxes and hope that these boxes work together.

read more

Hacking a weird failing HTTP request

posted in Architecture on 2015-12-04   request nginx server st http router problem external api

I recently finished watching Mr. Robot. If you didn’t check out the show please do. Last few days I felt like I’m hacking something. Just like Elliot in MR. Robot. This blog post is about fixing a weird bug. Really strange problem with a failing HTTP request.

read more

Enforce standards while submitting a pull request

posted in JavaScript on 2015-11-29   template textarea javascript bookmarklet n n template var code pull request

GitHub’s pull requests are an important part of my/our development process. That’s why I was thinking about creating a template that will enforce the standards.

read more

CSSSteal - Chrome extension that extracts CSS

posted in CSS3 on 2015-09-17   css styles var section el small li element rules

We had to update some of our old pages adding new elements. This means mixing old and new code. Placing HTML markup and JavaScript in legacy pages is not that difficult. Yes, it brings some issues but they are easily solvable. However, the CSS is a whole new story. That’s why I did CSSSteal. It helps me extract the needed styles.

read more

Using Local Storage as a communication channel

posted in JavaScript on 2015-05-05   namespace data localstorage function var storage loop browser buffer namespace

So it's been a few months since I published something here. It’s not because I’m lazy (that’s true though) but because I was working on my second book. Now the book is almost finished and I’ll start actively blogging again. In this article we’ll see how to use the local storage of the browser as a communication channel.

read more

The proper way of fixing bugs

posted in Must-see on 2015-02-11   bug problem time system parts don t fix steps work

I could split my programming experience in two parts. The first one is a little bit more creative. That's the time where the application still does not exist. You invent and architect the program. The second part is extending and fixing the already created system. They, these two parts, have their own interesting and boring sides. However, I believe that they both are in the essence of delivering quality software. This article focuses on bug fixing. It aims to give you bunch of advices how to properly handle the problems in your applications.

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

Merry Front-End Christmas

posted in Must-see on 2014-12-24   making talk ll capabilities technologies make language testing big

Christmas is just around the corner. I thought that I should post something. Recently I watchedvideos from two big front-end conferences. So, here is my present for you. A few talks that I think worth attention.

read more

How I squeezed two hours and a half

posted in Must-see on 2014-11-21   issue london wasn t web frontend page past magazine back

Usually I don't write such articles but this time I'll share my story. I was going to fly from London to Bulgaria. The flight is two hours and a half which is (by my opinion) enough to get bored. When I was traveling from Bulgaria to London I used my phone a lot. I read lots of stuff for reactive programming, played few games, ate some snacks. However, for the way back I wasn't prepared.

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

Feeding the beast at 60fps

posted in JavaScript on 2014-07-23   li data browser function var processed code list time

The browsers nowadays are smart. They optimize everything and help us to produce better applications. They process our code as fast as possible and even on mobile devices deliver a pleasant experience. However, at the same time, it is possible to write buggy code and make the browser freezing. We are not talking about slowing down the rendering. We are talking about no rendering at all. There are cases where we want so much from the browser that it just can’t handle it.

read more

"Help, I'm stuck in an event-loop" by Philip Roberts

posted in Must-see on 2014-06-22   event loop javascript philip roberts m stuck words

Us JavaScript programmers like to use words like, "event-loop", "non-blocking", "callback", "asynchronous", "single-threaded" and "concurrency". We say things like "don't block the event loop", "make sure your code runs at 60 frames-per-second", "well of course, it won't work, that function is an asynchronous callback!".

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

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

Codefront.io retrospection

posted in Must-see on 2014-05-13   talk end conference nice interesting talked rest people track day things chance

Okey, I normally don't write such articles. The things that I am writing about are technical stuff, concepts, experiments related to my job. However, this time will be a little bit different. I had a chance to speak at Codefront conference. And because it was so awesome I decided to share my experience.

read more

Codefront.io is around the corner

posted in Must-see on 2014-04-25   developer open io front end css javascript talk speakers interesting conference linz

There are only two weeks left before the international front-end conference in Linz - Codefront.io. It's organized by the guys from WebBox and it's scheduled for 10th of May. You still have a chance to buy a ticket and listen interesting talks about our lovely Web.

read more

Book review: Getting Started with Grunt: The JavaScript Task Runner

posted in Nodejs on 2014-04-21   book grunt experience free javascript task runner helpful started

I just finishing reading Getting Started with Grunt: The JavaScript Task Runner. The same book that we (I and Packt publishing) run a contest for. You could still joint it here and win a free copy.

read more

Cross-browser handling of Ajax requests

posted in JavaScript on 2014-02-23   ops xhr function data request var headers return callback ops method

This blog post is part of series about AbsurdJS. I'll continue filling the library with small and self organized black boxes. In the last article we talked about creating a JavaScript router. This time we will go through the process of making Ajax requests.

read more

A modern JavaScript router in 100 lines

posted in JavaScript on 2014-02-21   router javascript navigo match history node

(The router here is now placed in its own project - Navigo. There is also another article Deep dive into client-side routing which you may find interesting)

Nowadays the popular single page applications are everywhere. Having such application means that you need a solid routing mechanism. Frameworks like Emberjs are truly build on top of a Router class. I'm still not sure that this is a concept which I like, but I'm absolutely sure that AbsurdJS should have a build-in Router. And, as with everything in this little library, it should be small, simple class. Let's see how such a module may look like.

read more

To all devs out there

posted in Architecture on 2013-11-26   good code don t project make end css server start things

There are few things which I'm thinking about last few months. I summarize them here. Initially, I started writing this article for the company which I'm working for - East Interactive. The material is not meant to teach. It just contains few thoughts of main and I hope that my colleagues will find it helpful.

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

PHP: please, please, clear my cookies

posted in PHP on 2013-10-31   time cookies result arr setcookie request_ids time setcookie app_request_type time store needed

I'm currently working on a JavaScript application which is using the facebook API. There are some things which I need to pass from one page to the other. So, I decided to use cookies. The storing works like a charm, but the deleting doesn't. I needed one hour to find the exact problem.

read more

JavaScript: dependency free extend method

posted in JavaScript on 2013-10-28   extend var function o prop destination tobedefined expect o address bla bla

While I worked on AbsurdJS I needed a function which accepts numerous objects and combines their properties. I.e. something like the _.extend method of UnderscoreJS. What I did is actually to use one more dependency just because of such method. John-David Dalton nicely pointed out my mistake and added a simple function which solved the problem. I change it a bit and now it acts as UnderscoreJS's version.

read more

Git error: cannot lock existing info/refs

posted in Architecture on 2013-10-02   existing info refs lock existing info console

I just messed up my local repository. Thankfully there was an answer in StackOverflow.

read more

SASS: interpolation in a name of variable

posted in CSS3 on 2013-08-29   bg background color interpolation header include set variable sass set styles dark include set styles arg header include bg arg header

I just answered on that question at StackOverflow. That's actually asked a lot last few months.

read more

CSS: Understanding first-child, last-child and nth-child

posted in CSS3 on 2013-08-16   child element nth child scope row4 markup type color styles

I like the CSS only solutions. Very often I need to select a specific DOM element. Sure I could add a new class, but it is always nice if I can do that inside my stylesheets. It just looks better and keeps my HTML markup clean. first-child, last-child and nth-child are made exactly for this purpose.

read more

A bad side effect of the aspect oriented programming

posted in JavaScript on 2013-08-15   thing result function thing prototype dosomething start prototype dosomething function aspect oriented programming problem original class

I just read this very interesting article published on know.cujojs.com. It's about aspect oriented programming. At the beginning I thought "Oh, that's kinda cool", but when I start thinking about how I'll use it in practice I notice something bad. The blog post itself is well written and informative, but doesn't include any cons of the used technique.

read more

Two handy and advanced SASS features and their limitations

posted in CSS3 on 2013-08-13   mixin margin item reset list include extend sass items interpolation

I really like SASS and I use it a lot in my daily job. There are tons of useful features. However there are some things which I want to do, but I can't. There are limitation in the syntax and missing functionalities. Sharing what I found, I want to know if you meet those limitation and how you get around them.

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

Web Highlights #7

posted in Inspiration on 2013-07-27   http twitter design web case study sass media queries blog things

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

JavaScript is cool

posted in JavaScript on 2013-07-23   var function class return instance pubmethod module event function return

I'm writing a lot of JavaScript these days. Sometimes it's really crazy what you can do with that language. I have bunch of tools in my arsenal and I wanted to document them somehow. Writing an article is a good option. By tools I mean patterns, piece of logic or just syntax shortcuts. However, this article is not exactly about design patterns, but it uses some of them. It's just about few ideas, which I came into during my daily scripting.

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

Extending Jasmine (BDD framework for testing)

posted in JavaScript on 2013-07-05   function jasmine htmlreporter spec reporter jasmineenv test prototype

Don't get me wrong, Jasmine is a wonderful framework. I'm using it for testing JavaScript in both places - front-end (in browser) and back-end (Nodejs). However, the client side has some disadvantages, which I just fixed. I hope that someday these changes will be moved to the official version (or at least I'll make a pull request very soon).

read more

Importing huge MySQL dump under Windows.

posted in PHP on 2013-06-17   mysql dump table hugedump sql sql table hugedump root h localhost u root h mysql command

I just received a 250MB dump of a database and I needed to see what is it inside. As you may guess, PHPMyAdmin is not a good option in this case. I decided to use the command line.

read more

Get computed css styles for a given element

posted in CSS3 on 2013-06-16   queryselector h1 null document queryselector h1 getcomputedstyle document queryselector

I just found out that it is possible with pure javascript. It's supported in all the major browsers. Find more information here.

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

Flash, nodejs sockets and cross-domain policy file

posted in ActionScript on 2013-06-13   socket port xml policy file server anotherhost error flash player make

Ok, that was a long journey. I took an already build project and I had to make some changes. It's a complex system involving flex applications, nodejs and a mobile site. Before to start making changes I had to setup the project and make it work on my local machine. I spend few days doing this. At the end I successfully compile the flex application and made the necessary corrections. I uploaded the new swf file and of course it didn't work.

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

mod_rewrite, one simple rule and two stupidly lost hours

posted in PHP on 2013-06-05   public favicon png index php directory htaccess file server request mod_rewrite

Ok, I should admit that mod_rewrite and regular expressions are not my strongest part. Today - as every other day I realize how little knowledge I have. Actually it's good to have such moments. I lost almost two hours fighting with a really really simple mod_rewrite rule in my .htaccess file.

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

Git under windows (console mode)

posted in Architecture on 2013-05-29   git windows powershell file aliases function command status alias set

I'm a Windows user. I also have a virtual machine with Ubuntu installed and coding there from time to time. I use Git a lot and in general I prefer console mode over the GUI. Under Unix everything works just great, but Windows's command prompt requires more efforts from our side. However I found some helpful tips, which could make your life easier.

read more

A short review of ExpressionEngine framework

posted in PHP on 2013-05-20   short review expressionengine framework s capabilities tech pro account article made project start

I'm going to start a new project with ExpressionEngine. So, I made a short review of the framework's capabilities. The article is available at my account in tech.pro.

read more

Web Highlights #2

posted in HTML5 on 2013-04-10   media queries css regions chrome web app ui adaptive web app asset downloading results query asset downloading media query asset understanding typographic hierarchy browser

Some of the cool and helpful things which I found 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

What exactly "Retina display" means in the context of the front-end development

posted in HTML5 on 2013-03-26   retina display means simple explanation great article ll suggest lot searched smashingmagazine check

If you are wonder what exactly "Retina display" means I'll suggest to check this great article in SmashingMagazine. I searched a lot for a simple explanation and that's the best one.

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

Compiling iOS application under Windows with Flex SDK

posted in ActionScript on 2013-03-06   file developer application step openssl certificate device app p12 ios

As you may know, Apple doesn't allow creation of iOS applications just like that. Especially under Windows. It's somehow a complex process, which requires several steps in a specific order. However it is still possible and you can do that without Mac.

read more

Web assets - tips for better organization and performance (discussion at VarnaLab)

posted in HTML5 on 2013-02-28   web assets tips varnalab discussion performance organization subject web assets slides screencast

A screencast of the discussion at VarnaLab on subject "Web assets - tips for better organization and performance". The slides are available here.

read more

Douglas Crockford’s Function Challenges

posted in JavaScript on 2013-02-25   function s function challenges crockford s function douglas crockford s called multiple times function challenges test compose functions function scope learn knowledge

Douglas Crockford’s Function Challenges. Test your knowledge of function scope and and learn to compose functions that can be called multiple times through function returns.

read more

Edge Conference 2013

posted in HTML5 on 2013-02-25   edge conference panel web testing browser support complex devices

Edge Conference is a different kind of conference, for developers with experience to share, who want to see and bring improvements to the web platform. Their emphasis is on creating a good environment for productive debate and discussion, rather than presenting the experiences of a single speaker. The videos from the conference are now available and you should definitely check them out.

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

Testing with headless browser (Zombie.js + Jasmine)

posted in Nodejs on 2012-10-14   browser function login site expect browser test testing input zombie css selectors

I was planning to post this article a few weeks ago, but today I finally finished the examples and I can't wait to share it. We all know that the testing is a big part of our daily tasks and we should use every existing tool to make our lives easier. I really like test driven development and once I found the concept of the headless browsing I started to think that we can automate every single aspect of the testing. In this post I'll show you how to use Nodejs to test a simple php site.

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

VarnaConf 2012 - a great event for developers

posted in Inspiration on 2012-08-07   hrabar free university chernorizets hrabar free visit chernorizets hrabar http varnaconf event lecturers great speakers interesting conference varna bulgaria saturday

If you are in Varna, Bulgaria this Saturday please visit "Chernorizets Hrabar" Free University of Varna. Really interesting conference, with great speakers. More about the event, lecturers and everything else here http://varnaconf.com/.

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

Writing Maintainable Automated Acceptance Tests by Dale H. Emery

posted in Architecture on 2012-07-08   good test suite lot tests article http arlobelshee test suite read automated testing checkout dale emery shares programming dale emery driven development changed test driven development

For some time, I bring a lot of attention to the tests of everything that I'm working on. Actually Test Driven Development changed a lot my vision for programming. Dale Emery shares really interesting thoughts regarding automated testing. Checkout here. If you wonder what are the characteristics of a good test suite read this article http://arlobelshee.com/what-makes-a-good-test-suite.

read more

What is JavaScript prototype by Angus Croll

posted in JavaScript on 2012-06-30   javascript prototype understanding javascript prototypes http javascriptweblog wordpress language http javascriptweblog javascript language http context explanations

Maybe one of the best explanations of the prototype in the context of JavaScript language.http://javascriptweblog.wordpress.com/2010/06/07/understanding-javascript-prototypes/

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

A behind-the-scenes look at Facebook release engineering

posted in Architecture on 2012-04-07   facebook release engineering scenes release engineering ars s release management facebook s release business news http arstechnica interesting article exclusive

Did you ever wonder how Facebook's release management looks like. Here is an interesting article about that http://arstechnica.com/business/news/2012/04/exclusive-a-behind-the-scenes-look-at-facebook-release-engineering.ars/1

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

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 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

Testing Facebook application

posted in JavaScript on 2011-11-29   facebook function php testing var fb config id sdk check

I had a lot of work these days and didn't have time to blog here, but I think that the tips in this article are very useful. The number of Facebook applications is increasing every day. We all know that the testing (debugging) of our code is really important. That's why I decided to share my experience in this area.

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

GoogleMaps JS API: address to coordinates transformation

posted in JavaScript on 2011-06-01   map google maps function address locations var results location google maps latlng step

When we are talking about maps, Google is an absolute leader. Their GoogleMaps tool is free, well documented and works really good. What I didn't find directly in the documentation is how to get the exact location based on plain text. I.e. to convert an address to google.maps.LatLng object. That's why I wrote a simple function that did this job.

read more

Another IE surprise

posted in JavaScript on 2011-05-19   createstylesheet problem createstylesheet k found usage

We all know that the usage of InternetExplorer brings a lot of problems for us (the developers). Did you know that there is a JavaScript method createStyleSheet that you can call only 31 times.

read more

A few things you don\'t know about JavaScript

posted in JavaScript on 2011-05-18   javascript expert javascript programmers mistakes subtle bugs common mistakes subtle avoid common mistakes javascript programming language javascript garden check called javascript garden javascript called javascript bad practices

A couple of days ago, I found very useful page about JavaScript called "JavaScript Garden". Check out here.JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes, subtle bugs, as well as performance issues and bad practices that non-expert JavaScript programmers may encounter on their endeavours into the depths of the language.

read more

F5 2011 RE:PLAY Film Festival. Inductance

posted in Inspiration on 2011-05-17   film festival inductance play film festival
read more

AS3: dynamic text field to curve (TextField on an arcing path)

posted in ActionScript on 2011-05-04   text var curvedtext textformat number radius tf direction endangle startangle

[2]Most of the articles here are tightly connected to my daily work. As you probably know from one of my latest posts (runtime font loading/embedding) I worked a lot with texts these days. There was a request for producing curved text from a dynamic field. Of course it wasn't so easy to create such a feature. I wrote a simple class that did the job and I decided to share it.

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

JavaScript: managing events (dispatch, listen)

posted in JavaScript on 2011-01-06   function event events dispatch classname type eventbus addeventlistener testclass2 testclass1 var

As a huge fen of the flash platform, I always like to work with events. The events system in ActionScript3 is really helpful when we are building a big application with many modules and we want to keep them independent. JavaScript hasn't native support of events, but we can still use them.

read more

CSS: selecting a specific child

posted in Other on 2011-01-05   span css main span specific child style set

The selectors are one of the most powerful features in CSS. Sometimes they can save you a lot of additional work. In this article I'll show you how to set the style of a specific child in a list of elements.

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

AS3: Using custom Metadata in Flex (part 1)

posted in ActionScript on 2010-12-28   metadata public flex mycustomclass information metadata tags tag as3 flash utils describetype public function mycustomclass

I'm sure that you've already used metadata tags in your flex applications. There are several reserved keywords like [Bindable], [Embed], [Event] and so on (the full list is available here). The function of the metadata tags is to provide additional information to the flex compiler. For example information about embeding assets, dispatching events. This article doesn't explain how to use the default flex tags (you can learn that from here). It shows you how to create your own metadata tags and how to use them.

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

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

How to create realistic Earth globe in Flash (AS3, Papervision3D)

posted in ActionScript on 2010-09-16   stage globe var import org papervision3d rotationx rotationy moviematerial sphere stage stageheight stage stagewidth

Papervision3D is a perfect tool for the purpose. As you will see such a task needs only few lines of code. To make the example a little bit more interesting we will add additional code to control the rotation of the globe by the mouse.

read more

Distort MovieClip in Flash with AS3

posted in ActionScript on 2010-09-05   getrandomnum clip setting mtd tweentype out_expo end getrandomnum distort private function number movieclip distortimagewrapper

As you probably know there is no simple way to distort a MovieClip in Flash. The solution that I've found uses AS3. Special thanks to Thomas Pfeiffer and Ruben Swieringa. They share their experience with this problem.

read more

Export mysql data to SQL script or CSV

posted in PHP on 2010-09-04   server data mysql export good solution phpmyadmin didn t work export data php file mysql exe mysql server received host

Yesterday I received host name, user name and password for a MySQL server. I needed to export the data from it. I didn't have access to PHPMyAdmin, I tried to connect to the server by mysql.exe on my PC, but it didn't work. And then I found really good solution - PHPMyAdmin in only one php file. I launched it from my localhost and it works. So if you need to export data or just see it, use Adminer. I also uploaded the file on my server, you can download it from here.

read more

Reported Attack Page in Firefox

posted in Other on 2010-08-17   site code add tools milware click request review check message remove

Before a couple of days the code of my site was injected with some milware script code. In this article I will advice you how to remove this message.

read more

Create your own tween manager class in AS3

posted in ActionScript on 2010-08-07   arr ease startpos calcendpos steps var calcendpos steps break object steps break case properties start public function

There are some features in Flash that we can't work without. Tween classes are among the most used ones. They give you ability to animate objects without using the timeline, to change the animation fast and easy. The idea of these classes is very simple. That's why I think that it is a good idea to have your own tween manager that you can modify to fit into your needs.

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

Customize ComboBox in Flash (AS3)

posted in ActionScript on 2010-06-17   combo tf data import flash dp additem label customcellrenderer function combo textfield setstyle oncombochange cellrenderer movieclip

In my work as a flash developer very often I receive from the client just one photoshop file with the design of the application/site that has to be coded. In the last project the designer made the ComboBox in the style of the site. So I couldn't use the default look of the Flash's drop down component.

read more

Tween Manager Class in AS3

posted in ActionScript on 2010-03-16   customproperty object tween tweenmanager xtween property function change tweenmanager tween loop end

TweenManager is ActionScript3 class that helps you to animate your objects in flash. You don't need to create timeline type animations, because you can control every property of the object. Also it helps you to create a sequence by different animations/events. In the examples below I'll show you how to use the manager to solve different problems during your daily flash work.

read more

SVET - the big adventure (fantasy flash RPG game)

posted in Other on 2010-03-05   game run game check n run game jump n run rpg jump n fantasy rpg jump latest flash game

svet - the big adventure (flash fanyasy rpg game)My latest flash game. It's a fantasy RPG jump'n'run game. Check out here.

read more

Remove the yellow border in flash/flex

posted in ActionScript on 2010-02-26   stage stagefocusrect false easy stage stagefocusrect post rockabit solution

The solution was so easy: stage.stageFocusRect = false;Thanks to Rockabit for the post here.

read more

SVET - web based project management system

posted in Other on 2010-01-05   project management system based project management web based project svet make detailed reports specific period working time online notebook work basically

svetsoft - web based project management systemFinally I finished some bugs of my own project management system and I think it's ready for use. SVET is one of my biggest projects and it's a web based project management system, that helps you to organize your work. Basically it's an online notebook which you can use to store the information for your projects. It enables you to track your working time and communicate with your team and clients. You can also make detailed reports of what you've done for a specific period of time. Please check out here.

read more

Любими блогове

posted in Inspiration on 2009-10-04   http http www http www plat4m web http www http blog arsthanea http www riznlog http www sephiroth http www smashingmagazine photoshop http www tutorial photoshop http
read more

Flex DataGrid vertical scrolling bug

posted in ActionScript on 2009-09-09   datagrid data_change listener datagrid flexevent data_change listener invalidateproperties flexevent data_change itemrenderer invalidateproperties flexevent itemrenderer itemrenderer invalidateproperties custom itemrenderer itemrenderer datagrid custom itemrenderer
read more

Flash CS3 crashes when closing the testing window !

posted in ActionScript on 2008-11-14   textfield crashes testing window flash scrolling text field creating scrolling text mask directly m working bkwld problem applied

I'm working with a class for creating scrolling text field. So I'm using a MovieClip as mask and TextField. When I test the movie and close the testing window Flash just crashes. It's because I have applied the mask directly to the TextField :) The problem is described here. Thank you BKWLD !

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

Great works from Cinemotion

posted in Inspiration on 2008-08-25   bulgaria cinemotion creating tv adds flash site biggest brands coolest videos bulgarian company made studio found
read more