invisivel.net https://blog.invisivel.net Personal website of Filipe Figueiredo Correia Mon, 05 Oct 2015 21:46:55 +0000 en-US hourly 1 http://wordpress.org/?v=4.3.2 Dusting season https://blog.invisivel.net/2015/10/05/dusting-season/ https://blog.invisivel.net/2015/10/05/dusting-season/#comments Mon, 05 Oct 2015 21:46:55 +0000 https://blog.invisivel.net/?p=509 I haven’t written in this blog for quite a while now, but wow, 2012? Has it really been that long? The reason, to a great extent, has been the writing of a certain PhD thesis. But I’ve finally finish that back in May, so I might find myself again in the mood of writing here more often. Stay tuned.

Meanwhile, I’ve updated my research page, so if you’re curious about what I’ve been working on in the academia, be sure to check it. As to what I’ve been up to in the industry, more news will follow soon ;-)

]]>
https://blog.invisivel.net/2015/10/05/dusting-season/feed/ 0
Python’s object model explained https://blog.invisivel.net/2012/04/10/pythons-object-model-explained/ https://blog.invisivel.net/2012/04/10/pythons-object-model-explained/#comments Tue, 10 Apr 2012 18:28:29 +0000 https://blog.invisivel.net/?p=492 Python's object model

That’s about it. Really. Ok, I’m leaving out some of the details, but the oficial docs provide the full story, and this stackoverflow thread makes a great reading if you are looking to know more about metaclasses.

Edit: Added a couple of instances to the diagram too.

]]>
https://blog.invisivel.net/2012/04/10/pythons-object-model-explained/feed/ 1
Objects have not failed, or have they https://blog.invisivel.net/2011/11/03/objects-have-not-failed-or-have-they/ https://blog.invisivel.net/2011/11/03/objects-have-not-failed-or-have-they/#comments Thu, 03 Nov 2011 18:21:19 +0000 https://blog.invisivel.net/?p=478 I stumbled on this 2002 essay by Guy Steele, and it felt more current than ever. Definitely, go read it if you’re interested in the topic.

[…] to say that objects have failed because they don’t solve all possible problems is like saying carbohydrates have failed because you can’t live on pure sugar. […]

]]>
https://blog.invisivel.net/2011/11/03/objects-have-not-failed-or-have-they/feed/ 0
Agile Portugal 2011 https://blog.invisivel.net/2011/06/05/agile-portugal-2011/ https://blog.invisivel.net/2011/06/05/agile-portugal-2011/#comments Sun, 05 Jun 2011 14:04:46 +0000 https://blog.invisivel.net/?p=470 Yes, it’s just around the corner. The second edition of the Portugal-located conference on Agile Software Development is two weeks away. We are going to great lengths to bring you a great program, with huge names in the world of software development.

Don’t miss it, really.



]]>
https://blog.invisivel.net/2011/06/05/agile-portugal-2011/feed/ 0
Django & Domain-driven Development https://blog.invisivel.net/2011/05/17/django-domain-driven-development/ https://blog.invisivel.net/2011/05/17/django-domain-driven-development/#comments Tue, 17 May 2011 19:05:47 +0000 https://blog.invisivel.net/?p=378 What’s the relation between these two, you may ask. Django, and other frameworks of the sort, try to provide all that stuff that developers could otherwise need to implement over and over in their web applications. They allow to focus on what really differentiates our web apps from the rest of them. In part, this means letting developers focus on the domain model.

Django’s models do this well1, but they are more “relational” than they actually needed to be — we still have to deal with stuff like ForeignKeys and the like.

I would rather think exclusively in terms of objects, but, no ORM can fully abstract the relational database underneath. This is a leaky abstraction that half of the world would like to see fixed, and the other half as actually tried to fix it but failed to varying degrees. And that’s why I understand why django’s approach has converged to what it is today. It reflects a reasonable balance of these forces.

I still think there are better names than ForeignKey to represent one-to-many associations, though.

Creating and visualizing django models

Even if not purely object-oriented in their nature, I still think of django models as object-oriented domain entities. And the domain model of a system can really grow beyond the point where it can fit in a single person’s mind. Django projects are no exception.

