Saturday, February 19, 2011

The Solvers Manifesto

http://www.solversmanifesto.com/

The Solver Manifesto shows our dilemma, as a web developer, probably not much to the backend developer, or system developer. But definitely web developer, which is a big chunk of software development jobs.

We are not engineer, we are not paid as much as an Expert, and we don't get respected like a artist. Yet, we hired because we knows how to program, yet we have to make things nice. And yet, our opinion is not respected. Even when technicians fixing stuff, nobody question how they do it. Not for us.

p.s yes Yet Another Rant Post

Saturday, February 05, 2011

Random Python Learning : partial

On the holiday I decided to learn more on python, and really there is much to learn!!!!!!
One of the module I learn about is the functools module. 

One of the interesting function that I learn is partial, basically it is partial application of a function
for example

import functools
def adder(a,b,c):
    return a+b+c
def adder2(a,b):
    return a+b
add_three = functools.partial(adder,1,2)
add_one = functools.partial(adder2,1)
print add_three(1)
# would print 4
print add_four(3)
# would print 6
So you can wrap a existing without rewriting it, but give some default value to the existing function. And is actually used in python decorators.

read more here
http://docs.python.org/library/functools.html