Sunday, March 18, 2012

Coppola' s "Tucker"

Tucker 's car from Wikipedia
If you were given the chance to see only one of Francis Ford Coppola films please watch Tucker.

Imagine a man, in the decade of 1940s that dreams of creating a car, 30 years ahead of his time. This man actually ends up achieving his dream. Sounds as a dieselpunk film, doesn't it ?. Yet....

Dude, this was totally real! It is based on a true story. .

Check out the Wikipedia link for the techs of the car it self. And the man who was Tucker.

Saturday, March 10, 2012

UI Framework

Seriously, if you are a C/C++ Windows programmer it is very likely that you were forced to write UIs. UIs are a necessary evil, because it is how our software converses with the user, which is probably my least favorite part of the software process chain. A user likely does not care that you saved RAM, you optimized loops, you replaced a whole switch case based decision tree by a XML file and that you even placed the XML settings based file on a dynamic STL container. No, users care for how "beautiful" an UI is.

Microsoft has provided an API, which is strangely associated with UI design while in fact, most of its usability lie in helpful functions for threading, networking, file copying, etc. Some crazy folks program UIs using the API. Some of them do that because they are genius, while others do that because they like to brag. Chances are that the latter dudes do not write software for reasons like supporting a family being a programmer.

Microsoft has given us Microsoft Foundation Classes aiming to make the life of the programmer easier. Borland tried that too. They succeeded in  some ways. MFC is fast, OWL and the later C++ Builder are fast and easy to learn. MFC UI design is painful, because you are required to rely on thousands of code lines that MS wrote for you and you hardly have easy UI classes to dabble with. For example, try to write an application with multiple tabs, basically you will need to write two new classes. Honestly, UI design has given me much trouble. Specially while using C++ and MFC.

I was rather reluctant to use Qt, because you see, Qt is a holy grail for UI linux programmers, and linux programmers are not windows programmers. Yet, after using Qt for a month or so, this framework has captivated me. Basically, you can have lots of useful classes and the design is not totally RAD, but it is OOP based, rather more than MFC. And it allows you to focus on the code it self. My tasks has been for years to grab bytes from A and transferring to B, and processing this data and displaying for those evil persons called "users". Qt has allowed me to avoid much of the pain of UI design and thus making me away from the user needs: Qt makes UI design faster . Don't bother with WxWidgets or other multi-platform framework, Qt is the way.  It is like having a Swing API for C++. Java is a very fun, decent, awesome language. But it is not fast enough for windows. Specially if you like me, works with "transferring to B, and processing this data and displaying for those evil persons called "users"."

Qt your self dear colleague. Ask your boss to Qt him self. They wrapped the Windows UI API into something fast, easy to use and sane. And best of all, with a few changes your application will run on that painful OS called Linux.

Just kidding, my only complaint of Linux is due to development issues, Ubuntu is pretty decent. Like CentOS.

Thursday, March 08, 2012

Books I read

Brazilian Edition of "The Difference Engine"
I have just finished the book The Difference Engine by William Gibson and Bruce Sterling. It  disconnects the readers from our reality and intensely immerses their minds in a strange alternative 19th. Century  England. Wandering in an anachronistic London, characters seem, at first, not connected,  events are thrown at reader's eye without much concern to easy digestion. It is hard to discern between what was real in that century and what was conceived by the authors. Yet, this all is intended. The very nature of the machine it self is never actually shown, yet it was built in the recent years. London, seems rather dark, polluted and full of mystery. Cars are moved by steam, statistics and applied  math regulate the chaotic nature of a reality that never was.

Previously I read A Máquina Voadora by Braulio Tavares, which I dare to mention as our Bradbury, our Tim Powers, our P.K Dick. By creating an imaginary scenario, situated in Portugal in the middle age, Tavares crafts a story from wise, smart people that dared to try to understand the physics of reality in a time where scientific obscurity was a common sense.  The descriptions of that time are so intense that the reader feels like traveling back in time. This world is  recurrent in Braulio's stories, other of his works also are placed in this ancient Portugal, like in the short tales collection "Mundo Fantasmo" and I am reading  and " A Espinha Dorsal Da Memória", which are short stories books written masterfully. His imagination reminds me much of P. K Dick.