How to Avoid Common Mistakes in JavaScript

From time to time, we all make mistakes while programming in JavaScript. It may happen due to many reasons: lack of experience, bad mood, deadline, a headake and so on. Even though many issues seem small, they can still become a reason for a huge failure and hours of debugging in the future. That's why you need to pay attention to details when you're coding, and I'm going to give you some advice how to make this process easier.

Step 5. Scraping data with Goutte

We're still on our way to better data scraping. We did a great job last time, but it's time for improvements. Now I want to introduce another even higher level tool for data scraping - Goutte. It's originally written by Fabien Potencier, the creator of the Symfony framework and is now maintained by FriendsOfPHP. 

Parsing content using SimpleXML

Time to time developers need to parse content to extract needed data from it. Usually it's just HTML pages, but sometimes you need to scrape data from more advanced sites where you have to use more powerful tools. In this blog posts seria I want to show you how you can accomplish this. I'll describe approaches one by one and show their pros and cons. First of all, together  we will check what PHP proposes us out of the box to work with XML (SimpleXML and DOM). Then we will explore more and more powerful libraries like CssSelector, DomCrawler, Goutte and CasperJs that can help you achieve all needed goals and make your life much much easier and pleasant. Are you ready to dive in? Let's go then.

Experiment with "New things every 30 days"

The two main things I've been thinking about this year (except tons of other important things) are productivity and motivation. Sometimes even things that you really love and enjoy become less interesting for you, because you do them each day during a long period of time without switching to other things. You lose your interest in these things, your motivation becomes worse and as a result your productivity is low. For example, I really love and enjoy programming and I can spend the whole day or weeks sitting in my armchair with my laptop just coding. But we should not forget that job isn't the only thing in the world. Sometimes we need to add more colors to our lives. I believe that new things may help you rest in some sense, improve your mood, motivation and creativity if you want. You may become a much more energetic, with greater motivation than ever before, just because you have so many different and interesting things in your life. In this article I'm going to write about the experiment that I plan to do in the next 30 days to add something new to my schedule and try to become more productive at the same time.

YAML as a data format for application's configuration

It seems obvious that almost every application has its configuration. We can use a lot of data formats for configuration files, for example YAML or XML, JSON or plain PHP (replace with any language you use) files. Personally I like and prefer to use YAML to other formats and here I just want to describe a little one of Symfony components called YAML. Also It's quite interesting for me which format you use, what pros and cons you see, so don't hesitate to leave a comment with your thoughts.