Duplo's

The Duplo's blog.

RSS FeedsFollow me on Twitter!

  • Home
  • Projects
    • TomatoCompanion
  • About
  • Contacts

PyCon Italia 4 is over!

May 10th

Posted by duplo in Every day life

No comments

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

conference, develer, pycon, python

Visual guide to happy and productive work

Mar 18th

Posted by duplo in Development

3 comments

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 >

develer, happy, productive, work

Simple trick for deploy friendly custom settings/behaviors

Mar 11th

Posted by duplo in Development

No comments

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.

develer, django, python

My very first post!

Mar 9th

Posted by duplo in The blog

7 comments

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…
apple, blog, develer, first post, presentation, steve jobs
    • Popular posts
    • Archives
    • Tags
    • Categories
    • Development (3)
      • python (2)
    • Every day life (2)
    • The blog (1)
    apple blog conference develer django first post happy presentation productive pycon python steve jobs work
    • May 2010 (1)
    • March 2010 (3)
    • PyCon Italia 4 is over! (0)
    • Visual guide to happy and productive work (3)
    • Simple trick for deploy friendly custom settings/behaviors (0)
    • My very first post! (7)
  • My latest tweets

    Loading tweets...
    Follow me on Twitter!
  • Blogroll

    • BMLab – Appunti di Webmarketing (Italian)
    • Giovanni Bajo's swapfile
    • My old blog (italian)
    • Rugginoso's blog
    • Uranio multiblog (italian)
  • User Login






    • Register
    • Lost your password?
Mystique theme by digitalnature | Powered by WordPress
RSS Feeds XHTML 1.1 Top