So, I’ve been trying to find a tool that helps me dealing with large django projects. Here are some of my findings:

  • UML-to-Django —Uses XSL to transform a XMI file, to Django model classes. It has a few limitations at this point. Namely, it works well when the source XMI is created by ArgoUML, but I couldn’t use it successful with class models exported from other tools. I’m currently using Visual Paradigm, and the best way I found to bring my model to UML-to-django was to make Visual Paradigm generate Java source-code, and reverse engineer it in ArgoUML. And this still required a little bit of fiddling with the XMI produced by ArgoUML, but it worked in the end.
  • Dia-to-Django — Didn’t try it, as the SVN repo seems to have gone the way of the Dodo, but it looks like it could have been a viable alternative to UML-to-Django.
  • GraphModels extension — Rather than allow to generate django models from a UML class diagram, the graphmodels extension allows to visualize a django project as a diagram. Not a bad option; one can definitely understand a django project much quicker than looking at a diagram of the model classes. Unfortunately the notation is much closer to the relational world than to a object oriented one. Not that there’s anything wrong with that, but the visual elements of a class diagram convey a richer semantics, and I do take more time to grasp a diagram of this kind than I take to grasp a class diagram.
  • Django-yuml — Creates UML class diagrams from django models, using yuml. It’s obviously limited to what yUML can express, and as such it can’t represent stuff like association classes. Django models can express associative classes using the through option.
  • DUDE: Django UML Designer — This one is very different from the previous tools, but interesting nonetheless. Its a django-based UML modeler. It’s a dead project, apparently, but in case you’re interested in this kind of stuff, check models.py for a very early implementation of MOF using django model classes.

The graphmodels extension is serving me good for now, after some hacking to make the generated diagrams closer to UML class diagrams. Here’s an example of how it looks for the pycon system source code:

PyCon Models using the graph_models extension

Here’s how it looked before the modifications:

PyCon Models using the graph_models extension

This example doesn’t have generalizations, which also look much nicer with my changes. Here’s an example of how they look using my patch, before and after respectively:

A simple example of using the django's graph_models extension.A simple example of using the django's graph_models extension using my patch.

Update 2011/09/23: Fixed big mixup with the pictures.

  1. And I could start another rant right here, as I see a model as a set of classes/domain-entities, and not a single class/domain-entity. But I will try to adopt django’s terminology for the duration of this post.
]]>
https://blog.invisivel.net/2011/05/17/django-domain-driven-development/feed/ 0
Home renewal https://blog.invisivel.net/2011/04/10/home-renewal/ https://blog.invisivel.net/2011/04/10/home-renewal/#comments Sun, 10 Apr 2011 20:00:28 +0000 https://blog.invisivel.net/?p=400 This website’s contents and layout just received a well overdue renewal. Namely, you can now find in here some info about my research, and additional contents will eventually find their way here too.

Lacking the time to make my own theme, this time I’m just going with one by someone else, with of course a couple of customizations of my own. For posterity, this is how the website used to look.

]]>
https://blog.invisivel.net/2011/04/10/home-renewal/feed/ 0
Losts, founds and the agility in between https://blog.invisivel.net/2010/05/28/lost-founds-and-the-agility-in-between/ https://blog.invisivel.net/2010/05/28/lost-founds-and-the-agility-in-between/#comments Fri, 28 May 2010 19:05:57 +0000 https://blog.invisivel.net/?p=362 This blog has faded away, and twitter sort of became my voice to the world, but I have no intentions of closing it down just yet. As some say, hope is the last to die, which might explain why I still believe I will manage to post here some thoughts over the next months.

What has been keeping me so busy you ask? My job and my PhD research are the main culprits. I’ve lost count on the number times my thesis title has changed, but I’m pretty confident I’ve finally reached one with which I can reasonably see where I’m heading, and with which I am pretty sure to enjoy the ride. I hope I’ll be ready to give you more details soon :)

