Wednesday, October 13, 2004

Gamasutra on Production Testing and Bug Tracking

http://www.gamasutra.com/resource_guide/20030714/fristrom_pfv.htm

TiddyWiki

There is a new Wiki: TiddyWiki.

It's completly client side - No ServerSide components needed. It doesn't work without JavaScript, but hey, the implementation is REALLY COOL. Check it out.

http://www.tiddlywiki.com/

Wednesday, October 06, 2004

Snake Oil ...

Gehen Sie bei der Planung und Aufstellung nach folgenden Kriterien vor: An absolut erster Stelle steht eine vernünftige Stromversorgung. Ihre Anlage ist von guter Stromqualität abhängig. An zweiter Stelle steht die mechanisch richtige Aufstellung der Geräte. An dritter Stelle steht die hochwertige Verkabelung der Geräte untereinander. Erst wenn diese Bereiche Ihrer Anlage ausreichend versorgt sind, lohnt es sich - streng genommen - über die Qualität anderer Komponenten nachzudenken. Die Reihenfolge entspricht den Auswirkungen und dem Einfluß auf die Livehaftigkeit und Lebendigkeit der wiedergegebenen Musik.

http://www.phonosophie.de/strom5.html

Friday, October 01, 2004

Music Thing - Blog about Music stuff

http://musicthing.blogspot.com/

MIDI Viewport

The MIDI Viewport is a data analyzer for MIDI messages. But it is also much more. Handheld, battery powered, and compact, it displays MIDI data in the order it is received, one byte at a time--using an LCD 2 line by 16 character display. Connected to a keyboard or sequencer it will tell you, in English, which MIDI events are being sent by the device. You can scroll through the 64-byte buffer to see what is really going on in your MIDI system.

http://www.maxmidi.com/diy/viewport/

Tuesday, September 28, 2004

Breadth is sometimes better than depth

Eric Lippert talks about how you usually use recursion to list all the files in a directory and how to change your code to make this iterative (with an explicit stack).

Recursion just lets you do this algorithm without making the stack explicit; the stack is the call stack and doing the recursive call pushes a new frame on the call stack for you. We can easily do this without recursion by making the stack explicit.

Its written in some language that is called "CoffeeScript" or "Java" or something like that, but if you catch the drift, you should be able to use it in any language. And he continues to show how to change the behaviour from depth-first to breadth-first.

http://blogs.msdn.com/ericlippert/archive/2004/09/27/234826.aspx

Monday, September 27, 2004

From CodeWarrior 9.2 to XCode 1.5

This one comes from the darwin-development mailling list (Email address of Brad Oliver changed).

-------- Original Message --------
Subject: CodeWarrior to XCode
Date: Wed, 25 Aug 2004 23:59:53 -0700
From: Brad Oliver
To: darwin-development@lists.apple.com
CC: xcode-users@lists.apple.com
References: <20040826050031.5453.61096.mailman@lists.apple.com>

> Brad,
>
> is not that you have written an internal document - say -
> "How To's with Xcode: quirks explained" that could be distributed?

I haven't written anything more formal than an e-mail to my colleagues about the process. I'll summarize below. A lot of the "quirks" are not so easy to quantify as they involved getting used to the XCode IDE, which behaves very differently (to my eyes) compared to CodeWarrior.

Note that my perspective here is coming from years of work using CodeWarrior and porting code from Visual Studio to CodeWarrior. Also, these notes come specifically from our work moving Knights of the Old Republic (KOTOR) from CodeWarrior 9.2 to XCode 1.5.

1. "legacy" for-loop scoping (a variable defined in the for loop definition has scope outside the for loop) in theory works in gcc, but in practice breaks when the optimizer is enabled. You have use the ISO-standard for-loop scoping rules for this to work, i.e. move the variable declaration outside of the for-loop statement. gcc at least gives you warnings about this, so you can find and fix them in your code fairly easily.

2. Xcode's "CodeWarrior-style" inline assembly only works for the simplest cases, so it's best to avoid it if you can.

3. Passing a non-POD variable (where POD == Plain Old Data, e.g. C-style variables and structures rather than C++ structures that have vtables) to a routine that expects POD variables will generate a warning in gcc, and insert a "trap" instruction into your code, causing the app to abort in the debugger when that code is executed. I have no idea why gcc doesn't just generate an error for this case, since that code will fail to run.

This happens if, for example, you pass a custom string class structure to printf as a %s parameter. Under CW and Visual Studio, they will pass a pointer to the first chunk of non-vtable data (which in KOTOR is the actual char[] backing store for the string class out of blind luck). Under gcc, you must fix your code.

