Archive for the 'Code' category

code

Improving the Xcode sub-project experience with scripts and wits

Sunday, October 7th, 2007

There are a few annoying bugs when using sub-projects in Xcode that build dependencies for the “master” project, particularly for frameworks or shared libraries that have header files and that need to be embedded in the final product (built by the “master” project). This is the case for MHKKit and Riven X.
My solution to those [...]

code

NSNotificationCenter isn’t a singleton

Thursday, April 26th, 2007

Quoting from a reaction to Brent Simmons’s recent entry on large Cocoa projects:
As noted by Michael Tsai, NSNotificationCenter is a singleton, and thus essentially is one big honkin’ global. Globals are bad ™.
This was posted by Andy Finnell echoing Michael Tsai.
But in fact, NSNotificationCenter isn’t a singleton. You can create as many as you want. [...]

code

Macros for more sane NSError programming

Sunday, April 1st, 2007

Jeff Johnson recently posted an entry about using NSError in Cocoa to dramatically improve error handling. I wholeheartedly agree with the idea, and in fact adding NSError “variants” during MPQKit’s refactor was one of my top priorities.
That being said, there are a few annoyances with using NSError, one of which is constantly having to check [...]

code

Snake eats moon

Tuesday, March 14th, 2006

The wowsv Python module exports a single function, aptly named wowsv, to load World of Warcraft saved variables Lua files into Python.

code

Where is my playable Riven X, part II

Friday, February 3rd, 2006

That implies computing a new depth value whenever an element is enabled, and eventually a complete re-quantization of all enabled elements when you reach the upper bound of the dynamic range of your depth values.Finally, depth testing doesn’t solve the what to render problem entirely. Indeed, depth testing can be used to filter out “too far” objects, but you need to define your “far plane” or “depth clipping value” and initially set the depth value of all your primitives to that cutoff threshold.The texture problemIf you recall from the previous entry, one of the big advantages of depth testing is the ability to render a large number of primitives in one OpenGL operation (using vertex arrays and the likes of glDrawArray) that share common state properties…. Typically, a 3D model will be made of a few sub-sections, each of which is made of n primitives and one texture (or a few with multitexture) that will be applied to all the primitives using each primitive’s texture coordinates.

code

Pay heed to the Red Sweater

Wednesday, February 1st, 2006

Daniel Jalkut of Red Sweater Software fame wrote an entry today about warnings and how we dutifully ignore them. I share his concerns wholeheartedly. There is nothing more frustrating than compiling a project (of seemingly good quality on the web) only to be bombarded with all manners of warnings to the point the important stuff just slips by unnoticed.

code

Where is my playable Riven X?

Wednesday, November 30th, 2005

If one reads the Riven X project page, one can read “but I expect something barely playable in November”. Obviously, that’s not going to happen. Without going into boring details, let’s just say it’s been one hell of a semester.

apple

Report-an-Apple-Bug Friday for August 26, 2005

Friday, August 26th, 2005

It’s time for Report-an-Apple-Bug Friday, even though it’s not going to be about QTKit. Indeed, the bug I was reporting earlier on is far more complex than I anticipated. Read the full post for more details and for my weekly bug!

apple

On Report-an-Apple-Bug Fridays

Sunday, August 21st, 2005

About Report-an-Apple-Bug Fridays - it’s a good thing!

shell-script

Backing up Subversion daily (updated)

Friday, June 3rd, 2005

A simple shell script to backup Subversion repositories to a remote server.