Corollarium Dev Blog

Thoughts on software development redirected straight from /dev/null
Our new multi-camera rig for 360 degrees photographs! This is a small gif, but be sure to check  the interactive version. We developed our own hardware and software for a simple, fast and inexpensive setup. 
http://camera360.com.br

Our new multi-camera rig for 360 degrees photographs! This is a small gif, but be sure to check  the interactive version. We developed our own hardware and software for a simple, fast and inexpensive setup.

http://camera360.com.br

How to fill CLEditor with Selenium IDE

Here’s a snippet to fill the contents of a CLEditor in a user context library for Selenium IDE. Put this in a sample

 /**
* Fills a CLEditor
*
* @param locator May be a parent locator, such as div[data-attribute="xyz"], as long as
* there is only one textarea child
* @param html The html to type
*/
Selenium.prototype.doTypeHTMLEditor = function(locator, html) {
var element = this.page().findElement(locator);
var textarea = element.getElementsByTagName('textarea');
if (textarea) {
jQuery(textarea[0]).cleditor()[0].clear().execCommand("inserthtml", html).updateTextArea();
}
};

you should call the locator with an element parent of the TEXTAREA. Or just adapt the function to use the textarea itself.

SVR 2012

[Post in portuguese]

Estivemos no SVR2012. O congresso foi excepcional e muitas pessoas nos pediram o material dos cursos que demos sobre kinect e realidade aumentada para web e mobile. Vamos disponibilizar isso online assim que possível.

Two weeks

In “The money pit”, whenever Tom Hanks asks when things will be done, he gets the same answer: “Two weeks!”

I always think of that movie when I’m talking about deadlines in software development.

The pasta theory of code

I don’t know why, but most new programmers I’ve been talking to never heard of spaghetti code. Wikipedia has a nice definition for it:

Spaghetti code is a pejorative term for source code that has a complex and tangled control structure, especially one using many GOTOs, exceptions, threads, or other “unstructured” branching constructs. It is named such because program flow tends to look like a bowl of spaghetti, i.e. twisted and tangled.

Now, there is a whole theory of pasta and code. Spaghetti code is at the bottom. Next comes lasagna code. Lasagna code is made in layers, which is nice, but each layer is quite large and to change the things below you may have to move all the layers above, and you have to follow a very strict hierarchy, which sometimes make it impossible for one layer to talk to another one that is not immediately above or below.

Lasagna trumps Monday.

Even better is ravioli code. It comes in small pieces easy to chew, it’s easy to move parts of it around.

My personal favorite is cannelloni code. It is even better than ravioli code, because it’s neatly organized, but still flexible. It’s very easy to subdivide if some part gets too big, and you can change parts without touching anything else. The filling is hidden and you only see the interface :)

Source: http://www.flickr.com/photos/osakajon/22373345/