duplo

duplo

This user hasn't shared any profile information

Yahoo Messenger: pippospano666

Jabber/GTalk: predatore86@gmail.com

Posts by duplo

Woooo! Dj-Set download page just added!

2

Wooooo! Today is a great day! I’ve just setted up the new incredible, fantastic, terrific, Dj-Set download page!

Check out my very first posted Dj-Set (I know it’s not so great… I’ve done a lot of mess…)!

"Operating Systems laboratory" project just pushed in gitorious!

0

Hi all, guys. I’ve just pushed my “Operating Systems laboratoryproject into gitorious. I’ve also added a description page on this blog. If you need a decent (but not good) starting point feel free to use my code.

PyCon Italia 4 is over!

0

At the end we succeeded. PyCon 4 is finished. Everything was great!

Many interesting talks, some of which I could not follow because of my commitment to the Develer SRL stand.

I want to thank all the staff at PyCon. And a big thank you goes to Develer that allowed me to attend this great event.

See you next year at EuroPython!

The end of PyConThe real end of PyCon

Visual guide to happy and productive work

3

Most of you know that I’m a software developer and that I love my job. Many people think that it’s uninteresting, boring, prone to cause personality disorders, with no need for creativity or social relations. They are wrong. My job is extremely interesting, it requires intelligence and creativity, passion, and the ability to relate with others (with both colleagues and customers).

Though I work with the utmost passion, I often have trouble maintaining concentration. In my case there are three main sources of distraction.
(more…)

Simple trick for deploy friendly custom settings/behaviors

0

I think that only a few of you know that I’m also a web developer (with poor results…). In this field, my favorite technology is django, a complex and complete web framework written in python that permits the creation of rich web applications.

But this is only partially related to what I’m going to explain you. A django project was only the first project in which I used this approach. Now I use it in most of my python projects.

So, what I’m going to explain? I’m going to explain the simplest and painless way to modify an application’s settings and some behaviors without touching its code. This means that you can do all the tests you want, without changing the deploy settings. A colleague of mine taught me this trick, as a wise Zen master, so that I could teach it to my adepts and continue the tradition.

  • The first thing you need is a place you can use as hook. In django, the settings.py module (which contain all the application-related settings) is the right place.
  • Then you have to add a few lines to your file. Something like this:
    # ...
    # The content of the module ends here!
    
    try:
        import settings_locale  # You will redefine the settings in this module...
    except ImportError:
        pass
    
    # That's all. Really.
    

    Obviously, any name can be fine.

  • Now you have to create the other module file in the same directory of the previous edited one (in this example settings_locale.py). This file can contain everything you want (ie redefined variables, redefined functions, monkey-patches for classes or functions in the application…).

This trick is pretty simple, but the result is that you have a very useful module that could override about everything in your application, for debug or testing purpose. And when you need the real application behavior all you have to do is to remove this module. And all just works.

A great ‘thank you’ to dvd, that helped me in web development projects and taught me practically everything I know about webapp’s development process.

My very first post!

7

So this is my very first post in this blog… I could tell something about me, about what I do in my life, about what I love and what I hate. But for this purpose I’ve just created the About page (I’m pragmatic like most of the programmers ;) ).
Then the only thing that remains is to say a big thanks to all my supporters:

  • Develer Srl, the company I work for. It also hosts this blog.
  • Develer’s sysadmin! He’s a wonderful person, always willing to satisfy my strangest requests.
  • The great Uranio team. I’m proud to be one of them. They are also hosting my old blog.
  • My sweet girlfriend, because she’s able to tolerate me also when I can’t.
  • My parents, because they have given birth to one of the most beautiful and intelligent creatures in the world (no, he isn’t my brother…).
  • My Macbook Pro, my iPhone, my parents’ iMac quad-core, my girlfriend’s Macbook. They give meaning to my life :D (just kidding).
  • Steve Jobs and Apple. They have designed and produced some of my favorite working and every-day-living tools.
  • To all those who will read my blog. Because I decided to write in English but my English is not good enough…
duplo's RSS Feed
Go to Top