Code Safari
January 31st, 2008
There is an old saying... know your tools
well and let your spirit create the work.
In this case, my tools happen to have hundrends
of pages worth of crpytic code. And I realize the task
of making sense out of these lines of text is on the same
scale as scaling some large well known mountain.
To those whom do not know what working with massive software
projects is like... it's a little like a safari.
Your on the hunt for some functionality you would like to
examine or alter and you have to wind your way back and forth
through layers of function calls to obtain what your looking
for. The task lends it self well to a detective story style of
movie exibition.
At first the tangle of code seems impenetrable but thats where
strategy comes into play. Consider tonights venture...
What does the RENDER Button really do?
And with an objective in mind I must find a starting point.
So I start at the source of my inquiry and mouse over the
Render button.

"Render the current frame (F12)" it says. This clue is the
perfect entry point for if I walk into my city of code and
search the project for that specific string I shall indeed
find the exact location of the button rendering code.
A sweet broad called "Find in Project..." tells me
that buttons_scene.c has the low down on the Render button
UI code. I decide to take a stroll to the glitzy uptown
User Interface night club known as
static void render_panel_render(void)
The render panel they called it... sounded glamorous but I wasn't
fooled by the nicely antialiased front room and dressed up clerk.
I was a man on a mission. "Boy..." I waved to the young clerk. "I'm
looking for Mr. RENDER Code Have you seen him?"
"I'm sorry sir I can't give out that information" the boy replied
whilst straightening his jacket. He looked as nervous as a brides maid
in the wrong wedding. "I see..." I said as I eyed the poor sap.
"You know... you have some nice indentation in this here function...
I wouldn't wantta tab it out of place!" I reached for my Tab Key.
I heard blender functions were nothing if they weren't well indented.
"No! Don't! I'll tell you." I eased off of the tabkey while a smile
grew over my face. "Well thank you for you generosity. I would have
hated to see any one of these lovely lines of code misindented.
I know how coders hate that"
"Yes sir... they do." I had him now. I had him the way a fisherman
has a fish by the hook. "Where's Mr. RENDER... what room?"
"Line 1949" the boy replied. A nervous pause filled the room. I began to turn.. but turned back and
hit the spacebar just once to let him
know I meant business. "Thanks ol'bean" And with that I was
off and scrollin.
1949: uiDefBut(block,BUT,B_DORENDER,"RENDER",369, 164, 191,37, 0, 0, 0, 0, 0, "Render the current frame (F12)");
Soon I had found the poor sucker. But it wasn't Mr. Render. No, this fool had been filled with so many pointers
he looked like a sign post in the middle of LA. In his pocket I had found another clue. B_DORENDER I recognized
that name. It was the name of an event number that every User Interface element worth his weight in functionality has. I pocketed the card and dashed out. I knew where I had to go next.
void do_render_panels(unsigned short event) { ScrArea *sa; ID *id; switch(event) { case B_DORENDER: BIF_do_render(0); break;
do_render_panels... it was the place where all the action crowd hung out.
All the hip cats whom liked the action filled night life. If I was going to find
this Mr. Render it was there. It turned out that I was in luck. B_DORENDER was
right there signaling me to the function BIF_do_render(0);
I could feel the trail getting hotter, but this time the search was taking longer.
I'm guess this Mr. Render likes to keep himself well hidden. An ironic trait I thought as I drove up to sceneRender.c I drove past realizing that this was
a python joint. Our fellow would never be caught dead hanging around the likes
of an interpreted language processor. Our man was faster than that. I drove on.
Next I visited renderwin.c It was too late the F12KEY I knew right
away that this was merely the home of the optional F12 key you could press
to call up the Render... it wasn't what I was looking for.
By this time I was getting nervous. All my leads were dying off
one by one and the night was getting late. I opened another can of
Rootbeer and popped in some more Goldfish snack crackers.
This case was going to have to wait till tomorrow night.. Its late
and I have class at 7am tommorrow.
Notes Dan Rather never sounded so scary Regardless of how you feel about the violence it says something about the human entertainment condition. more specificially... This ugh
Statistic Ice
I got into an argument over thermodynamics today.
It was about the whole glass of water at room temp for
eternity could spontaneously form ice cubes. The guys at
work didn't believe it. I realized I wasn't making any
head way and also realized I came off looking quite crazy
to them.
Never had I felt more crazy than how I felt at that moment.
I knew I still believed in the concept but I knew they didn't.
And my trouble was finding a way to explain how I knew it.
How I just 'knew' it!