But the last few weeks, my mind has also been somewhere else. I’ve been organizing an event on Agile Software Development — Agile Portugal 2010. This will be the biggest event of the kind in Portugal that I have memory of, and putting it together has been quite an endeavor, but an incredibly fun one. I’m very excited about the program and the invited speakers we already have on board, and it keeps getting better and better.

If you want to be part of this great event, you can do it either as a speaker or a participant. The Call for Speakers and the early registration period will be open until the next June 5th.

]]>
https://blog.invisivel.net/2010/05/28/lost-founds-and-the-agility-in-between/feed/ 2
The Kake Coding Dojo format https://blog.invisivel.net/2009/11/15/the-kake-coding-dojo-format/ https://blog.invisivel.net/2009/11/15/the-kake-coding-dojo-format/#comments Sun, 15 Nov 2009 01:48:31 +0000 https://blog.invisivel.net/?p=351 I’ve just stumbled on this post by Danilo Sato and remembered what a great time we had on the Kake Coding Dojo last August, at Agile 2009.

Want to know what a Kake Coding Dojo is? Hugo Corbucci explains it on his blog, and so does Danilo (note that this Coding Dojo format was previously called UberDojo).

I’m tempted to promote some Kake sessions with fellow co-workers. We’ve been talking about ways to share knowledge on TDD and other agile practices across the company, and I found this to be an excellent way to improve one’s TDD skills, and to have contact with different languages while we’re at it. Will try to report back on my findings.

Update: Hugo has just made a post about this too, with some extra info.

]]>
https://blog.invisivel.net/2009/11/15/the-kake-coding-dojo-format/feed/ 0
Just finished submitting one more paper https://blog.invisivel.net/2009/05/19/just-finished-submitting-one-more-paper/ https://blog.invisivel.net/2009/05/19/just-finished-submitting-one-more-paper/#comments Tue, 19 May 2009 00:56:45 +0000 https://blog.invisivel.net/?p=342 Today I’m going go to sleep with this song on my mind (read it thinking on the melody of On the First Day of Christmas).

On the first day of EuroPLoP, my workshop said to me:
“Delete everything on page 3”
On the second day of EuroPLoP, my workshop said to me:
“Too many patterns,
and Delete everything on page 3”
On the third day of EuroPLoP, my workshop said to me:
“Three known uses,
too many patterns,
and Delete everything on page 3”
On the fourth day of EuroPLoP, my workshop said to me:
“Four forces,
three known uses,
too many patterns,
and Delete everything on page 3”
On the fifth day of EuroPLoP, my workshop said to me:
“Five good things,
four forces,
three known uses,
too many patterns,
and Delete everything on page 3”
On the sixth day of EuroPLoP, my workshop said to me:
“Six dumb suggestions
five good things,
four forces,
three known uses,
too many patterns,
and Delete everything on page 3”
On the seventh day of EuroPLoP, my workshop said to me:
“Seven minor changes,
six dumb suggestions
five good things,
four forces,
three known uses,
too many patterns,
and Delete everything on page 3”

Credits: Not sure who the author is, but Charles Weir has compiled a very fun song sheet of EuroPLoP conferences which I recommend to all the PLoPers out there.

]]>
https://blog.invisivel.net/2009/05/19/just-finished-submitting-one-more-paper/feed/ 0
Rankings of european universities https://blog.invisivel.net/2009/01/29/rankings-of-european-universities/ https://blog.invisivel.net/2009/01/29/rankings-of-european-universities/#comments Thu, 29 Jan 2009 23:27:35 +0000 https://blog.invisivel.net/?p=337 While helping a friend dealing with a professional crossroad, I started wondering which universities are considered to be the top ones nowadays. I had ran some searches about this matter some time ago, helping one of my brothers to select a school where to apply for the ERASMUS programme, but this was back in 2006, and I was hoping more reliable data would exist by now (ie, from independent parties, and using sensible criteria).

Although I still don’t blindly trust the numbers I’ve found (University of Porto isn’t on the list, so it can’t be right, can it? ;) they were the most convincing ones I came upon. They do try to explain which was the used criteria, which is a good thing.

]]>
https://blog.invisivel.net/2009/01/29/rankings-of-european-universities/feed/ 2