Pages

Thursday, April 29, 2010

Making and Breaking the Grid

Thoughts on Structure: An introduction
[...]
Like items are arranged in similar ways so that their similarities are made more apparent and, therefore, more recognizable. The grid renders the elements it controls into a neutral spatial field of regularity that permits accessibility - viewers know where to locate information they seek because the junctures of horizontal and vertical divisions act as signposts for locating that information. The systems helps  the viewer understand its use. In one sense, the grid is like a visual filing cabinet.


I read about the typographical grid (an organizing principle in graphic design) in the book About Face 3: The Essentials of Interaction Design, Part II: Designing Behavior and Form. Whoa! I was struck by a bolt of lightning. I learned something really useful and powerful at the same time. From that moment, I see graphic interfaces from a totally different perspective. Now I consider grid a must in my designs. Not only it arranges elements in more appealing, to human eye, positions but it also gives you a form to work with. To learn more about the grid and get a feeling of how professional designers make use of that technique, I bought a copy of the book, which I already mentioned,  Making and Breaking the Grid.

Well, I began to use that technique and manually arrange, and resetting, the GUI elements. By manually,  I mean that I had to write extra code. Unfortunately, the programming environment I used did not support grid-like behavior.

And then the Qt framework came.

A couple of weeks ago I decided to stop wasting time with inferior programming frameworks and switch to a better one. I choose Qt. Every time I explore Qt,
I have a that's great, that's cool, that's f*cking awesome, moment.
( I had a similar experience with the Lisp programming language.)

Yeap, Qt has layout managers; Qt classes that do all the dirty work for us.
You can either write code to handle the layout objects or use the Qt Designer,
which is of course much easier, especially for beginners.






Qt Designer in action. Watch and observe the grid structuring and the
auto arrangement of the objects, while we are resizing the form.




Bonus link: Let's Build a Grid

Sunday, April 25, 2010

How good things are made

Good programmers, designers, architects or creators of any kind are simply thoughtful. They are so passionate about making good things, that they will study any discipline, read any book, listen to any person and learn any skill that might improve their abilities to make things worthy of the world. They tear down boundaries of discipline, domain or job title, clawing at any idea, regardless of its origins, that might help them make a better thing.

Scott Berkun: Why Software Sucks
http://www.scottberkun.com/essays/46-why-software-sucks/

What is the role of math in computer science and programming in particular?

In the book Masterminds of Programming, Peter Weinberger gave an answer which,  in my opinion, is a good one.

Peter: My degree is in math, so I'd like to believe that math is fundamental. But there are many parts of computer science, and many kinds of programming, where one can be quite successful without any mathematics at all.
The use (or usefulness) of mathematics comes in layers. People with no feeling for statistics or randomness will be misled over and over again by real-world data. There's mathematics in graphics, there's lots of mathematics in machine learning (which I think statisticians think of as a form of regression), and there's all sorts of number theory in cryptography. Without some mathematics, people are just cut off from understanding large parts of computer science.

Never heard of  Peter Weinberger?
How about the AWK programming language?
Al Aho, Peter Weinberger, Brian Kernighan

Sunday, April 18, 2010

Cloudy with a Chance of Meatballs

I watched it yesterday. What a funny movie!
Geeks will love it ;-)

John Romero on Matt Chat

Dr. Matt Barton is a professor of English at St Cloud State University in St Cloud, MN. He is the author of two books on video-games: Dungeons and Desktops and Vintage Games (co-authored with his friend and colleague Bill Loguidice). He is the co-founder of Armchair Arcade (website) and a lifelong gamer. Many of his articles and reviews have been published online as well, particularly at GamaSutra, Game Studies, and Adventure Classic Gaming.


I really like, and appreciate, Matt Barton's work on retro video games.
His Matt Chat, YouTube channel, rocks!

Well, as the title indicates, this blog post is about John Romero interview on Matt Chat. And yes, I'm a fan of John Romero :-)

But before jumping on the interview videos, I want to mention a few additional links:


My copies of Vintage Games and Masters of Doom, side by side.

















Here is Romero's interview in 5 parts:









Sunday, April 11, 2010

Compile Qt libraries for static linking

Here I describe a Qt4 setup for static linking the libraries in order to
distribute executables on Windows platform, with no DLL dependencies.

First of all, download and install the Qt SDK for Windows (LGPL) version,
which is based on MinGW.

Lets say that we install it on K:\Qt.

While developing our applications it's wise to use the shared
(DLL) Qt configuration, because it has faster build time.
Moreover, I won't even configure the static Debug mode because
it produces huge (>100 MB) executables! The static Release mode
is just fine.
(BTW, I switch to static Release mode only if I have to
test it, or, of course, when it's time to release it.)

Make a copy of K:\Qt\2010.02.1\qt
and name it K:\Qt\2010.02.1\qt_static.

Our static configuration takes extra space, but who cares?

Now copy K:\Qt\2010.02.1\bin\qtenv.bat and put it in
K:\Qt\2010.02.1\qt_static as
configure_static.cmd.
Modify it to match the below shell script:

@echo off
set INCLUDE=
set LIB=
set QTDIR=%CD%
set PATH=%CD%\bin
set PATH=%PATH%;%CD%\..\bin;%CD%\..\mingw\bin
set PATH=%PATH%;%SystemRoot%\System32
set QMAKESPEC=win32-g++

configure -release -static -platform win32-g++ -nomake examples -nomake demos -no-exceptions -no-rtti -no-qt3support -no-scripttools -no-openssl -no-opengl -no-webkit -no-phonon -no-style-motif -no-style-cde -no-style-cleanlooks -no-style-plastique -qt-libjpeg -qt-zlib -qt-libpng

echo run "mingw32-make sub-src" to build core Qt libraries only.


Before executing it we need to modify some configuration parameters.
Open K:\Qt\2010.02.1\qt_static\mkspecs\win32-g++\qmake.conf (text file) and edit
QMAKE_CFLAGS_RELEASE = ... to
QMAKE_CFLAGS_RELEASE = -Os -momit-leaf-frame-pointer

Now, open the command line console, jump in qt_static folder and
run configure_static.cmd.

As soon as configure is finished, run mingw32-make sub-src
to build everything except examples and demos. A plain mingw32-make
will build everything, but that would be a waste of our time.

Notes:
References: