JsAction – a tiny event delegation library

JsAction – a tiny event delegation library

JsAction is a tiny event delegation library that allows decoupling the DOM nodes on which the action occurs from the JavaScript code that handles the action.

The traditional way of adding an event handler is to obtain a reference to the node and add the event handler to it. JsAction allows us to map between events and names of handlers for these events via a custom HTML attribute called jsaction.

Separately, JavaScript code registers event handlers with given names which need not be exposed globally. When an event occurs the name of the action is mapped to the corresponding handler which is executed.

Finally, JsAction uncouples event handling from actual implementations. Thus one may late load the implementations, while the app is always able to respond to user actions marked up through JsAction. This can help in greatly reducing page load time, in particular for server side rendered apps.

Semaphore Bull Memorial

I joined Easy Forex back in 2012 to work on a rather complex project – migrate main website of the company from a really outdated version of DotNetNuke to WordPress.  WordPress, even though it is an absolutely amazing platform, turned out not to be the right tool for the job.  But we’ve managed to deliver anyway.  One of the annoying practices that we had to employ though was a semaphore flag for the database changes – only a single developer could work on the database at any given time.  (Again, this wasn’t a WordPress limitation, but rather specifics of our environment at the time).  That was the time when we introduced the Semaphore Bull to our development process.

Semaphore Bull

 

It worked out quite well.  But being a soft toy, it got abused a lot along the way.  It lost a leg, which was screwed in for a while.  Then it nearly lost the whole butt.  Then the head.  Beaten, barely alive, it still stood its ground and did the job!  At some point it got so bad, that we’ve had to place it into the plastic container, where it survived for a few more month.

Today we’ve finalized our migration of the main website from WordPress to CakePHP.  The system is so simple now that we don’t even need a database  anymore.   And with that, the job of the Semaphore Bull ends.   Gone, but not forgotten though!

Because of its huge contribution to our work, because it saved us from countless painful hours of resolving SQL conflicts, we’ve decided to create a memorial.  Ironically, the memorial to Semaphore Bull is built out Semaphore Bull itself, and the container it lived in.  For the future generations to remember the deed, we’ve printed out the snippet of the developer’s manual and embedded it into the memorial together with the dates.   Here’s how it looks altogether now.

Semaphore Bull memorial

Thank you, Semaphore Bull.  You’ve done us a great service.  Rest in peace.

gitjk – undo what you just did in git

gitjk – undo what you just did in git.

Supports the following git commands: add, archive, branch, cat-file, checkout, clone, commit, diff, fetch, grep, init, log, ls-tree, merge, mv, pull, push, remote, revert, rm, show, stash,status.

Support for the following git commands is not implemented: bisect, fsck, gc, prune, rebase, reset, tag.

PHỞ DEVSTACK 1.0 – automated workflow for front-end developers in one tasty bowl of code

PHỞ DEVSTACK 1.0 – automated workflow for front-end developers in one tasty bowl of code.

Features:

  • Yeoman generator
  • Livereload (without refresh for CSS)
  • LESS stylesheets compilation
  • HTML, JavaScript and CSS minification
  • Advanced image handling (base64 inlining, image optimization, sprite generation)
  • Browserify JavaScript modules
  • Linting JavaScript
  • Running unit and end to end tests
  • Configurable directory structure
  • Replacing text in HTML (meta tags, analytics codes)
  • Scripts and stylesheets revisioning
  • Running build after file is changed
  • Configurable plugins
  • Stays up-to-date

iFX EXPO International 2014

iFX EXPO International 2014

About iFX EXPO

  • The largest financial B2B convention
  • Over 500 FX & Binary Brokers
  • Over 1,500 senior executive attendees
  • Over 70 exhibitors from around the world
  • Speakers from the industry’s largest firms
  • Socialize with the industry’s leading executives
  • Meet international affiliates & introducing brokers
  • Learn industry trends and new developments
  • Attend panels and lectures from leading firms

Where’s the fish?

A colleague shared with me the link to this Einstein’s riddle.  It looks easy at first, but it actually isn’t.  I’ve tried a couple of different models to solve it, but haven’t figured it out yet.  Something tells me that if I remembered Prolog from my college days, I would have solved it in about 3 minutes.  But I don’t.  So pieces of paper and text files it is.  If that won’t be enough until lunch time today, I’ll start doing something in PHP or Perl…

 

Update: Solved it!  My initial model of addition wasn’t right. Subtraction worked much better.