4. With the optimizer set to -O3 (the max), gcc does a lot of auto-inlining. As such, if you have some crappy code where a class defines a method as "inline" but the method is not actually inlined, gcc will give you a link error when you're done compiling. You have to remove the bogus "inline" statement in the function prototype to get it to work.

5. Single-precision floating-point functions like acosf, cosf, etc are not in the standard math library (libm). They are only available in 10.3+, in libmx. A similar situation exists for wchar support.

6. "bool" types are 32-bit in gcc, whereas they are 8-bit in CodeWarrior and Visual Studio. This causes substantial binary compatibility problems with data structures that are read to/written from disk. A "bool8" class can't be used to globally #define the problem away because it causes compile-time issues with templates. However, if you can identify the "bool" data structures that are being read/written to disk, you can change them to the "bool8" class and work around the problem that way.

7. We have routines that override standard library calls at link time, like fopen, etc. ZeroLink causes problems such that our overrides lose out, so it's best for us to keep ZeroLink off.

8. Dead-code stripping has a bug with C++ apps in XCode 1.5 whereby it tends to strip debugging symbols for used functions at link time. The end result is that you can't see the source code for a number of files in the debugger, nor can you set breakpoints in that code. Turning off dead-code stripping for the debug build fixes this, although you may have to work a bit to implement (or comment out) some routines that CodeWarrior would have otherwise stripped away. It's safe to use dead-code stripping in the release builds, as far as I can tell.

9. I write a lot of code that jumps past local variable initialization in C++, like so:

...
if (bad) goto bail;

int foo = 1;
do stuff here;
bail:
return;

This is not allowed by gcc; you have to change "int foo = 1;" to "int foo; foo = 1;". This is only if you're jumping past a local initialization, so it mainly comes up using the Apple debug macros like "require_noerr" and the like.

10. gcc doesn't recognize "\" as a path delimiter for #include statements, you have to change them to "/"

11. If you're using PPC intrinsics (like rlwinm or lhwbrx) you have to be sure to inlude "ppc_intrinsics.h" since they're not natively part of the compiler.

12. KOTOR casts a lot of class function methods as pointers for callbacks. gcc requires that you use a different syntax:

SetCallback ((CallBackPtr) classMethod);

becomes

SetCallback ((CallBackPtr) &Class::classMethod);

You can get away with just "&classMethod", but gcc will spew out a warning.

13. Build styles are fairly useless for our projects, since they don't allow us to easily have different libraries and source files for debug and release builds. It's fairly easy to clone XCode targets, so the best solution for us is to ignore/remove build styles from the projects and rely solely on different targets for debug and release builds.

I did run some performance tests on the game when we finished. On my Dual 2.5GHz G5, performance was almost immeasurably slower in the XCode build, by maybe .5 of a frame per second. It was well within the margin of error, enough so that I'd call it even with CodeWarrior.

I had some notes somewhere about compile times, but I can't locate them right now. Suffice it to say, CodeWarrior beat XCode/gcc pretty handily for the non-optimized build, but they were much closer on the optimized build. Surprisingly (at least to me) gcc's compile time using -O3 was almost identical to it's compile time for the non-optimized build. This also carries a big red asterisk - gcc does compile on both CPUs, so if you have a single-CPU Mac (or if CodeWarrior is ever updated to use 2 CPUs), then it's no contest in favor of CW.

I'd appreciate feedback from other people who have had experiences porting code from either VS/VS.NET or CodeWarrior to XCode. In our KOTOR test, the code had already been ported from VS.NET (VC7) to CodeWarrior, so it's unclear to me if there are any advantages that we'd see if we went directly from VS.NET to XCode.

--
Brad Oliver
xxx@xxx.com
_______________________________________________
darwin-development mailing list | darwin-development@lists.apple.com
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

If you can program it...

... then somebody will write an OS for it :-)

brickOS is an alternative operating system for the Lego Mindstorms RCX Controller. It also provides a C/C++ development environment for RCX programs using gcc and g++ (the GNU C and C++ cross compilation tool chain) and the necessary tools to download programs to the RCX. If you program in C or C++ and would like to be able to write programs for your RCX in these same languages then brickOS is for you.

http://brickos.sourceforge.net/

IT Jobs

http://www.it-jobs.de/

Sunday, September 26, 2004

JOBworld

JOBworld ist eine Metasuchmaschine fuer Stellenangebote im Internet.

http://www.job-world.de


