Archive for the ‘JavaScript’ Category

Motivation

Things became more stable last time – we have clients who pay in time, the projects are mostly interesting, we have defined schedule and proven methods to achieve results. No more crashes, sleepless nights and broken builds that should have been in production a day ago :) We have not introduced TDD and really good QA process yet, however this became stable enough to make our life not so stressed. Are we satisfied? Someone – yes, but others want something more thrilling. Programming should be fun (I think so too), but we cannot make our commercial projects to be fun, because we need to guarantee the quality. At the same time, there are a lot of interesting technologies to try that we don’t deal with on a regular basis. Ruslan, our client-side developer whose hobby technologies are RoR and low-level C++ and Assembler coding proposed to hold a kind of hackathon.

Continue reading ‘In-house JS && C++ hackathon’ »

Intro

OOP is a great concept, it simplifies the programmer’s life, especially in the field of interface development. Nearly all modern web-interfaces use JS in some way – for field highlighting, validation, help etc. It’s OK when there are such simple things.
And now imagine, that we have a set of dialogue windows (HTML+CSS) for adding a comment, rating, sending to the friend. Each of these boxes has a number of functions – check if user is logged in(if not – show login form), send AJAX request, process response, show error/success messages, position the box on the page etc.

Continue reading ‘OOP in jQuery’ »

Recently I’ve learned one nice trick with for loop. When you use it, you should know he number of itereations. Most people do it like this:

  1.  
  2. $a = array(1,2,3,4,5);
  3. $s = sizeof($a);//you may use count(), but sizeof if 5% faster :)
  4. for ($i = 0; $i < $s; $i++)
  5. {
  6. //do something clever here
  7. echo $a[$i].
  8. ;
  9. }
  10.  

But this requires counting number of elements before using a loop. Continue reading ‘Nice trick with FOR loop’ »