Mastering CSS selectors

css

There are many basic things every web developer MUST master early in his career and one of them is definitely: CSS Selectors and you see I said MUST not SHOULD because of the importance of the subject

A css selector is a matching pattern used to select any HTML elements in the page in order to style them or manipulate them using Javascript or any other JS library. As a web developer you will use these selectors a lot when you develop any website or web application, you will use them in your CSS files or in your Javascript code, so that’s why you have to learn an comprehend every and each one of them. Continue reading

Javascript TDD using Qunit and Karma

karma Karma is a Javascript Test Runner created by the AngularJS team(mainly Vojta Jína) in order to run your Javascript unit tests in multiple Browsers and devices at the same time.

Installing all the prerequisites

Because Karma is an NPM Package, you have to make sure that you’ve installed Node.js already. Personally I like to install Karma and all the dependent plugins locally in my project folder. To install Karma type this command in your Terminal:

npm install karma --save-dev

Continue reading

Improve your productivity with grunt JS

grund-js-opt

 

As a web developer, there are many tasks that every and each one of us do in a regular basis and some of these tasks are:

  • Compile coffeescript to javascript
  • Compile Sass or LESS to css
  • Check the quality of your code using one of the famous javascript linters like JsHint or JsLint
  • Minify JS and CSS files for deployment in the production environment
  • Minify your images
  • Run your unit tests

Continue reading

Unit testing With Qunit (Part 1)

 

qunit_logo

A couple of months ago, I started working on a project WYSIWYG for the benefit of one of our partners. This editor that is fully written in Web technoliges (HTML, CSS and Javascript) is one of the most key features of the main product for this company. To make it simple for everyone, edit HTML pages was the daily repetitive task done by more than a hundred employees to create differents types of documents like DOCX or PDF that can be saved easily on the server and even sent to the final clients by email.

After a couple of weeks I started to feel the pressure of this task for many reasons:
1. Huge browser compatibility issues (especially in the native Javascript API)
2. The number of Bugs is increasing every couple of commits
3. Regression !!!!!!!!!!!!!!!!!!!!!!

Continue reading