Die Suchergebnisse kommen von:
JobScout24
StepStone
ingenieurkarrieree.de
DIE ZEIT
medienhandbuch.de
UNICUM.de
Jobware
Handelsblatt
sueddeutsche.de
stellenanzeigen.de
Michael Page
jobpilot
jobsintown.de
Unister.de
hotel-career.de
Junge Karriere
Tagesspiegel
Top Arbeitgeber

Friday, September 24, 2004

Hackers and painters

Try to keep the sense of wonder you had about programming at age 14. If you're worried that your current job is rotting your brain, it probably is.

http://www.paulgraham.com/gh.html

Planet Sun

Just when I thought that MS Blogs are big, I discoverd Planet Sun.


Planet Sun is an aggregation of public weblogs written by employees of Sun Microsystems. The opinions expressed in those weblogs and hence this aggregation are those of the original authors.

Planet Sun is not a product or publication of Sun Microsystems.

Planet Sun is powered by Planet and is run by David Edmondson.

Go an see the list of people blogging. IT IS HUGE.

Do you have any questions for me?

One of the most mysterious questions of any interview is usually the last one asked … “Do you have any questions for me?” Wow. What a loaded question! What do you say? Is it a test? Is it a genuine request for inquiries? Who knows!

http://blogs.msdn.com/jobsblog/archive/2004/09/15/229999.aspx

MS is not evil - Proof here

Heck, I got quoted in Time Magazine for telling Bill Gates to split up the company. One thing I like about Microsoft is that it likes a diversity of ideas to rumble through the buildings here. The fact that I wasn't fired (or even reprimanded) sent a signal to all the bloggers here that you're welcome to take some risks and make some mistakes.

That is far more freedom that I have at my company. And NOBODY would think about calling them evil (unless they worked here...)

http://radio.weblogs.com/0001011/2004/08/31.html#a8180

Why it is important that your company has a face

And this face are your employees. All of them.

[Zef Hemel about the MS Blogs]
They have many, many employees of the product teams
blog. This way we can see who work there, what they’re doing and how they do it.

...

Don’t underestimate the importance of this kind of “marketing”, if you will. I don’t know how other people feel about this, but for me it works very well. For example, if I got to choose between working at Apple or Microsoft, I’d choose Microsoft right now. Why? Because Apple is nothing more than a building to me. Even though they may be working on very great products, arguably more innovative and possibly more interesting than Microsoft’s. I don’t know the Apple people (except for maybe Steve Jobs), I have no idea what the culture is like, I don’t know anything.

http://www.zefhemel.com/archives/2004/09/22/hiring-great-programmers

JamPlug

World's Smallest Guitar Amp :-)

This will surely not replace any Marshall towers, but it's a nice idea.

http://www.jamplug.com/

PREfast

PREfast is a static source code analysis tool that detects certain classes of errors not easily found by the typical compiler.


...

PREfast analyzes C and C++ source code by stepping through all possible execution paths in each function and simulating execution to evaluate each path for problems. PREfast does not actually execute code and cannot find all possible errors, but it can find errors that the compiler may ignore and that may be difficult to find during debugging.

http://www.microsoft.com/whdc/devtools/tools/PREfast.mspx

Thursday, September 23, 2004

Wir sind ein Personaldienstleister

Die RKM Zeitarbeit GmbH hat mich angeschrieben und wuerde gerne einen Lebenslauf von mir haben :-)

Ich hatte bisher sowohl negative als auch positive Erfahrungen mit Zeitarbeit/Personaldienstleistern. Ich werde mich mal bei denen melden und schauen was die so zu bieten haben. Nicht das ich viel erwarte, aber einfach mal schauen kostet nichts.

http://www.rkm.de/

Man Plans, God Laughs

And I would say that if the success of your project depends on your ability to forecast the future to that degree of precision, you're doomed from the outset . . .

http://www.hostilewitness.com/progress/

Wednesday, September 22, 2004

Three less spots in Heaven

Bob Evans, Donald Leslie and Ernie Ball died ...

http://blogs.msdn.com/shawnmor/archive/2004/09/10/228179.aspx

The Secret Life of Numbers

If you have a thing for numbers, you should check out The Secret Life of Numbers. The authors visualize (with java) how often they found a number in the internet. Look out for 80486 and 11042. Or find your postal code (or that of Tuebingen in Germany).

If you like that, you might like Wordcount.

List of RSS Readers / News Aggregators

Ok, I stole this from http://www.rsscalendar.com/rss/public/rss_readers.asp

Windows
Macintosh Linux Web-Based

RSS Calender

"RSSCalendar lets users quickly setup online calendars that can be syndicated as RSS feeds."

http://www.rsscalendar.com