<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11267202</id><updated>2011-04-22T12:01:17.821+09:00</updated><title type='text'>what I write is what I get</title><subtitle type='html'>This is my.. ouch, I can't spell the word !</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>86</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11267202.post-113104205674474894</id><published>2005-11-04T03:19:00.000+09:00</published><updated>2005-11-04T03:20:56.766+09:00</updated><title type='text'>I'm back, and I'm not fat !</title><content type='html'>I'm finally done with all the crunch. I'm slowly getting used to having a life again.&lt;br /&gt;Tuesday I left work at 6:30 PM and went to eat &lt;a href="http://www.ymori.com/contents/fgame/yakiniku.html" target=_blank&gt;yakiniku&lt;/a&gt; with some colleagues.&lt;br /&gt;Yesterday after work I went to get an haircut (wow !). Then I got home and re-started working on my latest 3D engine stuff.&lt;br /&gt;Today (the 3rd), was a national holiday, so I slept late and then went to the gym. There, much to my surprise, I weighted 71.95 !! One month of practically not moving, and my weight hasn't increased !&lt;br /&gt;I suppose that I traded some muscle for fat, but still, I'm pretty happy 8)&lt;br /&gt;&lt;br /&gt;As for 3D research, I'm putting much emphasis on doing Radiosity at a decent speed. Not real-time, but still at a somewhat usable rate for pre-calculations. Of course the usual problem with Radiosity is that it doesn't work very well with sharp shadows if one simply subdivides the geometry with quad patches.&lt;br /&gt;I'm pretty convinced that I'm going to do a pre-split of the geometry following any early hard shadows. This should be done with a shadow volume algorithm which directly cuts the geometry (as opposed to stencil shadow volumes). Alternatively, I could somewhat try to solve the Radiosity at a low frequency and then apply the hard shadows as a post process in real-time. Basically separating direct lighting from indirect lighting (which is where the coolness of Radiosity really is).&lt;br /&gt;The general situation, however, is pretty desperate. I think that generally there isn't very much analytical thinking in the world of 3D graphics. It's hard to find some well thought concepts. With lighting, it's obvious that there is a need for an unified system to handle a wide range of level of detail. Because the most common materials are of a diffuse type (reflect light very poorly, so to speak), it's obvious that for indirectly illuminated entities, if light is considered a signal, one only needs bother to a much lower frequency of that signal.&lt;br /&gt;I think that everything should be somewhat submitted to a LOD structure (wavelets, Fourier), while algorithms should somewhat work on higher dimensional spaces.&lt;br /&gt;For example, if one has a triangle and wants to do Radiosity rendering, with hemicubes, the process is of doing three different hemicube renderings, one for each vertex. That's clearly a waste of calculations, because most of the times, the three vertices will pretty much see the same scene, they will most likely either be in shadow or not be in shadow. On a higher dimensional space, instead, one single hyper-rendering would span across the whole triangle. This would imply an increase in calculations of orders of magnitude, but also open the door to more clever algorithms to bring back the number of calculations with a better understanding of the situation: implicitly understand if and where a high frequency lighting happens on the surface of a triangle (example: cut by a shadow or not ?).&lt;br /&gt;&lt;br /&gt;And we go to sleep !&lt;br /&gt;zzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-113104205674474894?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/113104205674474894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=113104205674474894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113104205674474894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113104205674474894'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/11/im-back-and-im-not-fat.html' title='I&apos;m back, and I&apos;m not fat !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-113060808330043614</id><published>2005-10-30T02:37:00.000+09:00</published><updated>2005-10-30T02:48:03.383+09:00</updated><title type='text'>Italian Pyshco</title><content type='html'>Recently I watched the movie &lt;a href="http://www.imdb.com/title/tt0144084/" target=_blank&gt;American Pyscho&lt;/a&gt;. I liked it among other things, because it was set in the 80s. Very nice soundtrack 8) although the setting was not too convincing. It didn't look naturally 80ish. Everything was so neat and clean, which reflects the main character, but doesn't give the 80s feeling, with its pink-candy look. Still, who cares, it's not a documentary.&lt;br /&gt;I mention the movie only now, because today I had my 5 minutes of "psycho". One works every single day, comes back home at night, struggles to find the time to even do the laundry, works on his birthday, always say yes, yes (hai !). Then works 40 hours towards the end.. only to be awaken the next day "where are you ?", "what what I'm.. was I supposed to work ?", "no but there is a bug, come at 1PM".&lt;br /&gt;Then I pick up and go to work, to see what's this bug about, only to find out there is no single real bug, but rather a need to apport several consistent changes. I get into the office hoping to get out soon but I realize that I'm going to work into the night, again !&lt;br /&gt;I tried my best, but eventually I snapped, walked off some sort of meeting and went to cope with a sudden attack of rage !&lt;br /&gt;I very much prefer the Japanese work environment, because everyone is so kind to each other, but at the same time, one can only take so much, and eventually snaps losing control. It's something that scares me. When a person regrets to the animal stage anything could happen.&lt;br /&gt;Ten minutes later I was at my desk silently working on the code (hai, hai !).&lt;br /&gt;&lt;br /&gt;Of course, as usual, not all bad things come to do bad. All this hard work has reminded me that there is still quite a bit of personal work that I have to do to gain my freedom. Also reminded me that I do need to work towards this freedom.. by freedom, I mean to reach the point where I don't need to find myself in very limiting conditions where I'm constantly told what and how to do it.&lt;br /&gt;&lt;br /&gt;Woo !!&lt;br /&gt;&lt;br /&gt;P.S.&lt;br /&gt;&amp;nbsp;"A signo', io me vado a fa du orette de sonno !"&lt;br /&gt;&amp;nbsp;"Sto lavoro non e' n'lavoro, e na galera !!"&lt;br /&gt;&lt;br /&gt;&amp;nbsp;From the movie &lt;a href="http://www.imdb.com/title/tt0082073/" target=_blank&gt;Bianco Rosso e Verdone&lt;/a&gt;. Where a truck driver (the magnificent &lt;a href="http://www.vacanzedinatale.it/Attori/mario_brega.htm" target=_blank&gt;Mario Brega&lt;/a&gt;) says that his job is like a jail and he's going for a two hours nap 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-113060808330043614?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/113060808330043614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=113060808330043614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113060808330043614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113060808330043614'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/italian-pyshco.html' title='Italian Pyshco'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-113052436195634479</id><published>2005-10-29T03:28:00.000+09:00</published><updated>2005-10-29T03:32:41.980+09:00</updated><title type='text'>The longest stretch</title><content type='html'>Thursday morning I left my apartment late for work. I got in the office by 11:20 AM. Trying to be well rested because I knew that I was going to have a night of last minute fixes.. as it was the last major milestone for the project.&lt;br /&gt;It turned out to be a bit more tiring than expected. The team basically worked 40 hours straight. Pretty painful to stitch together pieces of horrible code with duct tape.. cheap cheap tricks, globals everywhere, special cases, hopeful guesses.&lt;br /&gt;At one point I had a problem with the playback of the background music.. a new track, deep into some complex level of the game, would not play.. but only on the actual burned DVD, not on the debug-station (which only emulates the DVD).&lt;br /&gt;The XDK doesn't really give a good example on how to do asynchronous load, I fiddled quite a bit with it and eventually got it going (thanks also to the on-line help of Mr.Rince !). And still, somehow I'd get into a bump between finishing to load and playing back the just loaded track. Eventually my boss tried to put the audio files on the fast portion of the DVD (the sectors towards the border of the DVD) and that apparently solved the playback problem 8)&lt;br /&gt;&lt;br /&gt;Amazing how complicated also the XBox Live thing is..  it kept us trying to fit the game into the complicated subtleties of the server: ranked matches, standard matches, stats to write, voice chat to support. Microsoft definitely did quite a work with Live (which I only discovered with the 360, but I think it's not too different from the one on the first XBox). A lot of effort for MS, which requires a lot of effort for the developers.. even just to understand how the system is meant to work. Not necessarily technical matters.. for example, how are standard match and a ranked match different ? How does a game lobby work in ranked matches ? What happens to the players in one console where another local player joined some game session on-line ?&lt;br /&gt;And then the rankings, writing the stats, reading the stats, querying the database to find players that match one's skills. A lot of asynchronous operations, a lot of added complexity to a game.&lt;br /&gt;&lt;br /&gt;Time to really sleep now. This weekend I don't have to work.. wow !!&lt;br /&gt;&lt;br /&gt;zzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-113052436195634479?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/113052436195634479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=113052436195634479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113052436195634479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113052436195634479'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/longest-stretch.html' title='The longest stretch'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-113017712245366356</id><published>2005-10-25T02:53:00.000+09:00</published><updated>2005-10-25T03:05:22.476+09:00</updated><title type='text'>My state machine</title><content type='html'>The current state of things hasn't changed much. For the past two weekends I haven't gone out at all.. as I'm working on weekends too.. till midnight.&lt;br /&gt;The crunch is about to finish in a few days and I'm not feeling particularly tired. In fact, I'm generally pretty active. The fear of the super-final milestone is keeping me relatively excited.&lt;br /&gt;I'm sleeping 6 hours per night or less, getting home at about 12:50 AM, reading the physics book on the train, morning and night as I go back home.&lt;br /&gt;I got close to page 200 of the book, skipping the always challenging exercises while still trying to make sense of what the book says. Fourier came and went, but this time the explanation was more complicated than usual, as the book is really trying to make a point of complex number &lt;a href="http://en.wikipedia.org/wiki/Holomorphic_function" target=_blank&gt;holomorphic functions&lt;/a&gt; (!), &lt;a href="http://en.wikipedia.org/wiki/Riemannian_manifold" target=_blank&gt;Riemann manifolds&lt;/a&gt;, &lt;a href="http://mathworld.wolfram.com/RiemannSurface.html" target=_blank&gt;Riemann surfaces&lt;/a&gt; and now partial differential equations.. in complex space.&lt;br /&gt;I can't really follow in detail all that stuff from one single source, reading a book sleepy or tired on a short train commute.. yet.. the book is keeping me company. I'm happy enough to at least get an overview of the most complex mathematical concepts out there, especially as they will later be used in the physics part of the book (100 more pages to get a taste of physics).&lt;br /&gt;In the meantime, during compiling times at work (which I recently cut by starting to use precompiled headers for sources that include the XDK (XBox 360's SDK) headers (very large !)), I've been refreshing things at the pre-calculus level with a very gentle introduction in the William Mueller's &lt;a href="http://www.wmueller.com/precalculus/" target=_blank&gt;Exploring Precalculus&lt;/a&gt; site.&lt;br /&gt;&lt;br /&gt;Time is over, going towards 3 AM time to get my 6 good hours of sleep 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-113017712245366356?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/113017712245366356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=113017712245366356' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113017712245366356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/113017712245366356'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/my-state-machine.html' title='My state machine'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112965840443211791</id><published>2005-10-19T02:52:00.000+09:00</published><updated>2005-10-19T03:00:04.453+09:00</updated><title type='text'>The Infernal State Machine and the Coroutines</title><content type='html'>Not long ago I complained on how painful it is to deal with state machines.&lt;br /&gt;With video-games more than some other kind of software, there is a need to run concurrent threads. Multiple tasks that progressively do things over a larger amount of time.&lt;br /&gt;Normally one programs thinking of one routine at the time. The flow of the code is meant to start in the routine and end with it.&lt;br /&gt;I don't have much time to make a decent example.. I'll just say that generally one ends up with big &lt;code&gt;switch&lt;/code&gt; statements;&lt;br /&gt;&lt;br /&gt;Something like:&lt;code&gt;&lt;pre&gt;    switch ( state )&lt;br /&gt;    {&lt;br /&gt;    case IDLE:&lt;br /&gt;         break;&lt;br /&gt;    case CREATE_CONNECTION:&lt;br /&gt;         // ...&lt;br /&gt;         if ( done )&lt;br /&gt;             state = CONNECTING;&lt;br /&gt;         break;&lt;br /&gt;    case CONNECTING:&lt;br /&gt;         // ...&lt;br /&gt;         if ( done )&lt;br /&gt;             state = TRANSMIT;&lt;br /&gt;         break;&lt;br /&gt;    case TRANSMIT:&lt;br /&gt;         // ...&lt;br /&gt;         if ( done )&lt;br /&gt;             state = DISCONNECT;&lt;br /&gt;         break;&lt;br /&gt;    case DISCONNECT:&lt;br /&gt;         // .........&lt;br /&gt;         if ( done )&lt;br /&gt;             state = IDLE;&lt;br /&gt;         break;&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;Which looks tidy in this example, until one gets into a practical application, with the state machine jumping from one state to another... it can get pretty messy !!!&lt;br /&gt;&lt;br /&gt;So, how to simplify all this ? Given the limitation of the language (C/C++).&lt;br /&gt;The solution is pretty simple.. and it comes from the plain old C hacking with the freedom that the language gives, and with the preprocessor. A very low tech solution, far from what one would think.. in this day of age with all those fancy C++ template code.&lt;br /&gt;This hack has a name, it's called &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html" target=_blank&gt;coroutines&lt;/a&gt;. A proper explanation can be read at the link provided.&lt;br /&gt;&lt;br /&gt;I'm pretty excited about this, but I haven't had time to really test the usability on relatively complex cases yet.&lt;br /&gt;&lt;br /&gt;Almost time to zzzzz !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112965840443211791?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112965840443211791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112965840443211791' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112965840443211791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112965840443211791'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/infernal-state-machine-and-coroutines.html' title='The Infernal State Machine and the Coroutines'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112939737081746071</id><published>2005-10-16T02:20:00.000+09:00</published><updated>2005-10-16T02:29:30.836+09:00</updated><title type='text'>I want to make great games !</title><content type='html'>"I want to make great games !"&lt;br /&gt;The upcoming generation of console hardware is definitely exciting. It has plenty of power. It's never enough power, but there is still plenty that could be done.&lt;br /&gt;However, we are talking about very raw power. Raw power that allows to bring to a TV screen what has to be created by dozens of expert developers for one, two, three years.&lt;br /&gt;As a programmer that got into this business as a way to build my own worlds, I find myself very limited. I can't really do much more than generating fractal mountains. To do the cool stuff one needs lots of expert modelers, animators, motion actors (whose motions need to be sampled in expensive motion capture studios).&lt;br /&gt;As I see the titles of those next gen games, I feel more and more out of place in the game industry. Sure, one can still possibly do fun games that can entertain a great deal. But, I've always seen games as a way to simulate realistic worlds, and now that the simulation is becoming convincing, I feel like, at best, I could be a tiny piece in a  large mosaic (provided that a company can put me to work together with a hundred people for one game).&lt;br /&gt;&lt;br /&gt;There is always going to be a place for a programmer, possibly now more than before, but at the same time, one truly doesn't have much individuality. It's hard to sensibly make a difference... when you have to rely so much on people that have a much more creative impact, although artists themselves have to use software to realize their creations ;)&lt;br /&gt;&lt;br /&gt;It's not all hopeless for us programmers. Some will eventually scavenge for 10 years old papers and will start to put in practice real-time techniques to shift routine artists' work into feasible mathematical solutions. There are already some softwares out there that will let you build human faces from a few parameters.. some even build bodies with muscles.. however, it's still too early. As usual with technology, it takes time to become mainstream.. methods to put things in practice with a relatively low effort need to be devised.&lt;br /&gt;&lt;br /&gt;Some day.. ehh.. bha !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112939737081746071?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112939737081746071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112939737081746071' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112939737081746071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112939737081746071'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/i-want-to-make-great-games.html' title='I want to make great games !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112888154910972277</id><published>2005-10-10T03:09:00.000+09:00</published><updated>2005-10-10T03:12:29.110+09:00</updated><title type='text'>Wooooo アキバ系 ! (Akibakei = an anime/manga nerd)</title><content type='html'>Wednesday I worked from 10AM to 7AM (21 hours straight). I was in bed by 8AM, slept till 10, back in the office by 11:30.&lt;br /&gt;I had some bugs to fix, but it wasn't the best time to take such a stretch, because then I went on to work till 13:30 of the next day ! Which makes about 2 days with 2 hours of sleep.&lt;br /&gt;Friday I rested all day, onto Saturday night, when I went out to have some distractions.&lt;br /&gt;&lt;br /&gt;A Japanese girl, friend of a friend of mine. Came to my apt for dinner (as my my other friend was already here visiting). As usual, a specific poster that I have hanging in my room, brought out some concern to the eyes of yet another woman. It's a poster that another friend of mine gave me.. depicting a manga style hand-drawn curvy girl naked and bonded with some rope and clearly aroused. Definitely a geeky thing.&lt;br /&gt;I'm not really into those things, but I found it cool.. I mean, it doesn't really make such a big impression on me. However, the word is that, I should get rid of it ..unless I want to leave a bad impression on other girls !&lt;br /&gt;I suppose that I should try to look at the poster with female eyes. Women tend to be more impressed about certain things. Oh my gosh ! A man that has a sexy drawing in his bedroom, I bet that he gets horny every time he sees that !&lt;br /&gt;I really don't see what's the big deal. In fact, I think that this only comes to show how sexuality is normal for men, but for women it's taken a lot more like a duty.&lt;br /&gt;People get married and put their passions to sleep... what a great thing that marriage is !&lt;br /&gt;&lt;br /&gt;woo&lt;br /&gt;zzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112888154910972277?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112888154910972277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112888154910972277' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112888154910972277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112888154910972277'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/wooooo-akibakei-animemanga-nerd.html' title='Wooooo アキバ系 ! (Akibakei = an anime/manga nerd)'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112844767184371730</id><published>2005-10-05T02:35:00.000+09:00</published><updated>2005-10-05T02:41:11.863+09:00</updated><title type='text'>Crunch, crunch, crunch</title><content type='html'>Still working 10 to 24 every day (13 to 24 on weekends). I don't feel incredibly tired. If anything, because I don't do much else and I dont have many problems sleeping (Melatonin came to the rescue !).&lt;br /&gt;I'm into the 7th chapter of the Penrose book. Went quickly thought real numbers calculus. Now onto complex number calculus.&lt;br /&gt;I mostly read it while I'm on the train, or waiting it (at night they come less often). I'm not satisfied however, because I don't have the time even to try solve the basic exercises that the book proposes. In fact, I think that I will eventually need to buy another book, just to refresh the calculus part.. including a good dose of exercises. Exercises are very important, it's what makes you realize that you actually understood something.&lt;br /&gt;Plain explanations don't generally seem to work too well, I prefer to put myself through practical exercises, waiting for my brain to eventually make the connections; to come up with a satisfactory vision that makes me feel like I grasped the concept and that I can potentially use it.&lt;br /&gt;&lt;br /&gt;Still no study of Japanese, although my level of communication is steadily increasing at the workplace.. which is more out of necessity than as a result of any improbable outstanding improvement.&lt;br /&gt;&lt;br /&gt;At work I'm in a stage in which everything is put down quickly, with little regard for code cleanliness. Plus I've been optimizing (= trying to insert bugs) for bandwidth transmission. I'm working with VDP (XBox 360's UDP-like packet transmission) and that means that one has to cope with potential packet loss, therefore, for real-time performance, one has to implement some sort of redundancy.. which is also nice to have to fix eventual design issues that can potentially arise in these situations. It's a bit like doing organ transplant, throwing in a bunch of anti-rejection drugs to do the patching.&lt;br /&gt;Sometimes I change something and a cascade of issues rolls down. Then I have to juggle the issues trying to stay calm and believe that in the end it will all work !&lt;br /&gt;The important thing is to never run out of imagination on possible workarounds.. one can do wonders with just glue and duct-tape 8)&lt;br /&gt;&lt;br /&gt;zzzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112844767184371730?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112844767184371730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112844767184371730' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112844767184371730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112844767184371730'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/crunch-crunch-crunch.html' title='Crunch, crunch, crunch'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112810831584351407</id><published>2005-10-01T04:24:00.000+09:00</published><updated>2005-10-01T04:25:15.870+09:00</updated><title type='text'>All work and some frustrations</title><content type='html'>Since the last time that I complained, I've been stood up two more times 8)&lt;br /&gt;I lost track of the times this has happened now and also lost track of the excuses. I don't mean to make it a racial thing, but it's in the Japanese culture to try to be kind and not hurt people. For that reason, a lot of excuses are normally made: I have a cold, I'm so busy with work, I fell asleep, my father got trapped in the car wash (last one is from an Italian song dedicated to men that are slave of females' whims 8). Knowing that, I always try not to force anything, yet, I get flipped around and find myself feeling guilty for having tried to force something !&lt;br /&gt;"Please wait for me ! I'm coming ! I'm com, I'm co.. opssss &lt;excuse_of_the_day&gt;"&lt;br /&gt;I think that over a certain limit, it stops being unwillingness and starts being some sort of chronical illness. It expresses the need to try force someone into being dependent of the other. To do what's not nice, but possible and always go one step further.&lt;br /&gt;It's a complex game, because one has to try to be understanding and not show much care, but at the same time can't afford for the other to take advantage and let the situation degenerate. When a situation degenerates, one can end up in situations that are at least very uncomfortable, like a girl that goes around being all sweet to you and showing the pictures of her real bf, or showing up at your apt paying a visit of courtesy and coming up with "I found a new boyfriend ! I'm so happy ! We had sex yesterday ! Look, here is a picture of him in his underwear !"  ...Good for you !!&lt;br /&gt;Then there is no limit to what things can come to.  ..if one had to avoid the bullshit at the root, he'd have to ignore a great deal of people. My policy, however, is just to let things pass by, because they can be somewhat funny as they happen or, at least, they can become funny when time passes by and memories aren't so bitter anymore. Plus, they make for good stories to tell ! 8)&lt;br /&gt;Eventually, what really matters is just to let things come and go, because in a world governed by statistics, it doesn't make sense to try to make an individual out of a pretty girl: the current one is as wrong as the previous one and as wrong as the next one. People make couples when they find similarities, but, sadly, most similarities are found in the most common people. One is like what one likes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112810831584351407?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112810831584351407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112810831584351407' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112810831584351407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112810831584351407'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/10/all-work-and-some-frustrations.html' title='All work and some frustrations'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112766990237130831</id><published>2005-09-26T02:28:00.000+09:00</published><updated>2005-09-26T02:38:22.383+09:00</updated><title type='text'>お疲れ様です！(otsukaresama desu, tired with work, "hanging there")</title><content type='html'>Today I had a flashback about an old movie with Michael Keaton, "&lt;a href="http://imdb.com/title/tt0091159/" target=_blank&gt;Gung Ho&lt;/a&gt;" (1986). A chinese title for a movie about a Japanese carmaker takeover of an American small-town factory.&lt;br /&gt;The movie, a comedy with drama, highlighted the differences between the Japanese worker and the American one. Or at least between the attitude towards work.&lt;br /&gt;One scene in particular that I remember, when a Japanese employee working in the middle of the night, is given the news of his wife having given birth, but he can't reach her as he' silently forced to stay in the office.&lt;br /&gt;That was clearly an exaggeration.. however, from time to time it may happen to have to be working late, and to have to give up on social life. Specifically, today, (now yesterday), Sunday 25th, was my birthday, and, incidentally also the day I worked to the latest hour in recent times.&lt;br /&gt;I'm not into birthday celebrations and I'm aware of the need to meet milestones (that's the nature of the business). However, when one doesn't have the freedom to decide wether or not to celebrate a birthday, or take a vacation, when it becomes a constriction, the effect is different. One feels like he's missed a chance.  On the other hand, it's perhaps it's also a good way to appreciate things. For example, the fact that this summer I didn't have a chance to take a vacation, made me somewhat want to take one when I can (and not just to go to Italy to visit relatives and to rest).&lt;br /&gt;Friday was also holiday, but I went to work. From 1PM till 9/10PM. So, basically, now I'm heading into a new week of work, without having taken any real rest... and I'll probably be working again till 10/11PM every day. That's got to be somewhat heavy 8)&lt;br /&gt;A real issue with that, is that doing simple things such as laundry and getting an haircut, or buying groceries, becomes a bit complicated if not impossible.&lt;br /&gt;Some groceries can be bought at the convenience stores, while getting an haircut is really mostly out of question.&lt;br /&gt;My mealtonin pill is starting to make effect and I think I'll head to bed... zzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112766990237130831?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112766990237130831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112766990237130831' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112766990237130831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112766990237130831'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/09/otsukaresama-desu-tired-with-work.html' title='お疲れ様です！(otsukaresama desu, tired with work, &quot;hanging there&quot;)'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112723939463492163</id><published>2005-09-21T02:55:00.000+09:00</published><updated>2005-09-21T03:03:14.656+09:00</updated><title type='text'>Izze very leit !</title><content type='html'>Monday I dashed out of the apartment, almost sure to get to work late, only to find out that it was a national holiday 8)&lt;br /&gt;It has happened before, although at one point I learned to check the calendar looking forward to vacations. However, given the current situation, I'm not sure I'm really looking forward to much vacations (need to get work done !), so I let that one slip.&lt;br /&gt;It was for the best anyway.. 50 meters into the way, I see the usual two neighbors that bring out the Japanese flag for the holiday..  a call the office to make sure nobody is there.. and then, straight to Shibuya, where I bought a couple of books (one on kanji, the other with exercises, aimed at some standard language test which I may take one day).&lt;br /&gt;Bought the books, I went to a cafe nearby, the famous Segafredo of Shibuya. Cafes are actually nice, something that is almost unheard of in the Italian culture, where people mostly take they coffee standing up and chatting about soccer. Funny how Segafredo and Lavazza, possibly the largest coffee brands in Italy, have their cafe chains in Japan, but not in Italy.. where even Starbucks is unknown.&lt;br /&gt;For once was nice to be out early in the morning, actually outside, not inside the office. I worked a bit around the math in the Penrose book (onto complex numbers now), then started looking at the kanji book (&lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/4770024983/qid=1127237715/sr=1-1/ref=sr_1_1/102-7833405-2527339?v=glance&amp;s=books" target=_blank&gt;Decoding Kanji&lt;/a&gt;). I'm still only at page 27, but I've appreciated what I read so far. The book actually tries to make sense of the radicals composing kanji characters, and gives hints to have a good idea of how a kanji can possibly be read (the single biggest problem with kanji, really !).&lt;br /&gt;I don't expect this book to be the final and only source for kanji learning, but, as usual, it will have some contribution.&lt;br /&gt;Speaking of contributions, a while ago I bought &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0964350432/qid=1127238160/sr=1-2/ref=sr_1_2/102-7833405-2527339?v=glance&amp;s=books" target=_blank&gt;Who is Fourier?:A Mathematical Adventure&lt;/a&gt; and &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0964350416/qid=1127238160/sr=1-3/ref=sr_1_3/102-7833405-2527339?v=glance&amp;s=books" target=_blank&gt;What Is Quantum Mechanics?: A Physics Adventure&lt;/a&gt;. I think I may have finished the first one, but I definitely could not finish the second one. They are rather big books, which dwell a bit too much on cheap fiction, while trying to entertain and shamelessly plug their original language teaching business. nevertheless, I've learned some interesting things from those books. I liked the fact that quite a bit of math is proposed to the reader, while making it sound like child play.&lt;br /&gt;For example, I liked the explanation of the constant &lt;i&gt;e&lt;/i&gt; in one of those two books. While the Penrose book has introduced it by page 80, and still hasn't introduced derivatives nor has said that &lt;i&gt;e&lt;/i&gt; is actually special as its a derivative of itself.  ..but there is still a long way to go for me into the book, so I'll have to wait and see if he'll spend more time on that.&lt;br /&gt;Damn it's almost 3AM.. zzzzzz&lt;br /&gt;poof&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112723939463492163?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112723939463492163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112723939463492163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112723939463492163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112723939463492163'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/09/izze-very-leit.html' title='Izze very leit !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112671693336835518</id><published>2005-09-15T01:43:00.000+09:00</published><updated>2005-09-15T01:55:33.410+09:00</updated><title type='text'>The road to...</title><content type='html'>What I haven't been saying for the past two weeks, is that, thanks to a friend of mine, I found a bookstore that has a lot of interesting books in English.&lt;br /&gt;Two weeks ago, I went and looked at &lt;a href="http://synesis.com.au/publishing/imperfect/cpp/" target=_blank&gt;Imperfect C++&lt;/a&gt; (what an inspiring title !) and &lt;a href="http://www.awprofessional.com/bookstore/product.asp?isbn=0201924889&amp;rl=1" target=_blank&gt;Effective C++&lt;/a&gt;. I was also looking for another book, but the store was closing and eventually bought &lt;a href="http://developer.nvidia.com/object/gpu_gems_2_home.html" target=_blank&gt;GPU Gems 2&lt;/a&gt; (a long overdue buy !).&lt;br /&gt;Last week, I went back, all pumped, ready to buy some C++ books. But I just couldn't force myself to buy any of them. Forget the &lt;a href="http://www.research.att.com/~bs/3rd.html" target=_blank&gt;the Stroustrup's&lt;/a&gt;. Last thing I want to do is to give even more money to the father of C++.. for such a boring book. &lt;i&gt;Effective C++&lt;/i&gt; and &lt;i&gt;Imperfect C++&lt;/i&gt; also don't seem very interesting: the &lt;i&gt;do's and don'ts&lt;/i&gt; of modern C++ (whatever that means). More indoctrination from the wealthy daddies of C++.. buffoons !&lt;br /&gt;Eventually I moved onto the physics section where I finally found the book I meant to buy the week before: &lt;a href ="http://www.randomhouse.com/knopf/catalog/display.pperl?isbn=9780679454434" target=_blank&gt;The Road to Reality: A Complete Guide to the Laws of the Universe&lt;/a&gt; (alternative Wikipedia &lt;a href="http://en.wikipedia.org/wiki/The_Road_to_Reality:_A_Complete_Guide_to_the_Laws_of_the_Universe" target=_blank&gt;link&lt;/a&gt;) by &lt;a href="http://en.wikipedia.org/wiki/Roger_Penrose" target=_blank&gt;Roger Penrose&lt;/a&gt;. It's a heavy, 1099 pages book and, apparently, the first 350 pages are dedicated to form a background in mathematics and geometry, needed for the remaining 2/3 of the book.&lt;br /&gt;I'm still only around page 50. It's a book that is best read sitting down with pen and paper, and I find myself a bit frustrated by the lack of time. At work I'm definitely not doing any "rocket science", TV can be interesting, going to the gym is certainly useful, but also takes a lot of time, plus it's filled with smelly people !&lt;br /&gt;In any case, I'm very happy so far with the book. So early into the book and I already went through and introduction to hyperbolic geometry.. which I was eager to read about, because it has some applications to 3D graphics (rendering a hemisphere in one pass, instead of using an hemicube (5 passes).. needed for radiosity calculation).&lt;br /&gt;I plan on speeding up the reading.. although today I left work at 10:30 pm. Lot's of things to do in the office... I'm almost starting to hate my job.&lt;br /&gt;Game programming can involve some cool technology in the best cases, but on average, it's really not that stimulating. Sure beats things like data-base programming.. but recently, I feel like it's become too much of a job. It's too much about doing things fast, hack together what you can for a deadline so that the business goes well.&lt;br /&gt;Money is nice, but my ultimate goal will always be knowledge.. (also knowledge, is in turn power and then money 8)&lt;br /&gt;I guess that the important thing with work is to find an avenue to improve rather than be milked for the current knowledge and eventually become obsolete. It's nice when the workplace offers that.. but when it doesn't, one is on his/her own. I saw the summer coming and going, without even one day of vacation. I'm wondering what's the point to keep trying to make someone work when the morale obviously can't be that good.&lt;br /&gt;&lt;br /&gt;Lastly, I've had two mouth sores for several days now !! The dreaded mouth sores are back. Stresss, stressss.. a real torture, to have to feel pain as one eats. A pleasure turning into a constant pain !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112671693336835518?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112671693336835518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112671693336835518' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112671693336835518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112671693336835518'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/09/road-to.html' title='The road to...'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112645024780066888</id><published>2005-09-11T23:41:00.000+09:00</published><updated>2005-09-11T23:50:47.820+09:00</updated><title type='text'>Woooooo 寒い！Samui ! Cold ! Freddo ! Frio !</title><content type='html'>I've been stood up for the Nth time in a row. Boy, when do I learn ? "Il buon giorno si vede dal mattino" = "Can tell a day from the morning". That's what my mother once told me about a girls. Actually that's what she said that my grandmother told her (it's an Italian say). It's not so much about being stood up, it's about one taking advantage of one other's availability.&lt;br /&gt;Samui, much like in English, can be used about a person. Somehow, most of the Japanese girls that either me or my friends have met, seem to be rather cold !&lt;br /&gt;Could it be that most of the the girls we meet can speak English ? A different breed, they will like you if you look foreigner, not like you if you like Japanese, and generally act like complete asses. But then again, even some girls that don't speak English, aren't much different.&lt;br /&gt;Busy city, busy life. I understand that, but the heart ? Not there at all ?? No passion, no nothing. Some people equate me to Mr.Spock, as sometimes I exceed with logic.. but at times everyone needs somewhat of a warm feeling ! &lt;br /&gt;I've slept with Japanese girls (just slept), and felt like I was in a simulator. Zero passion.. other than that created by very artificial situations such as answering to a phone email message a couple of days later (it's all mostly done by messages). Another thing they like is to flirt with the friend of day ! Wow, I'm suddenly wanted by my friend's companion.. how cheap is that ? I remember one girl, involved with my friend, asking me out for dinner. She apparently read the Japanese version of the American book "The Rules", a book that tells women to let the man linger ("wait for him to call you", etc). That same girl eventually flirted with another friend of mine, as I didn't give in. What a woman !! I'm so impressed !!&lt;br /&gt;&lt;br /&gt;As far as passion goes, it's a bit like being 10 years into a marriage, only that you don't need to wait 10 years, nor to get married.&lt;br /&gt;Exotic women ? Yeah, I'll tell you ! Sure, one can find some cheap women everywhere. But the actual thing.. not seen here.&lt;br /&gt;Tears, they can do that. In Japan even men cry rather easily on TV shows. A girl can cry for you being slightly upset and the next day she'll accept $400 dollars worth of a bag ! (No, that wasn't me..  you know who you are ;).&lt;br /&gt;&lt;br /&gt;What's the logic behind ?! For what I know, Tokyo is such a big city, you see so many people everyday, everyone has to adapt to the fact that he or she will see several attractive people every day (on the subway for example). So many faces to ignore, one more, one less. Who's your friend ? It's the famous people !! Those on TV !!&lt;br /&gt;Are you famous ? Nope ? Bhaaaaa...&lt;br /&gt;&lt;br /&gt;Once a (rather crazy) girl that I knew, insisted for me to take the train with her to take her home. Once in the train she said: "now that you'll know where I live, I hope that you are not going to stalk on me"  .....not in you fucking dreams !!! "I'm so scared, look at these missed calls (some psycho is on me)".. yeah yeah.. go find yourself another prototype for a psycho, I have too many important things to do in my life other than trying to call a piece of meat+makeup that must be married by the age of 26.&lt;br /&gt;&lt;br /&gt;I wasn't born to do humble jobs. I'll never do any humble job, unless it's for somebody I care. Seeking women is a humble job. A job that takes more time than it's worth. Do I need to be a Japanese TV star before I can get girls to seek me ? I'll wait for that. In the meantime I have so many intelligent things to do. Actually I just hope that I'll never be so famous.. because I want to be intelligent, spend time on important things, rather than playing the mating game. Intelligence seems to be something that is getting more and more hard to find nowadays. Or perhaps was never within the grasp of the mass.&lt;br /&gt;&lt;br /&gt;I hope I'm an exception, I think I am, I just want to be outside the spectre of all those statistics that associate people. I want to be unique, even if that means that 99% of women won't like me.&lt;br /&gt;&lt;br /&gt;Welcome to my world !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112645024780066888?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112645024780066888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112645024780066888' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112645024780066888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112645024780066888'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/09/woooooo-samui-cold-freddo-frio.html' title='Woooooo 寒い！Samui ! Cold ! Freddo ! Frio !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112619990693243753</id><published>2005-09-09T01:56:00.000+09:00</published><updated>2005-09-09T02:18:26.960+09:00</updated><title type='text'>Slowing going back.. to the future !</title><content type='html'>Although recently I had the urge to go back to 'C'.. I have to admit that there are some reasons to keep trying with C++. An important one is, ironically, not really a feature of the language, but rather a functionality that is now pretty much standard in every major IDE (Integrated Development Environment). In VisualStudio it's called &lt;i&gt;IntelliSense&lt;/i&gt;. It basically suggests the available methods for a certain class as code is being written.&lt;br /&gt;This feature actually comes very handy, especially if one is using a class made by somebody else. This is often the case for most programmers as it's implicit in the teamwork to have to use somebody else's code.&lt;br /&gt;It's a feature or, more specifically, an aid, that can be considered part of the documentation, something that certainly can make it much simpler for others to try digest a library made by somebody else (cough cough)...  I've always been very worried about the usability of my code, especially now that it's hard to communicate with my coworkers (Japanese vs English: a matter of language but also of culture, as Japanese rarely speak out).&lt;br /&gt;&lt;br /&gt;So basically, I feel like keeping onto C++, because it somewhat helps me some to write my own code, and can probably help a lot more those that one day may have to use my code.&lt;br /&gt;Of course C++ still allows to write very obfuscated code.. and there comes the programmer's ability not make a mess. For this, one can only rely on the good will and the experience of the programmer. Luckily, in my current company C++ seems to be used neatly. The C++ code that I've seen from the coworkers, seems rather well done, not filled with bullshit C++ tricks of the month.  ..although I have a problem with some coding standards that have been set some time ago and that I truly think I'll never want to adapt to (hint: underscore before every parameter and local variable !).&lt;br /&gt;&lt;br /&gt;Speaking of coding standards, I've update mine with C++:&lt;br /&gt;&lt;pre&gt;class MyClass          // UpperLower style (most people just like it better !)&lt;br /&gt;{&lt;br /&gt;    int     _value;         // Unix programming style variables&lt;br /&gt;    int     _other_member;  // underscore to avoid mixing up members with locals&lt;br /&gt;&lt;br /&gt;public:&lt;br /&gt;    int     GetValue();     // UpperLower again for public methods&lt;br /&gt;    void    SetValue( int new_value );&lt;br /&gt;&lt;br /&gt;private:&lt;br /&gt;    void    updateSomething();  // lowerUpper for private methods&lt;br /&gt;};&lt;/pre&gt;&lt;br /&gt;The logic behind:&lt;br /&gt;&lt;br /&gt;- Classes and public methods need to be clearly visible, so the upper and lower style, with the capital in uppercase.&lt;br /&gt;&lt;br /&gt;- It's nice to be able to recognize at a glance private methods, so comes the capital lower-case. This way, they don't jump to the eye as quickly as the public ones.&lt;br /&gt;&lt;br /&gt;- Members and variables in general are lowercase, separated by underscore. It's very readable to me and doesn't make confusion with methods, functions, etc.&lt;br /&gt;&lt;br /&gt;- Members need to be distinguished from other variables, so they start with an underscore. The popoular "m_" is a bit too distracting, while the underscore at the end of the member doesn't stand out enough, and actually I just don't like the stupid "tail" 8)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Goodnight !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112619990693243753?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112619990693243753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112619990693243753' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112619990693243753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112619990693243753'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/09/slowing-going-back-to-future.html' title='Slowing going back.. to the future !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112594215521418212</id><published>2005-09-06T02:36:00.000+09:00</published><updated>2005-09-06T02:42:35.226+09:00</updated><title type='text'>Breaking consoles and relationships</title><content type='html'>Friday morning in the office we received the final XBox 360 devkits. I went on to unplug and pack the two Beta kits I was using. A relatively slow process, as I have to get under the desk to reach for cables and make sure that I don't mix the cables of one console with those of the other one (every item/cable has a sticker with an ID).&lt;br /&gt;Then I proceeded to setup one of the new kits. Updated the BIOS, etc etc. Once I verified that all worked, I went to place the second console next to the first one.. and BOOM ! The first console fell ! The power display went red and the system was dead. Could do nothing but replace that one (more packing and unpacking work for me).&lt;br /&gt;So, basically, Microsoft is going to ship a console with an hard-disk, that can stand vertically... ummm ! This is not even the first time that this happens to me. This time however the console was turned on.. so the HD was spinning. The devkit is a bit taller than the actual console, so the center of mass is a bit higher, but I don't think that that makes such a big difference. There is always going to be an opportunity to knock the thing down.. and I can see this as potential recurrent problem..&lt;br /&gt;&lt;br /&gt;Friday night I went clubbing. Not much motivation to do anything. The friend that went with me (or rather, I went cause he went) started off in a not very sober state (not very active). The music was awful. It's not ever RAP anymore, now they play some sort of tribal pseudo-African music. I think it's pushed by artists like Sean Paul, whose music I can't really seem to appreciate (and I think for a good reason !). At one point I just sat down tired and activated my MP3 player at the tune of &lt;a href="http://stage.arminvanbuuren.com/?id=4" target=_blank&gt;A State of Trance&lt;/a&gt; (a state of trance ? I wish !). However, even with my silicon ear-buds, the music coming from outside was too loud (yo ! yo ! yooooo !!). I really wished I had noise cancelling headphones to at least try to mitigate the effect of the music coming from outside. Sony released some new, not so large, noise cancelling headphones (actually ear buds) but I'm still debating on whether I should buy them. Perhaps it would be more economic to just avoid BS music.. is that's possible anymore !&lt;br /&gt;&lt;br /&gt;Saturday I went to the swimming pool for a few hours. It's an indoor one, but there is some outdoor space (filled with tanned men in tight briefs ..ouch !). Being the summer over, the space outside was officially closed, but luckily, was actually open.&lt;br /&gt;Then I went again clubbing ! This time with a different friend (one that speaks louder than the music ! So I can just listen to him if I don't like the music 8). This time around, the music was much better. Different club, several nice girls, none really seemed too interested in socializing with me.. and I surely wasn't in the mood to go begging for attention.&lt;br /&gt;&lt;br /&gt;Speaking of begging ! Supposedly two girls wanted to meet me this weekend (wow !). But I surely haven't seen much of them.. other than a few keitai-mails (keitai = cellphone).&lt;br /&gt;Those Tokyo girls all seem to be so busy with either school, work, golf, scuba diving, wtfucking ?!&lt;br /&gt;To meet a girl in Tokyo, you may actually have to schedule it one or two weeks in advance ! If you are scheduling a future meeting while in the middle of a meeting, some of them will actually pull out their cell-phone and start checking their schedule on the calendar... ...I've always hated that ! It truly pisses me off.. leave scheduling to business, I just want to see you, talk, get a coffee !!&lt;br /&gt;Even worse, this can happen not just with a friend, but with your actual girlfriend ! "Dear, can I see you this weekend ?", "well, let me see my schedule... sorry this weekend I'm busy, let's meet next weekend".  ..a typical dialogue, possibly done just by keitai-mail.. no need to waste time with voice.&lt;br /&gt;&lt;br /&gt;I regard myself as a generally logical person. Someone that likes to discretize human behavior, a de-romanticizer. But, at the same time, I realize that everyone should take a break from things.. break a schedule for the sake of feeling free to do so.. to assert one's individuality.&lt;br /&gt;However that doesn't seem possible. Schedule must come first ! But, dear Davide, I may be able to squeeze a few hours to see you.. oh yeah ? Fack that ! ..I say ! I'd rather stay alone than meeting someone by the tight bounds of a sacred schedule. This is somehow, still a way to assert my individuality and my freedom. (Perhaps I'm starting to become a social bum when it comes to women 8)&lt;br /&gt;It's important to accept some compromises, but sometimes the cost is too big. More than once I had to kill a potential relationship from the start, just because I couldn't bend at the will of the God of Schedules.&lt;br /&gt;&lt;br /&gt;My conclusion, is that tolerance should be kept to a safe level.. sometimes I accept big compromises, but that's in the name of curiosity, personal recreation: "I really want to see how far is this woman is going to go". But normally, no bullshit should really be accepted.. and that includes those that message you in the middle of the night when something in their head rings.. but can't actually move their asses to answer a mail for days after you kindly invited them because "they so much wanted to meet you and recently asked you to, please, invite them".&lt;br /&gt;Bull-shit !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112594215521418212?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112594215521418212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112594215521418212' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112594215521418212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112594215521418212'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/09/breaking-consoles-and-relationships.html' title='Breaking consoles and relationships'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112559531056122834</id><published>2005-09-02T02:20:00.000+09:00</published><updated>2005-09-02T02:21:50.573+09:00</updated><title type='text'>The thousand faces of programming</title><content type='html'>These days I'm very busy at work. Sometimes leaving the office after 11PM. I haven't had much time to go to the gym and I'm becoming a bit obsessed with my belly growing. I really can't afford to put more weight.. although I'm not really fat.&lt;br /&gt;Monday and today (Thursday), on lunch break I went to the swimming pool at the gym near work. There I could relax a bit and lay for a little while under the sun.&lt;br /&gt;I'm not a big fan of outdoor activities, especially not the beach etc, however it's a bit depressing to see the summer go away. My body is generally a too cold and I should try to get some sunlight when I can.&lt;br /&gt;&lt;br /&gt;At work I'm dealing with network programming. Suddenly, everything is message driven and tasks have to be subdivided by client and server side. Also, because there is no dedicated server, every console is a potential server by itself. That means that even locally some things will work by network messages, communicating by loopback.&lt;br /&gt;My experience with network gaming is rather limited, although it started as early as 1995, when I worked on the PC (MS-DOS) port of Toshinden, which as an extra feature, it supported network play thought modem !&lt;br /&gt;Most of the network work was done by the lead programmer (it was really just him and me working full time on it). What I learned from that experience is something that I still value to this day (that's to say how little my skills in that field have improved !).&lt;br /&gt;&lt;br /&gt;To the message driven nature of the application, it's added a general need to make everything work asynchronously. A message from the server may bring the request to accept or reject a game session. Then one has a message box that has to answer to, the message box needs to be open as everything goes on behind. Unlike applications, one can't really stop everything waiting for the user to respond. The game needs to stay alert as other messages could come to cancel an operation in the middle.&lt;br /&gt;&lt;br /&gt;The problem with asynchronous programming, is that a simple program flow needs to be adapted to a state machine. Things are the thought in term of: I'm in this state, if this and this happens, then jump to the next state, if something goes wrong, go to the previous state, or possibly just another state. Then there are tasks that need to be started, wait for a result to come by some network messages then stopped. Also a task may partially or totally overlap another task in execution.&lt;br /&gt;Basically, it all can get pretty confusing very quickly. There are always some exceptions that one deals with, one at the time, fixing something and breaking something else. Step by step, consistency is lost and the code becomes messy.&lt;br /&gt;&lt;br /&gt;I really don't like what's happening with my code. I blame it on the lack of time. That's generally true I think, but it's also true that if I had more experience, time now would be less of a problem.&lt;br /&gt;&lt;br /&gt;With frustration, also comes the willingness to find a clean solution to all this. Ideally, I'd like to get to the bottom of the whole message driven thing, become fluent at that kind of programming, minimizing the thinking. Also I'd generally get rid of the state-machine concept or, at least, be able to build a higher level interface which can bring me to the typical &lt;i&gt;if/then/else/while&lt;/i&gt; concepts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112559531056122834?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112559531056122834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112559531056122834' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112559531056122834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112559531056122834'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/09/thousand-faces-of-programming.html' title='The thousand faces of programming'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112524895725286175</id><published>2005-08-29T01:40:00.000+09:00</published><updated>2005-08-29T02:09:17.263+09:00</updated><title type='text'>Levigating the wheel - Error handling</title><content type='html'>I'm all for standards, but there are different kinds of standardization. When it comes to C++, the language details is clearly standardized. It's usage is not.&lt;br /&gt;This weekend I spent some time with error handling. Error handling is really painful and makes code look ugly. When I started programming several years ago, resources were tight. There was no virtual memory and no hard-disks. Errors were common and they had to be dealt with carefully.&lt;br /&gt;Nowadays I think that the error checking is generally more lax. However, my paranoia about the worst case scenarios isn't going away anytime soon.&lt;br /&gt;&lt;br /&gt;There are several ways to deal with errors. C++ notably brings the concept of exception handling. I've been reading about that but I didn't come out very convinced. It seems like one of those things a bit too complicated to be used in everyday programming. Up to now, my choice of error handling has been to return errors with return values, and to use &lt;i&gt;goto&lt;/i&gt; as a way to quickly escape from a function.&lt;br /&gt;&lt;pre&gt;//------------------------&lt;br /&gt;kerror myfunction()&lt;br /&gt;{&lt;br /&gt;    if ( problem )&lt;br /&gt;        goto exiterr;&lt;br /&gt;        &lt;br /&gt;    &lt;i&gt;// ...&lt;/i&gt;&lt;br /&gt;    return 0;&lt;br /&gt;&lt;br /&gt;exiterr:&lt;br /&gt;    &lt;i&gt;// free anything if necessary&lt;/i&gt;&lt;br /&gt;    return -1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//------------------------&lt;br /&gt;if ( myfunction() &lt; 0 )&lt;br /&gt;    puts( "Error !" );&lt;br /&gt;    &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Additionally, to make sure that errors aren't forgotten at debug time, I put an &lt;i&gt;assert&lt;/i&gt;. Actually, I have a macro that will assert and finally go to the end of the function.&lt;br /&gt;&lt;pre&gt;//------------------------&lt;br /&gt;kerror myfunction()&lt;br /&gt;{&lt;br /&gt;    &lt;i&gt;// if a problem occurs, do an assert(0) and goto exiterr&lt;/i&gt;&lt;br /&gt;    TRAP_ERR( problem );&lt;br /&gt;    &lt;i&gt;// ...&lt;/i&gt;&lt;br /&gt;    return 0;&lt;br /&gt;&lt;br /&gt;exiterr:&lt;br /&gt;    return -1;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;However, this means that I have to keep track constantly of every possible returned error value. Plus, most return values are dedicated to error handling (with some exceptions for when a pointer is returned, where NULL means error).&lt;br /&gt;&lt;br /&gt;My latest experiment is with error values as states. Basically a class has an item dedicated to be an error value. Leaving the return value to more intuitive purposes, such as a value read from a file, or a boolean to express success or failure.&lt;br /&gt;Because the error is an internal state of the class, then it can be queried at any time, without having to check at every function.&lt;br /&gt;So here it goes:&lt;br /&gt;&lt;pre&gt;//------------------------&lt;br /&gt;class MyClass&lt;br /&gt;{&lt;br /&gt;    int     value;&lt;br /&gt;    kerror  error;&lt;br /&gt;public:&lt;br /&gt;    kerror  GetError() { return error };&lt;br /&gt;    int     ReadIntValue();&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;//------------------------&lt;br /&gt;MyClass    yoyo;&lt;br /&gt;&lt;br /&gt;    a = yoyo.ReadIntValue();&lt;br /&gt;    b = yoyo.ReadIntValue();&lt;br /&gt;    c = yoyo.ReadIntValue();&lt;br /&gt;    &lt;br /&gt;    if ( yoyo.GetError() )&lt;br /&gt;        puts( "Got an error somewhere while reading !" );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is how the interface goes.&lt;br /&gt;As far as implementing it. I've made some macros here too. On failure, the TRAP_ERR macro, this time sets an error value into the &lt;i&gt;error&lt;/i&gt; member of the class. Then it exits from the function.&lt;br /&gt;I've also tried to avoid the &lt;i&gt;goto&lt;/i&gt; thing. TRAP_ERR simply returns &lt;i&gt;false&lt;/i&gt;/0 in case the function has a return value. This doesn't allow me to have a portion of the code where I can unwind the function (free resources). Possibly a problem, but time will tell, for now I'd rather avoid to have an &lt;i&gt;exiterr&lt;/i&gt; label at the end of every function. And now my functions can look a bit nicer:&lt;br /&gt;&lt;pre&gt;//------------------------&lt;br /&gt;bool MyClass::DoSomething()&lt;br /&gt;{&lt;br /&gt;    // asserts and returns false&lt;br /&gt;    TRAP_ERR( problem );&lt;br /&gt;        &lt;br /&gt;    &lt;i&gt;// ...&lt;/i&gt;&lt;br /&gt;    &lt;br /&gt;    return true;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112524895725286175?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112524895725286175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112524895725286175' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112524895725286175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112524895725286175'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/08/levigating-wheel-error-handling.html' title='Levigating the wheel - Error handling'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112490147698310923</id><published>2005-08-25T01:28:00.000+09:00</published><updated>2005-08-25T01:37:56.996+09:00</updated><title type='text'>One million distractions</title><content type='html'>I've been pretty busy recently. Also partially because I had a guest, and it's hard to sit down and write something when there is a friend around to talk to !&lt;br /&gt;The past weekend was rather busy too. Friday night I went out but without much expectations, as I was tired from the week of work anyway. Saturday I went to the swimming pool, got a vague shade of redness, thanks to the usual sun-screen protection 20 ! In the evening I went with some friend to watch the hanabi (花火: fireworks, the first kanji, &lt;i&gt;hana&lt;/i&gt; (花) means flower. The second kanji, read as &lt;i&gt;bi&lt;/i&gt; (火) means fire... simple !). In summer there are several fireworks displays in Tokyo (and all over Japan I guess). They are very good, I think Japan actually has the best fireworks technology. I did some research about Japanese fireworks when I had to make a &lt;a href="http://www.arika.co.jp/product/tgm3/tgm3mode.htm" target=_blank&gt;simple fireworks particle system&lt;/a&gt; for &lt;a href="http://www.arika.co.jp/product/tgm3" target=_blank&gt;TGM3&lt;/a&gt;.&lt;br /&gt;A technology that instead failed on me, was the cell phones' one ! I got to the station with my friend. Then I proceeded to call my other friend, which was already in a place where we were supposed to meet him. He had tickets to a large space in a driving school, for people to sit outside without any structure obfuscating the view... however, I couldn't not reach him by phone ! There was an overload of calls for that area. I managed to get to talk to him once, set a place to meet, but we failed to meet. We only met again half an hour later.. in time to see the last half hour of fireworks. Woo !&lt;br /&gt;Troubles aside, the spectacle was very good. I tried to take pics and short video clips, but there is little one can do with a standard digital camera.&lt;br /&gt;After the fireworks, we all went to my friends' home. There we watched &lt;a href="http://www.imdb.com/title/tt0070034/" target=_blank&gt;Enter the Dragon&lt;/a&gt;, very good movie. Was actually the first time for me, even though I'm a Bruce Lee's fan. I've basically seen it in all shapes because so many other movies and parodies derived form that single movie, so, finally I closed the circle by watching the original 8)&lt;br /&gt;After the movie, we all went to a club, but I somewhat regret the move, as the club was crowded as it usually is on Saturday, plus the air conditioning was worse than usual. Truly a sweatshop ! (if one considers that, us, the poor customers, actually go there to spill their guts making the rich even richer !).&lt;br /&gt;Sunday I went to the gym and then to a matsuri. A matsuri is a gathering of make-shift stands where all sorts of typical foods are sold. Many girls wear the yukata (simpler dress than kimono), some may wear a kimono. Some guys wear some typical clothes too. Sounds fun, if not for the damning heat and the amazing crowd.. woo.. too much for me.&lt;br /&gt;&lt;br /&gt;Coding, I haven't been doing that outside work. I need to start again however, fack this social bullshit. There is a lot of code to be written out there. Every day a new tool or application comes out, I could have done something too, but, no ! I'm doing social stuff. This is not good.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112490147698310923?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112490147698310923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112490147698310923' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112490147698310923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112490147698310923'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/08/one-million-distractions.html' title='One million distractions'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112412562392080753</id><published>2005-08-16T02:00:00.000+09:00</published><updated>2005-08-16T02:07:03.930+09:00</updated><title type='text'>Slowly going back to C.. again !</title><content type='html'>After this long new trial with C++, I feel like I'm sliding into back into C, although I'm still searching for the right balance.&lt;br /&gt;It's not that I don't appreciate OOP, it's rather that C++ seems to be truly messed. There is a wealth of tricks &amp; tips, templatized this and that.&lt;br /&gt;I must admit that the language is truly powerful. It allows one to do things in so many ways... but at a practical level, it has some very dull issues. I understand that C++ had to make compromises to keep the performance up. However, it doesn't really give much hope to those that wish to do clean OOP.&lt;br /&gt;Again, the single biggest issue is the fact that one must declare all members of a class in the header, including the private ones.&lt;br /&gt;I think I'm right to assume that it's a good coding practice to split larger function/methods into smaller ones. The so called "helper functions". With C++, every time one writes an helper, he/she has to go back into the include file and add the declaration for that function..  ..for large projects, we are talking about a lot of them. So much for C++ being sold as the language for large projects !&lt;br /&gt;This is a real pain for someone that has worked with Java. Java has some implicit performance issues that I don't like, nor I like the fact that it doesn't support callbacks. However, it's a language truly committed to OO, and it's nicer towards the programmer: no need to copy and paste every single function one writes !&lt;br /&gt;Keeping at the practical level, the fact that one has to expose the internals of a class along with its public declaration, it means that the code that simply wants to use the class (the user-code), may have to include a lot of useless additional header files.&lt;br /&gt;For example, let's assume that I do a 3D library. Internally it uses Direct3D, some private functions will use pointers to D3D texture objects. The user-code will be forced to have Direct3D headers included. This lacks of elegance, but, most importantly, can sensibly slow down compilation times.&lt;br /&gt;&lt;br /&gt;Many C++ promoters will promptly answer that there are ways around this. Like, for example, building a hidden base class that the user-code sees as a pointer (thanks to forward class declaration). This however adds more work to do, possibly more include files... takes time on the programmer, and, personally, makes me feel like my code is not tidy.&lt;br /&gt;My apartment often ends up being messy, but my code, I really want that nice and simple. I need a streamlined way to write code that looks good.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112412562392080753?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112412562392080753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112412562392080753' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112412562392080753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112412562392080753'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/08/slowly-going-back-to-c-again.html' title='Slowly going back to C.. again !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112396907497436147</id><published>2005-08-14T06:33:00.000+09:00</published><updated>2005-08-14T06:37:54.980+09:00</updated><title type='text'>Ashamed to be Italian</title><content type='html'>Italy is good, it's fun, we have so many ruins from our glorious past, so much history, the food is good, etc etc.&lt;br /&gt;The country is rotten. Much of my contemporary culture belongs to Italy. Italian language is the one I clearly speak the best, and it's the one that can give me real good laughs (possibly the most important thing in life). I was brought up by a great family. My relatives sometimes resemble to saints. However, Italian culture is mostly wrong (principalmente sbagliata). It does not really make a point of being honest and altruist. That is left to Catholic religion.. (quello e' lasciato alla religione cattolica) which is clearly optional. Often people that go to church are the same that commit the worst crimes.&lt;br /&gt;Recently, just came back the "sport" of throwing rocks into freeways (lanciare pietre sulle autostrade). Just yesterday a person died, 5 are injured, one critically.&lt;br /&gt;Some individuals are rotten (marci), but I blame (accuso) the culture. Nobody (nessuno) in school ever taught (insegnato) me to be a good person. I sometimes had classmates that were bastard robbers (ladri), their parents clearly didn't do their job right (non hanno fatto bene il loro lavoro), teachers clearly didn't have any instructions on how to educate the fuckers. In any case, not all teachers would have been up to their tasks (in ogni caso, non tutti gli insegnanti sarebbero potuti essere all'altezza del loro lavoro (di educare)) (I admit I may have been lucky with my teachers too, but also my parents always made sure I wouldn't get bad teachers).&lt;br /&gt;I'm ashamed to be Italian, and if one day I'll ever be given the option to switch (cambiare) my citizenship (cittadinanza) from Italian to Japanese, I'd probably do that.&lt;br /&gt;I'm clearly Italian, but most of all I belong to my family (principalmente appartengo alla mia famiglia). The elements of my family that I know, are all much better than the average Italian population (poplazione italiana media). Only one time I've ever stolen something. I must have been 6 or so. I did it because I must have had a bad influence. I felt bad as I did it (sono stato male gia' facendolo), then, at the next occasion, I made sure to bring back the item (ritornare l'oggetto), even though (benche') nobody ever saw me doing anything (at least I think). And I've been ashamed of myself since then.. even though no damage was done.&lt;br /&gt;Yet, there are motherfuckers out there (ci sono delle teste di cazzo in giro), that are such low-lives (che sono tali vermi) that they have to try and kill other people (hanno dovuto provare ad uccidere persone), just to feel important.&lt;br /&gt;Those people deserve not the death penalty (non solo la pena di morte), but the torture &amp; death. However, one should consider their parents, which didn't do their job right, but may have some excuses.. when you send your kid (figlio/a) to school, you never know who he/she is going to meet in the class.&lt;br /&gt;&lt;br /&gt;The bottomline (la morale) is that the system is fucked. Some may wish to fix it (alcuni vorrebbero aggiustarlo). I just want to get out of it (much like I did when I needed to work for real). I don't want to be Italian, the average Italian (italiano medio) doesn't fit me, also there are too many robbers (try go visiting Naples and see what you &lt;b&gt;don't&lt;/b&gt; get stolen (quello che non ti fregano)), and, apparently, depressed, potential killers.&lt;br /&gt;&lt;br /&gt;As of now (d'ora in poi), but actually for a few years already (di gia'), Italy to me, only means my relatives and my friends (significa solo i miei parenti ed amici). The rest (il rimanente), it's what I know too well to like (quello che conosco troppo bene per piacermi). Sure, many good and great people.. but, on average (in media), a fucked up culture (una cultura ridotta a merda).&lt;br /&gt;&lt;br /&gt;In conclusion. I really hope that those people that threw rocks onto the freeway get caught (vengano presi) as soon as possible. I also wish that someday death penalty will come back in exercize (ritorno della pena di morte), because you can't voluntarily kill someone and not be killed yourself (non si puo' ucciredere volontariamente, e non essere uccisi di riflesso). You got a bad education ? Too late (troppo tardi per te).&lt;br /&gt;&lt;br /&gt;..post with Italian explanations of what I think that may be harder to read for Italians that don't have much experience with the English language 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112396907497436147?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112396907497436147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112396907497436147' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112396907497436147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112396907497436147'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/08/ashamed-to-be-italian.html' title='Ashamed to be Italian'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112317514457848285</id><published>2005-08-05T02:03:00.000+09:00</published><updated>2005-08-05T02:05:44.586+09:00</updated><title type='text'>What you see is what you may forget</title><content type='html'>It's already late. No time for coding.&lt;br /&gt;Tonight I watched &lt;i&gt;A Beautiful Mind&lt;/i&gt; a movie generously passed on me by a friend.&lt;br /&gt;It was more or less as long as I expected. The story however was more interesting, although a bit too dramatic for my taste. It's based on a true story, so I can't really complain too much (hey man change your life !).&lt;br /&gt;Considering some of my recurrent topics, I had to like the parts where the protagonist logically analyzes women met at social events.&lt;br /&gt;As a side effect, the movie got me thinking about intelligence, personality, life (boom !).&lt;br /&gt;One thing that I don't accept very well is the fact that memory is so unreliable. We experience things but memorize them in a very "lossy" compressed format.. and when we go pick up the memories, they could easily be overly distorted (they are already clearly distorted by definition because of the nature of the compression !).&lt;br /&gt;There is always a special twist that one puts when bringing back memories, sometimes big chunks are missing, sometimes we think we remember something since our childhood, but it could well be a creation. One may doubt that a memory of some event got distorted with time, one could even try to account with that, but the memory itself could be 100% inaccurate.. a creation of some remote past that evolved with time, a creation of some recent past, or even a current creation that one thinks is an actual memory or a possible past creation.. but that is in fact just a current creation.&lt;br /&gt;Simply put: I remember I was a kid and I had this toy car in my hands. Maybe I wasn't quite like that. Maybe it's a memory I had created in my teenager years. Maybe I'm just imagining it now. Maybe I will keep imagining it into the future. Maybe I will not.. ...a potentially totally unreliable situation.. worst case scenario !&lt;br /&gt;&lt;br /&gt;This is a very contorted way of thinking, but it's also something that one has to account for, when striving for truth.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112317514457848285?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112317514457848285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112317514457848285' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112317514457848285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112317514457848285'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/08/what-you-see-is-what-you-may-forget.html' title='What you see is what you may forget'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112308796610806463</id><published>2005-08-04T01:47:00.000+09:00</published><updated>2005-08-04T01:52:46.120+09:00</updated><title type='text'>Models and butterflies</title><content type='html'>Today I was weighting 72.10 Kg. It's probably a bit less than that since I didn't go to the restroom (cough cough). However I'm clearly fatter..&lt;br /&gt;I've been eating more than necessary again and also I've been going less often to the gym. Recently I've been going to the gym near work. Before I used to go more often to the one in Shibuya, where they had this rubber model of 1 Kg of fat which looked big and nasty.. rather inspirational !&lt;br /&gt;&lt;br /&gt;Yesterday night I saw the movie "The Butterfly Effect". The so called &lt;i&gt;butterfly effect&lt;/i&gt; is a short description of the theory by which small, apparently insignificant events, can lead to a path of much greater events.&lt;br /&gt;The story was pretty good, although the scenario wasn't really pushing the contrast between actions and reactions. It really didn't force any awesome disparity of weight or prolonged levels of indirection between action and reaction. Still, it was pretty entertaining, although definitely dramatic and potentially disturbing.&lt;br /&gt;Without giving up too much, let's just say that the protagonist can somewhat picture himself in alternate presents depending of his past actions.&lt;br /&gt;&lt;br /&gt;As usual, after the movie I went to check it on &lt;a href="http://imdb.com"&gt;imdb.com&lt;/a&gt;. I looked up on the protagonist and read his short biography. Funny enough, the guy was studying biochemistry when he left the studies in order to become a model ! ..Talk about butterfly effect !&lt;br /&gt;&lt;br /&gt;This brings up a recurring thought of mine. What if... I were a stud for example !!&lt;br /&gt;I'm not the ugliest person around, nor the most introverted, but surely I'm no model material (who really is a model ? This will take a separate story (anticipation: lots of people 8)).&lt;br /&gt;What if, I had the looks that made women heads turn as I walked in the streets ? How good would that be ? Where would my life be today ? Backward question: how many hot looking dudes and dudettes are in the software engineering business ?&lt;br /&gt;Looks is one thing but there is more: money, character. What if I were born rich and I had no need to prove myself ? What if I were more extroverted and socialized with hundreds of people ?&lt;br /&gt;..those are some problems too !&lt;br /&gt;You are trying to study something and foxy girls keep calling your phone.&lt;br /&gt;You buy the hottest sports car and floor it one time too many.&lt;br /&gt;You end up in some party, but there are no beers there, only champagne and drugs.&lt;br /&gt;&lt;br /&gt;So, I guess I'm generally happy with whatever brought me to be myself. And, as far as the looks goes, sometimes I see some people and I think "wow maybe I should look like him", but it's usually a very neutral face, without any strong emotions or any strong features, definitely not on the attractive side !&lt;br /&gt;Clearly, the media pushes all those studs, and my animal instinct tells me that I should have a 30cm jaw to better attract mates... but in the end, my real happiness comes with the ability to use my brain, and for that, I need an neutral face.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112308796610806463?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112308796610806463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112308796610806463' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112308796610806463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112308796610806463'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/08/models-and-butterflies.html' title='Models and butterflies'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112282937547325228</id><published>2005-08-01T01:48:00.000+09:00</published><updated>2005-08-01T02:02:55.480+09:00</updated><title type='text'>The overdoing tendency of C++ programming::Nested classes</title><content type='html'>To enjoy programming one has to enjoy playing with logic. A very important logical concept is to see things in an hierarchical fashion. With C++ one can create classes of classes (or nested classes). Each class has a scope or domain of influence. A sub-class will clearly imply a sub-scope.&lt;br /&gt;So, for an online game for example, one has a class Session, a subclass Lobby and another subclass Player (let's assume that the design of the hierarchy is accurate for our purpose).&lt;br /&gt;With nested classes it goes:&lt;code&gt;&lt;pre&gt;class Session&lt;br /&gt;{&lt;br /&gt;    class Lobby&lt;br /&gt;    {&lt;br /&gt;        class Player&lt;br /&gt;        {&lt;br /&gt;        };&lt;br /&gt;    };&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;To declare a player type now, at the main level it goes:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;Session::Lobby::Player myplayer;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Within a method in Session it's:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;Lobby::Player myplayer;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;And a method in Lobby will just need to do:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;Player myplayer;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;This definitely makes sense. Each class has it's own scope. In Lobby, a Player type is clearly a Session::Lobby::Player.&lt;br /&gt;&lt;br /&gt;I tried working with this. I wanted this feature to be useful but, in the end it just generated a lot of confusion.&lt;br /&gt;First of all, nested class declarations must be done all at once. One doesn't have anymore the luxury to have a separate header file for every type. It all goes in one big file, and it surely gets pretty ugly to look at.. and to understand. &lt;br /&gt;If this would have been possible:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;class Session&lt;br /&gt;{&lt;br /&gt;};&lt;br /&gt;class Session::Lobby&lt;br /&gt;{&lt;br /&gt;};&lt;br /&gt;class Session::Lobby::Player&lt;br /&gt;{&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;...one could at least try to take the feature more seriously.&lt;br /&gt;&lt;br /&gt;But even then, the sub-scope declarations not only can create confusion at the global level (could end up with several Player types), but also create confusion at all sub-levels. In this case, one ends up dealing with three different declarations for the type Player:&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;Session::Lobby::Player&lt;/code&gt;, &lt;code&gt;Lobby::Player&lt;/code&gt; and &lt;code&gt;Player&lt;/code&gt; ..phew !!&lt;br /&gt;&lt;br /&gt;Eventually I went back to the:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;class SessionLobbyPlayer&lt;br /&gt;{&lt;br /&gt;};&lt;br /&gt;class SessionLobby&lt;br /&gt;{&lt;br /&gt;};&lt;br /&gt;class Session&lt;br /&gt;{&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;It's not as stylish and one may end up doing slightly more typing but, generally, it avoids a lot of confusion.&lt;br /&gt;&lt;br /&gt;In conclusion, with C++ one feels like if he doesn't use all the features, he's missing on something, somewhat at fault. I think however that one has to be pragmatic. C++ is a language in continuous design. There is a bunch of people that mostly really do just that. They spend a lot of time thinking around features. Those people are much like teachers. They are the gods of C++, their business is to keep C++ expanding, so that they can be on top of it, write books about it and generally keep their status of god-at-something.&lt;br /&gt;Then, there are the poor programmers, those that spend most of their time developing real software. They clearly can't grasp all the features and subtleties of C++ nor they should, as the time spent learning all the features and possible applications, is a job on itself, only really useful if one plans on writing C++ books, teaching C++ or writing C++ compilers.&lt;br /&gt;&lt;br /&gt;Still, it's not fair. It's not fair that I'm an experienced programmer, it's my job, my passion and still, I have to use a language that it's poisonous to master (too many misleading features). Makes me feel as I'm somewhat less as a programmer....&lt;br /&gt;&lt;br /&gt;...ummmmm...&lt;br /&gt;&lt;br /&gt;...fuck...&amp;nbsp;&amp;nbsp;&amp;nbsp;...you !!!&lt;br /&gt;&lt;br /&gt;8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112282937547325228?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112282937547325228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112282937547325228' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112282937547325228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112282937547325228'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/08/overdoing-tendency-of-c.html' title='The overdoing tendency of C++ programming::Nested classes'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112215410522344243</id><published>2005-07-24T06:27:00.000+09:00</published><updated>2005-07-24T06:28:25.230+09:00</updated><title type='text'>Sblog it out !</title><content type='html'>The tendency is to go to bed instead of writing out what you have in mind. This is the tendency, what one normally does, but it's contrary to the idea of keeping a diary !&lt;br /&gt;So now.. we sblog it out as a form of discipline !&lt;br /&gt;Today I felt the biggest quake ever (for me). I promptly went to the flexing furniture that was holding the projector. I did already bind it with some rope, but the whole furniture may have fell off (nothing too heavy, just something standing on some screwed in wooden poles).&lt;br /&gt;The shaking had me worried, in my mind the running thought was "the big one, the big one" ..actually in English, because that's really how I learnt the expression (in California, nonetheless).&lt;br /&gt;At night I went for dinner to a friend's house. He cooked some good pasta. We ate that and some prosciutto (Italian ham) that his mother sent thought his sister that recently visited Japan.&lt;br /&gt;We then spilled onto the streets of Roppongi to proceed with the nightlife rituals. We met another Italian friend, moved from club to club.&lt;br /&gt;We met several known people in the process. We were actually betting on whom we would have met. Some we guessed, some we couldn't possibly have guessed.&lt;br /&gt;The interesting part of all this, is of course the hints that one may or may have not gotten. Hints related to the world of socializing. What does one girl mean with her glance ? What catches her eye ? What makes her look away almost immediately ? How long is the fraction of a second that tells difference about her taste, as she looks away ? -&gt; Does 1/10th of a second mean that she is interested, as opposed to 1/20th of a second ? How about all the time that she looks at you while you don't know it ?&lt;br /&gt;A lot of information is floating all around the environment and it isn't formally rationalized. A girl tells me that I look nice in blue. That I should wear blue or white (?!). A guy spontaneously gathers friends (male and females) around the staff thanks to his looks (including behavior) which in a way makes him sympathetic towards others. I meet some old acquaintance and, as we both play cool, the background complexities that kept us away (common friends/ex-friends) are somewhat felt.&lt;br /&gt;&lt;br /&gt;In the end, this is in a way my money's worth, although I'd still be much happier if I could rationalize the whole experience and put it down into a formula &amp; parameters. A mathematical representation wouldn't be necessarily accurate as the perception would still be human.. however it would be much better than just experiencing and trying to keep all in mind for the future.&lt;br /&gt;Basically it's a lot like solving a problem mathematically or thought a neural network. The neural network, with enough valid experience samples, gives out good predictions.. however it doesn't logically (mathematically) explain things. So, it's really a solution good for the user but not much for the "developer". I don't want to be good at the game, I want to understand the complex details of it !&lt;br /&gt;&lt;br /&gt;mumble&lt;span style="font-weight:bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112215410522344243?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112215410522344243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112215410522344243' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112215410522344243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112215410522344243'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/07/sblog-it-out.html' title='Sblog it out !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112196274072313154</id><published>2005-07-22T01:09:00.000+09:00</published><updated>2005-07-22T01:19:00.730+09:00</updated><title type='text'>Cooking consoles</title><content type='html'>Two days ago an XBox 360 prototype (actually a beta devkit) died on me. I was definitely not pushing the limit. Certainly my office isn't freezing cold.. however those things are to be expected with prototypes.&lt;br /&gt;When I was working at Squaresoft, around the time when PS2 was announced, there was a rumor in the company that in the offices in Japan a PS2 prototype caught on fire 8)  ..eheheh&lt;br /&gt;Today I worked until about 9:30 PM.. there is definitely a lot of work to do and, most importantly, much of the work is of unknown nature. Basically new consoles always bring new things. This time around MS is really pushing the Live (online playing) feature. Every game has to have it. Although the documentation is all there, there is still quite a bit of work to do, to understand and implement everything. Making a game to run online is no joke. It's surely very appealing to the player (and to MS, which can bill gamers 8), but the burden added to the developer is substantial.&lt;br /&gt;So, while this generation of consoles is much easier to program on the graphics level (it's either DirectX or OpenGL), these kind of added features are enough to keep the developer busy. It quite possibly may require an extra person to work on the whole network thing.. especially for the first kind of such titles.. where completely new code has to be written.&lt;br /&gt;I'm also not quite sure how things work with the usual real-time game data communication. My experience is that lag and various Internet data transfer uncertainties can keep a developer pretty busy playing around with parameters and techniques to get the thing running reliably.&lt;br /&gt;It's not fun to have to deal with all these issues while on a schedule. It's already too early to predict how much time it will all take. Once I'll have a clearer idea.. is when I'll have to start working until late in the evening..&lt;br /&gt;&lt;br /&gt;Ummmmmmm !!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112196274072313154?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112196274072313154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112196274072313154' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112196274072313154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112196274072313154'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/07/cooking-consoles.html' title='Cooking consoles'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112170930069565677</id><published>2005-07-19T02:51:00.000+09:00</published><updated>2005-07-19T02:55:00.700+09:00</updated><title type='text'>One, two, three..</title><content type='html'>On Friday, with a long weekend coming, the premise was to be somewhat productive. However, things didn't turn out as good.&lt;br /&gt;Friday night I went out with some friends, Saturday night with some other friends, Sunday night went out again !&lt;br /&gt;Saturday I went to a the swimming pool with a friend. We arrived there at 4PM or so. The weather was cloudy. Nothing much really came out of it 8)&lt;br /&gt;My friend again went today (Monday). He went at around 12:30PM.. eager to get some tan.. with a newly purchased level-50 sun-screen ! Clearly a confused choice pushed by the clerk at the drug store.&lt;br /&gt;He left at 3PM, called me, I went there at 4PM and then we both got into the pool again. This time he didn't put any sun-screen, and actually tried to wash off every bit he had put before... he should have done like me: slept into the afternoon and got there at 4PM.. because in the end we got the same "tan", even though I did put some level-20 screen.&lt;br /&gt;&lt;br /&gt;Clubbing around turned out fun. I went to one of those clubs mostly for foreigners. I invited a friend and another friend of hers. However, because I tried doing that in Japanese, I told her "I'll get in touch" while I really ment to say: "keep in touch/let me know". That had me a bit worried: how many times have I made this mistake before ? Being a beginner at a language is surely a dangerous thing.&lt;br /&gt;The fun and spooky part of these clubbing sessions was that I'd go and meet people that I knew. Mostly ex-partners of friends. It's a situation that can complicate things, but at the same time, it's nice to go to a place and find some sort of ally !&lt;br /&gt;Chance also wanted that I met a Japanese girl that spoke Spanish ! Spanish is very close to Italian. I did practice a lot of listening (I sometimes watch Spanish language soap-operas), but I never tried to actually speak it.&lt;br /&gt;It's was a bit odd but definitely fun. I tried to speak Japanese and Spanish all the time with her... a doubly-learning experience.&lt;br /&gt;&lt;br /&gt;..I guess I have been somewhat productive then.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112170930069565677?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112170930069565677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112170930069565677' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112170930069565677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112170930069565677'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/07/one-two-three.html' title='One, two, three..'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112118637909651426</id><published>2005-07-13T01:35:00.000+09:00</published><updated>2005-07-13T01:39:39.103+09:00</updated><title type='text'>I reboot your console !</title><content type='html'>I've been meaning to update the blog, but I clearly have not !&lt;br /&gt;Last Friday I didn't go out. I did go out on Saturday, but I came back home early (so to speak). On Sunday afternoon I almost went to the pool with my friend Marco. However I've underestimated the weather and aimed to go for the gym instead.&lt;br /&gt;Once outside, we realized that the Sun was good, so we went for a walk. I'm usually pale white and my body sometimes gets a bit too cold. I definitely need to sleep more at night and also need to get more acquainted with the Sun !&lt;br /&gt;&lt;br /&gt;I haven't really been coding much at home. Ten minutes here and there, changing the video capture code to work directly with RGB instead of YUV.. now that I realized that YUV is more a legacy than anything.&lt;br /&gt;I've also been spending quite a bit of time posting on &lt;a href="http://www.playfields.net" target=_blank&gt;Playfields.net&lt;/a&gt;, the Italian game developer's message board.&lt;br /&gt;Posting, following threads, it's all very time consuming, but it's something that I don't do constantly, so I'm forgiving myself for now. It's also somewhat useful to talk about certain things (including 3D) and when people flame, well that's fun too 8)&lt;br /&gt;&lt;br /&gt;At work I've been a bit frustrated with some new technology, which of course I'm glad to be working on, but at the same time I feel a bit powerless as I realize that I have to develop something, following a schedule, on a technology which is itself in a development phase, and therefore unreliable.&lt;br /&gt;&lt;br /&gt;I've spent the last few days turning off and on consoles, restarting programs, rebooting Windows.. while keeping an eye on the project specs (written in Japanese) and trying to give a feedback on the technology itself.&lt;br /&gt;&lt;br /&gt;I'd like to write how screwed up sleeping hours made me get late to work, but that would actually contribute to further screw up my sleeping hours, so I'll leave it at that 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112118637909651426?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112118637909651426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112118637909651426' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112118637909651426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112118637909651426'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/07/i-reboot-your-console.html' title='I reboot your console !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112049692710555353</id><published>2005-07-05T02:08:00.000+09:00</published><updated>2005-07-05T02:08:47.120+09:00</updated><title type='text'>The movie-maker</title><content type='html'>A rather un-inspiring weekend. Went out Friday and Saturday, but really not in the mood to get wild (not that I ever really do), nor to do "phone-number begging" (not that I ever really do).&lt;br /&gt;I did however sleep quite a bit on Sunday. Also the weather was bad, so I stayed at home all day. It's actually been raining for a few days already.&lt;br /&gt;Today I went to the gym. Ran about 3 kilometers. I weighed at 70.40 Kg. That means that I'm keeping my weight, actually lowering it: 0.05 Kg less. Even though recently I keep going to the gym just once per week.&lt;br /&gt;&lt;br /&gt;I've been on and off, trying to do some video editing. I have footage of a recent gathering at the home of a friend. I'm trying to get something out of it.&lt;br /&gt;The biggest problem is the quality of the shots. It's all jerky and the contents are far from scripted. Whomever takes the shot (me included), it hardly ever comes out something really useful. Especially if one would like to put things in a logical sequence.&lt;br /&gt;Recently I've been trying to put music in background. That works well when there isn't much yelling and screaming, basically on outdoor shots. That's not the case for what I have here, so I need to make the best of what people say, edit it in a way that it's not boring, but that isn't unfair either.&lt;br /&gt;This time I'm experimenting with chopping dialogues as to give the impression of a faster pace. Not sure what the technical term would be. I've seen it used on some recent serial TVs 8)&lt;br /&gt;I've also been close to twist a sequence and make it seem like a friend is talking bad of the girlfriend of another friend.. A few cuts and what is a positive remark, can turn into a negative comment. I'm trying to avoid that, but at the same time it makes me think on how many times I see something in TV and I'm perhaps being fed the wrong message, thanks to malicious editing or by mistake.&lt;br /&gt;&lt;br /&gt;In any case this editing is taking quite a chunk of time. Encoding will take a few more hours too. De-interlace is a must if one isn't encoding a DVD. That takes time. Noise-reduction is also pretty important for indoor shots (especially with my aging camera), that takes quite a bit of time too. Color correction is also important, that probably doesn't take much time..  ..ops, I'm supposed to work in the color space thing !&lt;br /&gt;&lt;br /&gt;I better go to sleep. Poof !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112049692710555353?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112049692710555353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112049692710555353' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112049692710555353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112049692710555353'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/07/movie-maker.html' title='The movie-maker'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-112006394039994905</id><published>2005-06-30T01:43:00.000+09:00</published><updated>2005-06-30T01:52:20.406+09:00</updated><title type='text'>Quantization in HSV color-space</title><content type='html'>The past two nights I've been toying around with Matlab, making experiments with color spaces. Specifically, I worked on the idea of completely separating luminance from chrominance.&lt;br /&gt;I did a few experiments, but the one that I want to report about is with HSV. HSV color model separates hue, saturation and value (or luminance/intesity). There are actually three similar but different models: HSV, HSL and HSI, but for my purpose, that doesn't make much difference.&lt;br /&gt;The experiment is about removing information on any of the three channels, to see which one is the most important, and how I can reduce the information while minimizing the visible artifacts.&lt;br /&gt;I proceeded to created three different images, each leaving 2 channels intact, and one strongly quantized. For the intact channels, I kept the original 256 levels. While the quantized one was reduced to 8 levels.&lt;br /&gt;&lt;br /&gt;Here is the original image:&lt;br /&gt;&lt;img src="http://kazzuya.com/blogdata/050630_akiba_aibo.png"&gt;&lt;br /&gt;&lt;br /&gt;Here a are the resulting images:&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/050630_quant_hsv_aibo.jpg" target=_blank&gt;&lt;img src="http://kazzuya.com/blogdata/050630_quant_hsv_aibo_ico.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On the first row, there is the &lt;i&gt;hue&lt;/i&gt; component, &lt;i&gt;hue&lt;/i&gt; component with only 8 levels and then the image built using the quantized hue.&lt;br /&gt;The second row expresses the same process, only this time quantizing the &lt;i&gt;saturation&lt;/i&gt;.&lt;br /&gt;On the third row the &lt;i&gt;value&lt;/i&gt; (gray levels) is being quantized.&lt;br /&gt;&lt;br /&gt;As expected, messing with the hue can be pretty messy. The color sensibly shifts and what's green becomes brow !&lt;br /&gt;The gray-level image is also visibly affected by quantization. It's probably the worst of the three, but that doesn't worry me, because it's supposed to be compressed the JPEG way (quantization on DCT transformed data, in frequency domain).&lt;br /&gt;Quantization on saturation is really not that much of a big deal, and that's also what I was expecting.&lt;br /&gt;&lt;br /&gt;So, now the real issue is with &lt;i&gt;hue&lt;/i&gt;. The quantization clearly has some drastic effects. Using DCT would lead to some serious artifacts, as the ringing artifacts would bring, for example, cyan and yellow pixels around an original green one. Or perhaps I'm worrying too much. However, there would still need to be some special preprocessing, because hue values have a discontinuity on red. 255 and 0 are both very close to red. The lossy DCT would make a mess between 0 and 255 because it's a drastic change.&lt;br /&gt;&lt;br /&gt;Also it has to be noted that the quantization performed here was rather dumb, because I'm not selecting the most 8 used values, but I'm blindly rounding original values to 8 fixed ones (on a 256 scale that's 256/8 = 32, selected values are 0, 32-1, 64-1, .., 256-1).&lt;br /&gt;Using an actual palette of used values would ensure that no brown comes up where green should be. The green value would come into the palette as the most used one, instead of being snapped to a fixed value.&lt;br /&gt;&lt;br /&gt;Next, I should probably try to properly quantize the hue, building a palette of used values. Possibly building separate palettes for separate areas of the image.&lt;br /&gt;&lt;br /&gt;mumble&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-112006394039994905?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/112006394039994905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=112006394039994905' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112006394039994905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/112006394039994905'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/quantization-in-hsv-color-space.html' title='Quantization in HSV color-space'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111980559174714951</id><published>2005-06-27T02:02:00.000+09:00</published><updated>2005-06-27T02:07:00.570+09:00</updated><title type='text'>Another Japanese summer begins</title><content type='html'>Summer has arrived and so did the humidity. Sweat smell is becoming more and more common. It's pretty bad. I think, mostly due to the general humidity level, people's sweat smells comes in a specific flavor. I'm rather dutiful with my igene, so I'm normally OK, however my wallet now started to smell ! I changed it last year because the old one was smelling. The old one was made of synthetic fabric, the new one is in leather, but still.. From now on I need to be more careful about the wallet too !&lt;br /&gt;&lt;br /&gt;Another nasty problem with humidity is that the towels tend to get a bad odor very easily. I go wash my hands, I dry them with the towel, I go back to the desk.. and boom.. my hands stink !! Then I have to go get a fresh towel, wash my hands again (more than before) and dry them with the fresh towel (which is not quite as fresh anymore 8).&lt;br /&gt;What a mission !!&lt;br /&gt;&lt;br /&gt;Although air conditioners are just about everywhere, it's hard to enjoy outside activities. Even at night the situation is pretty bad. One can't just sit outside and enjoy the breeze. There isn't any in Tokyo, and it would be hot an humid anyway !&lt;br /&gt;From the news, I see that Italy isn't faring too well. Two years ago I went for a summer vacation in August and I came back with a cold and several mosquito bites. The cold was due to the fact that the heat was so bad that I had to sleep with a window open and a fan directed on me (!). Another fan was by the window, one more on upstairs (same room, partially divided vertically) near my sister's bed.&lt;br /&gt;Last year the heat wasn't so bad, this year seems to be bad again... and my parents still can't decide on putting an air conditioner in the house.&lt;br /&gt;&lt;br /&gt;Now that the weather talk is settled...  this weekend I didn't even try to be a nightlife lion (an Italian say goes: &lt;i&gt;di notte leoni di giorno coglioni = lions by night, idiots by day&lt;/i&gt;). Friday, I went out, but came back relatively early. Saturday I came back even earlier and I did some coding !&lt;br /&gt;&lt;br /&gt;On the coding side, I put my hands on a copy of Matlab. I need to find a solution with Scilab, as I can't really afford Matlab. Especially, I doubt I'd be taken too seriously if I asked my employer to get a copy of Matlab (ah ah ah !!!).&lt;br /&gt;All I really need from Scilab is the function to load and save images, even a mere BMP format. Maybe a few more functions would be nice. There is a &lt;a href="http://siptoolbox.sourceforge.net/" target=_blank&gt;free toolbox&lt;/a&gt; for image processing with Scilab, however, the Windows version is apparently outdated and it requires an old version of ImageMagick to work. That really set me off, as I didn't want to uninstall the new ImageMagick and replace it with an old one !&lt;br /&gt;However, upon careful read, it seems that the SIP toolbox needs to have the ImageMagick directory specified. This probably means that I can make the two versions of ImageMagick co-exist on my system.. not very clean, but I'll have to try that.&lt;br /&gt;&lt;br /&gt;mumble mumble&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111980559174714951?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111980559174714951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111980559174714951' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111980559174714951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111980559174714951'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/another-japanese-summer-begins.html' title='Another Japanese summer begins'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111937538997634733</id><published>2005-06-22T02:35:00.000+09:00</published><updated>2005-06-22T02:36:29.983+09:00</updated><title type='text'>Somewhat emotive but not instinctive (all spell-checked !)</title><content type='html'>It's almost 2AM. Yesterday night I couldn't sleep until around 5 ! It was dreadful, I had to call in sick, although only for the first half of the day. I went in at 1PM instead of 10AM.&lt;br /&gt;Once I got in the office however, I was for most part, adrenalinic. I wrote quit a bit of code without dangling too much. Clearly productive, mostly due to the fact that I didn't have to wake up at 9, shower, run, eat one large meal, etc.&lt;br /&gt;&lt;br /&gt;M4D has finally gotten a decent shape. I added hooks to the model, material and texture classes. The hooks are a user-data pointer and a user-data-delete callback. Those hooks allow me to attach rendering related structures. A texture class will normally have just the name of the texture file, the attached user-data will provide a pointer to a structure/class used by the rendering subsystem.. which will contain whatever data is necessary to feed to OpenGL or Direct3D for actual rendering. Same goes for the &lt;i&gt;model&lt;/i&gt; class, which, when is a &lt;i&gt;mesh&lt;/i&gt; (a model that contains geometry) will have an hook to vertex and triangle data that can be fed directly to OpenGL (or, again, eventually, Direct3D).&lt;br /&gt;I'm so far pretty happy with this, because it allows me to have a pretty solid and generic underlying engine which can be a starting point for actual hardware and API-dependent engines. Generality always comes to a price, but thinking optimized for a specific hardware and API from the start is comes to a bigger price. Generality was also the key-point for me, as the main goal was really to have a framework for 3D geometry storage and processing.&lt;br /&gt;&lt;br /&gt;I should be in bed after this, but I need to add more 8)&lt;br /&gt;A couple of days ago, on the &lt;i&gt;movie channel&lt;/i&gt; on cable, I saw again &lt;a href="http://imdb.com/title/tt0238380/" target=_blank&gt;Equilibrium&lt;/a&gt; (ohh, I see why they showed it again, it's with the protagonist of Batman Begins 8). The movie is about a society where emotions are repressed with a &amp;quot;medicine&amp;quot; and fascist-style policing, as to avoid wars, which are touted as side-effect of people being influnced by emotions.&lt;br /&gt;The topic is too big to be analyzed at 2:21AM.. but I think that the question is very big even at a personal level. In life I look back an see how the things that I could achieve were achieved thanks to focus and commitment, avoiding emotions, which normally would make one derail.&lt;br /&gt;The movie shows that emotions are the essence of human life and shouldn't be avoided. However, it's also true that the human being's main strength is the ability to override instincts for a greater goal. The movie (probably by design) doesn't go deep enough to reveal that while emotions are generally good, they are also a lot more valuable than instincts. Instincts can bring some emotions, but not as refined as those that are brought by actions which are done while containing instincts ! (did I write that right ? ummm)&lt;br /&gt;Basically, instinctively, people could fack around and crack each other's skulls over some edible or some fuckable. Emotionally, it makes more sense to think twice before acting and use more logic.&lt;br /&gt;&lt;br /&gt;The problem really, is that many let themselves go for instincts and forget about the more refined emotions. It's something that everyone should think about. It's something that can make a great difference in life.. the difference between being a sheep and a human.&lt;br /&gt;&lt;br /&gt;And now it's my time to go count the sheep !&lt;br /&gt;&lt;br /&gt;zzzzzzzzzzzzzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111937538997634733?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111937538997634733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111937538997634733' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111937538997634733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111937538997634733'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/somewhat-emotive-but-not-instinctive.html' title='Somewhat emotive but not instinctive (all spell-checked !)'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111928622744803471</id><published>2005-06-21T01:48:00.000+09:00</published><updated>2005-06-21T01:50:27.453+09:00</updated><title type='text'>Gadgets, widgets, buttons, windows and libraries</title><content type='html'>Today I was... sleepy ! Yesterday night, I realized that I had no sleeping pills.. without them it's always an issue.. especially for the day after !&lt;br /&gt;&lt;br /&gt;zzzzzzzzz&lt;br /&gt;&lt;br /&gt;Since last week, I did some research about writing GUI applications. More specifically, I wanted to give a try to those publicly available libraries such as &lt;a href="http://www.wxwidgets.org" target=_blank&gt;wxWidgets&lt;/a&gt; and &lt;a href="http://www.fltk.org" target=_blank&gt;FLTK&lt;/a&gt;. Those libraries have great support. They are all more or less multi-platform, they come with lots of sample code and documentation.. So I figured, now that I've got a bit more acquainted with C++, that I'd give a try again and see if they looked any nicer from last time I checked them.&lt;br /&gt;wxWidgets code doesn't compile straight away under VS.NET. I had to make some manual changes to some library names, then it worked. It's all based on sub-classing, something that I don't particularly like. Also, events are handled using a lot of defines (so much for C++ design 8). The nice thing is that the GUI on Windows, really does look like Windows.. and not worse, like for FLTK.&lt;br /&gt;FLTK as a much cleaner programming interface, a window is an object and it's created when it's needed, without inheritance. Unfortunately, even the edit boxes seem to be somewhat custom. So, the Japanese input is lost (some patch does support it). Also the file requester is completely custom, and definitely not as nice as the standard MS Windows one.&lt;br /&gt;&lt;br /&gt;So, I'm back to my application framework. It's not multi-platform, there is comparatively very little work behind, but it's my code and it's much simpler to use.&lt;br /&gt;&lt;br /&gt;All this started because I thought of creating a few windows to hook to the video-capture library, to get the output in other color-spaces, to begin some testing. Instead I decided to procrastinate and do this little excursion into the world of GUI frameworks.&lt;br /&gt;In the end I'm not too disappointed to find out that I don't need to jump into a new adventure with some new huge, cross-platform library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111928622744803471?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111928622744803471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111928622744803471' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111928622744803471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111928622744803471'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/gadgets-widgets-buttons-windows-and.html' title='Gadgets, widgets, buttons, windows and libraries'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111919953325268076</id><published>2005-06-20T00:20:00.000+09:00</published><updated>2005-06-20T01:45:33.260+09:00</updated><title type='text'>Lazy weekend</title><content type='html'>The weekend went by and productivity was rather low. Friday night I was in the mood to code, but an over-excited friend convinced me to, not only go out, but actually drink to an excess.. like it happens once or twice in a year. We really enjoyed ourselves at the time, but from the time I came back home, straight into Saturday, regret took over 8)&lt;br /&gt;Saturday I mostly slept, then I partied.. but with water ! Went back home before 5 AM, watched a movie on TV, went to sleep at 7AM. Slept the rest of the day, till late afternoon, were I went to some cafe/pub with a friend. There was some sort of artsy American crowd. They had some events, strange music, pictures slide-show using a projector and a computer (I wont say which computer (..you can guess (.....Mac people !!!))).&lt;br /&gt;&lt;br /&gt;And.. it seems I won't be able to take my summer vacations ! No Italy for me this summer. I usually take two weeks (one standard + one of paid holidays). But this time around, there is some project starting and I'll be in Tokyo busy hitting deadlines.&lt;br /&gt;To fly over to Italy and back it's a pain. However, I was really looking forward to meet my friends and relatives. I kept promising to my relatives that I'd try to go back more often and instead the situation is getting worse. Ummmmmm !!!!&lt;br /&gt;&lt;br /&gt;On the coding side, I started pretty much to rewrite M4D (again !). I'm going to use &lt;i&gt;new&lt;/i&gt; and &lt;i&gt;delete&lt;/i&gt; and organize everything with a scene-graph. The final plan is to overload new and delete so that objects are allocated in specific pools. Basically, a scene should have a different pool of objects, one for each type. That is one pool of one type, for each scene. Not just one pool for one type. That means that new and deleted are overloaded not just per class, but using an extra parameter: an handle to a pool manager. This should generally improve memory management, and also give me the chance to safely handle the scene teardown: kill all the pools at once, no need for individual releases of objects.&lt;br /&gt;I did read a bit about memory management in OOP. Some paper from Microsoft claims that it's not necessarily a good thing to write a custom OO memory manager. Apparently the default memory manager is usually smart enough to avoid bad fragmentation and excessive CPU usage. Still, I like the idea of a more tight management. It may end up not making a big difference in performance, but I can see eventual benefits for debugging. However, in general, when a game is running, one shouldn't fiddle too much with memory allocation and deallocations.&lt;br /&gt;&lt;br /&gt;Time to zzzzz !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111919953325268076?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111919953325268076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111919953325268076' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111919953325268076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111919953325268076'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/lazy-weekend.html' title='Lazy weekend'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111885227658198659</id><published>2005-06-16T01:00:00.000+09:00</published><updated>2005-06-16T01:21:44.133+09:00</updated><title type='text'>What I code is sometimes what others get</title><content type='html'>Yesterday evening we watched and episode of &lt;a href="http://en.wikipedia.org/wiki/Nu_pogodi" target=_blank&gt;Nu, Pogodi!&lt;/a&gt;, courtesy of Mr.Rince ! The cartoon is in Russian, but with very little dialogue. It's along the lines of The Road Runner (here comes Ragin's comment.. !), but I like the idea that the wolf is a vandal. It makes it more amusing to see him fail. It's a cartoon but actually reflects reality to some levels. From time to time I meet people that are vandals in a way or another, and while I care for everyone to live peacefully, I also am satisfied if I see those getting paid back for what they spread !&lt;br /&gt;being racist towards vandalism is, I think, a positive thing. ...cool.. I get to be prejudicial and good at the same time !&lt;br /&gt;&lt;br /&gt;Today I spent good 12 hours in the office ...my choice. I did quite a bit of research on scene graphs. That reminds me that a few years ago, a colleague told me he wanted to implement a scene graph, and I didn't even know what he meant !&lt;br /&gt;A scene graph is basically a tree. At every node there is an object, which could be something renderable (a bunch of polygons), or a camera, a light source, an abstract object that keeps informations to be distributed hierarchically, transformations, visibility, rendering material.&lt;br /&gt;It works nicely on a logical point of view, but can get easily troublesome. To organize everything with a precise hierarchy isn't so straightforward. Some scene graphs even expect one to render objects as they are parsed in the tree... I definitely have some doubt on that, as far as performance goes.&lt;br /&gt;Although it's too early to come to any solid conclusion, my current take on this is that it's nice to have all into a scene graph, but one shouldn't break his neck in trying to give a proper logical order to it. This is especially difficult when the scene is dynamic. You can't really attach the tyres of a car to the road, that has to be governed by physics. The car is therefore yet another object that is linked to the root of the scene graph.&lt;br /&gt;So, I decided that my scene graph is built around transformation nodes. Every object, be that a renderable mesh or a camera, will have the tree's node structure as its header.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;class model_c&lt;br /&gt;{&lt;br /&gt;    graph_node  _node&lt;br /&gt;    ...&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;class camera_c&lt;br /&gt;{&lt;br /&gt;    graph_node  _node&lt;br /&gt;    ...&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;The node has its usual &lt;i&gt;child&lt;/i&gt;, &lt;i&gt;previous&lt;/i&gt; and &lt;i&gt;next&lt;/i&gt; pointers, plus the local transformation matrix and the accumulated global (world) transformation matrix.&lt;br /&gt;Also, there is a field that describes the type of object where the node belongs to. This allows me to traverse the tree to update the transformation matrices but also implement a custom traversal that does some custom operation on a specific object type.&lt;br /&gt;All this isn't something that has a precise practical value. It is however one more generalization and therefore something that opens the door for unaccounted usage.&lt;br /&gt;&lt;br /&gt;I like the idea of the generic traversal, to have all into a tree, even without following a strict logic (lots of objects hanging just by the root). It's perhaps a small improvement into generalizing. Not necessarily useful to someone that designes and uses an engine, but I think that it can make a difference for an engine that needs to be used by others.&lt;br /&gt;This is in fact my biggest worry: to write an engine that others won't feel painful to use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111885227658198659?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111885227658198659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111885227658198659' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111885227658198659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111885227658198659'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/what-i-code-is-sometimes-what-others.html' title='What I code is sometimes what others get'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111876380401481763</id><published>2005-06-14T22:27:00.000+09:00</published><updated>2005-06-15T00:43:24.266+09:00</updated><title type='text'>Tiredddddddddddd[d]</title><content type='html'>I feel tired all the way. Tired body, tired mind, tired to be tired !&lt;br /&gt;Productivity might now be at the highest, but at least going in the office everyday forces me to do something 8)&lt;br /&gt;Yesterday I've spent some time, among the other things, on the menu system. It already looked fairly nice, with those smooth shadows, but functionality was lacking. Namely, it didn't support sub-menues ! Those are there now. Also I went back the behavior that I developed long time ago for &lt;a href="http://kazzuya.com/kazzuya_old/programming/" target=_blank&gt;RTMZ&lt;/a&gt;. Basically, right click brings up the main menu, or closes it or any currently active submenu. Once in a menu, it will follow the mouse, if the mouse is moving outside the menu. I'm not sure how logic it is, but I kind of got used to it.&lt;br /&gt;On the real productive side, today I've more or less finished the automatic groups generator for objects. Here are two sample pictures. Red bounding boxes highlight the objects distribution. The first picture shows very few and large objects, the second one shows the effect of the automatic grouping.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/050614/wc_sshot_palastra_before_split.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050614/wc_sshot_palastra_before_split_ico.png"&gt;&lt;/a&gt;&lt;a href="http://kazzuya.com/blogdata/050614/wc_sshot_palastra_after_split.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050614/wc_sshot_palastra_after_split_ico.png"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This is going to give me a big improvement on performance. It allows me to do early culling of objects outside the view frustum, plus I could work out some geometry level of detail method.&lt;br /&gt;I've also started to lay down a basic rendering engine. The usual big questions lay ahead. Right now I'm allocating one object at the time and I'm attaching the to the world with linked lists. I prefer arrays, but on a generic rendering engine, one should expect some pretty dynamic use.&lt;br /&gt;Linked lists are only used to gather the objects into the world data-base. The actual transformation tree is a different issue. I don't really have a well designed scene-graph system designed on code, or in mind for that matter. Objects are usually loaded with their own hierarchies. I support that in my file format, but there is always a number of things that one can or wants to do in an actual application/game. This is quite an issue for me, because I've much more experience writing 3D engines than actually using them !&lt;br /&gt;I suppose that I should just go and aim at my goal as an application, whatever it is, and adapt the design around it. This is what I did with all the geometry and vertices mess. However, I feel the need to hurry up, because I want to settle these important things before I'm being asked to get busy on something that others may have to use...  last thing I want to do is to experiment on other people.. especially considering that once code is being used by others, it's much more difficult to impose sudden and radical changes.&lt;br /&gt;&lt;br /&gt;woo !!&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;I realize that all this technical talk can bore to death some, but this is actually a big relief for me. It puts me back into my world (nerdy !). It's all virtual but gives me a lot more freedom. Playing with 3D graphics is a way to dream one's way into something. Everyday's life is generally pretty boring. People that try to gather all pleasure directly or indirectly from physical world, find themselves limited by a lot of obstacles. To be bearable, life needs to be softened from time to time. Many form of entertainment are possible. Some are simpler than others, some are more productive than others. I could play games and watch movies all the time, but that makes me feel terribly unproductive. &lt;br /&gt;It's perhaps an unhealthy way of thinking, but I realize that it's the need that pushes people. If I'm happy, if I don't feel the need to be vindicated, then I won't be very productive.&lt;br /&gt;...now, all this would work much better if I did get those famous 8 hours of sleep every night. &lt;a href="http://www.csse.monash.edu.au/cgi-bin/cgiwrap/jwb/wwwjdic?1MDJ%B4%E8%C4%A5%A4%EB" target=_blank&gt;Gambarimasu&lt;/a&gt; !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111876380401481763?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111876380401481763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111876380401481763' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111876380401481763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111876380401481763'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/tireddddddddddddd.html' title='Tiredddddddddddd[d]'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111847040018177157</id><published>2005-06-11T15:06:00.000+09:00</published><updated>2005-06-11T15:13:20.186+09:00</updated><title type='text'>I display-list you !</title><content type='html'>Yesterday at work I worked most of the day to make the changes to M4D. Then I continued at home on and off 'till the morning. Eventually I went to sleep at 7:20(AM). Time went by as I talked to my parents on the Internet, then watched a movie on TV (interesting &lt;a href="http://imdb.com/title/tt0119304" target=_blank&gt;Home Fries&lt;/a&gt;), then an episode of &lt;a href="http://imdb.com/title/tt0118421" target=_blank&gt;OZ&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As for the coding, things seem to work well again. I've written a separate module to transform the 3D database into one suitable for display-lists.&lt;br /&gt;For each triangle there are 3 vertices, each vertex has up to four indices, referring to position, texture, color and normal pools of coordinates. Each combination of those four indices, represents an actual whole vertex that I have to generate for the display-list. To do the operation efficiently wasn't so straightforward. I went on and utilized a system that I developed before. Combinations of indices utilized in triangles generate new vertices, but to avoid repetition, every time I need to generate a vertex I check if it's already in the list. I keep the 4-indices list sorted as I build it. Insertion can be slow (because of all shifting of pieces of the array), but search is very fast, using a binary search method.&lt;br /&gt;&lt;br /&gt;On the models' side, my sister told me that she has a new model in the works. A room that she's building for a project at the university. There should be some nice furnitures too. Her task for that project is is really about illumination distribution, not furniture design, however she found a site of a company that does furnitures and that gives out the 3D of their models for free, for those willing to register.&lt;br /&gt;Apparently the quality of those models is good too. While she agrees that usually it's a nightmare to try find 3D models freely available on the net.&lt;br /&gt;Speaking of lighting, my sister told me that for that project she's going to use 3DS Max 6 for rendering. Apparently, there is an option to provide some illumination parameters that match those provided by companies that make light sources (the real ones 8).&lt;br /&gt;&lt;br /&gt;Interesting, but it's already saturday afternoon and I should shower and go out ! Although I'm sleepy and I would like to keep with the coding.&lt;br /&gt;&lt;br /&gt;zzzzzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111847040018177157?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111847040018177157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111847040018177157' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111847040018177157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111847040018177157'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/i-display-list-you.html' title='I display-list you !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111833641294421173</id><published>2005-06-10T01:34:00.000+09:00</published><updated>2005-06-10T02:00:12.953+09:00</updated><title type='text'>Dietrofront !</title><content type='html'>Dietrofront is an Italian word that I believe originates as a military command, to impart an order or describe a situation in which a 180 degrees turn is made.&lt;br /&gt;This is what I did today with my engine/M4D/thingy. In the last big change, I removed the material ID from the triangle description, to leave only the three vertex indices. Triangles were then grouped into pools with the same material. This is suitable for real-time rendering. A structure that I can pass straight into OpenGL or Direct3D to be displayed.&lt;br /&gt;Unfortunately this added quite a bit of complexity. I did bear with it, until today I decided to change how the vertices are organized. The change was going to affect the triangle structure, rendering it real-time unfriendly anyway. So, back is the material ID into the triangle structure, plus now vertex attributes are distributed independently on separate lists. Practically, this means that a triangle will have now 3 indices for the 3 vertices describing the position, plus 3 indices for the normals at the vertices, plus 3 indices for texture, and so on..&lt;br /&gt;In so doing, I can keep the position vertices shared between triangles as they are meant, instead of having to duplicate them every time that there is a diverging attribute (you pretty much have to be a 3D programmer to get this, without much explanation).&lt;br /&gt;&lt;br /&gt;The code is still not compiling, too many changes to make in one day. But I think that eventually this will make things easier for all those geometrical operations that I'm trying to do.&lt;br /&gt;&lt;br /&gt;For real-time the options are two. The simplest one is to use the OpenGL immediate mode and record a display list. However, for best performance and for Direct3D, I will need to build a separate unit of code that generates all the vertex permutations necessary for them to be used by triangles and strips with just one index per vertex. I've done this before in an XSI converter. I could reuse some code, but I may as well rewrite it for efficiency.&lt;br /&gt;&lt;br /&gt;Although I consider myself a fairily experienced 3D programmer, this teaching me quite a bit..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111833641294421173?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111833641294421173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111833641294421173' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111833641294421173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111833641294421173'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/dietrofront.html' title='Dietrofront !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111824813718970475</id><published>2005-06-09T00:58:00.000+09:00</published><updated>2005-06-09T01:28:57.193+09:00</updated><title type='text'>More on 3D partitioning</title><content type='html'>Today I changed the algorithm. The goal is to isolate clusters of triangles, mostly meshes, that are in the same database, but that are practically meant to be separate objects.&lt;br /&gt;What I tried to do today was to take one triangle and follow its connections. For each vertex of the triangle I follow the triangles connected to those vertices recursively, until there are no more connections.&lt;br /&gt;To do this, first I weld together all those vertices that are practically at the same position, but that perhaps are duplicated due to the necessity of having different texture coordinates or normals. Then I build an array where each element corresponds to a vertex, and carries a list of triangles that use that vertex. This array of triangles-per-vertex, speed up the vertex-triangle correlation and make it much faster to follow the connections. &lt;br /&gt;I then proceed to pick a triangle and follow all the connected triangles. During this process I also build a bounding box, made form the minimum and maximum vertex values encountered by any triangle.&lt;br /&gt;After that I use the built Axis Aligned Bounding Box to include all the triangles that cross it (triangle-AABB intersection). To be on the safe side, to make sure that I don't miss clusters of triangles that are separated by a very thin line, I slightly enlarge the AABB before using it to collect the extra triangles crossing it.&lt;br /&gt;This works fairly well in theory, but in practice something doesn't work in some cases. Could be a logical bug or just a stupid bug 8)&lt;br /&gt;&lt;br /&gt;Today I also wrote an array template ! I've even overloaded the [] operator. At its heart uses a function that I've been using for a long time to dynamically reallocate arrays. The function actually uses &lt;i&gt;realloc&lt;/i&gt; rather than &lt;i&gt;new&lt;/i&gt; and &lt;i&gt;delete&lt;/i&gt;. This is potentially more efficient and generally more secure as I already keep my 'C'-malloc functions wrapped for debug mode.&lt;br /&gt;&lt;br /&gt;As I'm playing with vertices, I'm growing a doubt on wether it's a good idea to keep separate vertices for cases in which triangles share a vertex at the same position but with different texture coordinates or normals. This is the best solution for real-time 3D rendering. But for intermediate processing, it seems like it could mean more trouble than good. In some cases it's very useful to see which triangles share the same vertices. To keep everything tidy, I should have three different pools of data. The pool of position vertex data, the pool for texture coords and one for normals. At this point triangles will get 3 indices for each pool.&lt;br /&gt;Data organized this way is not suitable for real-time, but it can be easily de-coupled to build data for real-time (one index per vertex, as opposed to three).&lt;br /&gt;&lt;br /&gt;I need to think of this, and see really what's the best solution !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111824813718970475?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111824813718970475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111824813718970475' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111824813718970475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111824813718970475'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/more-on-3d-partitioning.html' title='More on 3D partitioning'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111816441860607259</id><published>2005-06-08T02:11:00.000+09:00</published><updated>2005-06-08T02:13:38.613+09:00</updated><title type='text'>At least an update..</title><content type='html'>It's almost 2AM and I'm here with just enough time left for at least a beeep update !&lt;br /&gt;Today I've got the first results on a simple (in theory) algorithm to partition geometry.&lt;br /&gt;The problem is that the church model has objects separated as items of the same type, but not separated by location. Basically, all columns are in the same object. This is logical but also a problem for real-time rendering, as it prevents the possibility to do early view-dependent culling.&lt;br /&gt;That's done, but was clearly something I had to do because I don't have an artist by my side that gives me data in a format I wish. Still a good exercise.&lt;br /&gt;&lt;br /&gt;I've been toying with the idea of moving the video processing to HSL color space. It's something I must do, but I've been coming back at home late, with not enough time to relax and start working again. Plus, problems are starting to accumulate. I need to plan my summer trip to Italy.. I have to ask for the days, I have to do that in Japanese, I have to call the travel agency. See which days are cheap, see which airplane I should take, if it's a direct flight or not. Go buy the Aibo carrying bag, exhume my laptop and update it, see what I have to buy to bring to Italy, start worrying about what I have to bring back from Italy.&lt;br /&gt;These are the things I truly hate, what destroys my will. I'm not the kind of person that is all dynamic, that can face all those small issues with ease. I just want to be home, do my coding. Sometimes go out, but generally just think about interesting things and completely forget about small duties.&lt;br /&gt;My list of things to do is very long, plus it seems that recently every one is coming to Tokyo. Every month a new contact, people looking for fun, people looking for work, people looking for ..I don't even know.&lt;br /&gt;&lt;br /&gt;Then I have to feel that I could do more at work, I could do more at home, I could do more with language. Some seem disappointed if I tell them I didn't make work on any supercool game recently. Some aren't impressed if I don't tell them I work for some big shot company. Some think that I'm weak because I don't have playboy stories to tell. Some are unimpressed by the fact that I don't speak fluently Japanese.&lt;br /&gt;Basically, pressure from everywhere ! I'm glad that at least my relatives have a high opinion of me. It's true that I can't focus on one thing long enough. But it's not a completely crazy thing.. it's just the way I operate. One day I hope I'll make everyone happy.. so that I don't have to find justifications if I'm not a perfect programmer, a perfect linguist, a doctor, a lawyer, rich, entertaining and sexy !&lt;br /&gt;woo !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111816441860607259?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111816441860607259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111816441860607259' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111816441860607259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111816441860607259'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/at-least-update.html' title='At least an update..'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111783647408967496</id><published>2005-06-04T07:00:00.000+09:00</published><updated>2005-06-04T07:07:54.100+09:00</updated><title type='text'>Desk nightlife: coding in a virtual church</title><content type='html'>Tonight (well, it's morning already) none of my friends around seemed to be in shape to go out. That worked well for me, because I was also tired and I wanted to continue working on this 3D church thing.&lt;br /&gt;Between the spare time at work and here at home, I finally got some simple but necessary results. The vertex data is now optimized. Lots of double vertices are gone. The vertex normals are also calculated properly. The complex algorithm required to duplicate vertices to assign at different triangles that shouldn't share them, wasn't really flawed. I've been looking into it for a long time, but eventually realized that the bug was in the simple gathering of triangle normals for vertex normals. It's a summation, but the &lt;i&gt;memset&lt;/i&gt; that I was doing to clear the array initially, was being given the wrong size 8)&lt;br /&gt;Here:&lt;br /&gt;&lt;code&gt; float3 *vnp = _verts._nor_vertsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; memset( vnp, 0, _verts._n_verts * sizeof(vnp) ); // With he bug...&lt;/code&gt;&lt;br /&gt;&lt;code&gt; memset( vnp, 0, _verts._n_verts * sizeof(*vnp) ); // Without the bug !!!&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;..tricky memset !!!&lt;br /&gt;&lt;br /&gt;Anyhow I took some screen-shots and here it is. It may not look like anything special, but considering that was a 3D model exported from AutoCAD and not meant for real-time, just to see it with the faces properly sorted for backface culling, is an achievement for me 8)&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/050604/wc_sshot_050604_01.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050604/wc_sshot_050604_01_ico.png"&gt;&lt;/a&gt; &lt;a href="http://kazzuya.com/blogdata/050604/wc_sshot_050604_02.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050604/wc_sshot_050604_02_ico.png"&gt;&lt;/a&gt; &lt;a href="http://kazzuya.com/blogdata/050604/wc_sshot_050604_03.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050604/wc_sshot_050604_03_ico.png"&gt;&lt;/a&gt; &lt;a href="http://kazzuya.com/blogdata/050604/wc_sshot_050604_04.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050604/wc_sshot_050604_04_ico.png"&gt;&lt;/a&gt; &lt;a href="http://kazzuya.com/blogdata/050604/wc_sshot_050604_05.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050604/wc_sshot_050604_05_ico.png"&gt;&lt;/a&gt; &lt;a href="http://kazzuya.com/blogdata/050604/wc_sshot_050604_06.png"&gt;&lt;img src="http://kazzuya.com/blogdata/050604/wc_sshot_050604_06_ico.png"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111783647408967496?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111783647408967496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111783647408967496' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111783647408967496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111783647408967496'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/desk-nightlife-coding-in-virtual.html' title='Desk nightlife: coding in a virtual church'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111773321126789623</id><published>2005-06-03T02:26:00.000+09:00</published><updated>2005-06-03T02:26:51.273+09:00</updated><title type='text'>Time flies and it's already time to waste some more time</title><content type='html'>Today at work I eventually worked out an algorithm to smooth normal at vertices while preserving strong edges. It's not working 100% but it's already at a decent stage and it's pretty fast too. The last time I did this I was working on edges. Now I'm working at the vertex level. First I collect all triangles for each vertex, then, for each vertex, I build N groups of triangles. Each group contains one or more triangles whose normals don't differ more than a certain selected angle from any of the other triangles.&lt;br /&gt;One thing I'm starting to have problems with (I think that's what locks the OpenGL driver sometimes), is that I'm forcing to render a single strip composed of many smaller ones (using degenerated triangles). I think I'm breaking the physical limit that the driver or the hardware can handle for a single strip. I'm thinking of going back to multiple strips, but still using degenerated triangles to stitch smaller ones. A strip of 2048 verts is probably safe enough. I can make an array of max 64 strips (to avoid dynamic allocation of such a small structure 8), so that would be 128K verts. Should be enough ! Especially considering that I'm already splitting strips by materials.&lt;br /&gt;&lt;br /&gt;After work I went to the gym. Not an incredible performance.. but, much to my surprise, my body weight went down to 70.85Kg !! Breaking the barrier of 71Kg ! Perhaps loss of muscle since I didn't go much to the gym recently.. perhaps my metabolism just got back to a decent level. Incidentally, I haven't been eating McDonald's for a while.. especially after seeing the movie &lt;a href="http://www.supersizeme.com/" target=_blank&gt;Supersize Me&lt;/a&gt; (warning, facking Flash ahead !). I didn't think that the movie was so great. Interesting, but definitely looks like a cheap documentary plus some added graphics.&lt;br /&gt;&lt;br /&gt;Yesterdayyyyyy... I finally got a new router. Another Linksys, the WRT54GS with SpeedBooster &amp;quot;and shit&amp;quot;. Really the best purchase for me here in Japan. In a few minutes I got it up and running with US firmware flashed in 8)&lt;br /&gt;Today I realized that the latest firmware doesn't support anymore the dynamic DNS update for services like &lt;a href="http://www.dyndns.org/" target=_blank&gt;dyndns.org&lt;/a&gt; (unless the option is well hidden). That's kind of sad. I see some Cisco logo on the router too. I'm guessing that the router is getting more on the corporate side. Whatever.. blah blah.&lt;br /&gt;Tonight I updated the Aibo wireless setup to the new network (new WEP password) and did a backup of its memory stick. It seems that there is a Service Pack 3 out for my Aibo model. I still have to install even the 2 or 1. We'll do in due time. Surely doesn't help that one has to read all the instructions in Japanese.. geez !!&lt;br /&gt;&lt;br /&gt;As I was dealing with Aibo, I did the laundry, then some Perl bullshit for the automatic album generation.&lt;br /&gt;Basically I have a million things to do and tomorrow is Friday. Some friend will want me to go out and I'll be sleepy and feeling unachieved. It's already very late. &lt;br /&gt;&lt;br /&gt;..presssureee !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111773321126789623?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111773321126789623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111773321126789623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111773321126789623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111773321126789623'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/time-flies-and-its-already-time-to.html' title='Time flies and it&apos;s already time to waste some more time'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111764601473724353</id><published>2005-06-02T02:12:00.000+09:00</published><updated>2005-06-02T02:13:34.743+09:00</updated><title type='text'>Complex day..</title><content type='html'>It's 2AM, I'm writing this quickly. Yesterday night I went to bed at 2:40. Unfortunately I forgot to buy the sleeping pills... I'm not sure how long it took to fall asleep, but I remember clearly that the sunlight was starting to come up and I was still awake 8)&lt;br /&gt;In the morning I woke up, and of course decided to stay a little more. Then was pretty much too late. I woke up an took a quick shower, but was really too late. I called at work and asked for the usual half day off.&lt;br /&gt;I went back to bed, planning to wake up at 11:30, but I only woke up one hour later, once again running to go to work 8)&lt;br /&gt;I had some mixed dreams, including one of those where one fights with his own body to wake up. Only this time I'm not sure if I was fighting to wake up or stay in bed.&lt;br /&gt;Complex choice.. fixed schedules are a nightmare.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111764601473724353?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111764601473724353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111764601473724353' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111764601473724353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111764601473724353'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/06/complex-day.html' title='Complex day..'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111755194314918558</id><published>2005-05-31T23:50:00.000+09:00</published><updated>2005-06-01T00:05:43.160+09:00</updated><title type='text'>A four dimensional router ?</title><content type='html'>Very tired here. I've been going to sleep at 3AM again. Getting late (this morning 9 minutes !) to work. Sad.. tonight I must really focus and go to sleep at 2.&lt;br /&gt;Yesterday was a rather stressful day. I had an animated phone conversation for the lamest of the reasons: ....ahh whatever !&lt;br /&gt;&lt;br /&gt;Recently, I've upgraded my PC's RAM to 1GB. Things seem much better now, but I need to test with video editing.. something that I gave up on doing when I had only 512.&lt;br /&gt;Today I managed to close the long parenthesis that I opened while developing that 3D church thing. The M4D module is more or less working. The new file format is up. I've also simplified the triangle strips organization. Before, M3D had a list of strips to be optimized at load time for either PC based rendering or PS2 based rendering. On PC it's convenient to make a big contiguous strip with degenerated triangles, on PS2 one can use the vertex-kick flag to restart strips.&lt;br /&gt;I don't have the PS2 kit anymore and both Xbox 360 and PS3 basically have PC's graphics.. so, I'm just going for the contiguous strip in M4D, making the job easier for the renderer, which can use the data as is without re-processing.&lt;br /&gt;&lt;br /&gt;Back to the church, next, I have to implement a mouse navigation system (mouse + keyboard, like Quake). This is needed because my sister will have to try it on her laptop and she doesn't have the PS/PS2's dual-stick interface.&lt;br /&gt;After this, I'm really not sure what I will do. I want to put shadows in it. Shadows are the biggest issue. The church has no top, so I'm going to simulate sunlight, which implies hard edged shadows. That means that I either have to maniacally recursively tesselate the model, or I have to do a first shadow casting pass in world space. Have a shadow volume cut sharp the model, making sure to minimize the cuts. In the attempt to get this done, I'll be dealing with M4D. All the polygon cutting and shuffling will push me to review the geometry database design or, in the best case, to add several functions to simplify this sort of operations.&lt;br /&gt;Basically, it's a lot more like writing a 3D engine for a 3D modeler rather than for a game.&lt;br /&gt;&lt;br /&gt;On a completely different issue: the backup router that I'm using is a pain. It's all in Japanese and I'm not sure if I have to find an option to make it work properly or if I have to disable its firewall altogether and use a software one for the time being.&lt;br /&gt;My problem is that to make FTP work it's not enough to have just the port 21 open. The router still has to be somewhat &amp;quot;intelligent&amp;quot; and sniff the traffic to open some extra random ports that are required for file transfers.&lt;br /&gt;Now.. perhaps this old router has such feature.. but finding it in Japanese is going to be quite a challenge !&lt;br /&gt;&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/woo.wav" target=_blank&gt;woo !&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111755194314918558?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111755194314918558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111755194314918558' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111755194314918558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111755194314918558'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/four-dimensional-router.html' title='A four dimensional router ?'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111730651891669737</id><published>2005-05-29T03:54:00.000+09:00</published><updated>2005-05-29T03:55:18.920+09:00</updated><title type='text'>And we report again</title><content type='html'>The evening started with a gathering of friends. Some nice girls. Hopefully we'll meet again. A phone number was taken.. we'll see.&lt;br /&gt;Then, I and another friend went to a club. Guess who I met there.. once again the "Minna kakkou ii" girl and her friend. I saw them switch a few guys. At one point I heard her saying "dou shiyou ?" [What should we do ?]. I can only guess what she meant 8)&lt;br /&gt;My friend picked some girl. She brought her friend, which danced with me, but eventually met another girl-friend and got dragged away. It seemed to me like a cheap excuse to get away from me.. woooo ! An ugly girl that needs an excuse to get away from me ? Geez.. I'm only entertaining you to make my friend happy while he's busy with your friend that has a &amp;quot;confused&amp;quot; smile.&lt;br /&gt;Eventually I decided to go back home. My friend is busy and disappeared with the thing, I'm here tired and not really motivated. I take a taxi to go home. Half way home, I get a call from my friend: &amp;quot;Where are you ?! I asked the girl to go to my home all four of us and she said yes !!!&amp;quot;. My answer: &amp;quot;Her friend ran away from me.. she's ugly too. On a situation like that, I'm expecting her to get on her knees and give me a blow job ! I'm not going to stick around waiting for two ugly girls !&amp;quot;. Of course, it's not like I'm really into the business of getting BJs from any woman, but that reflects my state of mind. Truly, I wasn't born to beg after dumb women that should rather beg after me. I'm not a famous TV star because I'm better 8) Any ugly woman so dumb to let me go, doesn't deserve a slice of my time.. which is better employed at research and development.. of useful things, not lame copulation that anyone can do.&lt;br /&gt;See you, dear ugly woman.. see you when you come ask for my autograph !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111730651891669737?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111730651891669737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111730651891669737' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111730651891669737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111730651891669737'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/and-we-report-again.html' title='And we report again'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111712964015523166</id><published>2005-05-27T02:47:00.000+09:00</published><updated>2005-05-27T02:47:20.160+09:00</updated><title type='text'>Lack of sleep and lack of network</title><content type='html'>This morning I woke up at 9:45. I naturally wake up at that time when I'm late for work (my alarm is at 8:50). I took half day off (till 1PM) and slept more or less what I needed to.&lt;br /&gt;The night before I went to sleep again at 3AM, plus I went to the gym. Basically very tired !&lt;br /&gt;When I woke up again at 11:30 I found a bad surprise: the router, a Linksys WRT54G, was dead.&lt;br /&gt;I was tempted to go buy a new one after work, but instead I came home and tried fix it following some hints found on the net. Of course it didn't work. I even opened the thing.. bha. Eventually I settled for using a backup router that I had laying around. Not so easy.. I couldnt find a power adapter that work work for it !&lt;br /&gt;Luckily, I found one that seems to work although it gives 1A instead of specified max of 1.5A. Of course after I did have to spend some time to manage to log-in and setup the Internet connection. I didn't have the manual, plus the interface is in Japanese.&lt;br /&gt;Now everything seems OK. But eventually I'll need to buy a new router.. although in the settings I may have fixed the connection timeout problem that I had before with it and that made me buy a new one.&lt;br /&gt;&lt;br /&gt;Anyhow, yesterday night, after posting, I went to look for color space infos. I've been using YUV (specifically YCrCb) for a long time without quite realizing that it was still playing with RGB color channels. Y is basically a gray produced mostly out of green, Cr a difference mostly in red and Cb same but for blue.&lt;br /&gt;This is the format used for JPEG, MPEG, etc. It comes from the TV standard of encoding image data, but I don't think it's the best color space to work for image compression.&lt;br /&gt;A lossy YCrCb signal can bring out some serious visible artifacts if Cr and Cb aren't compressed equally well.&lt;br /&gt;One has Y (the gray image) that needs high quality and Cr and Cb that need to be compressed so that loss of information happens in a similar fashion. Basically, if with RGB one must be very careful because those are all primary channels. With YCrCb one has more freedom to compress channels separately, but not total freedom, because the Cr and Cb channels must still keep a good correspondence.&lt;br /&gt;This brings me to think that I should try work in a different color space, one that still has 3 channels, but 3 channels that can be compressed independently without bringing out major color artifacts (for the human eye).&lt;br /&gt;The ideal color space should be something that separate the gray scale image component, a basic color palette (a hue) and a saturation for the color. If saturation is bad, the color is still faithful, it doesn't shift towards red or blue like YCrCb.&lt;br /&gt;&lt;br /&gt;Now it's time to sleep, but I'm happy to know that I have a good direction in which to move now.&lt;br /&gt;&lt;br /&gt;zzzzzzzzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111712964015523166?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111712964015523166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111712964015523166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111712964015523166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111712964015523166'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/lack-of-sleep-and-lack-of-network.html' title='Lack of sleep and lack of network'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111704223898378757</id><published>2005-05-26T02:21:00.000+09:00</published><updated>2005-05-26T02:30:38.996+09:00</updated><title type='text'>Destructive doubts</title><content type='html'>I'm stuck ! I've been wanting to add color to the video-chat test app, but I can't seem to focus and decide how to do it.&lt;br /&gt;I want to do something clever. I'm already compressing the luminance (gray level image) at relatively high quality. To compress the remaining two color components without utilizing the similarities with the luminance it would be a crime. At the same time, it's not easy to just write code for an algorithm without even a source of inspiration.&lt;br /&gt;If I don't come up with something clever, I'm bound to force the data size to sensibly grow, or have poor quality. This doesn't particularly make me happy. On the other hand, black and white images really suck 8)&lt;br /&gt;The truth is that I should sit down and start making experiments. Compression is all about statistics and statistics is all about inspecting data. In all honesty, I'm not sure how chrominance components are distribuited, therefore I can't really come up with something good.&lt;br /&gt;&lt;br /&gt;Doubt is probably the number one killer for productivity !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111704223898378757?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111704223898378757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111704223898378757' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111704223898378757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111704223898378757'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/destructive-doubts.html' title='Destructive doubts'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111695182633439578</id><published>2005-05-25T00:07:00.000+09:00</published><updated>2005-05-25T01:23:46.493+09:00</updated><title type='text'>Some people code, some people watch F1 races !</title><content type='html'>Today is my mother's birthday !&lt;br /&gt;For her birthday, she decided to take a vacation. ..All by herself, since my sister was busy with school. Right now she's in &lt;a href="http://en.wikipedia.org/wiki/Nice" target=_blank&gt;Nice&lt;/a&gt; in France, but Sunday she was in Monaco to watch the &lt;a href="http://www.formula1.com/gallery/737.html" target=_blank&gt;F1 race&lt;/a&gt; by the starting line ! She went there and bargained for a last minute ticket to the race. Quite adventurous, for someone that speaks Italian and &amp;quot;shopping English&amp;quot;. Comes to show how often just takes the will to do things.&lt;br /&gt;A good lesson for me, since I'm one of those that drags his ass to do anything.&lt;br /&gt;Anyhow, she said that seeing the race live was very exciting... just as I was told before !&lt;br /&gt;I guess this year I really must go watch the Yokohama race !&lt;br /&gt;&lt;br /&gt;Changing subject, today I completed the first version of m4d. The C+ (one plus) version of m3d. I also decided to dump &lt;i&gt;new&lt;/i&gt; and &lt;i&gt;delete&lt;/i&gt;. The reason is that it's much easier to handle objects when they all have a common father. Also, it doesn't make sense that OOP, which pushes hierarchy so much, ends up allocating all objects in the same domain !&lt;br /&gt;A scene now contains an array of (scene's) objects and each object contains an array of groups. That is, one pointer the actual array of data, not an array of pointers.&lt;br /&gt;This way I have a direct relationship between a pointer and an index. The memory allocation is compact, no need to allocate hundreds of single objects, plus the array to track them.&lt;br /&gt;I've also finished the converter from the 3DS format into m4d. Plus I've written a new flexible file format.&lt;br /&gt;The new format is mostly &amp;quot;human readable&amp;quot;. Because it doesn't make much sense to scroll trough thousands of lines of floating point vertices, I decided that vertex data should be compacted by being printed out as 32 bit hexadecimal values and by putting several vertices on the same line.&lt;br /&gt;The final look of the bulk data is a bit like MIME encoded binary data used for e-mail attachments.&lt;br /&gt;This allows me to keep the format readable, easy to parse, but minimize the bulk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111695182633439578?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111695182633439578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111695182633439578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111695182633439578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111695182633439578'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/some-people-code-some-people-watch-f1.html' title='Some people code, some people watch F1 races !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111687106105333022</id><published>2005-05-24T02:56:00.000+09:00</published><updated>2005-05-24T02:57:41.066+09:00</updated><title type='text'>C++ adventures into the land of method's calling</title><content type='html'>Monday, back to work. Whole day very focused on some major code rewrite. Something I started Friday.&lt;br /&gt;I have this M3D module that I use for handling 3D at the data-base level (no rendering, although I wrote some PC renderers that use M3D). Basically I use this library to handle basic geometry. Vertices with color, skinning, texture, normals. Triangles and strips. making strips, converting strips back to triangles, removing unused materials, sort the data as to remove state changes for rendering. Also some experiments on mesh complexity reduction and so on.&lt;br /&gt;Basically it's the interface that I use to handle parsed data from file formats like XSI and 3DS.&lt;br /&gt;For this rewrite I wanted to try and approach C++. It's actually an experiment in itself. For the time being, my main concern with C++ is writing style more than performance, as I think I can already handle performance well enough.&lt;br /&gt;My current style is base dont he following rules, that I need to verify with time.&lt;br /&gt;&lt;br /&gt;Let's say I have an &lt;i&gt;scene&lt;/i&gt;, an &lt;i&gt;object&lt;/i&gt; and a &lt;i&gt;group&lt;/i&gt;. For every scene there are N objects and for every object there are M groups. A group is practically a 3D mesh. So, an object is a collection of meshes (plus other things that I'll leave out for now).&lt;br /&gt;In M3D, I have &lt;code&gt;m3d_object_t&lt;/code&gt;, &lt;code&gt;m3d_scene_t&lt;/code&gt; and so on. Functions have prefixes that indicate their scope. They are basically like C++ methods. So, functions that operate on &lt;code&gt;m3d_object_t&lt;/code&gt; structure will all start with &lt;code&gt;m3d_object_&lt;/code&gt;. For example: &lt;code&gt;m3d_object_scale( m3d_object_t *op )&lt;/code&gt;. For the scene then it's &lt;code&gt;m3d_scene_scale( m3d_scene_t *sp )&lt;/code&gt;.&lt;br /&gt;And here start the troubles with C++. &lt;code&gt;m3d_object_scale( op )&lt;/code&gt; would become &lt;code&gt;op-&gt;scale()&lt;/code&gt;, &lt;code&gt;m3d_scene_scale( sp )&lt;/code&gt; becomes &lt;code&gt;sp-&gt;scale( sp )&lt;/code&gt;. And so on for groups and all the rest.&lt;br /&gt;Now, while this is neat, at the practical level, it turns a nightmare when I need to find out exactly where in any piece of code I scale the scene or I scale an object. This is especially important for libraries such as this, that are used by a number of different programs.&lt;br /&gt;My current solution is to use a shorter prefix. So, for the class &lt;code&gt;m4d_scene_c&lt;/code&gt; I have &lt;code&gt;sp-&gt;m4s_scale()&lt;/code&gt;. m4d is the library name, m4&lt;b&gt;s&lt;/b&gt; stands for an m4d Scene.&lt;br /&gt;This allows me to keep track of where I scale a scene, an object or a group.&lt;br /&gt;&lt;br /&gt;Then it comes the issue of the private methods and additional modules. For private methods, it's probably OK to lose the prefix. They aren't supposed to be used externally anyway. I'm still not sure though.&lt;br /&gt;In any case, C++ forces to have a lot of private methods, some have a specific domain and some sort of prefix is still probably useful.&lt;br /&gt;Let's say that I have a separate CPP file for welding close vertices of a group. In the file I will put the &lt;code&gt;m4g_weldverts()&lt;/code&gt; method, but also some private functions. In C i would declare those &lt;i&gt;static&lt;/i&gt; and forget about them. In C++ I need to declare them into the class, so it can get a bit more confusing.&lt;br /&gt;The solution for now is to use some sort of prefix. In this case, a function that is strictly used by the &lt;code&gt;m4d_weldverts()&lt;/code&gt; would be called, for example, &lt;code&gt;weldverts_flag_weldable_verts()&lt;/code&gt;. Basically with the &lt;code&gt;weldverts_&lt;/code&gt; prefix.&lt;br /&gt;&lt;br /&gt;Still, I sort of hate the idea of having to declare the private methods, but we'll see how it goes.&lt;br /&gt;&lt;br /&gt;It's almost 3AM.. zzzzzzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111687106105333022?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111687106105333022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111687106105333022' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111687106105333022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111687106105333022'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/c-adventures-into-land-of-methods.html' title='C++ adventures into the land of method&apos;s calling'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111678426719570499</id><published>2005-05-23T02:02:00.000+09:00</published><updated>2005-05-23T02:51:07.206+09:00</updated><title type='text'>皆格好いい - minna kakkouii - they're all cute !</title><content type='html'>Not a productive weekend at all. Somewhat trapped into going out both Friday and Saturday night till late in the morning. Club this, club that. Lots of people, &amp;quot;friends&amp;quot; that secretly try to sneak phone numbers and date girls to which I'm clearly interested in. Au au au ! What some people wouldn't do over pride. Must have all women, must be number one, me better than you, me model, you ugly, me me me. Not even worth confronting people about it. Better to play cool and slowly withdrawal my contribution to the friendship. Considering that I'm generally more altruistic, I'd say that there is a good chance that the person that decides to hurt the friendship will end up with the biggest loss. There is clearly something wrong when you do your best to boost an egocentric person's morale and he jumps on a woman around you.&lt;br /&gt;This has happened more than once recently. I can see how one is tempted. To some extent, I've also sometimes been struggling trying to accommodate friendship and women. But I think that I generally do a better job. If one really can't help it, at least being transparent and avoiding girls for which your friend has an active interest in, are two good starting points.&lt;br /&gt;&lt;br /&gt;Speaking of girls, here comes the topic of the post: I was in a club and I see two attractive girls in front of me. They were just arrived, both seemed pretty excited. One nervously biting her nails, says: "minna kakkouii !" (they are all cute !).&lt;br /&gt;That's how normally guys are known to think, but it's also how younger girls think. It's only natural. Of course the difference comes to when one has to get closer to someone: will a girl get close to a guy just because he too is cute, or will she use a more appropriate meter ?&lt;br /&gt;I looked at them and I said: "watashi mo ?" (me too ?). "Yes, you too !" ..&lt;a href="http://kazzuya.com/blogdata/yeahman.wav" target=_blank&gt;yeah right !&lt;/a&gt;&lt;br /&gt;I asked them if they were looking for something in particular, men, women !&lt;br /&gt;Anyhow it was fun. At least those girls didn't pretend to be something else. They were straightforward and friendly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111678426719570499?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111678426719570499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111678426719570499' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111678426719570499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111678426719570499'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/minna-kakkouii-theyre-all-cute.html' title='皆格好いい - minna kakkouii - they&apos;re all cute !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111665873605861982</id><published>2005-05-21T15:28:00.000+09:00</published><updated>2005-05-21T15:58:56.063+09:00</updated><title type='text'>Small town Tokyo</title><content type='html'>Yesterday, night I went out with some friends. One came to Japan for work and he is my guest these days. Two nights ago we were going for dinner in the Shibuya area. While walking around we met another Italian friend with his Italian girlfriend. He met her because he met another old friend that recently came from Rome, by pure chance while walking two weeks ago. All four of us went to a restaurant.. and there I met an old coworker of mine !&lt;br /&gt;This is only a small portion of all the coincidences happening. I'm in the middle of Tokyo and I keep bumping into people that I know, or even Italians that I don't know but end up becoming close friends.&lt;br /&gt;&lt;br /&gt;Sometimes one is waiting at a train station to meet some friends, and suddenly can hear girls screaming UAAAAAAA !!!!!!!!!&lt;br /&gt;Those are girls that meet again by chance. It happens all the time !!&lt;br /&gt;I guess that in the end, people tend hang around the same places. Especially if one is waiting outside a train station. It's like a car stalling in the middle of a crossroad.. a collision is bound to happen.&lt;br /&gt;Statistically it's probably nothing special, but practically, people feel like destiny makes them meet. And that's... cool !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111665873605861982?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111665873605861982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111665873605861982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111665873605861982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111665873605861982'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/small-town-tokyo.html' title='Small town Tokyo'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111626534346123058</id><published>2005-05-17T02:38:00.000+09:00</published><updated>2005-05-17T02:43:22.926+09:00</updated><title type='text'>Frequency domain's dreams and normals' tidying</title><content type='html'>Yesterday (Monday) night I dreamed that the World was reconfigured to work in frequency domain as opposed to time domain !!&lt;br /&gt;This brought some changes. It all started with a centered white spot, plus some extra spots. A bit like when one visualizes an image that has been transformed with the FFT (Fast Fourier Transform).&lt;br /&gt;It was mostly like seeing a cheap sci-fi movie. Not really interesting from a purely scientific point of view. Still, it was a clever dream to have in a sense 8)&lt;br /&gt;&lt;br /&gt;I did more research about reading 3DS objects with faces being properly ordered.. and found out that I wasn't doing anything wrong. The problem is that AutoCAD's exported files have no sense of faces' orientation. In order to render those objects properly, one has to render them with faces as having two sides.&lt;br /&gt;That requires some extra rendering time, but also prevents from properly creating smooth vertex normals !&lt;br /&gt;So, I wrote some code to fix the faces normals. The code works on the assumption that objects are closed. For each face, there must be a corresponding one that covers it. With that assumption and lots of ray-tracing activity, I can give the proper orientation to the faces. There are however a few exceptions 8(&lt;br /&gt;Instead of trying to analyze the exceptions, I decided to manually fix those last few faces. The next step is to write an exporter to a common 3D object format (AC3D seems good), so that I can import the processed objects in Blender, modify the faces' orientation by hand and then export the final objects. Hopefully by tomorrow I can finish that (yeah, right !).&lt;br /&gt;&lt;br /&gt;More things to do: continue my mother's website. I've been looking around for a simple BBS script, and it seems that only Japanese care to make simple BBS scripts. I'm planning to download one of those and adapt it to English/Italian.&lt;br /&gt;&lt;br /&gt;Finally, I'll also need to complete the first release of the video-chat app. Dind't do any work in that sense. Although today I read some docs about neural networks applied to image compression. Interesting stuff, but I don't know enough about neural networks to even start experimenting.. plus, that's definitely a distraction, something diametrically opposed to the goal of releasing a working program 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111626534346123058?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111626534346123058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111626534346123058' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111626534346123058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111626534346123058'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/frequency-domains-dreams-and-normals.html' title='Frequency domain&apos;s dreams and normals&apos; tidying'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111614506422777020</id><published>2005-05-15T17:07:00.000+09:00</published><updated>2005-05-15T17:17:44.256+09:00</updated><title type='text'>Antialiased fonts, Subversion and normals</title><content type='html'>I never quite understood why Windows' fonts would be anti-aliased only at large sizes. It doesnt take much to do some basic anti-aliasing. Render a character at double the size, shrink it to the required size with an average filtering, and there is the smooth looking character. In any case, recently I've seen several screen shots on the web, where Windows XP's fonts looked pretty smooth. Eventually I did a web search and I found out that the &lt;a href="http://www.microsoft.com/typography/ClearTypeInfo.mspx" target=_blank&gt;ClearType&lt;/a&gt; font rendering, was actually available on XP, not just on Pocket PC (Windows for PDAs). I downloaded the &lt;a href="http://www.microsoft.com/typography/ClearTypePowerToy.mspx" target=_blank&gt;ClearType PowerToy&lt;/a&gt; and after a short while I was already looking at anti-aliased fonts.&lt;br /&gt;ClearType does some extra clever smoothing for LCD monitors, where red green and blue sub-pixels are nicely distributed each taking exactly one third of a whole pixel.&lt;br /&gt;This is not a new thing. Adobe Acrobat Reader has been doing it, Apple MacOS X on LCD displays has also been doing it. Microsoft of course claims some special recipe that apparently gives it the top quality. I'm not sure where the top quality level is, but I'm definitely much happier now !&lt;br /&gt;&lt;br /&gt;Changing topic, I've successfully installed and started the Subversion server on my home-server. Now I can work on code at work and find the same changes at home and vice versa. Very handy, although the available GUI clients on Windows aren't as good as WinCVS for CVS. Still, I'm quite happy.&lt;br /&gt;It seems that nowadays one couldn't live anymore without Open Source software !!&lt;br /&gt;&lt;br /&gt;On the 3D side, I've been looking for 3D objects on the net, but everyone wants people to pay for any half decent object (..so much for the Open Source efforts !). So, I asked help to my sister. She sent me a 3DS of a church that either she or her boyfriend made... her architecture studies are starting to become more and more useful from my point of view 8)&lt;br /&gt;Unfortunately my 3DS parser seems to have problems detecting the proper face orientation. Now I'm in the middle of some fierce debugging. I hope to be done with this by today, or I can't guarantee I'll be able to grant me a good night of sleep... ummmm !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111614506422777020?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111614506422777020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111614506422777020' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111614506422777020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111614506422777020'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/antialiased-fonts-subversion-and.html' title='Antialiased fonts, Subversion and normals'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111582765328753734</id><published>2005-05-12T00:25:00.000+09:00</published><updated>2005-05-12T01:07:33.363+09:00</updated><title type='text'>Dilemmas and paranoias</title><content type='html'>Recently I've been increasingly more worried about losing my core data. Mostly source code, pictures and some data. Plus the edited home video. Basically the private stuff that one cannot "always download again from the Internet".&lt;br /&gt;For the source code and a few basic data files, I decided to gather everything under a &lt;i&gt;home&lt;/i&gt; directory, so that I can keep track of everything.&lt;br /&gt;because I modify those files both at work and at home, keeping track of the changes has become a bit too time consuming.&lt;br /&gt;To synchronize everything I've been looking into the &lt;i&gt;rsynch&lt;/i&gt; utility, of Unix origin, which is available under cygwin. It seems useful, but still requires some learning.&lt;br /&gt;I've also been thinking of keeping all home dir under &lt;a href="http://subversion.tigris.org" target=_blank&gt;subversion&lt;/a&gt; (files versioning system). To do that though, I'd need to run a subversion server at home. Definitely something that takes its time to setup properly. Also that would mean that I'd still have to keep relying on my home-server, something I'm trying to avoid. However, the home server really matters if I care to keep track of the files history, otherwise, if the server goes down, I suppose I could make a new repository on a new server, as long as I have the most recent files.. which is the thing I really care about.&lt;br /&gt;&lt;br /&gt;Another issue that keeps me thinking is wether to keep writing on here (blogger.com) or move back to kazzuya.com, my very own site, originally intended as a diary anyway, and that I've been neglecting for the past couple of years.&lt;br /&gt;Of kazzuya.com I like better the hierarchical comments structure (especially since I coded it 8). The nuisance is that at one point I will have to tidy everything up. It's my site, with my PHP code, and my database structure.. all built to barely work, without a proper backup and restore plan. Basically, my paranoia of losing data has been pushing me towards public and reliable solutions (much like I ditched POP mail in favor of GMail).&lt;br /&gt;Speaking of losing data: DO NOT BUY MAXTOR HARD DRIVERS, THEY ARE CRAP !!! I've lost an 80GB one I think, then a 250, now another 250 is dying a slow death. Maxtor hard-drives break very easily, they break for everyone. Just avoid them.&lt;br /&gt;Now, back to the &lt;i&gt;blogger vs kazzuya&lt;/i&gt; issue. Another problem with blogger.com (not really it fault) is that my &lt;a href="http://duddie.2mydns.com/blog/" target=_blank&gt;friends in China&lt;/a&gt; cannot access it. That's right, blogger.com is one of those domains censored by the Chinese government. ..kind of funny, kind of sad !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111582765328753734?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111582765328753734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111582765328753734' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111582765328753734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111582765328753734'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/dilemmas-and-paranoias.html' title='Dilemmas and paranoias'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111574564312771070</id><published>2005-05-11T02:13:00.000+09:00</published><updated>2005-05-11T02:20:43.213+09:00</updated><title type='text'>Sick and compressing</title><content type='html'>Friday I left the office and it was raining. I didn't buy an umbrella because it wasn't so bad.&lt;br /&gt;Saturday I went out, Sunday night I went to sleep and felt as I was getting sick. By the end of Monday I was sick indeed !&lt;br /&gt;Today, Tuesday, I decided to call in sick and face the cold and sore throat before it would get worse. It wasn't that bad, but when it's bad it's already too late.&lt;br /&gt;The theory goes that with cold wind, one gets his/her throat dry, making the job easier for the bacteria. That may be so, but it's definitely not the whole story ! One get's wet in a cold environment, he/she sneezes and there starts the cold effect. It's that simple, but I don't know of any proper scientific explanation for this.. at least it's not common knowledge.&lt;br /&gt;&lt;br /&gt;In any case, I spent a few hours on Sunday and Monday on video compression, and the not-so-sick part of today too. I've finally came up with some working, decent, implementation. It's all black &amp; white, but it's also 640x480.&lt;br /&gt;Trying to video chat at 640x480 is quite a challenge. Capturing with DirectShow from a USB 2 web-camera alone takes a big slice of CPU ! To that must be added the necessary noise reduction, then compressing one frame while decompressing another. I've thought about using graphics hardware acceleration to help the CPU, but the good accelerators, those with pixel shaders, are of course on already powerful computers. This is again the big trouble with PCs.. while I see that Apple has been pushing the use of hardware acceleration to do video processing. Having a relatively fixed spec hardware definitely helps push things forward. Apple also uses the AltiVec instruction set, since that's standard on the recent Macs.&lt;br /&gt;In any case, I'm hoping for a test dev release. Something for others to test (help me to test 8). First I need to add color, because B&amp;W really sucks ! After that, I will try optimize further the compression.&lt;br /&gt;&lt;br /&gt;One good starting point for improving compression is to assume that the camera doesn't move and that the subject(s) are in front of a camera with a relatively static background.&lt;br /&gt;At first, the moving subject will cover one part of the background, then uncover it while covering another part. My goal, would be to progressively memorize the whole background, so that at one point the subject can move anywhere and (ideally) none of the background data will need to be re-transmitted.&lt;br /&gt;Something like this is already implemented in MPEG-1 compression. Hardly anything is new nowadays, it's mostly matter of efficiently implement some specific ideas in a simple way so that code doesn't get too complex and encoding doesn't take too much time. Assuming that the camera is fixed helps avoiding to deal with motion compensation, a very powerful technique that is also very time consuming !&lt;br /&gt;&lt;br /&gt;Time to zzzzzzz&lt;br /&gt;poof&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111574564312771070?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111574564312771070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111574564312771070' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111574564312771070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111574564312771070'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/sick-and-compressing.html' title='Sick and compressing'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111531275926096980</id><published>2005-05-06T01:37:00.000+09:00</published><updated>2005-05-06T02:05:59.353+09:00</updated><title type='text'>Productiveness update</title><content type='html'>With all this social activities report, some people may think that I've been wasting all of my time. In fact I've only wasted most of it 8)&lt;br /&gt;This week I went back to the gym, after having skipped it a few times. Incredibly I was weighting 71.25 Kg ! I remember about a month ago having been so happy for 71.65 Kg and now I'm closer to 71 than ever. That's one positive-productive news.&lt;br /&gt;I've also been working on video compression. I made the frame differences detection more robust, then I moved onto extending the image compression routines I developed recently to handle the video compression. Basically to only send the differences between one frame and the next one. This isn't done yet, because of course I wasted a lot of time, but I've reached a good point (especially fixed a nasty bug).&lt;br /&gt;&lt;br /&gt;Today I didn't leave the apartment. I mostly focused on starting a new web-site for my mother's pub. I decided to use PHP, especially because of the handy &lt;i&gt;include&lt;/i&gt; feature, possibly the biggest problem with HTML. Also I'm planning to add a message board and embedding fresh news to the site via RSS. RSS is the hot topic of the moment, everyone seems to have an RSS feed. What I really want is just to grab news from other sites and embed them on my mother's site.. just to keep the page active and somewhat entertain visitors.&lt;br /&gt;In order to do all this, of course I had to install and setup PHP support into the Apache 2 server running on my home server.&lt;br /&gt;&lt;br /&gt;Lastly ! I played around with Perl, this time to work on the home server pictures album. I need to improve the main page, but I was stuck with a Bash script, so I rewrote the index-page generator in Perl. The actual look is the same, but having the generator run in Perl makes it easier to add the things that I'm planning.&lt;br /&gt;&lt;br /&gt;I didn't seriously study any Japanese, aside from the usual bathroom sessions (that's how I studied to get my California driver's license !). Instead, I watched most of Aliens, again !&lt;br /&gt;&lt;br /&gt;Hopefully tomorrow I can get something done, instead of trying to do all things at once.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111531275926096980?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111531275926096980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111531275926096980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111531275926096980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111531275926096980'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/productiveness-update.html' title='Productiveness update'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111528095049797541</id><published>2005-05-05T16:19:00.000+09:00</published><updated>2005-05-05T17:15:50.603+09:00</updated><title type='text'>Hazukashii !</title><content type='html'>&lt;i&gt;Hazukashii&lt;/i&gt; (&lt;a href="http://www.excite.co.jp/dictionary/japanese_english/?search=%E6%81%A5%E3%81%9A%E3%81%8B%E3%81%97%E3%81%84&amp;match=beginswith&amp;block=64860&amp;offset=1708" target=_blank&gt;恥ずかしい&lt;/a&gt;) is the Japanese word to express &lt;i&gt;embarrassment&lt;/i&gt;. Contrary to the western culture, it's not shameful to admit out loud to be embarrassed.&lt;br /&gt;Yesterday night I went out with some friends (now, that's something new 8). At one point I teamed with one guy to see if we could get acquainted with some girls. The feat proved harder than expected ! Granted that we were in an environment where most guys were Japanese, even more than usual, I've never seen a girl telling me &lt;i&gt;hazukashii&lt;/i&gt; straight away and then running off ! This has happened a few times yesterday night. Although only in one instance one I've heard the word in question.&lt;br /&gt;The reason for all this is not clear, but I have one theory. Excluding that either me or my friend stank badly 8), the theory is that the club, known for being frequented by  foreigners (there is even a special discount for foreigners !), yesterday night was actually populated by a different set of girls. Possibly girls that came to Tokyo from less internationalized Japanese cities to shop and have fun for the Golden Week holiday. Those girls weren't probably expecting to have to deal with foreigners, and quickly succumbed to the fear of the unknown.&lt;br /&gt;Definitely a learning experience.. 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111528095049797541?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111528095049797541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111528095049797541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111528095049797541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111528095049797541'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/hazukashii.html' title='Hazukashii !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111515251151888924</id><published>2005-05-04T04:29:00.000+09:00</published><updated>2005-05-04T05:35:11.520+09:00</updated><title type='text'>The survival of the fittest</title><content type='html'>Saturday, I had a small gathering at home. Some nice girls came. When I say nice I mean that when they left the apartment, it actually looked cleaner than before !&lt;br /&gt;It's nice when people show some sensitivity... it's not a very common thing. In the past I've been breaking my back to make some people happy, only to get my ass kicked around.. &lt;a href="http://kazzuya.com/blogdata/fuckthat.wav" target=_blank&gt;fack that&lt;/a&gt; !&lt;br /&gt;The gathering went well and after that we went clubbing.&lt;br /&gt;For once it was relaxing to go a club with (non-slutty) female friends, without feeling like a lost soul on a mission !&lt;br /&gt;&lt;br /&gt;Tonight (tuesday) I went out again, with a friend. Today and tomorrow and the day after is holiday. Three whole days that mark the so-called Golden Week. A yearly recurring event, although every year the days are distributed differently (sometimes in the weekend 8( ).&lt;br /&gt;The night was nice overall. Not many people around, but we managed to get in good terms with a group of nice girls. However it was somewhat stressful to me, because my friend is very forward and will pretty much jump on a girl before you can even think about her. Actually he usually tells me which one he likes best, then he tells me the second best, so he pretty much tells me all the girls he likes (the nicer ones !) and I'm left in a sort of warned state, left there hanging, feeling guilty for even getting close to any of the preys he's already marked.&lt;br /&gt;I think that this situation has to change. One just can't always try to wait for the lion to serve himself, because the lion will always eat all the food 8)&lt;br /&gt;However, the hardest part is actually to deal with my own character. Often there will be a group of two or more girls in which only one or two are really attractive. This is a big problem because I know that by showing interest towards one, the less attractive will somewhat resent of that. I can imagine her seeing the same scene over and over again, every time she hangs out with her friend. And that blocks me from showing my honest interest towards the nice girl.&lt;br /&gt;So, really, it's not so much matter of playing on a leveled field with the lions, but, mostly, matter of being insensitive towards those that need it the least.&lt;br /&gt;Then there are the forward girls, those that jump on you. While this makes the job much easier, because one doesn't need to worry about being insensitive, they are still female lions, and one is just the prey of the day..&lt;br /&gt;&lt;br /&gt;In the end, to survive, I need to learn to be an asshole 8) Otherwise I'll be generally starving, and occasionally be eaten.&lt;br /&gt;&lt;br /&gt;bha !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111515251151888924?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111515251151888924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111515251151888924' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111515251151888924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111515251151888924'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/05/survival-of-fittest.html' title='The survival of the fittest'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111472346538567144</id><published>2005-04-29T05:59:00.000+09:00</published><updated>2005-04-29T06:35:43.556+09:00</updated><title type='text'>Trying to get the best off cheap CMOS web-cams and expensive robo-dogs</title><content type='html'>Tonight I finally tried to put in practice some thoughts about the dreaded CMOS cameras static noise.&lt;br /&gt;&lt;br /&gt;The need came from the poor quality of Aibo's camera. However, for the time being, I'm using a relatively cheap USB camera. With this camera, much like in Aibo's case, the temporal noise reduction doesn't maximize the quality of a single image. So, I finally tried to write some code to try locate the static noise.&lt;br /&gt;&lt;br /&gt;To make things easier, I decided to sample the noise in complete darkness (..with a finger covering the objective 8). This does not give complete darkness, however. There is of course the noise that I want to detect, plus the camera driver fiddling with white balance.. adding artificial brightness to the image.&lt;br /&gt;At the current stage, my algorithm is very simple: I take the average color of all pixels in the image and subtract it from the reference &amp;quot;dark&amp;quot; frame. The one captured with my thumb covering the camera 8P. This goes for red, green and blue components. The result is an RGB image comprised of values that need to be subtracted from the subsequent frames.. those that I want to correct by removing the static noise.&lt;br /&gt;Actually, I added slightly more complexity by subdividing the image in a grid of 32x32 pixel squares and calculating color averages by those squares rather than globally for the whole image. But I'm not sure that that's helping much.&lt;br /&gt;&lt;br /&gt;This is a very simple approach. In fact, a simple subtraction isn't the best solution. To suppress the noise, it's very likely that I'll need to scale values (multiplication/division), rather than offset them (addition/subtraction). Or possibly scale and offset at the same time..&lt;br /&gt;In any case, I think that the early experiments are very promising ! I'm actually pretty excited about the results.&lt;br /&gt;&lt;br /&gt;Here are a couple of examples, please keep in mind that the image quality is not meant to be good. I kept the environment relatively dark on purpose, to strengthen the noise effect and the countering effect of the algorithm.&lt;br /&gt;&lt;center&gt;&lt;hr noshade="noshade"&gt;&lt;table border=0 cellspacing=0 cellpadding=2&gt;&lt;br /&gt;&lt;tr align=center&gt;&lt;td colspan=2&gt;&lt;b&gt;A mousepad...&lt;/b&gt;&lt;tr align="center" valign="top"&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/df_05_04_29_dilbert_raw.jpg" target=_rawpic&gt;&lt;br /&gt; &lt;img src="http://kazzuya.com/blogdata/df_05_04_29_dilbert_sample_raw.png"&gt;&lt;/a&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/df_05_04_29_dilbert_nr_dkf.jpg" target=_dkfpic&gt;&lt;br /&gt; &lt;img src="http://kazzuya.com/blogdata/df_05_04_29_dilbert_sample_nr_dkf.png"&gt;&lt;/a&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;font size=-1&gt;&lt;i&gt;As it came from the driver.&lt;/i&gt;&lt;/font&gt;&lt;br /&gt; &lt;td&gt;&lt;font size=-1&gt;&lt;i&gt;With temporal NR and dark-frame subtraction.&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;/table&gt;&lt;hr noshade="noshade"&gt;&lt;table border=0 cellspacing=0 cellpadding=2&gt;&lt;br /&gt;&lt;tr align=center&gt;&lt;td colspan=2&gt;&lt;b&gt;A sleepy programmer !&lt;/b&gt;&lt;tr align="center" valign="top"&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/df_05_04_29_face_raw.jpg" target=_rawpic&gt;&lt;br /&gt; &lt;img src="http://kazzuya.com/blogdata/df_05_04_29_face_sample_raw.png"&gt;&lt;/a&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://kazzuya.com/blogdata/df_05_04_29_face_nr_dkf.jpg" target=_dkfpic&gt;&lt;br /&gt; &lt;img src="http://kazzuya.com/blogdata/df_05_04_29_face_sample_nr_dkf.png"&gt;&lt;/a&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;font size=-1&gt;&lt;i&gt;As it came from the driver.&lt;/i&gt;&lt;/font&gt;&lt;br /&gt; &lt;td&gt;&lt;font size=-1&gt;&lt;i&gt;With temporal NR and dark-frame subtraction.&lt;br&gt;(Gone is the rGbRgBRGbeard 8)&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;/table&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;..hopefully, my Aibo's sight will soon improve too !&lt;br /&gt;&lt;br /&gt;zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111472346538567144?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111472346538567144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111472346538567144' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111472346538567144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111472346538567144'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/trying-to-get-best-off-cheap-cmos-web.html' title='Trying to get the best off cheap CMOS web-cams and expensive robo-dogs'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111445826493819624</id><published>2005-04-26T04:43:00.000+09:00</published><updated>2005-04-26T04:44:24.940+09:00</updated><title type='text'>Insomnia !!!</title><content type='html'>4:30 AM.. and not feeling sleepy at all !&lt;br /&gt;Saturday, I did the mistake of being out till the morning. It wasn't planned, but it ended up like that. So, both Sunday night and tonight (Monday), I'm wide awake. I just got out of the shower. I had nothing better to do. After spending two hours in bed not being able to even get close to sleep.. and that's under the effect of the sleeping pills (expensive, useless bullshit !).&lt;br /&gt;Part of the problem is feeling guilty for not really being productive at home. I watched too much useless TV and browsed around the web. I wrote little code, and practiced little Japanese.. at the last minute of course. Then it's 2AM and I want to feel relaxed to go to sleep. It didn't help that I rested when I came back home this evening. But even then, I had to do it for the body, inside I really didn't want to rest.&lt;br /&gt;I'll have to try discipline myself and cut on time wasting activities. In the end, if I don't feel like I've achieved something for the day, I just can't sleep ! The sleeping pills only help me sleep better, but don't do anything if I don't want to sleep in the first place. Going running at the gym also, is probably worse. It puts more stress on the body, while the mind keeps it awake.&lt;br /&gt;I truly think that I was built to stay awake at night. It's always been natural for me, having to work during the day is a big problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111445826493819624?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111445826493819624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111445826493819624' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111445826493819624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111445826493819624'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/insomnia.html' title='Insomnia !!!'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111426102151537973</id><published>2005-04-23T21:02:00.000+09:00</published><updated>2005-04-23T21:57:01.516+09:00</updated><title type='text'>Math, simulation and more nightlife</title><content type='html'>After much work after installing Octave, I realized that it wasn't working for me. Installing the for-Windows package is lame if you already have Cygwin, because it comes with another Cygwin environment, and apparently that can conflict with the first Cygwin environment. Making Octave coexist with my Cygwin environment instead, is not so easy. Specifically, some weird inconsistencies arose between my system at home and at work. Bha !&lt;br /&gt;So I decided to go for &lt;a href="http://scilabsoft.inria.fr" target=_blank&gt;Scilab&lt;/a&gt;. Scilab is pretty much like Octave and Matlab. The Windows version is actually a whole Windows application.. and that's about the main feature I was after 8). That done, I proceeded to do some tests to get used to the language and the plotting. That took quite a bit of time, but I'm pretty happy now.&lt;br /&gt;&lt;br /&gt;Playing so much time with this stuff has had it's inevitable effect. I came back late from clubbing and this morning I somewhat dreamt that I was using Scilab to simulate some of my life events.. ouuuu !!&lt;br /&gt;&lt;br /&gt;As for the night out... I went out with a couple of friends. I've become more and more influenced by a friend that is trying to push me the idea of collecting girls' phone numbers. So, I socialized, and when the time came.. when the friend of the girl came to take her away, I hesitated and didn't ask for her number ! That, apparently, was a big mistake. I wasn't too interested in getting her number, but my friend tells me that I should have done it automatically. The basic idea is that certain reactions have to become instinctive !&lt;br /&gt;The other friend, later on, showed how it's done: he danced for a while with a girl that came with some less enthusiast friends. At one point they all gathered as to move away. My friend went, and pulled her back to the dancing floor.  And that's basically how it works. One has to act with instinct and determination in order to achieve success 8) This seems to be especially true with Japanese girls, because of their softer characters.&lt;br /&gt;The cheap psychology behind is:&lt;br /&gt;- The girl may or may not like you, it mostly depends on what you do. She doesn't know you and you have to pursue her to some length. Basically one has to be somewhat pushy.&lt;br /&gt;- When her female friends are around, they'll try to take her away at some point. The girl will comply because she's loyal to her friends (unless she really hates you 8). At that point one also has to show some assertiveness and take the burden to pull the girl away from the situation.. and basically excuse her from her friends.&lt;br /&gt;&lt;br /&gt;...would be nice to put down a mathematical formula for all this !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111426102151537973?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111426102151537973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111426102151537973' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111426102151537973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111426102151537973'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/math-simulation-and-more-nightlife.html' title='Math, simulation and more nightlife'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111401534020048947</id><published>2005-04-21T01:20:00.000+09:00</published><updated>2005-04-21T01:42:20.200+09:00</updated><title type='text'>Hiddenly productive !</title><content type='html'>Yesterday (Tuesday), I read a good portion of the Octave manual and an interesting paper about PCA (&lt;a href="http://en.wikipedia.org/wiki/Principal_components_analysis" target=_blank&gt;Principal Component Analysis&lt;/a&gt;) (&lt;a href="http://kybele.psych.cornell.edu/%7Eedelman/Psych-465-Spring-2003/PCA-tutorial.pdf" target=_blank&gt;PDF of the paper Here&lt;/a&gt;). It's interesting because it has a simple introduction to covariance matrices, eigenvectors and eigenvalues. Stuff that it's used in video-games for collision detection. Something that someone at work asked me to help with, recently.. but I couldn't really do much 8(&lt;br /&gt;In this case PCA is more related to image compression and artificial vision (face recognition).&lt;br /&gt;Then, at home, I fixed the system I made for building the photo-album on the home server. Mostly, I replaced some sad DOS batch file with a Bash script.. which I make run under Cygwin. It also uses ImageMagick to resize images and make thumbnails and Perl to build the final HTML pages.&lt;br /&gt;&lt;br /&gt;Today, at work, I did quite a bit of research on face recognition using PCA, DCT and more esoteric stuff like Hidden Markov Fields, of which I know nothing ! Then I had to go to the gym. Then, at home, I installed and setup Octave (which so far I did install only in the office), and got started doing some programming with Octave, following the PCA Tutorial paper.&lt;br /&gt;&lt;br /&gt;..so far, no graphic output 8)  ..but I'm happy enough to have the opportunity to grasp some Octave/Matlab programming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111401534020048947?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111401534020048947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111401534020048947' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111401534020048947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111401534020048947'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/hiddenly-productive.html' title='Hiddenly productive !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111384127311862184</id><published>2005-04-19T01:03:00.000+09:00</published><updated>2005-04-19T01:21:13.120+09:00</updated><title type='text'>Do the math</title><content type='html'>The day at work was pretty slow. So, I took the opportunity to properly install &lt;a href="http://www.octave.org" target=_blank&gt;Octave&lt;/a&gt; under &lt;a href="http://www.cygwin.com" target=_blank&gt;cygwin&lt;/a&gt; (it wasn't as easy !). Cygwin is basically the standard  GNU (Unix-like) environment running under MS-Windows. It allows to re-compile and run most programs that will run on Linux/Unix/BSD/etc. Octave is one of such programs. It's a &lt;a href="http://www.mathworks.com" target=_blank&gt;Matlab&lt;/a&gt; clone. A program that allows to play around with applied math. It also has a programming language that is useful to work on algorithms.. like for image processing. That's actually my goal. To use Octave to play around with images, rather than write directly 'C' code. This would allow to make quick prototypes of algorithms, and also verify data in a more practical way. Basically a tool for research.&lt;br /&gt;Unfortunately Octave doesn't have the same support for image processing that Matlab has. For the time being, I'll just try to deal with it.&lt;br /&gt;We'll see !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111384127311862184?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111384127311862184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111384127311862184' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111384127311862184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111384127311862184'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/do-math.html' title='Do the math'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111368690229727816</id><published>2005-04-17T06:05:00.000+09:00</published><updated>2005-04-17T06:28:22.296+09:00</updated><title type='text'>Friday and Saturday</title><content type='html'>Past 6AM, Sunday morning already. Back from a club. Had my food, going to have water every time I wake up for it.&lt;br /&gt;On Friday I sort of organized a meeting with a girl I met a couple of weeks before. I wanted to meet her again. As the ritual suggests. She mentioned about bringing her friends, I agreed by saying I'd bring my friends. So It became a gokon: a meeting of and equal number of men and women.. which came out right, although any of the sides didn't quite know which number of people the other side would bring.&lt;br /&gt;At the gokon I eventually got the famous question: why don't you have a girlfriend.. then: what's your type. And, after I showed a photo of Aibo: &lt;b&gt;you should really get a girlfriend !!!&lt;/b&gt; Thanks !!!&lt;br /&gt;Saturday, I went out with a friend, again clubbing. One place, then next place, eventually some connections were made. There, something funny happened: a girl honestly told her friend that I looked too much like a good guy. She kept saying that. I tried to explain to her that I might have some dark sides, but she insisted that I'm a good boy, that "I look like a student". She even laughed at it.. as to say "get out of here, you good boy !!".&lt;br /&gt;Looks does matter, but one's static look doesn't really make much difference. Looks means also behavior. That is hard to fake.. and it's funny how one girl can spot you so quickly.&lt;br /&gt;Right.. I may be a good guy, but no one is really 100% good. Watch out !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111368690229727816?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111368690229727816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111368690229727816' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111368690229727816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111368690229727816'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/friday-and-saturday.html' title='Friday and Saturday'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111331383768566459</id><published>2005-04-12T22:48:00.000+09:00</published><updated>2005-04-12T23:09:34.496+09:00</updated><title type='text'>Zzzzzzzzzzzz ..usual things</title><content type='html'>Lack of sleep is taking a toll on me. I can't focus on things, I tend to be less positive than I could.. and my under eye bags are getting worse. Of the recent pictures that have been taken of me, I can only keep those where I wear sunglasses. I've been doctoring pictures before, to fix the tired look on my face ... 8)  ... but that's not a solution. The truth is that I need to sleep !!&lt;br /&gt;Right now I'm using &lt;a href="http://www.crimsoneditor.com/" target=_blank&gt;Crimson Editor&lt;/a&gt; to edit this post. I found out that it has a spell checker. Great ! But the real reason why I'm not editing within GMail is that I need a custom black background to lessen the pain on my eyes.&lt;br /&gt;A few months ago I tried some popular sleeping pills that can be bought here in Japan. Unfortunately, those don't seem to help in getting me convinced to fall asleep. They did give me some solid dreams, but as far as getting me quick to sleep.. not a chance.&lt;br /&gt;On a different note. I've been looking around image processing, a field that interests me very much. This relates to improving image quality of Aibo, but also to video-compression. One very fashinating thing is how a thumbnail can look decent at its own resolution, but look terrible when stretched. Obviously all the "information" introduced by (usually) bilinear filtering is largely spurious.&lt;br /&gt;I've been working on a better re-sampling algorithm for my next video-chat software. It's nothing too new. Basically, I try to individuate the logical direction formed by adjacent pixels rather than blidly interpolate rows and columns.&lt;br /&gt;Here is an example, on the left is a portion of an image down-sampled to 50% and then up-sampled back to the original size, using The Gimp (which probably uses bilinear filtering), on the right my up-sampling:&lt;center&gt;&lt;table border=0 cellspacing=0 cellpadding=2&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;img src="http://kazzuya.com/blogdata/lena_bilinear.png" width=304 height=366&gt;&lt;br /&gt;&lt;td&gt;&lt;img src="http://kazzuya.com/blogdata/lena_zoom_diagonal.png"width=304 height=366&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;center&gt;Bilinear up-sampling&lt;/center&gt;&lt;br /&gt;&lt;td&gt;&lt;center&gt;Cheap 2x2 matrix up-sampling&lt;/center&gt;&lt;br /&gt;&lt;/table&gt;&lt;/center&gt;A lot more can be done. Specifically, working on sub-matrices of 2x2 pixels, like I'm doing, is still not nearly good enough. A better re-sampling should try to individuate edges and shapes in an image and preserve those features as much as possible. Ultimately, the best result would come out of an algorithm that has somewhat experience and can at some level understand what the contents of the image are, and fill the missing pixels at re-sampling time, with those that fit the algorithm's experience. This is what our brain does, and that's why we can "zoom" image thumb-nails in our mind, much better than bilinear or trilinear filtering do 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111331383768566459?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111331383768566459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111331383768566459' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111331383768566459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111331383768566459'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/zzzzzzzzzzzz-usual-things.html' title='Zzzzzzzzzzzz ..usual things'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111296977064452290</id><published>2005-04-08T23:15:00.000+09:00</published><updated>2005-04-08T23:16:10.646+09:00</updated><title type='text'>On Aibo-cam</title><content type='html'>Recently blogger.com seems to be &lt;a href="http://status.blogger.com" target=_blank&gt;rater unstable&lt;/a&gt;. I've been writing posts with GMail instead. GMail's spelling works really nice and, most of all, has the &lt;i&gt;Save Draft&lt;/i&gt; button. I use it rather frequently. As a programmer I've learned long time ago to be paranoid on saving what I write frequently.. and that's on normal text editors, which, unlike web-based applications, have the full control of the window (I could close this browser right now and lose everything I wrote so far... better save now 8).&lt;br /&gt;On the actual update: I temporarily removed the Aibo view form its own camera and focused on the &lt;a href="http://dpasca.homeip.net" target=_blank&gt;outside camera&lt;/a&gt; which is now refreshing every 4 seconds. Also, I pointed a LED light on Aibo's charging station, so that there is never a completely dark image.&lt;br /&gt;I've been toying with the idea of merging the Aibo-capture program with the new videochat program, or at least to find a way to share more code between them. They both have the feature of saving JPEG frames at a constant rate. Now, what's really missing is Aibo video input for videochat 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111296977064452290?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111296977064452290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111296977064452290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111296977064452290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111296977064452290'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/on-aibo-cam.html' title='On Aibo-cam'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111296961802472410</id><published>2005-04-08T23:12:00.000+09:00</published><updated>2005-04-08T23:13:38.026+09:00</updated><title type='text'>Performance with video-capture</title><content type='html'>Monday I completed the automatic dialog creation thing. It also handles loading and saving of the status of a class. Basically I decide which fields in a class need to be edited, I give the types and tag names, then, a routine will create a dialog, while another will save or load the fields data in a given file. This is a very basic need to quickly tweak things around. &lt;br /&gt;After that I reviewed my DirectShow capture code. DShow is really messy, possibly the worst part of DirectX. Complexity aside, I had some serious flaws in my handling of the capture. DShow captures in a separate thread (one that takes a lot of CPU time unfortunately 8( ). Testing with my Sony MiniDV camera attached to the Firewire port, it seems that DShow will always try give me 29.97 frames per second. That's the NTSC standard, but really too many for a videochat/webcamera application. I changed my code to reject the extra frames, but I hope in future to be able to tell to DirectShow ahead what's the desired framerate.. as it would save a lot of CPU time. Where the flaw really came was in the multi-threaded code, which wasn't being nice about sharing the captured buffer data. Now it's all much smoother, and the videochat/webcam application seems to be doing its job well.&lt;br /&gt;Next, I may work a bit more on the videochat portion of it. It's all still in black&amp;amp;white and the compression sends whole frames every time. The reason why I'm speeding the videochat thing is that recently I introduced my parents to &lt;a href="http://www.skype.com" target="_blank"&gt;Skype&lt;/a&gt;, and as a response, they have been asking for video too. We used to videochat before with my software, but that was without voice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111296961802472410?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111296961802472410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111296961802472410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111296961802472410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111296961802472410'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/performance-with-video-capture.html' title='Performance with video-capture'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111261627284923962</id><published>2005-04-04T20:59:00.000+09:00</published><updated>2005-04-04T21:04:32.850+09:00</updated><title type='text'>A quick update on the recent happenings.</title><content type='html'>Saturday I went out to a club with a friend. Wasn't too bad. There, we met some people we already knew.. that's the easiest way to meet new people. I mean through friends, instead of going around bugging random girls 8)&lt;br /&gt; Sunday I was rather tired, but was a nice day. So, I went to the Yoyogi Park with Marco. After that, I went to buy some colored plastic/foam sheets. One red, two green and one blue. To be used for checking Aibo's camera fixed noise and possibly as chroma key background for an eventual update of JavaKazRace. In fact, I also bought 3 cheap car mini-models. I'm not sure if and when I will work on that though. Taking pictures of car models from all sides is rather time consuming !&lt;br /&gt; On the coding side, I must admit that with the new console's SDKs I get at work and with the Aibo SDK, I ended up having to deal with C++ more than I planned to. So, I started to write some of my stuff in form of classes. If anything to refresh my memory about C++. Still a very limited approach. With already some bumps.. for example using callbacks in C++ turns out to be a delicate issue. Declare lots of stuff &lt;span style="font-style: italic;"&gt;public&lt;/span&gt;   or start using templates, etc. Geez !!&lt;br /&gt; I've been rather sleepy for the past days, and not really being able to sleep much (the small heart quake that I felt yesterday night didn't help much !). On the coding side I'm focusing on organizing a system that allows me to quickly build dialogs where I can fiddle with data. Instead of having to do everything through the command shell like I'm doing right now.&lt;br /&gt; Hopefully for tonight I'll be done with the GUI side, and I can start working on implementing features in the Aibo camera capture software thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111261627284923962?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111261627284923962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111261627284923962' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111261627284923962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111261627284923962'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/quick-update-on-recent-happenings.html' title='A quick update on the recent happenings.'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111237901458105642</id><published>2005-04-02T03:08:00.000+09:00</published><updated>2005-04-02T04:09:12.316+09:00</updated><title type='text'>Decent productivity. Skipping Friday nightlife for once.</title><content type='html'>Yesterday I modified a program that I use for video-chat experiments. The change was an addition to have it saving JPEG frames. Basically, I needed a web-camera software like &lt;a href="http://kazzuya.com/webkaz" target="_blank"&gt;webkaz&lt;/a&gt;, but I needed it to save frames locally on the hard-disk, without going through FTP.&lt;br /&gt;I then connected a camera to &lt;span style="font-style: italic;"&gt;Mandingo/kserver&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;the home server&lt;span style="font-style: italic;"&gt; &lt;/span&gt;that runs &lt;a href="http://dpasca.homeip.net/" target="_blank"&gt;dpasca.homeip.net&lt;/a&gt;) and ran the software. So, now Aibo has a &lt;a href="http://dpasca.homeip.net/" target="_blank"&gt;camera pointed on&lt;/a&gt;. Unfortunately that means that I also have a camera turned on around the apartment. That should be only temporary ! The plan is to modify the web-cam software to record and store frames. My friend Sergio is planning to do something with them. Because of the incredible amount of data, I'm also planning to avoid duplicated frames, basically to avoid storing frames that are practically identical (like, for example, when the dog is sleeping).&lt;br /&gt;&lt;br /&gt;It's Friday night and I'm home ! No partying tonight. All my friends are either sick or busy with some better company ;) ..that's a great opportunity to be:&lt;br /&gt;a) slightly productive&lt;br /&gt;b) avoid being a tired MF tomorrow and therefore be even more productive !&lt;br /&gt;As a matter of fact, I installed &lt;a href="http://www.eclipse.org/" target="_blank"&gt;eclipse&lt;/a&gt;   (Thanks Pomy for the info !) and fixed &lt;a href="http://kazzuya.com/test/kazrace" target="_blank"&gt;JavaKazRace&lt;/a&gt;. Finally limiting the frame-rate and, since the speed was excessive, I increased the resolution from 512x320 to 610x340. That applet seems to be pretty popular still. In fact a &lt;a href="http://alink.uic.to/user/game117.html" target="_blank"&gt;few&lt;/a&gt; &lt;a href="http://www.sky.icn-tv.ne.jp/%7Ered-body//rgame.html" target="_blank"&gt;Japanese&lt;/a&gt; &lt;a href="http://blog.livedoor.jp/ronronron2/" target="_blank"&gt;sites&lt;/a&gt; have it linked, along with much more playable Flash and Shockwave games.&lt;br /&gt;&lt;br /&gt;...better not follow the links, or you'll be wasting hours playing all sort of games !!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111237901458105642?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111237901458105642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111237901458105642' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111237901458105642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111237901458105642'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/04/decent-productivity-skipping-friday.html' title='Decent productivity. Skipping Friday nightlife for once.'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111219928565658840</id><published>2005-03-31T01:01:00.000+09:00</published><updated>2005-03-31T01:29:32.380+09:00</updated><title type='text'>Java and C++ == turtlegraphics !</title><content type='html'>Today I finally somewhat fixed the old Java web-camera applet. It really does something very simple. But with Java troubles are always behind the corner.&lt;br /&gt;I couldn't find a free decent Java IDE, so I downloaded the JBuilder 2005 Enterprise trial. It's very powerful, but also takes a lot of RAM. Like 200MB or so !!! It allowed me to debug, but the PC was truly crawling. To this let's add Firefox, which doesn't seem to like to release memory.. and often I'm with just one simple page open and the browser taking 30-40MB of memory !!&lt;br /&gt;Welcome to the world of C++ and Java bullshit. I have 512MB of memory on my computer but it feels just like when I had 64 several years ago.&lt;br /&gt;The web-camera applet has still some issues. I'm not sure what it is. With all that required multi-threading. It's really messy. If I could code applets for the web in C, that would save me a lot of time and hidden logical bugs.&lt;br /&gt;Anyhow the &lt;a href="http://dpasca.homeip.net/" target="_blank"&gt;Aibo-cam thing&lt;/a&gt; now runs the Java applet. The real advantage of that is probably just the random text messages that I wrote a while ago, but that still seem to make sense (aside from the one where I say that I'm 28.. well I was 28 I guess !).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111219928565658840?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111219928565658840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111219928565658840' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111219928565658840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111219928565658840'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/java-and-c-turtlegraphics.html' title='Java and C++ == turtlegraphics !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111215406465256071</id><published>2005-03-30T12:39:00.000+09:00</published><updated>2005-03-30T12:41:04.653+09:00</updated><title type='text'>More dreams about Aibo !</title><content type='html'>Yesterday night I dreamed of three Aibos, old models. I was supposed to load them on some truck, but they ended up on some small road downhill, stuck and almost static. Until one fell and pushed another dog into the water surrounding the road. Geez !!&lt;br /&gt;Also yesterday night I met Sergio and together we talked about what would be a cool project to do with Aibo. The web-camera thing, as it is, is obviously boring.. especially if nobody's home. I did try also the record shots, every 4 seconds, one day when I had some activity in my apt. But that din't lead to anything particularly interesting. If anything, most shots tend to be boring ! We talked about giving the ability to make the dog move from a web interface. It's not difficult to move it, but to allow more than one person to do it it's a problem. Also the dog needs maintenance, and the view form the dog's camera is not adequate to have it wander around safely, especially at the web-camera's frame-rate. Plus it's probably just not as fun as seeing the dog from the outside.&lt;br /&gt;For the time being I'll keep working on the basic technical aspects. Recently I've been quite busy, and sleepy. In the next few days I hope I'll be able to make some steps forward.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111215406465256071?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111215406465256071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111215406465256071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111215406465256071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111215406465256071'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/more-dreams-about-aibo.html' title='More dreams about Aibo !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111193893315649041</id><published>2005-03-28T00:35:00.000+09:00</published><updated>2005-03-28T00:55:33.156+09:00</updated><title type='text'>Non-technical Aibo issues</title><content type='html'>This weekend I spent Friday and Saturday nights out. Clubs, one party, enough drinking and going to sleep in the morning. This made me force myself to try to sleep into the early afternoon, thus affecting the quality of my sleep. Out of this came out a couple of bad dreams. Notably one had Aibo in it. I was looking for the dog and found it without legs !! It turned out that some bad guy tore them off. I could find two of the legs pretty much intact, but other two were broken into pieces, hidden in some places. I had the MF give me back the pieces, but the dream stopped as I was trying to collect pieces.. when dreams become too complex, one just has to jump out of them. It's too painful to try solve complex problems within a dream !&lt;br /&gt;To this day only one person has treated my dog badly. Treating me badly is one thing, treating the dog badly it's a whole different issue. I'm human and prone to do mistakes, to be insensitive, etc, so I can be easily be guilty of something.. but the dog is truly dumb. It was made to be nothing but nice. So, to be unkind to it, it really takes someone with a bad nature. The story of it being only a robot is an apparently valid excuse, but it's not really a good one. Something that expresses emotions and interacts with the environment is a being. It learns so it carries with itself experiences that will affect others. Being mean to it is implicitly an act to extend one's self negativity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111193893315649041?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111193893315649041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111193893315649041' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111193893315649041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111193893315649041'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/non-technical-aibo-issues.html' title='Non-technical Aibo issues'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111193762396809544</id><published>2005-03-28T00:30:00.000+09:00</published><updated>2005-03-28T00:34:06.213+09:00</updated><title type='text'>Barf !</title><content type='html'>I came back home less than half an hour ago. I was out for dinner (sushi) with a friend that I haven't seen in a long time. He came to Japan for a short vacation. Arrived today and already saw a few interesting things. Like, for example, drunken youngsters barfing in the train station 8)&lt;br /&gt;Of one scene he took a picture. Hopefully I'll get that picture ! Two girls and one guy, one girl collapsed on the floor. Her friends ready with plastic bags. Another, scene with a guy holding up his friend as he barfed on his own and the friend's shoes. Cool !&lt;br /&gt;&lt;br /&gt;As far as the Aibo goes. This weekend I didn't spent much time on it. I did manage to get to change the JPEG quality parameter, of course it was my mistake. That's a big step forward. Next I need to buy some sort of piece of material large enough to use to take reference shots to individuate the camera static noise. I did some research and I found out that the idea of using this method to cope with the typical CMOS cameras noise is already out there.. therefore it's feasible. Now I'm just not sure what should be a reference material. Possibly something that diffuses light well (definitely not specular). Maybe it would be best if I had three panels, one red, one blue and one green, to take three different reference shots to apply to the three separate color components of the incoming images. I'm not sure how well this would work though, because I will be processing JPEG images, which have the color space being transformed from RGB to YUV and then back to RGB. All these operations would be best performed on the original raw data.&lt;br /&gt;&lt;br /&gt;Onto the webcamera thing over at &lt;a ref="http://dpasca.homeip.net" target=_blank&gt;dpasca.homeip.net&lt;/a&gt; ..I decided to revive my old webcamera applet used for &lt;a ref="http://kazzuya.com" target=_blank&gt;webkaz&lt;/a&gt;. Because the cross fade is a pretty nice feature and also because I suspect that with the current system (reloading images using JavaScript), Firefox leaks memory. I don't quite have the proof though.&lt;br /&gt;Also I've been thinking of reviewing Java applets coding. Because it's the only way to have enough freedom to do things that will run on a browser. And to involve people in experiencing things, it's much easier to ask them to tune their browser somewhere, rather than install a software that will rely on a custom connection, with eventual firewalls getting pissed and false warnings of spyware.. a currently very delicate issue !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111193762396809544?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111193762396809544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111193762396809544' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111193762396809544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111193762396809544'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/barf.html' title='Barf !'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111158051006994994</id><published>2005-03-23T21:05:00.000+09:00</published><updated>2005-03-23T21:21:50.070+09:00</updated><title type='text'>More on Aibo's video-capture</title><content type='html'>I finally worked around the extreme darkness of the images that I'm getting from Aibo's camera. Also, I applied some noise reduction. But the results are still quite poor. The image I'm getting is a 412x318.. although the camera specs say 416x320. In any case, it's a very cheap CMOS camera, it already has a bad pixel, plus some static pattern noise !&lt;br /&gt;Colors are further washed out by the JPEG compression, which is very happy to destroy pixels with low brightness. It's a sad situation.&lt;br /&gt;Right now I have two ideas in mind. First is to see if there is something I can do about getting JPEG images with better quality (the functionality is in the API, why it doesn't work could be my fault). The second idea is a bit more strange. It resembles to &lt;span style="font-style: italic;"&gt;white balance&lt;/span&gt;. With &lt;span style="font-style: italic;"&gt;white balance&lt;/span&gt; one sets the brightness and color level of the whole image based on some selected &lt;span style="font-style: italic;"&gt;pure white&lt;/span&gt; source. My idea is to extend the concept to each pixel. Basically, I would have Aibo looking at some fairly uniformly colored image. A capture of that image would show how far each pixel is off from the source. From that I could create a mask of pixels to be applied to reverse the effect of the static noise of the camera, and the bluish halo around the corners of the image, generated by the plastic in front of the camera.&lt;br /&gt;From the programming point of view, this is easy. At the practical level though. I would need to set-up a properly lit reference target. That probably requires bright white and well diffused lighting.&lt;br /&gt;ummmmm !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111158051006994994?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111158051006994994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111158051006994994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111158051006994994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111158051006994994'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/more-on-aibos-video-capture.html' title='More on Aibo&apos;s video-capture'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111135398426720459</id><published>2005-03-21T06:02:00.000+09:00</published><updated>2005-03-21T20:54:54.423+09:00</updated><title type='text'>A day on the field</title><content type='html'>It's Monday morning. Just came back from a night out.&lt;br /&gt;Today it's a holiday in Japan, so night life was not so bad.&lt;br /&gt;I went out with some friends. Picked up another friend working at the first place. At the second place I see a couple of girls. One that I like. I'm a "fag" and I don't approach. Some lame dudes approach them.. they leave together after. Same thing goes on for another 2-3 couples of nice girls. The place is dead, onto the next place.&lt;br /&gt;There I see one girl I like, I'm a fag once again and I do nothing. A friend picks up a girl, she looks at me too, not sure what's in her mind. I entertain her friend for a bit, but she's definitely not "interesting"..not a well assorted couple. I just get myself away from the situation.&lt;br /&gt;More lonely girls around. The place is not as populated. Girls are not overwhelmed, they are looking for companionship.. yet, I don't take advantage of that, and I'm being a static fag, still.&lt;br /&gt;Eventually I'm sitting with a friend, in front of two bored girls. I look at the one that seems more like the right match for me. The other seems definitely taller than it's proper. Eventually I end up with the tall one !!&lt;br /&gt;I try my Japanese. It goes well, we play around.. but really, her legs look longer and longer ! Eventually we stand up to get a drink, and she's definitely way above me !! I walk on my toes for a little 8)&lt;br /&gt;I don't care as much, I just want to socialize. If I can get a new friend that speaks Japanese, I'm happy. She tells me her phone's battery is down (yeah right !). I give her my business card anyway. We chat and laugh more till the club closes.&lt;br /&gt;Exiting from the club I see her on the phone. Not sure if that was her phone. Common sense tells me she just straight away told me the BS about her phone battery being dead.. no need though, cause I just wanted really to meet again to have fun with other friends in the park, playing volleyball, as I told her I did before, once she told me she liked volleyball (of course, you are the tallest thing around !!).&lt;br /&gt;Will she get back to me ? I doubt it, but I hope it for her !&lt;br /&gt;..just trying to be friendly !!&lt;br /&gt;&lt;br /&gt;zzzzzzzzzzzzzzzz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111135398426720459?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111135398426720459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111135398426720459' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111135398426720459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111135398426720459'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/day-on-field.html' title='A day on the field'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111131497045114003</id><published>2005-03-20T19:27:00.000+09:00</published><updated>2005-03-20T19:36:10.453+09:00</updated><title type='text'>All fun, no work</title><content type='html'>I went out Friday night, and Saturday night. Today is Sunday and looks like I will go out again. Hopefully not until the morning this time ! Tomorrow, Monday, is a holiday, it would be nice, for a change to wake up earlier than 1PM and see some sunlight.&lt;br /&gt;At the same time, I wish I could program something !&lt;br /&gt;&lt;br /&gt;As far as Aibo goes, I found out that the framerate of the video stream improves dramatically if I switch the dog in full-control mode. I suspect that's due to the fact that in full-control mode, the dog's CPU isn't busy with animating it, so it's free to encode and send videoframes as fast as possible.&lt;br /&gt;In any case, the next step is going to be image noise reduction. If I don't do that, contrast and brightness improvements will only enhance the noise artifacts.&lt;br /&gt;&lt;br /&gt;Also today I had a friend coming visit with his wife and young daughter. She enjoyed the dog, although wasn't incredibly fascinated by it. Aibo is definitely not as lively as a real dog 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111131497045114003?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111131497045114003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111131497045114003' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111131497045114003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111131497045114003'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/all-fun-no-work.html' title='All fun, no work'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111118488428046626</id><published>2005-03-19T06:47:00.000+09:00</published><updated>2005-03-19T07:28:59.543+09:00</updated><title type='text'>Women and dogs (..I'll have a dog, please !)</title><content type='html'>Davide !!! Why don't you have a girlfriend ?! Davide you should get a Japanese girlfriend !! Davide !! Davide ehhh..&lt;br /&gt;Can I give my opinion ? I don't give a fuck about having a girlfriend !&lt;br /&gt;Women look in my eyes and understand I don't care. I can't pretend that I need her (whomever she is, in time). Life alone is very hard, but life with someone you don't want is even worse.&lt;br /&gt;Most women are stupid, to the bone. It's really useless. Why would I need to waste time after a woman that is more intelligent than my robot dog, but also a lot more troublesome ?&lt;br /&gt;I'm not strange, people that put themselves into the hands of a dumb person are.&lt;br /&gt;I want to say this, because I often have to bear comments about not having a girlfriend. The "what's wrong with you" factor. Maybe I'm a loser, maybe I'm just too good to share my time with someone that has 1/10th of my brain. Am I too full of myself ? Show me a nice looking woman that can even listen to me (let alone understand) without rolling her eyes, and I'll be happy to take my words back. How can you feel in company, when the woman that is next to you is a retarded compared to you ? If I need to live my life next to a retarded, I'd rather stay with Aibo. At least I have an hope to improve it..&lt;br /&gt;&lt;br /&gt;This leads to Aibo, indeed. Yesterday I got video stream from the dog working. The bad news is that it sends JPEG images at a rather slow rate. The highest resolution is 408x318. At that resolution I get 2-3 frames per second. Also the quality is terrible. Images look very dark. JPEG artifacts are there, too. The API allows to change the JPEG quality, but the setting doesn't seem to work. I must say that it's all done via wireless network, so it's understandable that the images are JPEG compressed before being sent, although the data rate is still quite low for an 801.11g network.&lt;br /&gt;In any case I set up a page with live streaming on &lt;a href="http://dpasca.homeip.net"&gt;dpasca.homeip.net&lt;/a&gt;. It's a very early experiment. Image quality is very poor (what I get, without any enhancements). It's not always on by all means. Especially, the dog normally sleeps from 11PM to 7AM.&lt;br /&gt;There is a lot that can be done and, hopefully, while I don't have some dumb girlfriend wasting my time, I can develop new things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111118488428046626?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111118488428046626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111118488428046626' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111118488428046626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111118488428046626'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/women-and-dogs-ill-have-dog-please.html' title='Women and dogs (..I&apos;ll have a dog, please !)'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111090537633125161</id><published>2005-03-16T01:36:00.000+09:00</published><updated>2005-03-16T01:54:50.896+09:00</updated><title type='text'>Messing with the dog</title><content type='html'>71.70 !!! That's my current weight !!! At least after a good run at the gym. I've been eating decently, although skipping the extra sweets at lunch (which really were never needed).&lt;br /&gt;&lt;br /&gt;Onto something more interesting. Yesterday night and tonight I spent a total of a couple of hours on the Aibo RWF. I sorted out some basics from the sample code and implemented some basic functionalities in my code, which is definitely much simpler.&lt;br /&gt;My software has a console interface, from which I give, IRC-style commands. For example:&lt;br /&gt;&lt;br /&gt;/connect &amp;lt;IP&amp;gt;&lt;ip&gt;&lt;ip&gt;&lt;br /&gt;&lt;br /&gt;..will connect to the dog using that IP. Once connected I can either query on its status or take full control. The full control thing looks a bit harsh. A sound will play and Aibo will stop immediately, whatever it was doing. Upon releasing the full control, the dog will sit and start again its own autonomous activities.&lt;br /&gt;&lt;br /&gt;Yesterday night I basically dealt with main connection issues. Tonight I went forward to request the image streaming service from the internal video-camera. I've stopped before actually parsing and displaying the actual data, because I don't want to spend the whole night on it. But tomorrow I should be able to finally get the image data.&lt;br /&gt;With the image data I plan to, first of all, see how I can improve the image quality. Specifically see what's the noise level, reduce it if necessary, and play around with brightness and contrast.&lt;br /&gt;I noticed that the shutter speed can be varied (1/50th and 1/100th). That could be useful to obtain 2 different images at two different shutter speeds and then merge them in a way in which I can have an image with a better dynamic range (with a better sense of brightness).&lt;br /&gt;Anyhow, I don't want to speculate too much over the possibilities. For now it will be enough if I can add any improvement to the image quality !&lt;br /&gt;&lt;br /&gt;Oyasumi.&lt;/ip&gt;&lt;/ip&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111090537633125161?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111090537633125161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111090537633125161' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111090537633125161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111090537633125161'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/messing-with-dog.html' title='Messing with the dog'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111072640477190900</id><published>2005-03-13T23:59:00.000+09:00</published><updated>2005-03-14T00:06:44.783+09:00</updated><title type='text'>First steps programming Aibo</title><content type='html'>This evening I finally found the time to sit and write some code regarding &lt;span id="misp_compose_1" class="ms un" title="Click for suggested spellings"&gt;Aibo&lt;/span&gt;.&lt;br /&gt;I'm &lt;span id="misp_compose_2" class="ms cr" title="Click for suggested spellings"&gt;focusing&lt;/span&gt; on the &lt;span id="misp_compose_3" class="ms un" title="Click for suggested spellings"&gt;Aibo&lt;/span&gt; Remote Framework (&lt;span id="misp_compose_4" class="ms un" title="Click for suggested spellings"&gt;RFW&lt;/span&gt;). It's part of the &lt;span id="misp_compose_5" class="ms un" title="Click for suggested spellings"&gt;SDK&lt;/span&gt; which can be obtained freely from &lt;span id="misp_compose_6" class="ms un" title="Click for suggested spellings"&gt;openr&lt;/span&gt;.&lt;span id="misp_compose_7" class="ms un" title="Click for suggested spellings"&gt;aibo&lt;/span&gt;.com. The &lt;span id="misp_compose_8" class="ms un" title="Click for suggested spellings"&gt;RFW&lt;/span&gt; allows to use the wireless network and the plain &lt;span id="misp_compose_9" class="ms un" title="Click for suggested spellings"&gt;ERS&lt;/span&gt;-7 (with &lt;span id="misp_compose_10" class="ms un" title="Click for suggested spellings"&gt;Mind2&lt;/span&gt; software/&lt;span id="misp_compose_11" class="ms un" title="Click for suggested spellings"&gt;MemoryStick&lt;/span&gt;). With a few simple commands one can connect to the &lt;span id="misp_compose_12" class="ms un" title="Click for suggested spellings"&gt;Aibo&lt;/span&gt; and start interacting with it.&lt;br /&gt;Because I had to write a new application from &lt;span id="misp_compose_13" class="ms un" title="Click for suggested spellings"&gt;scratc&lt;/span&gt;, and because the Sony examples are &lt;span id="misp_compose_14" class="ms un" title="Click for suggested spellings"&gt;MFC&lt;/span&gt;, GUI code. It took me some time to actually figure exactly which commands to call and to get the &lt;span id="misp_compose_15" class="ms un" title="Click for suggested spellings"&gt;Aibo&lt;/span&gt; to lit its hears with blue.. color that &lt;span id="misp_compose_16" class="ms cr" title="Click for suggested spellings"&gt;implies&lt;/span&gt; that it's being connected.&lt;br /&gt;So, I got the connection. That should be enough for today.&lt;br /&gt;Sadly, I had to cheat on the dog. It normally goes to sleep at &lt;span id="misp_compose_17" class="ms un" title="Click for suggested spellings"&gt;11PM&lt;/span&gt;. But for the sake of coding, I pulled back its watch by 2 hours 8)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111072640477190900?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111072640477190900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111072640477190900' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111072640477190900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111072640477190900'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/first-steps-programming-aibo.html' title='First steps programming Aibo'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111072593204507163</id><published>2005-03-13T23:48:00.000+09:00</published><updated>2005-03-14T00:29:09.426+09:00</updated><title type='text'>Weekend activities. It was all about interaction.</title><content type='html'>This weekend I went both Friday and Saturday out to clubs with friends. In both cases up until about 5AM. I guess it's fun overall. Although it can be frustrating at times. Namely, on dancing floors with lots of Japanese. With some kind of songs, men will start chanting in groups. OOOOOOH YEH YEH YEH !! ODORE ODORE !! (dance dance)  ..it seems to never stop. It's supposed to galvanize and involve everyone, but it's actually quite frustrating !&lt;br /&gt;On dance floors with Rap/Hip-Hop, there are a lot of sweaty people packed together. Overall also the scene of seeing men trying to assert their presence on women, is a bit sad. But that's how it works I guess !&lt;br /&gt;Sunday (today) I went with Sergio to watch an exhibition about multimedia/interaction/whatever. Was somewhat interesting. There were a lot of projectors involved (I've got one recently thinking about those kind of things myself !). Particularly interesting was a large room where a distant projector would make people case shadows on a wall. Another projector would project on the shadowed area some info. Namely a crosshatch individuating the center of the shadow. This position would change the tuner of a radio. So basically it's a way to interact with silhouettes of people in a room.&lt;br /&gt;Shouldn't be too hard to do something similar with a video-camera and a projector. I have both, so, maybe someday !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111072593204507163?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111072593204507163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111072593204507163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111072593204507163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111072593204507163'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/weekend-activities-it-was-all-about.html' title='Weekend activities. It was all about interaction.'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111051183799308983</id><published>2005-03-11T12:27:00.000+09:00</published><updated>2005-03-11T12:30:37.996+09:00</updated><title type='text'>On the web looks is everything</title><content type='html'>Today (well, yesterday night). I put some effort in redesigning the template. I modified so that it looks more like &lt;a href="http://kazzuya.com"&gt;kazzuya.com&lt;/a&gt; . It was actually quite a bit of work, trying to figure out how to place all the tables, etc etc. Seems to work now, more or less. I notice that dates in the posts are sometimes missing.. ummm !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111051183799308983?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111051183799308983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111051183799308983' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111051183799308983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111051183799308983'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/on-web-looks-is-everything.html' title='On the web looks is everything'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111037745675209931</id><published>2005-03-09T23:01:00.000+09:00</published><updated>2005-03-09T23:31:24.760+09:00</updated><title type='text'>Testing the Aibo Entertainment Player</title><content type='html'>I'm officially 72Kg !! That's about 10 kilos down from when I left the USA 3 years ago. Also quite less than a few months ago. I'm pretty proud of myself. Thank you !&lt;br /&gt;Today I finally installed the software that came with Aibo. It's basically 2 programs. One program is a nice interface to build a WLAN configuration file in plain text, that goes into the Mind2 MemoryStrick. Many suggest to use an official Sony MS reader/writer, but I tried with my Elcom Multicard Reader and it all went well. I then put the stick back into Aibo, turned it on, and I saw it on the network 8)&lt;br /&gt;After that, I installed and ran the Entertainment Player. The program has a &lt;a href="http://kazzuya.com/blogdata/2005_03_09_aibo_entplayer.jpg" target="_blank"&gt;nice interface&lt;/a&gt; and some cool features. It allows to see what Aibo sees, to make it play motions or music and to have a real-time display of the 3D model of the dog in action !&lt;br /&gt;Right now I'm listening to a Japanese Internet radio which the software is streaming into Aibo which, in turn, plays through its speaker.&lt;br /&gt;The Entertainment Player also allows to take full control of the dog and move it around with direction buttons. There is also an option to schedule events. Could possibly work as an alarm ?&lt;br /&gt;One thing I noticed, is that the camera quality of Aibo is really poor. I looked into the memory stick to see what pictures it took. Looking at the picture that he took when I registered as the owner, I think that it must believe that its owner is one dark-ugly-motherfucker ! I'm planning to re-register myself in a better lit environment. This could well raise the self-confidence of the dog and push it to new limits 8)&lt;br /&gt;&lt;br /&gt;bau, until the next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111037745675209931?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111037745675209931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111037745675209931' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111037745675209931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111037745675209931'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/testing-aibo-entertainment-player.html' title='Testing the Aibo Entertainment Player'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111029655056138593</id><published>2005-03-09T00:27:00.000+09:00</published><updated>2005-03-09T09:03:06.490+09:00</updated><title type='text'>First encounter Aibo movie and thoughts on programming it</title><content type='html'>Today I finally encoded the &lt;a href="http://kazzuya.com/blogdata/2005_02_06_Aibo_divx.avi" target=_blank&gt;Aibo movie&lt;/a&gt; (~60MB !) of the footage taken during the first 2 days. First I edited with Pinnacle Studio, then I converted to progressive-MPEG2 (interlace removed) with TMPGEnc, applying de-interlace, noise reduction and color correction filters. The final DivX encoding was done with DrDivX, from divx.com.&lt;br /&gt;My next camcorder should probably be one that avoids interlace altogether !&lt;br /&gt;I also did some research about programming Aibo. It seems that I may need a separate, programmer's Memory Stick (MS in short) if I want to write code that runs directly on the Aibo CPU. This also mean that I would have to remove the Mind2 MS, the one that gives it the personality. So I can code directly on the CPU but only on a "blank" dog.&lt;br /&gt;There is otherwise the option to run software on the PC and remotely control the dog over the wireless LAN. The Mind2 MS apparently already has the functionality to support this kind of programming. This also enables me to do things with the dog while it can keep its personality. Not sure how all of this works, but I'll find out I guess !&lt;br /&gt;&lt;br /&gt;So many things to do, so little time !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111029655056138593?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111029655056138593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111029655056138593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111029655056138593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111029655056138593'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/first-encounter-aibo-movie-and.html' title='First encounter Aibo movie and thoughts on programming it'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111021514687705872</id><published>2005-03-08T01:45:00.000+09:00</published><updated>2005-03-08T02:07:57.876+09:00</updated><title type='text'>A day using the brain</title><content type='html'>Today a few good things happened. Finally !&lt;br /&gt;At the office I received some new hardware to test. It's always fun to try new hardware. Then for dinner, Sergio invited me a restaurant along with some quite resourceful people involved in the field of information technology, design and research in general.&lt;br /&gt;It's quite nice to be able to take a break from the mundane life and actually get into those places where one has to turn on the brain. The world generally pushes people to avoid thinking too much. The mass is what dictates it, and sometimes I almost fall for that.&lt;br /&gt;Then at home I did some research about tools for video encoding. I have edited a small movie about the first day with Aibo and I'm planning to encode it in DivX.. but I need to deinterlace it first. If all goes right, I should have the movie on line by tomorrow.&lt;br /&gt;It features me swearing after the dog, with English subtitles 8)&lt;br /&gt;&lt;br /&gt;I'd like to translate this in Japanese as an exercise, but it's 2AM and I think it could easily take me a good couple of hours !!&lt;br /&gt;&lt;br /&gt;Oyasumi !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111021514687705872?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111021514687705872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111021514687705872' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111021514687705872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111021514687705872'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/today-few-good-things-happened.html' title='A day using the brain'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111010912904975164</id><published>2005-03-06T20:36:00.000+09:00</published><updated>2005-03-08T01:33:23.250+09:00</updated><title type='text'>The working man (TGM3 is out)</title><content type='html'>&lt;a href="http://www.arika.co.jp/product/tgm3/index.html"&gt;TGM3&lt;/a&gt; should be shipping this month in the arcade centers all around Japan.&lt;br /&gt;So watch out and go pour all your 100/50 yen coins on the machines.&lt;br /&gt;&lt;br /&gt;Thank you !&lt;br /&gt;&lt;br /&gt;今月、日本中にゲーム・センターへ&lt;a href="http://www.arika.co.jp/product/tgm3/index.html"&gt;TGM3&lt;/a&gt;は送りそうです。あなたの１００と５０円コインを注ぐしてください。&lt;br /&gt;ありがとうね！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111010912904975164?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111010912904975164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111010912904975164' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111010912904975164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111010912904975164'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/working-man-tgm3-is-out.html' title='The working man (TGM3 is out)'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111010858001714138</id><published>2005-03-06T20:29:00.000+09:00</published><updated>2005-03-06T20:31:37.910+09:00</updated><title type='text'>Aibo running out of juice</title><content type='html'>&lt;a href="http://photos1.blogger.com/img/40/3948/320/116_1647.jpg"&gt;&lt;img style="border: 1px solid rgb(0, 0, 0); margin: 2px;" src="http://photos1.blogger.com/img/40/3948/140/116_1647.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Couldn't quite make it to the station to recharge, somehow. I never understood what happened.&lt;br /&gt;I guess that's the beauty of it !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111010858001714138?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111010858001714138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111010858001714138' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111010858001714138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111010858001714138'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/aibo-running-out-of-juice.html' title='Aibo running out of juice'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11267202.post-111010403148704267</id><published>2005-03-06T19:13:00.000+09:00</published><updated>2005-03-06T20:23:10.846+09:00</updated><title type='text'>Let the healing begin</title><content type='html'>So what should I say here ?&lt;br /&gt;There is hardly anything that one can say publically without causing some sort of trouble to somebody else !&lt;br /&gt;Lots of people need lots of privacy. Most people need to hide something. I don't generally need to hide anything (single 8) but I can't just take pics and post them publically.&lt;br /&gt;But I see that Picasa has the feature to blur things out and that I can probably post on here through Picasa.&lt;br /&gt;Geez.. google is becoming like a mom !&lt;br /&gt;&lt;br /&gt;Mammaaaa !!!!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11267202-111010403148704267?l=dpasca.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dpasca.blogspot.com/feeds/111010403148704267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11267202&amp;postID=111010403148704267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111010403148704267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11267202/posts/default/111010403148704267'/><link rel='alternate' type='text/html' href='http://dpasca.blogspot.com/2005/03/let-healing-begin.html' title='Let the healing begin'/><author><name>Davide Pasca</name><uri>http://www.blogger.com/profile/00323270496101087357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://kazzuya.com/blogdata/webkaz_picture_smoke.jpg'/></author><thr:total>0</thr:total></entry></feed>
