Saturday, February 11, 2012

Prototypes and 'new' statement in Javascript

The blog is now moved here

The purpose of this article is to be a reminder how prototypes in javascript works. It is not full manual or detailed guide how to deal with that. So let's get started.

Classes in javascript is simply functions. Let's create few
var A = function(){
    this.some = 'A value';
    this.another = 'A value another';
}
Now we have two functions which can be be instantiated with new keyword
var a = new A();

Wednesday, January 18, 2012

Python dictionary with default values

The blog is now moved here

Recently, I had a task to call method with certain parameters passed to another function inside it. 

The code looks like this:

class SomeClass(object):    
    def some_method(self, arg2, params, kwarg1='default_value', 
                                        kwarg2='default_value'):        
        return external_module.meth(**params)

Thursday, September 29, 2011

Mercurial branching

The blog is now moved here

I have been working with git for awhile and found git very powerful. Our team was forced to use mercurial so we needed a branching model. We used this branching model with git which I found very useful. I didn't find really step-by-step guide of how to deal with mercurial after some research.


I was inspired by A Guide to Branching in Mercurial and tried to implement git practices with mercurial. The model itself is really similar to git's one. The purpose of this post is to describe how to implement that model with mercurial.


Tuesday, September 13, 2011

Introducing

Hey everyone,

This is my very first blog and  I want to apologize for my English which is not very good.
I'v been developing web applications for a few years now and finally I decided to setup the blog. Currently I'm the head of small web development company Anvil EIght and we are always trying to create something amazing.

I've never blogged before but read a lot and want to try myself in this field. The blog isn't my personal diary but it would be a collection of things that I and my teammates found interesting. I have accumulated a lot of ideas and now want to share them.

I hope you have as much fun as I do. So, let's start !

The blog is now moved here