<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>The Boundingbox</title>
	<atom:link href="http://boundingbox.homelinux.net/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://boundingbox.homelinux.net/blog</link>
	<description>Is everything bounded?</description>
	<pubDate>Mon, 26 Oct 2009 11:53:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>From C++ to ObjC/Cocoa. Destination iPhone</title>
		<link>http://boundingbox.homelinux.net/blog/?p=378</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=378#comments</comments>
		<pubDate>Sat, 27 Jun 2009 23:51:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=378</guid>
		<description><![CDATA[
I&#8217;m thinking about developing some applications for iPhone. I&#8217;ve never code anything for Mac, so starting this trip to IPhone, the first stop is ObjC/Cocoa. Here I have collected some information I found useful for  C++ programmer to start coding ObjC .

Concepts Translation
In ObjC compare to C++, the basic object oriented programming concepts are called  in a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-441" title="iphone" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/06/iphone.jpg" alt="iphone" width="65" height="65" /></p>
<p>I&#8217;m thinking about developing some applications for iPhone. I&#8217;ve never code anything for Mac, so starting this trip to IPhone, the first stop is ObjC/Cocoa. Here I have collected some information I found useful for  C++ programmer to start coding ObjC .</p>
<p><span id="more-378"></span></p>
<h2>Concepts Translation</h2>
<hr />In ObjC compare to C++, the basic object oriented programming concepts are called  in a different way. I use this easy table to make the translation.</p>
<table style="border-color: blue; border-style: dotted; border-collapse:collapse;" border="1">
<tbody>
<tr>
<td><strong>C++</strong></td>
<td><strong>ObjC</strong></td>
</tr>
<tr>
<td>Class</td>
<td>Object</td>
</tr>
<tr>
<td>Member function</td>
<td>Method</td>
</tr>
<tr>
<td>Data members</td>
<td>Instance variables</td>
</tr>
<tr>
<td>Constructor</td>
<td>Initializer</td>
</tr>
<tr>
<td>Destructor</td>
<td>Deallocator</td>
</tr>
<tr>
<td>Multiple Inheritance</td>
<td>Not available :D</td>
</tr>
<tr>
<td>Member function call</td>
<td>Object message</td>
</tr>
</tbody>
</table>
<h2>Method declaration &amp; Messages</h2>
<hr />ObjC syntax for methods is based on Smalltalk so there is nothing in common with C++. To show how to send a message to a instance let&#8217;s suppose I already have an instance MyObject *objectInstance; declared.</p>
<p><strong>Declaration / Message</strong></p>
<p>The following table shows several examples of method declaration and method invocation = messaging</p>
<table style="border-color: blue; border-style: dotted; border-collapse:collapse;" border="1">
<tbody>
<tr>
<td colspan="2"><span style="color: #008000;">method: doSomething<br />
arguments: 0<br />
return value: 0</span></td>
</tr>
<tr>
<td>declaration</td>
<td>messaging</td>
</tr>
<tr>
<td><strong>-(void) doSomething;</strong></td>
<td><strong>[objectInstance doSomething];</strong></td>
</tr>
<tr>
<td colspan="2"><span style="color: #008000;">method: getAnIntetger<br />
arguments: 0<br />
return value: 1(int) </span></td>
</tr>
<tr>
<td>declaration</td>
<td>messaging</td>
</tr>
<tr>
<td><strong>-(int) getAnIntetger;</strong></td>
<td><strong>int result = [objectInstance getAnInteger];</strong></td>
</tr>
<tr>
<td colspan="2"><span style="color: #008000;">method: setAnInteger<br />
arguments: 1(int)<br />
return value: 0 </span></td>
</tr>
<tr>
<td>declaration</td>
<td>messaging</td>
</tr>
<tr>
<td><strong>-(void) setAnInteger:(int)value;</strong></td>
<td><strong>[objectInstance setAnInteger:5];</strong></td>
</tr>
<tr>
<td colspan="2"><span style="color: #008000;">method: setAnIntegerAndString<br />
arguments:2 (int, string)<br />
return value: 0 </span></td>
</tr>
<tr>
<td>declaration</td>
<td>messaging</td>
</tr>
<tr>
<td><strong>-(void) setAnIntegerAndString:(int)value withString:(NSString *)string;</strong></td>
<td><strong>[objectInstance setAnIntegerAndString:5 withString:@"Jurl Jurl"];</strong></td>
</tr>
</tbody>
</table>
<p>If you replace - with + in the declaration, then the instance method becomes a class methods</p>
<h2>NSObject</h2>
<hr />When you use ObjC to write code based on the Foundation Framework, NSObject is the superclass that your classes should inherit from . The Foundation Framework, as its name highlights, is the main framework of the Cocoa Lib.  <strong>Corollary</strong>:  All your classes should inherit from NSObject.</p>
<p><strong>Main methods implemented by NSObject</strong></p>
<table style="border-color: blue; border-style: dotted; border-collapse:collapse;" border="1">
<tbody>
<tr>
<td><strong>-(id) init</strong></td>
<td>Default constructor</td>
</tr>
<tr>
<td><strong>(NSString *) description</strong></td>
<td>Returns a string with a brief description of the object</td>
</tr>
<tr>
<td><strong>(BOOL) isEqual: (id)anObject</strong></td>
<td>Compare object instances and returns YES if they are the same and NO otherwise</td>
</tr>
</tbody>
</table>
<h2>Simple Object/Class Declaration</h2>
<hr />I prefer learning from examples.  So from here I will start writing a simple object to show the fundamentals to code classes in ObjC.</p>
<p><span style="color: #0000ff;">FILE: MyObject.h</span></p>
<pre>#import &lt;Foundation/Foundation.h&gt;

<strong>@interface MyObject : NSObject </strong>{
<span style="color: #008000;">   // Declare instance variables</span>
<span style="color: #008000;">   </span><span style="color: #008000;">// Basic types allocation is managed by the compiler</span>
   int m_value;
<span style="color: #008000;">   // Class instances are always managed through pointers
   // Allocation is a coder responsability</span>
   NSString *m_string;
}

<span style="color: #008000;">// Declare methods</span>
- (int) getValue;
- (void) setValue: (int) value;
- (NSString *) getString;
- (void) setString: (NSString *) string;
<strong> @end</strong></pre>
<h2>Simple Object/Class Definition</h2>
<hr /><span style="color: #0000ff;">FILE: MyObject.m</span></p>
<pre><strong>#import "MyObject.h"</strong>
<strong>@implementation MyObject
</strong>
// Define methods
<strong>- (int) getValue</strong>
{
<span style="color: #008000;">   // Compiler returns this value doing a copy
<span style="color: #000000;">   return m_value;
}</span></span></pre>
<pre><strong>- (void) setValue: (int) value</strong>
{
<span style="color: #008000;">   // Compiler manages the copy of basic types variables</span>
   m_value = value;
}

<strong>- (NSString *) getString</strong>
{
   <span style="color: #008000;">// We just return a pointer, not a copy of the class instance</span>
   return m_string;
}

<strong>- (void) setString: (NSString *) string</strong>
{
   if (string)
   {
<span style="color: #008000;">      // We tell the memory manager we have just finished using m_string instance</span>
      [m_string release];

<span style="color: #008000;">      // We point to the new string and tell the memory manager
      // that we are going to use the instance we have receive</span>
      m_string = [string retain];
   }
}</pre>
<p><strong>@end</strong></p>
<h2>Intializers. Object instance creation</h2>
<hr />In ObjC, to create an instance of an object, you need explicitly 2 steps:</p>
<ol>
<li>Allocation</li>
<li>Constructor/Initializer</li>
</ol>
<p>Following code shows who create an object instance. Take a look at the ObjC message nesting syntax.<br />
<strong>MyString *myString = [[MyString alloc] init];</strong></p>
<h2>Overwritting NSObject init method</h2>
<hr />To customize your object initialization is as easy as overwriting the init method of NSObject</p>
<pre><span style="color: #0000ff;"><span style="font-family: mceinline;">FILE: MyObject.m (APPEND)</span></span></pre>
<pre><span style="color: #008000;">// id is the common type of any NSObject</span>
- (id) init
{
	<span style="color: #008000;">// First init the super class and check everything went OK</span>
        if (![super init]) return nil;
        <span style="color: #008000;">// Set initial value</span>
	m_value = 75.0f;
        <span style="color: #008000;">// Return instance, self = this</span>
	return self;
}</pre>
<h2><strong>Custom initializer with arguments</strong></h2>
<hr />If you want your own customized initializer, you can do it of course. Let&#8217;s see how to.</p>
<p><span style="color: #0000ff;">FILE: MyObject.h (APPEND)</span></p>
<pre>- (id) initWithString: (NSString*)string;</pre>
<p><span style="color: #0000ff;">FILE: MyObject.m (APPEND)</span></p>
<pre><strong>- (id) init</strong>
{
	return [self initWithString: [[NSString alloc] initWithFormat:@"defaultTitle"]];
}

<strong>- (id) initWithString: (NSString *)string</strong>
{
	if (![super init]) return nil;
	m_value = 75.0f;

	<span style="color: #008000;">// Use retain to keep the</span>
	m_string = [string retain];
	return self;
}</pre>
<h2>Understanding Memory Management</h2>
<hr />The memory management in ObjC is based on reference counting. All NSObjects have a retain counter.</p>
<ol>
<li><strong>MyObject *myObject = [MyObject alloc]; </strong><br />
//returns an instance with retainCounter = 1</li>
<li><strong>[myObject retain]; </strong><br />
//make retainCounter++, call retain method if you want to keep the instance alive</li>
<li><strong>[myObject release]; </strong><br />
// make retainCounter&#8211;, call release method when you have finished using the instance</li>
<li>When the retainCounter == 0, the dealloc method is called.</li>
</ol>
<p>First thing required to avoid memory leaks is to implement dealloc method</p>
<p><span style="color: #0000ff;">FILE: MyObject.m (APPEND)</span></p>
<pre><strong>-(void) dealloc</strong>
{
   [m_string release];
   [super dealloc];
}</pre>
<h2>AutoRelease</h2>
<hr />There is another way to avoid memory leaks without taking care of the retain counters. At least in iPhone applications you need to instance an allocation pool. And as far as I know, to do so, you create an NSAutoreleasePool instance during the initialization process. You can use the autorelease message to make the NSAutoreleasePool responsible for deallocating the object instances. Using this feature you do not control when the instance will be deallocated, it will depend on NSAutoreleasePool strategies.</p>
<p>This technique is NOT recommended for iPhone, because the memory resources of the phone aren&#8217;t very large and it&#8217;s a good idea deallocate instances as soon as they are not useful. But there are circumstances where there is no other option. If you want to overwrite NSObject method description, where you need to return an NSString, if you don&#8217;t want to keep a description string as an instance variable you have to return an autorelease string because you can&#8217;t release the return value before returning it.</p>
<pre><strong>- (NSString *) description</strong>
{
   NSString *result;
   result = [[NSString alloc] initWithFormat: @"Just an object to test];
   [result <span>autorelease</span>];
<span style="color: #000800;">   // Alternative using class method
   // result = [NSString stringWithFormat:@"Just an object to test"];</span>
   return result;
}</pre>
<h2>References</h2>
<ul>
<li><a title="From C++ to Objective-C" href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/06/cpp-objc-en.pdf">C++ to Objective-C</a></li>
<li><a class="answer-hyperlink" href="http://stackoverflow.com/questions/1063229/objective-c-static-class-level-variables/1250088#1250088">Objective C Static Class Level variables</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=378</wfw:commentRss>
		</item>
		<item>
		<title>More on flash charts to see temperatures</title>
		<link>http://boundingbox.homelinux.net/blog/?p=263</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=263#comments</comments>
		<pubDate>Mon, 19 Jan 2009 01:35:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=263</guid>
		<description><![CDATA[
<object	type="application/x-shockwave-flash"
			data="http://boundingbox.homelinux.net/logger/amstock/amstock.swf?path="http://boundingbox.homelinux.net/logger/data/"settings_file="http://boundingbox.homelinux.net/logger/data/settings_2009.xml""
			width="560"
			height="250">
	<param name="movie" value="http://boundingbox.homelinux.net/logger/amstock/amstock.swf?path="http://boundingbox.homelinux.net/logger/data/"settings_file="http://boundingbox.homelinux.net/logger/data/settings_2009.xml"" />
</object>
You never know from where the inspiration will arrive. Doing some banking managements I took a look at one interesting Euribor Web Page and  I came across a nice charts with lots of options to be able to explore values along a wide time range. [...]]]></description>
			<content:encoded><![CDATA[
<object	type="application/x-shockwave-flash"
			data="http://boundingbox.homelinux.net/logger/amstock/amstock.swf?path="http://boundingbox.homelinux.net/logger/data/"settings_file="http://boundingbox.homelinux.net/logger/data/settings_2009.xml""
			width="560"
			height="250">
	<param name="movie" value="http://boundingbox.homelinux.net/logger/amstock/amstock.swf?path="http://boundingbox.homelinux.net/logger/data/"settings_file="http://boundingbox.homelinux.net/logger/data/settings_2009.xml"" />
</object>
<p>You never know from where the inspiration will arrive. Doing some banking managements I took a look at one interesting <a href="http://euribor.com.es">Euribor Web Page</a> and  I came across a nice charts with lots of options to be able to explore values along a wide time range. Doing some research I found that the flash chart used belongs to <a href="http://www.amcharts.com">amCharts</a>. This web offers  the use of a wide range of flash charts for free, including the stocks chart, the one that I was interested in.</p>
<p><span id="more-263"></span></p>
<p>So I downloaded the stocks chart, I read the documentation and explored the examples given by amcharts. After one or two hours I was playing with the stock chart filled with the temperatures values stored by my data logger, take a look at the <a href="http://boundingbox.homelinux.net/logger/logger.html">result </a>, more or less the same that you can see on top.</p>
<p>The stocks chart is a wonderful flash component. You don&#8217;t need to worry about almost nothing, just create a csv file with the date and the value you want to see per line. The stocks chart will do the hard job for you. Of course you can spend a lot of time exploring all settings but for the simple ones it won&#8217;t take too much. It gives you more or less the same behaviours of simple <a href="http://oss.oetiker.ch/rrdtool/">RRDTools</a> graphs but being able to do some zooming interactively.</p>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=263</wfw:commentRss>
		</item>
		<item>
		<title>Conferencia de Ed Catmull. How Pixar Fosters Collective Creativity</title>
		<link>http://boundingbox.homelinux.net/blog/?p=230</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=230#comments</comments>
		<pubDate>Thu, 08 Jan 2009 23:05:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=230</guid>
		<description><![CDATA[
Exiten muchos libros, charlas y conferenciantes dedicados a tratar sobre el tema de cómo gestionar equipos, cómo mantenerlos motivados, etc&#8230; Después de leer unas cuantas, las siguientes tienen algo de dejavù. En mi opinión, esta conferencia de Ed Catmull se destaca de las demás en 3 aspectos.

Ed Catmull es el CTO de una empresa de [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/edcatmull.jpg"><img class="alignnone size-medium wp-image-311" title="edcatmull" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/edcatmull.jpg" alt="" width="100" height="69" /></a></p>
<p>Exiten muchos libros, charlas y conferenciantes dedicados a tratar sobre el tema de cómo gestionar equipos, cómo mantenerlos motivados, etc&#8230; Después de leer unas cuantas, las siguientes tienen algo de dejavù. En mi opinión, esta conferencia de Ed Catmull se destaca de las demás en 3 aspectos.</p>
<ol>
<li>Ed Catmull es el CTO de una empresa de renombre dentro del la producción de películas de animación y resulta que es un sector del que no abunda información de gestión de equipos.</li>
<li>En esta conferencia la mayoría de los consejos y recetas van acompañadas de una breve descripción sencilla de como ha llegado a esas conclusiones. Como en cualquier problema es muy importante definir las condiciones de contorno para poder aplicar la solución más adecuada. Muchas conferencias de este tipo no describen el contexto que llevó a las conclusiones que se exponen obviando gran parte del problema.</li>
<li>La conclusiones que aporta Ed Catmull sobre los cimientos de Pixar a la hora de gestionar sus equipos, bajo una apariencia de convencionalidad no lo son. De hecho, creo que aporta ideas muy modernas de gestión pero sin negar que implica asumir ciertos riesgos para que realmente fraguen. Vamos que nadie da duros a peseta. Quien no arriesga no gana.</li>
</ol>
<p>Antes de seguir recomiendo la lectura <a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/10/how_pixar_fosters_collective_creativity.pdf">Conferencia</a>, pero si no tienes mucho tiempo aquí va mi resumen. <a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/10"></a></p>
<p><span id="more-230"></span></p>
<h3>A) Introducción</h3>
<p>Mi intención en este resumen es destacar y sintetizar las ideas que más me han gustado, las relaciones entre ellas además de  alguna que otra opinion personal. Intentaré dentro de lo posible avalar las síntesis con recortes de la conferencia.</p>
<h3>B) Fundamentos</h3>
<p><span style="color: #008000;"><strong>&#8220;I don’t think our success is largely luck. Rather, I believe our adherence to a set of principles and practices for managing creative talent and risk is responsible&#8221; </strong></span></p>
<p>Hasta aquí todo normal, no es la primera vez que oímos e incluso experimentamos que la gestión del equipo humano y los riesgos son la clave para llevar un proyecto empresarial a buen puerto. Sin embargo aquí se refiere al personal como el talento creativo, interesante. A lo largo de la conferencia Ed Catmull muestra su profunda convicción en que las personas con talento y creatividad marcan la diferencia entre el éxito y el fracaso.</p>
<p><span style="color: #008000;"><strong>&#8220;Some basic beliefs: Talent is rare. Management’s job is not to prevent risk but to build the capability to recover when failures occur. It must be safe to tell the truth. We must constantly challenge all of our assumptions and search for the flaws that could destroy our culture&#8221;</strong></span></p>
<p>En mi opinión estas líneas,  al comienzo de la conferencia,  resumen las dos ideas principales de la charla:</p>
<ul>
<li>Talento y riesgo responsable van de la mano con el éxito.</li>
<li>Potenciar el feedback interno real y mantener una búsqueda constante de los puntos flacos para mantenerse con los pies en la tierra.</li>
</ul>
<h3>C) <span style="color: #008000;">&#8220;Talent is rare&#8221; &amp; &#8220;Management’s job is not to prevent risk but to build the capability to recover when failures occur&#8221;</span></h3>
<p>Durante la conferencia el <strong>talento y el riesgo tienen una relación simbiotica</strong>. En el siguiente párrafo es donde yo creo que Ed Catmull explica parte de esta relación.</p>
<p><span style="color: #008000;">&#8220;To act in this fashion, we as executives have to resist our natural tendency to avoid or minimize risks, which, of course, is much easier said than done.[...]. If you want to be original, you have to accept the uncertainty, even when it’s uncomfortable, and have the capability to recover when your organization takes a big risk and fails. What’s the key to being able to recover? Talented people! Contrary to what the studio head asserted at lunch that day, such people are not so easy to find&#8221;.</span></p>
<p>Por otro lado Catmull deja claro que el talento es poco común o infrecuente, y en esta línea plantea dos temáticas muy interesantes:</p>
<ul>
<li>Para encontrar <strong>talento hay que cultivarlo</strong>, es necesario crear el entorno para que se desarrolle y crezca.<span style="color: #008000;">
<p>&#8220;What’s equally tough, of course, is getting talented people to work effectively with one another. That takes trust and respect, which we as managers can’t mandate; they must be earned over time. What we can do is construct an environment that nurtures trusting and respectful relationships and unleashes everyone’s creativity.&#8221;</span></p>
<p><span style="color: #008000;">&#8220;If we get that right, the result is a vibrant community where talented people are loyal to one another and their collective work, everyone feels that they are part of something extraordinary, and their passion and accomplishments make the community a magnet for talented people coming out of schools or working at other places.[...] I believe that community matters.&#8221;</span></p>
<p>&#8220;<span style="color: #008000;">Our philosophy is: You get great creative people, you bet big on them, you give them enormous leeway and support, and you provide them with an environment in which they can get honest feedback from everyone&#8221;</p>
<p></span></li>
<li>Una vez que se ha conseguido un <strong>equipo con talento</strong> hay que añadir la dificultadad de conseguir que sean <strong>capaces de trabajar de forma eficiente</strong>. En los siguientes recortes mientras Catmull describe las cualidades de un buen director, implicitamente está describiendo como permitir que el talento trabaje en equipo.<span style="color: #008000;">
<p>&#8220;What does it take for a director to be a successful leader in this environment? Of course, our directors have to be masters at knowing how to tell a story that will translate into the medium of film. This means that they must have a unifying vision—one that will give coherence to the thousands of ideas that go into a movie—and they must be able to turn that vision into clear directives that the staff can implement.&#8221;<span style="color: #008000;">&#8220;They must set people up for success by giving them all the information they need to do the job right without telling them how to do it.  Each person on a film should be given creative ownership of even the smallest task. &#8220;</span><span style="color: #008000;">&#8220;Good directors not only possess strong analytical skills themselves but also can harness the analytical power and life experiences of their staff members. They are superb listeners and strive to understand the thinking behind every suggestion. They appreciate all contributions,regardless of where or from whom they originate, and use the best ones.&#8221;<br />
</span></p>
<p></span></li>
</ul>
<h3>D) <span style="color: #008000;">&#8220;It must be safe to tell the truth&#8221; &amp; &#8220;We must constantly challenge all of our assumptions and search for the flaws that could destroy our culture&#8221;<br />
</span></h3>
<p>En mi opinión Catmull expone que la maquinaría de un estudio son las personas con su talento y con su creatividad al servicio de los objetivos del estudio y como toda maquinaría esta requiere un mantenimiento. Al contrario que las máquinas las personas evolucionamos, y de la misma manera tienen que evolucionar las labores de mantienimiento de la empresa. Cómo saber qué acciones de mantenimiento hacer en cada momento?<strong> </strong>Garantizando el<strong> </strong><strong>feedback interno y </strong>manteniendo<strong> un cierto grado de paranoia</strong>, asumiendo que por muy bien que vayan las cosas siempre hay puntos flacos que encontrar y solucionar. Creo que los dos siguientes parrafos no tienen desperdicio, cremita pura.</p>
<p><span style="color: #008000;">&#8220;Observing the rise and fall of computer companies during my career has affected me deeply. Many companies put together a phenomenal group of people who produced great products. They had the best engineers, exposure to the needs of customers, access to changing technology, and experienced management. Yet many made decisions at the height of their powers that were stunningly wrongheaded, and they faded into irrelevance. How could really smart people completely miss something so crucial to their survival? I remember asking myself more than once: “If we are ever successful, will we be equally blind?”</span></p>
<p><span style="color: #008000;">Many of the people I knew in those companies that failed were not very introspective. When Pixar became an independent company, I vowed we would be different. I realized that it’s extremely difficult for an organization to analyze itself. It is uncomfortable and hard to be objective. Systematically fighting complacency and uncovering problems when your company is successful have got to be two of the toughest management challenges there are. Clear values, constant communication, routine postmortems, and the regular injection of outsiders who will challenge the status quo aren’t enough. Strong leadership is also essential—to make sure people don’t pay lip service to the values, tune out the communications, game the processes, and automatically discount newcomers’ observations and suggestions.</span>&#8221;</p>
<h3>E) Otras citas destacadas para la reflexión</h3>
<ul>
<li>Sobre la política de comunicación interna.<span style="color: #008000;">
<p>&#8220;Everyone must have the freedom to communicate with anyone.<br />
This means recognizing that the decision-making hierarchy and communication structure in organizations are two different things. Members of any department should be able to approach anyone in another department to solve problems without having to go through “proper” channels. It also means that managers need to learn that they don’t always have to be the first to know about something going on in their realm, and it’s OK to walk into a meeting and be surprised. The impulse to tightly control the process is understandable given the complex nature of moviemaking, but problems are almost by definition unforeseen. The most efficient way to deal with numerous problems is to trust people to work out the difficulties directly with each other without having to check for permission.&#8221;</p>
<p></span>Francamente interesante. En este tema mi pregunta sería si está política de comunicación puede aplicarse a cualquier empresa o si solo es aplicable a empresas con una consolidación y madurez suficiente.</li>
<li>Sobre la calidad
<p><span style="color: #008000;">&#8220;There has to be one quality bar for every film we produce&#8221;</span></p>
<p>En esta cuestión no puedo estar más de acuerdo, creo que es importante cerrar un grado de calidad y satisfacción, y llevar a cabo los esfuerzos necesarios para conseguirlo. Y si no se está dispuesto a estos sacrificios es mejor parar y replantearse las cosas. Pero no se debería bajar y subir el listón según las cirscunstancias.</li>
<li>Sobre la relación entre la tecnología y el arte<span style="color: #008000;">
<p>&#8220;John coined a saying that captures this dynamic: “Technology inspires art, and art challenges the technology.”&#8221;</p>
<p></span>Esto ya es más una cita filosófica que puede quedar muy bien en la firma de un foro o en los emails :).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=230</wfw:commentRss>
		</item>
		<item>
		<title>Debian Server Backup Script using Gmail</title>
		<link>http://boundingbox.homelinux.net/blog/?p=211</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=211#comments</comments>
		<pubDate>Fri, 02 Jan 2009 23:32:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=211</guid>
		<description><![CDATA[
The third level in backup security and one of the most important is to be able to store backups in a place different than the production place, well known as Keep backups off-site. Currently taking advantage of free services like gmail, it´s much easier to fulfill this third level of backup security and to have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/backup-icon.jpg"><img class="alignnone size-full wp-image-290" title="backup-icon" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/backup-icon.jpg" alt="" width="65" height="65" /></a></p>
<p>The third level in backup security and one of the most important is to be able to store backups in a place different than the production place, well known as <strong>Keep backups off-site</strong>. Currently taking advantage of free services like gmail, it´s much easier to fulfill this third level of backup security and to have all your backups available through an internet connection. Here I show a homemade script that does the following steps.</p>
<ol>
<li>Compress your web server, database and svn repository</li>
<li>Encrypt compressed files with openssl</li>
<li>Send those files to a gmail account</li>
<li>Clean gmail account removing old backups</li>
</ol>
<p><span id="more-211"></span></p>
<h2>1. Shell script for backup compression and encriptation</h2>
<h3>a) Compression</h3>
<p>This is the simple part. We will backup the SVN repository compressing the repository directory, and we will do the same for the web server, we will compress the www root directory. To backup the Mysql database we will first do a mysqldump and then we will compress the dump file. To configure de compression process we have to define the following variables.</p>
<ul>
<li>Backup Path: The path that will be compressed</li>
<li>Archive Path:  The path where we want to store the last backups in your server.</li>
<li>Backup History: How many backup days you want to keep in your server.</li>
</ul>
<h3>b) Encriptation</h3>
<p>After having generated the backup files .tgz we will apply openssl encriptation so we can send this files through internet and be almost sure that no one will be able to access them.</p>
<h3>c) Script code</h3>
<pre style="PADDING-LEFT: 30px">#!/bin/bash
# backups
<span style="color: #99cc00;">
</span><span style="color: #99cc00;"># command paths</span>
TAR=/bin/tar
DATE=/bin/date
FIND=/usr/bin/find
ECHO=/bin/echo
MYSQLDUMP=/usr/bin/mysqldump
RM=/bin/rm
OPENSSL=/usr/bin/openssl
PYTHON=/usr/bin/python
SENDGMAIL=/etc/cron.daily/gmailSend.py
CLEANGMAIL=/etc/cron.daily/gmailCleanup.py

<span style="color: #99cc00;"># script variables</span>
DATECODE=`$DATE +%Y%m%d`
ARCHIVEDIR=<span style="color: #ff9900;">&lt;backupArchivePath&gt;</span>

BACKUPDIR1=<span style="color: #ff9900;">&lt;webServerPath&gt;</span>
ARCHIVE1=$ARCHIVEDIR/$DATECODE-wwwServerBackup.tgz
LOGFILE1=/root/backups/$DATECODE-wwwServerBackup.log
ERRORFILE1=/root/backups/$DATECODE-wwwServerBackup.err.log

BACKUPDIR2=<span style="color: #ff9900;">&lt;subversionPath&gt;</span>
ARCHIVE2=$ARCHIVEDIR/$DATECODE-svnBackup.tgz
LOGFILE2=/root/backups/$DATECODE-svnBackup.log
ERRORFILE2=/root/backups/$DATECODE-svnBackup.err.log

BACKUPDIR3=$ARCHIVEDIR/db.sql
ARCHIVE3=$ARCHIVEDIR/$DATECODE-dbBackup.tgz
LOGFILE3=/root/backups/$DATECODE-dbBackup.log
ERRORFILE3=/root/backups/$DATECODE-dbBackup.err.log

<span style="color: #99cc00;">
# Create log and error files if they don't exist and clean them</span>
$ECHO &gt; $LOGFILE1
$ECHO &gt; $ERRORFILE1
$ECHO &gt;&gt; $LOGFILE1
$ECHO &gt;&gt; $ERRORFILE1

$ECHO &gt; $LOGFILE2
$ECHO &gt; $ERRORFILE2
$ECHO &gt;&gt; $LOGFILE2
$ECHO &gt;&gt; $ERRORFILE2

$ECHO &gt; $LOGFILE3
$ECHO &gt; $ERRORFILE3
$ECHO &gt;&gt; $LOGFILE3
$ECHO &gt;&gt; $ERRORFILE3

<span style="color: #99cc00;"># Backup www</span>
$TAR czvf $ARCHIVE1 $BACKUPDIR1 &gt;&gt; $LOGFILE1 2&gt;&gt; $ERRORFILE1
$OPENSSL enc -aes-256-cbc -e -in $ARCHIVE1 -out $ARCHIVE1.enc -pass pass:<span style="color: #ff9900;">&lt;password&gt;</span>
$RM $ARCHIVE1
<span style="color: #99cc00;">
# Backup svn repos</span>
$TAR czvf $ARCHIVE2 $BACKUPDIR2 &gt;&gt; $LOGFILE2 2&gt;&gt; $ERRORFILE2
$OPENSSL enc -aes-256-cbc -e -in $ARCHIVE2 -out $ARCHIVE2.enc -pass pass:<span style="color: #ff9900;">&lt;password&gt;</span>
$RM $ARCHIVE2

<span style="color: #99cc00;"># Backup database</span>
$MYSQLDUMP -u<span style="color: #ff9900;">&lt;user&gt;</span> -p<span style="color: #ff9900;">&lt;password&gt;</span> --opt --all-databases &gt; $BACKUPDIR3
$TAR czvf $ARCHIVE3 $BACKUPDIR3 &gt;&gt; $LOGFILE3 2&gt;&gt; $ERRORFILE3
$RM $BACKUPDIR3
$OPENSSL enc -aes-256-cbc -e -in $ARCHIVE3 -out $ARCHIVE3.enc -pass pass:<span style="color: #ff9900;">&lt;password&gt;</span>
$RM $ARCHIVE3
<span style="color: #99cc00;">
# Remove files more than 2 day old</span>
$FIND $ARCHIVEDIR -type f -mtime +2 -exec rm -f {} \;
<span style="color: #99cc00;">
# Email files to gmail</span>
$PYTHON $SENDGMAIL $ARCHIVE1.enc
$PYTHON $SENDGMAIL $ARCHIVE2.enc
$PYTHON $SENDGMAIL $ARCHIVE3.enc
$PYTHON $SENDGMAIL $ARCHIVE4.enc

<span style="color: #99cc00;"># Clean gmail account moving all backup emails older than 60 days to the trash folder</span>
$PYTHON $CLEANGMAIL

<span style="color: #99cc00;"># Decript</span><span style="color: #99cc00;"> command
# $OPENSSL enc -aes-256-cbc -d -in $ARCHIVE4.enc -out $ARCHIVE4 -pass pass:&lt;password&gt;</span></pre>
<h2>2. Send the encripted backup files to your gmail account as Drafts</h2>
<p>Using <a href="http://libgmail.sourceforge.net/">libgmail</a> makes sending files to a gmail account terribly simple, the only problem you need to face is the attachment file size limitation of the gmail account, that during my develepment process was something around 20MB. To solve this issue, we use the split linux tool to cut big files in 19MB chuncks, and then we email each piece.</p>
<p><strong><span style="color: #0000ff;">gmailSend.py</span></strong></p>
<pre style="PADDING-LEFT: 30px">import sys, os
import libgmail
import glob

def <span style="color: #0000ff;">sendFile</span>(filename):
  accountName = <span style="color: #ff9900;">&lt;account name&gt;
</span>  accountPassw =  <span style="color: #ff9900;">&lt;account password&gt;
</span>
  gmailAccount = libgmail.GmailAccount(accountName, accountPassw)
  try:
    gmailAccount.login()
  except libgmail.GmailLoginFailure:
    print "\nLogin failed. (Wrong username/password?)"
  else:
    print "Log in successful.\n"

    if gmailAccount.storeFile(filename, label='serverBackup'):
      print 'File stored successfully'
    else:
      print 'Could not store'

def <span style="color: #0000ff;">main</span>(argv):
  <span style="color: #99cc00;"># Check file size &lt; 19M
</span>  if os.path.getsize(argv[1]) &lt;= 19000000:
    sendFile(argv[1])
  else:
    <span style="color: #99cc00;"># Call split -d -b 19000000 argv[1] argv[1]+'.'
</span>    os.system('split -d -b 19000000 %s %s.'%(argv[1], argv[1]))

    <span style="color: #99cc00;"># Call cat file.tgz.00 file.tgz.02 file.tgz.03 &gt; file.tgz to compact splitted files
</span>
    <span style="color: #99cc00;"># Go throug all files created from the split and send them</span>
    filePieces = glob.glob('%s.*'%(argv[1]))
    for file in filePieces:
      sendFile(file)

if __name__ == '__main__':
  main(sys.argv)</pre>
<h2>3. Clean gmail account</h2>
<p>After using the script during several months I ended using all the space of my gmail account so I had to do a manual clean up. To avoid this awful task I&#8217;ve added a final cleanup python script, responsible for moving all backup email drafts older than 60 days to the gmail trash folder. As gmail deletes all emails that have been in the trash more than 30 days, we will keep 3 months backup history.</p>
<p><strong><span style="color: #0000ff;">gmailCleanup.py</span></strong></p>
<pre style="PADDING-LEFT: 30px">import sys, os
import libgmail
import glob
import datetime</pre>
<pre style="PADDING-LEFT: 30px"><span style="color: #99cc00;"># This method parses the subject of the draft mail.
# It supposes that the subject of the email uses the backup script naming conventions
# Subject example: 'FSV_01 20081201-dbBackup.tgz.enc'</span><span style="color: #99cc00;">
</span>
def <span style="color: #0000ff;">ThreadSubject2Datetime</span>(subject):
   items = subject.split(' ')
   if len(items) == 1:
      return None</pre>
<pre style="PADDING-LEFT: 30px">   items = items[1].split('-')
   if len(items) == 1:
      return None</pre>
<pre style="PADDING-LEFT: 30px">   date = items[0]
   return datetime.datetime(int(date[:4]), int(date[4:6]), int(date[6:8]))</pre>
<pre style="PADDING-LEFT: 30px"><span style="color: #99cc00;"># This script will move to the trash all draft emails older than 60 days
# As gmail deletes all email is the trash that have been there for 30 days,
# we will keep 3 months backup history</span>
def <span style="color: #0000ff;">main</span>(argv):
   accountName = <span><span style="color: #ff9900;">&lt;account name&gt;</span></span>
   accountPassw = <span style="color: #ff9900;">&lt;account password&gt;</span></pre>
<pre style="PADDING-LEFT: 30px">   gmailAccount = libgmail.GmailAccount(accountName, accountPassw)
   try:
      gmailAccount.login()
   except libgmail.GmailLoginFailure:
      print "\nLogin failed. (Wrong username/password?)"
   else:
      folder = gmailAccount.getMessagesByFolder(libgmail.U_DRAFTS_SEARCH, allPages = True)
      for thread in folder:
         date = ThreadSubject2Datetime(thread.subject)
         if date:
            if date &lt;= datetime.datetime.today() - datetime.timedelta(60):
            gmailAccount.trashThread(thread)</pre>
<pre style="PADDING-LEFT: 30px">if __name__ == '__main__':
  main(sys.argv)</pre>
<h2>4. Known issues</h2>
<ul>
<li>The gmailCleanup.py script supposes the gmail account is one created only for backup porposes.</li>
<li>I&#8217;m sure that the shell script can be improved because I&#8217;m not an expert on bash scripting. You can use it as a start with script.</li>
<li>I&#8217;m missing the configuration of the cron deamon to execute the shell script whenever you want because I think this is well documented in internet.</li>
<li>Finally I think I should code all the process in python.</li>
</ul>
<h2>5.  Acknowledgments</h2>
<p>Thanks to <a href="http://www.codepixel.com">Javier Loureiro</a> for the startup ideas around backups and gmail.</p>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=211</wfw:commentRss>
		</item>
		<item>
		<title>PythonWin 2.4.3 Create wrap classes for COM automation</title>
		<link>http://boundingbox.homelinux.net/blog/?p=104</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=104#comments</comments>
		<pubDate>Thu, 01 Jan 2009 21:31:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=104</guid>
		<description><![CDATA[
This is just a little tip for those who use python and work with COM automation components. If you are a windows user,  and you want to write python scripts to interact with Adobe Photoshop, Microsoft Excel, Microsoft Visual Studio the best way to do so is using the this application&#8217;s COM componts. But most [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin00.png"><img class="alignnone size-full wp-image-274" title="pythonwin00" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin00.png" alt="" width="65" height="57" /></a></p>
<p>This is just a little tip for those who use python and work with COM automation components. If you are a windows user,  and you want to write python scripts to interact with Adobe Photoshop, Microsoft Excel, Microsoft Visual Studio the best way to do so is using the this application&#8217;s COM componts. But most of the times finding documentation this COM components registered in your Windows is tricky and difficult. Using a simple tool that is automatically installed with the pythonwin module, you can get wrap python classes for all interfaces and constants exported by a registered COM component. This usually helps a lot to find non documented methods, and even to make your python script more legible and clean.</p>
<h3><span id="more-104"></span>Steps to get your wrap classes</h3>
<p style="padding-left: 30px;">1. Go to Start-&gt;Programs-&gt;Python-&gt;PythonWin</p>
<p style="padding-left: 30px;">2. Menu Tools-&gt;COM MakePy utility-&gt;Explore and select the registered COM component you want to use.</p>
<p style="padding-left: 30px;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin01.png"><img class="alignnone size-medium wp-image-266" title="pythonwin01" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin01-300x215.png" alt="" width="300" height="215" /></a><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin02.png"> <img class="alignnone size-medium wp-image-267" title="pythonwin02" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin02-300x214.png" alt="" width="300" height="214" /></a></p>
<p style="padding-left: 30px;">3. The main window will show the path file where the python file has been generated</p>
<p style="padding-left: 30px;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin03.png"><img class="alignnone size-medium wp-image-268" title="pythonwin03" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/pythonwin03-300x163.png" alt="" width="300" height="163" /></a></p>
<p style="padding-left: 30px;">
<h3>Use case with Adobe Photoshop CS3 Object Library</h3>
<p>If you don&#8217;t want to use the wrap classes, you can access the name of the active document and the free memory available of an existing instance of Adobe Photoshop using the following code:</p>
<pre>import win32com.client

cs = win32com.client.Dispatch("Photoshop.Application")
print cs.ActiveDocument.Name
print cs.FreeMemory</pre>
<p>The other option is to use the PythonWin App to generate the wrap classes of Adobe Photoshop CS3 Object Library and then rename the odd python file name created by PythonWin with the something like this,  <strong>adobePhotoshop.py</strong>. Then place this file in a path where your python load modules, for example the same path where you have the file of your main script and then use the following code</p>
<pre>import adobePhotoshop

acs = adobePhotoshop.Application()
print acs.ActiveDocument.Name
print acs.FreeMemory</pre>
<p>There is not a big improvement compared with the firs option isn&#8217;t it?. The great advantage arrives when you use the wrap classes file with any python development environment like Eclipse+Pydev. During the development of your script you can use the Outline tool over the <strong>adobePhotoshop.py </strong>and<strong> </strong>explore the methods of any of the interfaces, for example the Application class and all its properties.</p>
<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/eclipse01.png"><img class="alignleft size-full wp-image-273" title="eclipse01" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2009/01/eclipse01.png" alt="" width="216" height="771" /></a></p>
<p style="text-align: center;"><strong>Tips to explore the wrap classes file, adobePhotoshop.py</strong></p>
<p><strong>1.</strong> Usually for each interface there is a wrap class with the same name, this is an empty class that is usually implemented in a class with the same name but started with underscore. For exampler, to explore the methods of the Application interface look for the implementationt in the class _Application.</p>
<p><strong>2.</strong> To explore all data members of one interface explore the implementation of the _prop_map_get_ dictionary of the implementation class. For example, to explore the properties of the Application interface, look for the dictionary _prop_map_get_ of the class _Application.</p>
<p style="text-align: center;"><strong>Tip to find the entry point class</strong></p>
<p style="text-align: left;">You will be wondering why betewen all those classes I know I have to invoke Application to access photoshop COM. Well it´s easy the entry point classes  inherits from CoClassBaseClass.</p>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=104</wfw:commentRss>
		</item>
		<item>
		<title>Inkscape. Vectorize for free and without too much pain</title>
		<link>http://boundingbox.homelinux.net/blog/?p=215</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=215#comments</comments>
		<pubDate>Sun, 17 Aug 2008 22:02:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[2D]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=215</guid>
		<description><![CDATA[
A great friend and coworker drew my south park caricature. It was a hand drawing so I scanned and get a dirty grey-scale image, not to nice. So to get something cleaner I realized that I will need to vectorize the image. To do so I was looking for some freeware and I found Inkscape. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/08/vectorize.jpg"><img class="alignnone size-full wp-image-220" style="border: 1px solid black;" title="vectorize" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/08/vectorize.jpg" alt="" width="300" height="140" /></a></p>
<p>A great friend and coworker drew my south park caricature. It was a hand drawing so I scanned and get a dirty grey-scale image, not to nice. So to get something cleaner I realized that I will need to vectorize the image. To do so I was looking for some freeware and I found <a href="http://www.inkscape.org">Inkscape</a>. This open-source software is surprisingly great and the vectorizing tool is awesome for someone like me that was facing this problem for the first time. So in the following lines, I will briefly document how to vectorize a bitmap using <a href="http://www.inkscape.org">Inkscape</a> and the help of <a href="http://www.gimp.org/">The Gimp</a>.</p>
<p><span id="more-215"></span></p>
<h3><strong>Vectorizing process</strong></h3>
<p style="text-align: center;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/08/vectorize1.jpg"><img class="aligncenter size-medium wp-image-221" title="vectorize1" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/08/vectorize1-300x147.jpg" alt="" width="300" height="147" /></a></p>
<ol>
<li>Open the image in The Gimp and select the piece of the image you want to vectorize. Using Ctrl+C and then Ctrl+Shift+V you will create new image and save it (jpg or png will work well).</li>
<li>Open the Inkscape and Drag&amp;Drop the the new image file into the main window of the Inkscape.</li>
<li>Select the image and click on menu Path-&gt;Trace Bitmap. A pop-up dialog will appear.</li>
<li>The Trace Bitmap dialog shows several methods to vectorize and a very useful Update button to see a preview of the vectorizing process result. Playing with the parameters for a while will show you all the possibilities.</li>
<li>When you arrive to a nice result in the preview, you can press OK and the final result will be showed in the main window ready to be edited.</li>
<li>Usually it&#8217;s a great idea to select the vectorized result and apply a simplification because the number of knots used for the paths during the vectorization process makes editing the strokes almost impossible. To do so click on menu Path-&gt;Simplify. Be careful because this algorithm sometimes simplifies too much, but it&#8217;s usually easy to solve this issues adding some points where the simplification was too aggressive.</li>
</ol>
<h3><strong>Tips</strong></h3>
<ol>
<li>If you have big black shapes, probably the vectorizer will create several white gaps. Increase the Suppress Speckles parameter within the Options tab to remove them.</li>
<li>Usually the Brightnees cutoff works pretty well, but when the edges of the shapes are well defined by colors use the Color Quantization</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=215</wfw:commentRss>
		</item>
		<item>
		<title>Modelling (II). Playing with subdivision surfaces.</title>
		<link>http://boundingbox.homelinux.net/blog/?p=181</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=181#comments</comments>
		<pubDate>Fri, 25 Jul 2008 21:34:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[2D]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=181</guid>
		<description><![CDATA[
The main idea behind modelling using subdivision surfaces is to create simple geometry that after applying a smoothing algorithm like Catmull-Clark or Loop it finally gets its smoothed and final shape. This way you model the low resolution mesh and you get the higher resolution meshes applying different levels of this smoothing modifiers.
The main problem [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/3d1.png"><img class="alignnone size-medium wp-image-194" title="3d1" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/3d1.png" alt="" width="80" height="80" /></a></p>
<p>The main idea behind modelling using subdivision surfaces is to create simple geometry that after applying a smoothing algorithm like Catmull-Clark or Loop it finally gets its smoothed and final shape. This way you model the low resolution mesh and you get the higher resolution meshes applying different levels of this smoothing modifiers.</p>
<p>The main problem is that this smoothing algorithms will smooth at all cost and you sometime want to keep several edges chamfered but hard. One way to do this is creating bound edges around the edges you want to be hard.</p>
<p><span id="more-181"></span></p>
<p>I&#8217;m using 3dsmax as the modeling software and to start playing with this I found the exercise of  keeping a box like a box after applying a TurboSmooth a great way of understanding the behavior of the smoothing algorithms</p>
<p style="text-align: center;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/limitingsmoothin2.swf"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/limitingsmoothing.swf" /><embed type="application/x-shockwave-flash" width="500" height="400" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/limitingsmoothing.swf"></embed></object></a></p>
<p style="text-align: left;">
<p style="text-align: left;">Another a bit more complex example. This time we will create a smoothed gear. Here I show you one strategy</p>
<p style="text-align: center;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/LimitingSmoothing2.swf"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/limitingSmoothing2.swf" /><embed type="application/x-shockwave-flash" width="500" height="400" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/limitingSmoothing2.swf"></embed></object></a></p>
<p style="text-align: left;">
<p style="text-align: center;">Thanks to <a href="http://akenar.com">Ramón<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=181</wfw:commentRss>
		</item>
		<item>
		<title>3dsmax Modelling (I). Using Image references</title>
		<link>http://boundingbox.homelinux.net/blog/?p=132</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=132#comments</comments>
		<pubDate>Fri, 18 Jul 2008 23:43:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[3D]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=132</guid>
		<description><![CDATA[

One interesting technique to model real things, is to use pictures of this real things as a reference and place them in our modelling software so we can do the blocking of the model based on that visual information. Here I will describe step by step how to do it using 3dsmax. Thanks to Ramón [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">
<p style="text-align: left;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/3d1.png"><img class="alignnone size-medium wp-image-194" title="3d1" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/3d1.png" alt="" width="80" height="80" /></a></p>
<p style="text-align: left;">One interesting technique to model real things, is to use pictures of this real things as a reference and place them in our modelling software so we can do the blocking of the model based on that visual information. Here I will describe step by step how to do it using 3dsmax<strong>. </strong>Thanks to <a href="http://akenar.com">Ramón</a> for all the help.</p>
<p style="text-align: left;"><span id="more-132"></span></p>
<p><strong></strong></p>
<ol style="text-align: left;">
<li>Make 3 photographs from Top, Front and Left sides. Use tripod and avoid as much as posible the perspective deformation</li>
<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/top.jpg"><img class="alignnone size-full wp-image-134" style="border: 1px solid black;" title="top" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/top.jpg" alt="" width="320" height="240" /></a><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/front.jpg"><img class="alignnone size-full wp-image-133" style="border: 1px solid black;" title="front" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/front.jpg" alt="" width="320" height="240" /></a><br />
<a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/left.jpg"><img class="alignnone size-full wp-image-135" style="border: 1px solid black;" title="left" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/left.jpg" alt="" width="320" height="240" /></a></p>
<li>Use The GIMP to crop, cut and paste each of the photos in one big picture, aligning each photo and making them fit.</li>
<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/referencia.jpg"><img class="alignnone size-full wp-image-136" title="referencia" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/referencia.jpg" alt="" width="320" height="244" /></a></p>
<li>Use guides to match the sides of each view and crop one image per view</li>
<li>Create a square size image (512&#215;512) and paste the cropped images in the center of the square image, then save it. The square size is important for the 3dsmax viewports to show them properly.</li>
<li>Finally you have 3 square size images</li>
<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/top1.jpg"><img class="alignnone size-full wp-image-137" style="border: 1px solid black;" title="top1" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/top1.jpg" alt="" width="256" height="256" /></a> <a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/front1.jpg"><img class="alignnone size-full wp-image-138" style="border: 1px solid black;" title="front1" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/front1.jpg" alt="" width="256" height="256" /><br />
</a><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/left1.jpg"><img class="alignnone size-full wp-image-139" style="border: 1px solid black;" title="left1" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/left1.jpg" alt="" width="256" height="256" /></a></ol>
<p style="text-align: left;">Configuring 3dsmax vewports</p>
<ol style="text-align: left;">
<li>Press Alt+B on each viewport</li>
<li>Elegir el fichero de la imagen y después rellenar las opciones como se muestra en la pantalla</li>
<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/opciones.jpg"><img class="alignnone size-full wp-image-140" title="opciones" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/opciones.jpg" alt="" width="320" height="394" /></a></p>
<li>Repetir con cada viewport hasta conseguir la siguiente imagen</li>
<p><img class="alignnone size-full wp-image-141 alignleft" style="float: left;" title="3dsmax" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/3dsmax.jpg" alt="" width="480" height="394" /></ol>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=132</wfw:commentRss>
		</item>
		<item>
		<title>Mundos Digitales 2008 (I). Beowulf y la pirámide del valor.</title>
		<link>http://boundingbox.homelinux.net/blog/?p=122</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=122#comments</comments>
		<pubDate>Fri, 11 Jul 2008 22:32:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=122</guid>
		<description><![CDATA[
Tuve la suerte de poder asistir a la edición de este año de MundosDigitales, festival de la industria del 3D que se celebra anualmente en La Coruña y que reune a personas de la mayoría de los estudios de animación nacionales y parte de Europa. Es un encuentro muy agradable donde asistir a conferencias sobre [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/logo_cabecera.gif"><img class="alignnone size-medium wp-image-125" title="logo_cabecera" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/logo_cabecera-300x46.gif" alt="" width="300" height="46" /></a></p>
<p>Tuve la suerte de poder asistir a la edición de este año de <a href="http://www.mundosdigitales.org/english/index.htm">MundosDigitales</a>, festival de la industria del 3D que se celebra anualmente en La Coruña y que reune a personas de la mayoría de los estudios de animación nacionales y parte de Europa. Es un encuentro muy agradable donde asistir a conferencias sobre este mundillo y hacer amigos del sector.</p>
<p>Para no olvidarme de las conferencias que considero que más me han gustado, voy a llevar a cabo unos cuantos post en que describiré varias ponencias de Mundos Digitales 08 de forma desenfadada y con bastantes aportaciones personales (quién avisa no es traidor),</p>
<p>[Post in spanish because I feel more comfortable using my native language and I don´t have too much time to translate this in english. Content just for spaniards sorry.]</p>
<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/min_sylwan.jpg"><img class="alignnone size-medium wp-image-124" style="margin-top: 20px; margin-bottom: 20px;" title="min_sylwan" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/min_sylwan.jpg" alt="" width="84" height="78" /></a></p>
<p><strong>EL CAMBIANTE MUNDO DEL PIPELINE EN EL CINE<br />
Sebastian &#8220;Beowulf carnosico&#8221; Sylwan</strong></p>
<p><span id="more-122"></span></p>
<p>Y empezaré con una conferencia que sin ser muy técnica me llegó (Qué fuerte!) . Así en breve, este gurú del cine y los efectos nos vino a contar que la industria del 3D está en plena etapa de industralización, justo en ese momento en que se pasa del producto artesanal a la fabricación industrial. De producciones pequeñas en número y de calidad gracias a la dedicación, al mimo y tiempo empleado, a las producciones de grandes tiradas donde la eficiencia y el rendimiento de fabricación permitirán que los contenidos 3D sean más asequibles y sofisticados. Todo esto aderezado con datos, gráficas escaladas (homenaje al Sr.Loureiro) y más datos y más graficas y tal. Que si su predicción se cumple no habrá peli sin VFX y además serán más baratos y se produciran como churros.</p>
<p>Pero a mi lo que me molo fueron dos grandes conceptos: LA SANTISIMA TRINIDAD y LA PIRAMIDE DEL VALOR</p>
<p><strong>LA SANTISIMA TRINIDAD</strong></p>
<p style="text-align: center;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/trinidad1.png"><img class="alignnone size-medium wp-image-126" title="trinidad1" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/trinidad1.png" alt="Engranajes del exito" width="239" height="169" /></a></p>
<p>Sebastian no se refirió a este tema ni con este título ni éxactamente con estos nombres, me he permitido la licencia  de rebautizarlos para darles un poco más de empaque. En resumen un recordatorio por parte del Sr. Sylwan, de los ingredientes principales para cualquier producción con pretensiones: Poderío Tecnológico, Talento Artístico y Visión Comercial.</p>
<p><strong>LA PIRAMIDE DEL VALOR</strong></p>
<p style="text-align: center;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/piramid.png"><img class="size-medium wp-image-131" title="piramid" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/piramid-300x225.png" alt="" width="300" height="225" /></a></p>
<p>Y ahondando en la misma temática pero centrándose en el poder tecnológico, Beowulf nos mostró  más conceptos interesantes usando la pirámide del valooorrrr. Aquí podemos ver una propuesta de los cimientos en los que asentar un estudio y lo que deberían aportar a la producción si se usan correctamente. De esta manera:</p>
<ul>
<li>El <strong>pipeline </strong>si se está bien diseñando debería aportar <strong>estabilidad </strong>a la producción</li>
<li>El <strong>software </strong>si se elige bien y se usa correctamente debería aportar <strong>eficiencia </strong>a la producción</li>
<li>La <strong>fontanería </strong>que era como se refería Sebastian a los desarrollos a media internos, deberían facilitar la <strong>integración </strong>del software en el pipeline de la producción</li>
<li>Y por último las <strong>diferencias con los competidores</strong> de una producción deberían siempre estar relacionadas con <strong>aspectos innovadores</strong>.</li>
</ul>
<p style="text-align: center;"><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/piramid.png"><br />
</a></p>
<p style="text-align: left;">En principio ninguno de estos gráficos ni los conceptos que muestran son la pera limonera, pero muchas veces ponerle nombre a las cosas y monstrarlos en una imagen ayuda integrarlos más facilmente y los hace más poderosos. Además son un rato pintones.</p>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=122</wfw:commentRss>
		</item>
		<item>
		<title>MrPotato Indiana Jones</title>
		<link>http://boundingbox.homelinux.net/blog/?p=119</link>
		<comments>http://boundingbox.homelinux.net/blog/?p=119#comments</comments>
		<pubDate>Wed, 09 Jul 2008 21:18:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<guid isPermaLink="false">http://boundingbox.homelinux.net/blog/?p=119</guid>
		<description><![CDATA[
Incredible, people from Playskool knows what I need, they have already released the new MrPotato Indiana Jones, with integrated sound in the hat. So I can get rid of the useless Indiana Jones soundtrack emitter and replace it with my voice synthetizer :D. Now I only need some spare time.
I agree it´s not very friendly, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/mrpotato.png"><img class="alignnone size-medium wp-image-121" title="mrpotato" src="http://boundingbox.homelinux.net/blog/wp-content/uploads/2008/07/mrpotato.png" alt="" width="100" height="112" /></a></p>
<p>Incredible, people from Playskool knows what I need, they have already released the new <a href="http://www.amazon.com/Playskool-Potato-Indiana-Jones-Taters/dp/B000Y8Z2L0">MrPotato Indiana Jones</a>, with integrated sound in the hat. So I can get rid of the useless Indiana Jones soundtrack emitter and replace it with my voice synthetizer :D. Now I only need some spare time.</p>
<p>I agree it´s not very friendly, it´s a kind of ugly, but it´s a MrPotato c´mon and if you press on the hat you will get some music, isn´t it cute?. During this summer holidays I need to be working on that defenitely. MrPotato v.3 is about to come. Muhahahaha</p>
]]></content:encoded>
			<wfw:commentRss>http://boundingbox.homelinux.net/blog/?feed=rss2&amp;p=119</wfw:commentRss>
		</item>
	</channel>
</rss>
