5/22/2002

5-22-02 - 1

5-22-02

BRDF for leaves (on trees and plants) would work well. I hope to get to try it some time reasonably soon.

Some software that should exist (I could/would write if I had time) :

  • Quality image zooming (enlargement). WM Withers has an article called "Augural Image Zooming" , but I'm convinced you can do even better with modern image analysis techniques. Image analysis comes mainly in three forms : 1. pattern identification and re-synthesis and used in texture generation; 2. histogram modelling, as used in image compression; 3. shape identification by edges and gradients as used in image-recognition. Combine these three and you can make a very good local model of images, which can be used for lots of things; one of them is image zooming (enlargement) with quality preservation.

  • Image sharpening. Again, using the above techniques, you should be able to take a blurry image and sharpen it. Obviously, the data's not there to make a perfect reconstruction, but with modeling, you could get close.

  • Image hole filling. Remove a chunk of an image, and fill in the hole by modeling around the borders and using continuity. This is not just blurring, it's extrapolation of the patterns. So, if you had a ball on carpet, and you remove the ball section of the image, it should be able to fill the hole with "carpet"-like pattern.

5-11-02

I finally saw "Eyes Wide Shut". It's incredibly beautiful, visually; Kubrik's use of color is really amazing. I particularly liked the way all the interiors at night are so orange and warm, with such strong blues outdoors. Other than the technical prowess, I found it very bland. It left me feeling nothing strong, feeling like nothing had really happened. I certainly couldn't imagine why so many people felt so strongly for or against the movie. Maybe I wanted it to be longer; I felt like the first 2 hours of the movie were a good setup for something interesting to happen - maybe the Tom Cruise character would try to inflitrate the secret society, maybe the couple would be torn apart by their desires for other people, maybe they would act out some of their urges for transgression and then find that they really didn't want that life, etc. something! anything passionate and powerful and dramatic, but none of that happened.

In the same match of movies, I saw "Hidden Agenda" by Ken Loach, one of my new favorite directors. This movie also leaves you with an ending where nothing really happens, but it's quite satisfying. Hidden Agenda is an interesting twist on the traditional detective narrative; throughout the movie, you essentially know who did, and most of why. The plot is about the detective trying to find a way to bring the perpetrators to justice without tearing apart his own life and the whole world he lives in. In the end, he can't, so the movie ends with the world being stuck in the same corrupt shit-hole it's always in.

5-05-02

I think there's a big market in games for non-hardcore gamers. The problem is that it's very hard to make games for these people. The Sims does a very good job at it, but there aren't many others. Of course there are the puzzle games (Bejewelled, etc.), but I haven't seen a single puzzle game since Tetris which does anything new. Also, people won't pay much for puzzle games and it's not a huge market, though this will continue to be a market. To make a game for these people, it can't involve twitch, it can't involve precise control, since many of these people find the mouse or gamepad to be a very awkward input device; it can't be too complicated or be a contest of wits since many of these people aren't very bright. It needs to be something like a card game; most card games are not very complicated, don't require speed or lots of brains, etc. the best card games have an element of skill so that a better player will statistically beat a less skilled player, but they also have enough of an element of luck that a weaker player will win often enough to not be discouraged. Games like the MMORPG's are sort of a start in this direction, though the high end players of those games are very hard-core and savvy there are also barely-computer-literate people who play them almost as chat rooms.

5-05-02

Dungeon Siege - we put the TS in RPG

5-05-02

I've been thinking about audio analysis and modification a lot lately. Audio's weird because it seems very simple compared to images, being a 1d signal instead of a 2d signal, but in fact it's quite complicated. For one thing, you have a very wide frequency range; you need to work from about 10 Hz to 10 KHz , that means that the very-large-scale structure (low frequency sound) can span (at least) 2k samples, and as much as 96k samples if you're really picky. For another thing, there's a lot of complicated perceptual stuff like chords, harmonics, octaves and such which are very deeply embedded in the brain. For another, there's this whole issue of phase; that is, you can take a continuous wave and shift it without changing the way it sounds to the ear. I like to think of audio as made up of two parts : the "shapes" of sounds, like you see in the attack of a sound; this stuff is very phase-dependent, like drums and such are primarily in the "shape". The other part is the continuous tones; this stuff is just a superposition of simple waveforms, and it's phase-invariant. The funny thing is that this is a totally overcomplete representation; either "shape" or "waves" can represent the whole signal on their own, but usually one or the other is natural. I haven't found this well addressed in the literature; it seems like a big problem for audio in general. For example, if I want to do instrument recognition (like to take a recorded audio track and separate out the components), I need to do this shape/wave analysis. To recognize an instrument, I want to look at it in a phase-invariant way, I want to scale out ther frequency of the note, and I want to scale out the amplitude; I want to get the sample into a standard reference frame so that I can just compare it to a library.

The Windowed Fourier Transform is sort of a good start for analyzing audio. The goal is get a picture of the frequency content of the signal at each time. So, at each time, you do a Fourier Transform to sample at max frequency with a very small window (a window is something like a Gaussian function that you multiply on to smoothly select out just a portion of the original signal), then you sample the next lower frequency with a slightly larger window, all the way up to a very low frequency with a very large window. This is some kind of crazy analysis, and it's not a correct complete orthonormal basis; the goal is not to exactly regenerate the original signal. So, now we have this set of data which says at each time, how much of a given frequency is present. We can say "at time t, what's the spectrum?". Now we can do things like adjust the pitch of the sound without changing the speed it plays, just be up-shifting all this information. Similarly, we can change the speed of the sound without changing the pitch. We regenerate an output signal by interpolating all this information; we need to phase-adjust to make the regeneration smooth and continuous, eg. not introducing any lumps in the signal that we're going to hear. The signal that comes out is not anything like the original, but it sounds just like the original. The differences lie only in small phase adjustments of various frequency components; this can make the waveform look really different in something like a trivial difference (ala RMSE), but it hasn't changed so far as your ear is concerned.

Of course, this is much too slow; it's O(N^2log(N)) . In practice, instead of sampling at every time, you sample in intervals, like 0.1 milliseconds apart. Then you also don't analyze all the way down to very low frequencies; you just stop at some reasonably high frequency, like 100 Hz, and you hope that the lower stuff sort of comes out right.

4-16-02

Kung Fu Chess is great; in many ways it's superior to the games we big-budget game developers make; it's a blast, it's simple, it's quick, and it's deep.

I have some sympathy for terrorism; I need to explain that a lot more, because at first sight it's sort of offensive. If you were a small ethnic group tormented by oppressors who took your freedom and killed your relatives, how could you stand up to them? You cannot hope to defeat their army, so traditional war will get you nowhere, but at the same time you cannot allow this to happen. It's all very nice to say "rely on the international community", but that typically gets you nowhere. So, how can you possibly affect change? The only way is to make it too difficult for the oppressors to keep their hold on you. The most effective way to do that is with terrorism. The Algerians did it to the French, the East Timorese did it to the Indonesians, hell the Americans did it to the Brittish. In all those cases, the terrorists were clearly in the right; of course, when we agree with them we call them "revolutionaries" or "freedom fighters" or something. Now, I'm not saying that the Al Qaeda falls into this group, nor am I saying that the Palestinians necessarily do either (that's very complicated), but certainly many Palestinians *believe* that they are in this group, fighting the just fight for their freedom in the only way they can. The support that the United States gives to Israel, which has become a totalitarian state with no mercy, disgusts me.

4-12-02

I just put up the PPMZ2 code here on my site, and it's reminded me why I stopped working on it back in 1999. I hit a couple of funny issues; I was working mainly with the Calgary Corpus, and I was (and still am) convinced that PPMZ is very close to the best you can do with a Markov coder. There were some funny files in the Corpus - "geo" and "pic". "pic" is an actual binary image, and you could compress it better if you could tell it was an image, deduce its dimensions, and use a bilevel image coder on it. You could also do well on it just be transposing it, so that you packing image columns rather than rows. PPMZ was incapable of figuring any of this out on its own, of course. "geo" is a binary file from a GIS database or something like that; anyway it consists of a bunch of 4-byte floats one after another. You can pack it best if you can figure that out, and actually read it in 4-byte chunks and do some special float packer. You can also do well just by reorganizing it so that the significant bits of the floats are together; that is, reorg it from ABCDABCD... to AAA..BBB..CCC..DDD... ; again, PPMZ couldn't figure this out on its own. This was all old news, and somewhat depressing, but I pressed on. Then, around the time that I gave up, people started really working on coders that special-cased English text. PPMZ has always been very good at English text, so I thought I would play that game as well. In fact, PPMZ2 right now has a mode with a pre-conditioned order-0 model for text which knows the nature frequency of occurance of the letters in English. Anyway, most of the special casing for text involves taking advantage of rule-based patterns that a finite-context coder (like a Markov model) cannot capture. For example, capitol letters in English text primarily occur only in a few places; at the start of a sentence or on a proper noun. So, you can first compress your text all in lower case, and then go back through and pack the capitols as a boolean flag on each letter; that flag is highly predictable; ". " predicts a capitol very well, as does "english" (trying to make "English"), etc. Similarly, punctuation is highly predictable. You can do very well by packing English text as all lower case with no punctuation, eg. with a 27-letter alphabet (sending spaces), and then filling in the remaining characters, which are highly predictable from the text. There's a lot more you can do, but this is a good sampling. This depresses me. What I'm doing here is building *my* special knowledge of the data into the coder. The idea of general-purpose coder is that it should be figuring these things out on its own. Part of the problem with that is that I have seen millions and millions of words of English text; that is my coding model is very well conditioned and very large; in a sense we humans have a massive amount of "side information" in the form of our shared collective knowledge. I'm reminded of this Star Trek TNG episode where a race of people speak entirely in references; they say "Darmok and Jalad at Tanagra" (or something like that) and it means a huge amount because of their shared side-information. The other depressing thing is that a lot of this information is rule-based or "finite state", and not well described with a finite context model. We still have no way of efficienctly learning (approximate) rules or finite-state information in compression, and it's unclear to me how to get there. I'm sure it will happen, but we're really getting into the realm of AI and computer learning. You need a multi-stage compressor, where at the lowest level, you're running something like PPMZ, but it's also feeding the text through some fancy AI (like a Neural Net or what ever) that's learning about rules in the data and feeding probabilities back to the base compression engine. The only problem with this picture is the one I mentioned before about the amount of conditioning data. Most compression engines are "one-off" without long-term memory, which is a mess to deal with; this means that they don't have long to learn about the data, and these AI engine do need a lot of time to learn.

4-12-02

I'd like to see a research project to try to simulate a single real scene in CG. So far as I know this has never been done; pick a place, like my living room, and try to build it in CG and render images that look "real". The test of "real" should be done by comparing photos and CG shots and asking a blind sample of people which is the computer-generated shot. The CG qualifies as "real" when >= 50% of the people say the CG shot is the real one. I think it would be interesting, once the image gets really close to looking real, then you can take photos and compare, and ask yourself "why doesn't the CG image look real?". I think a lot of interesting stuff could come out of that; is it dust in the air making the lighing more diffuse in the real world? Is it that the sun light arriving in the real world is varying and non-uniform because it's been through all kinds of interactions on the way to the living room? Is it the layers of dirt and dust on objects in the real world? Is it subtle subsurface scattering and other micro-surface effects? Is it that 2d textures just can't look really real; that you actually need cloth and wood and such that have 3d shape, etc...

4-11-02

More and more projects that I'm considering working on are in the realm of human-mimicing machines. Let me start back at the beginning. Some things I'm interested in are shape identification in images and extraction of instruments in audio. I know these things are possible in a reliable and accurate way, because humans can do it. You must be able to describe what humans do with some algorithm, that could be reproduced in a machine. The problem with this argument is that it may not be practical; that is, how close are tasks like these to "true AI" - that is, making a machine that has creativity, etc. For example, when I see that a "zebra" is a "zebra", as opposed to a funny-looking white horse with extreme shadows on it, how much of my database of knowledge about the world am I using? How hard is it to fool the brain? (pretty hard, with real images).

4-06-02

The Spherical Harmonic technique of Hanrahan et.al. in Siggraph 2001 is pretty great; it's practical in realtime on PixelShader 1.4 hardware (eg. the new Radeons). You can think of it as an enhancement of the old "environment mapped lighting" technique, which I've discussed many times in various places. On the other hand, the useful applications of this technique are still quite low due to some difficult problems. It really only works with static lighting environments, because you need to spend a lot of time precomputing these maps (that's kind of the whole point, to be able to do much higher quality lighting math in your precomputation step), and it only works for the moment in very small closed environments, because there's no good way to sample at multiple points and interpolate, or whatever.

2-27-02

I think it's quite possible that the laws of the universe are infinite. First, a bit of Goedel argument, ala Penrose :

The physical laws of the universe correpond to a formal system, in that they specify which computations can be done in that universe, and computations correspond to logical statements ala Turing/Penrose. Now, the Goedel theorem says that for any consistent formal system F, there exist statements which cannot be proved with F. In fact, the Goedel statement on F, let's call it G(F), is a true statement that cannot be proved with F. Now if F is the formal system of the physical laws of the universe, then G(F) cannot be proved with it, but G(F) is true, so those laws must not be all the laws of the universe!! This is a bad paradox, and the only way to solve it is by making F exempt to Goedel. One way to do that is if F is infinitely large.

Let me digress briefly to say that an "infinite" F need not be infinite in the way you might think; that is, it need not really be an infinite set of rules. It might just be an infinitely precise number with infinite entropy (like the "Chaikin number"). Now, a number like PI does not count, because it can be computed with a finite set of rules, and a number like sqrt(2) certainly doesn't count, but maybe the (unitless) charge of the electron (the "alpha" constant, roughly 137 (more like 137.03597... though perhaps different in an infinite number of places) might be such a number. Note that an infinite set of rules can be encoded in an infinite number, so in a sense, they are equivalent, but thinking in terms of infinite numbers seems closer to our every day experience. Now, it's quite possible that numbers like alpha will be derived by some deeper theory, and so not really have infinite entropy, but for the moment our physics has lots of these infinite numbers.

Anyway, this is all sort of an aside to my main point, which is - so what if the rules of the universe are infinite? I think it was Einstein's achilles heel in the end that he thought there must be a finite set of knowable rules that control the universe. Sure, there might be, but there also might not be. Note that I'm talking here about "knowable in principle", and not "knowable in practice", because it's possible that the rules of the universe are finite and knowable, but are just far too complex for our minds to ever understand. For example, the rules might take 2^9999 bits to encode, which would prevent humans from ever knowing them. So, whatever, who cares? The role of physics is not to find the absolute answer about what the universe is doing; even if you had the final set of rules, you could never know that it was the final set of rules! The role of physics is to find a good model for the universe. A model should be able to predict what will happen when a certain configuration moves through time in the universe with a high degree of accuracy. Our current model (quantum field theory + general relativity) is incredibly good; it's certainly not the end, and I suggest there may be no end, and in fact whether there is an end is the wrong the question to ask.

The question "is quantum mechanics the final answer?" is usually asked for the wrong reasons, as if it not being the final answer somehow invalidates it. It's not the final answer, but that doesn't make it any less valid. The ideas that quantum mechanics puts in our heads, about superpositions of amplitudes moving through time, sampling all possible paths, those ideas are good ideas, even if they're not right! Why? Because they fit the universe so closely, that they're a good approximation. Wave theory of sound is not "right"; what's actually happening is a complicated QFT interaction of all those atoms; who cares? wave theory is perfectly valid as an approximation, and it's very useful to think that way. The question "what is actually happening when a sound wave moves through air?" might be a bad question, it might be unanswerable; and who cares if it is? The right question is "what is the simplest very good approximation of the mechanism for sound waves moving through air?" (or something like that).

Non-scientists (and surprisingly many scientists) have a lot of trouble giving up this idea that science is about figuring out the root of the universe. It's not, and to ever claim that you have the final laws is a completely indefensible position.

1-13-02

I wonder when modern band name styles developed. I mean, at some point in history, like in the 19th century, bands were named in logical ways, like "The London Quartet" or the "David Goliath and his Large Band". Then, some group started calling themself something like "Bedspread". That must have been a weird time; by the 40s it seems that weird group names were an accepted thing. Weird-band-namers in that time must have thought themselves very clever; now, names like "Pavement" or "Cake" don't seem clever at all, and are completely divorced of meaning; even in the age of "The Crickets" and "The Beatles" the bands felt compelled to have some logical reason for their name, be it an insect on one of their recordings, or a pun.

I wonder if toilet paper companies do "field" product testing. I have this image of the Charmin toilet paper lab; they develop a new product, and then they're like "ok, Stan, make some beans, gotta test it".

I've been wondering this for a long time, but don't think I've written it down : all those products that say "not tested on animals" - what are they tested on? The consumer? Should I be scared of using a shampoo that's not tested on animals? Better to test on chimpanzees than humans, no?

12-18-01

Idea for better enlarging of images :

Take an image. Wavelet transform it with a nice smooth-basis wavelet. You will end up seeing the shape of the mother wavelet in the enlarged image, so choice of the wavelet may be important; for best quality, allow several choices and let the user pick the one that turns out best. Now, increase the size of the image in the wavelet domain by adding more subband levels. For example, a 1x1 source image would just make an "LL" band. A 4x4 would make an LL and 2 sets of {LH,HL,HH} ; you can double the image size by adding an {LH,HL,HH} band. Fill out the new bands somehow (see later). Now inverse-transform the wavelet image. Result is a higher resolution image.

Now the question is how to fill out the added bands. The easiest thing is to make them zero. If you do this, it's equivalent to using the source pixels as coefficients for mother wavelets in a higher resolution; if, for example, the wavelet is a "cosine" wavelet transform (ala EZDCT) then this is just Fourier-upsampling. The reason this is cool is that there are better things to do. It turns out that natural images have correlation at all levels of resolution. What that means is that all the "LH" bands roughly look the same; in particular, the correlation matrix between an "LH" band at level (n-1) and an "LH" band at level (n) is roughly the same for all (n) !! This means that we can build a deduced heurstic correlation matrix (via stastical analysis, just like a compressor would do) and then use that to predict the next level!

(minor note to self/implementer : make sure your wavelets are normalized; work in YUV space; maybe gamma-adjust to make the intensities light linear? use doubles throughout).

12-17-01

There's this really old idea to do virtual storage by having a small hard drive, and then keep lots of data floating around on the wires and routers of the internet. It occurred to me the other day that this could actually be done now in a cool "guerilla" way. So, idea for using the internet to back up your hard drive :

This is a lossy storage system, so it's used only for optional backups, and ideally each file would be stored in several places for RAID-style safety. Basically, you run a background task which is constantly feeding your data out to the internet. Your data can be crammed into lots of places. The program can get you lots of free website accounts on geocities, yahoo, etc. and cram your data up there; the program can post your data to the usenet newsgroups and then recover it via news archives; the program can get you lots of free email accounts and email the data to those accounts. Of course the data would be encrypted! Someone more sneakily, the data can just be routed around in loops. You can send out data to bad email addresses all over the internet; when it bounces back to you, you can delete it if you don't need it (and immediately send it out again). The result is that at least one backup of every file on your machine is floating around as an email in transit. You can make the turn-around longer by routing the mail through loops of anonymous re-senders and other such free services. You can use a chain of free email accounts to keep your data flowing in loops.

12-11-01

I bought 4 kiwis. The first I ate was very unripe, quite sour and hard. I waited a few days and ate the next, it was pretty sour and not soft at all. Today I ate the third kiwi; it has a slight hint of sweetness, and a little bit of softness. Perhaps the last kiwi will be good.

Today I thought to tell my youngest brother, James, that he needs to learn to do things that he finds unpleasant or disagrees with, "since in life, it's sometimes necessary to do those things to reach your goals". Then I paused and realized that I'm still not convinced of that fact. In my youth I would have flown into a rage over that edict, crying that it's senseless - why would you do something unpleasant in your life in order to acheive pleasantness in your life!? if the goal of life is to enjoy it, then just do it now! Why is enjoyment later considered better than enjoyment now? (as an aside, there is of course no "goal" or "reason" for life except to get to the end (why did the chicken live? to die), by which reasoning the suicides are the real "winners" in life, and the martyrs are doing a good job too, but they've got some confused side track about some nonsense "cause" or other). Anyway, I was saying that in my youth I rebelled against the idea that one must ocassionally conform to the social rules and "play the game" (as the say) in order to get ahead. I would mouth off in school, trying to show the teachers that I didn't consider them superior, and that this enforced heirarchy was only an obstruction to real learning; I would refuse to do busy-work, occasionally getting B's in classes I should have aced because of things like "points off for using pencil when you're required to use pen" or "points off for handwriting" or "didn't do the assignment to write each vocabulary word ten times". I felt the same way socially, and still do somewhat. I would intentionally violate social mores that I thought were silly. For example, at various times I thought religion was just insane - how can a rational person believe that a woman was made from a man's rib? (for example) - and I would tell people so. I would call people by slurs just to see their reaction, because I thought it insane to get riled up over what a complete stranger calls you. I would wear ragged, ripped clothing all the time to outrage the goofs.

I've moved past all this silliness to some extent; I now find it just as silly for me to find amusement in someone getting riled up as I find it silly that they got riled up. (as an aside, I used to be incredibly amused by the pure insanity and ridiculousness of the world; now I find it much more depressing; what I once thought just insane I now see as a manifestation of greed, sloth, avarice, and stupidity in the human race). Anyway, I now (sometimes) hold my tongue when I know someone is telling a lie, or when I have an opportunity for an "I told you so" or such. I now play some of the "games". For example, a good "game" that my dad me is this one : if you have an idea which you expect will receive resistance, first place the seed of the idea, then coax the decision maker towards that idea. When he arrives at it on his own, praise him for his brilliance, all the while basking in getting your way. This method is much more likely to get results than just presenting the idea and all the pros and cons, since people are much more likely to support their own idea than someone else's. Is it wrong to play this "game" ? Certainly not; it's a very mild form of manipulation compared to what some people do. Does it make me feel sick inside? Yes, a little bit. Do I wish I worked and lived in a place where I never had to do things like that? Yes, very much. Does such a place exist? Maybe not.

11-27-01

A mini survey of sorts; I've got a bunch of research I've done that I could write about, so you all can vote on what you'd like to hear about :

  • Fast ray-triangle intersection with side information (barycentric precomputation)
  • Experiments on primitive bounding volumes (aka "you're probably doing the wrong thing")
  • Detailed analysis of light & shadow techniques (aka "it's hopeless")
  • Fast collision detection with line-swept spheres

11-19-01

Movies : The Eel (Shohei Imamura) ; Music : The Shins

9-29-01

More thoughts on work as war. It's amazing what trials and horror you can fight through in war. BUT the minute you feel that your cause is not just, your resolve disintegrates and the leeches and mud and cold and hunger all become unbearable. Also, if your general is lobbing grenades into your platoon and giggling (I imagine something like a cross between MacArthur in Dr. Strangelove and the policeman in Young Frankenstein), you sort of turn around say "what the fuck are you doing?" incredulously, like "you want us to fight this war, but you're killing us!". Then you toss down your guns and go home.

9-23-01

Reading about the horrible human rights violations China has committed recently (and throughout its history), I initially think that it's a horrible irony to grant the 2008 Olympic games to Beijing, games that are supposed to unite the world and be a symbol of a free peaceful society. What's the alternative, though? Denying them that, and trade, and normal relations with the west? Isolating China (like a child sent to its room for bad behavior) is surely the wrong tack. An isolated China would stew and build hatred for the west. The political think tanks are right that the only way to free China is by embracing it, and simply trying to ignore its transgressions (while still voicing disapproval). Of course, this business of not even acknowledging the violations has got to go.

9-20-01

I guess I'll never be really happy in any corporation. A human needs freedom, a human needs to be able to be really wrong once in a while, to get naked and run around the office, to punch holes in the wall, to just scream, to curse at everyone around and then buy them coffees, to take all your mates on a drive to Mexico. I can't handle this idea of working with people you don't like and living your life in the time outside of work; I'm not sure why, lots of people seem to do it, but not I. I need my coworkers to be my mates, to have that camraderie, etc. It's not just about getting personally wild, though, it's about the company being wild. It's about not using focus groups, it's about doing things that don't appeal to the mass market. I want to write Kafka, not Steven King, I want to make Rushmore, not Rush Hour, I want to paint Francis Bacon, not Dali. Unfortunately, most of the people doing wild things don't know WTF they're doing. It's also very hard to find them. Genius is a rare thing, and it's very hard to spot before it's exploded publicly (genius and insanity are only epsilon apart).

I read recently that the way modern armies work is entirely based on the pack mentality of the troops in a platoon. Any one soldier on his own might stop and say "wait, what the fuck am I doing here?" and run on home, but if he has that good bond with his platoon, he'll think "no, I can't bail out on my mates". A good workplace is the same way - even if you're ready to collapse, you know you have to suck it up to help out your crew. I've been thinking a lot lately about these analogies between armies and companies. I think the dream in a corporation is to have a strong and wise leader that you can respect, like Duke Leto Atreides or Romell or Napoleon or Henry V, and not a maniac or idiot or coward. The best feeling is to trust and feel secure in the hands of your leadership - to know that if you can follow orders and execute them, then all will be well. Humans can do amazing things when they're set up for it. The best situation is to have a trusted leader and for him to say "Look, I've got this master plan, and here's your role : do this and this, and if everyone does their part, we'll be victorious". If you really believe it, then you'll get it done and go to incredible lenghs to do so. The worst thing is when you don't trust your leader, and they give you that same speech, and you know inside that even if you do your part perfectly, the war won't be won, and you'll be hearing the same speech next week.

9-20-01

Sometimes I just want to get crazy, to be poor, broke, live in the big city, and do something important, do something to change the world, do something different, like art or music or *something*, to be addicted to drugs, or a criminal. To not just be a cog in the machine, to not just do the same crap that everyone in the world is doing, to not be replaceable, to not enjoy nice wine, to not have a nice car, to not watch television. But then that feeling passes and I go back to doing all those things that I despised a moment ago, because after all, I do like them so.

One of my best memories is sitting on the floor in college, drinking and smoking and playing poker (badly), listening to Pavement and Luna and the Replacements and such. It was simple, it wasn't big fun, but it was pure. I wasn't hanging out with them for any calculated reason, it wasn't to build business relationships, or to get invited on their next ski trip, or to get with the sister, or whatever, it was just a moment.

I need to find someone older who's gotten through this. It seems like many people feel this lack of satisfaction in their youth, and most people get over it by simply having their spirit killed over the years, until eventually they just are content to work like drones and go home to their dog and their television. One of the better attitudes that I've seen is to just sort of ignore the crap that's going on around, and just try to do your own thing in whatever situation you're in and make the best of it. Perhaps I need to do more of that, but I still have too much desire to improve the world to just sit back and laugh when crazy shit happens. For example, when someone tries to run me off the road, I can't just laugh about it, I want to cut them off and get out of my car and give them a lecture about the shit they're doing. If you're Kieslowski, making films in communist Poland, the right thing to do is to try to express yourself, but to work within the system. Even when the censors chop up your movie, or when you have to put all your meaning into subtle subtext, you can be happy about doing what you really want to; it's futile and fruitless to rail against the system. I must learn from this.

In the real world, commercial pressures and focus groups and such are a must. So, the secret is to find that compromise, that sweet spot, where you can do the artistic things that you really want to, and to also be successful enough to keep going.

9-16-01

In article , hsutter@acm.org says...
> note that the above version has other problems
>(e.g., the return value should be a reference to non-const and the function
>should end with "return *this;").

I've read this over and over and just can't understand it.  I don't
see what the possible benefit of this is.  The only reason why you
should return a reference from your assignment operator (that I can see)
is so that you can write code like

a = b = c;

or

(a = b) == c

etc.

I don't think it's a good idea to write interfaces that permit this, and
I have no interest in supporting client code that does this.

Now, I've often heard it said that "integral types support it, so you
should support it" , but integral types support all kinds of things that
I don't support, like bitwise OR operators.  Why should my Mutex class
try to act like an integer?

9-12-01

Jesse Helms, Phil Gramm, and Strom Thurmond are all finally leaving the Senate (by not running for re-election) due to old age. The enemy is vanquished by attrition, but surely the Hydra will grow new heads.

I have very little time for the "rants" these days; I can't get to my web-site from work, and I have very few moments of free time at home.

There's this traditional casting of blame in companies up and down the heirarchy. Management sits around and says "my workers are a bunch of bums, it's their fault the job's not getting done", and the workers sit around and say "management is a bunch of bums, it's their fault we weren't told to do the right job". This is inevitable to some extent; it takes a very extraordinary personality to actually accept the blame, and anyway a lot of the time everyone is to blame so both people may be correct. Regardless, this breeds bad blood, and is to be avoided. I think the only way to do this is to merge management and labor; that way, labor can't blame the schedulers - they made the schedule themselves! To do this you need a really open environment, where everyone knows everything and is involved in all aspects of the work.

This whole terrorism this has captivated the county, of course. The sick side of me can't help being proud of the terrorists - everyone was so sure that they could never do any significant damage in America, but look how they've succeeded! Of course, the deaths of the innocents is terrible, but it's also terrible in Palestine, in Afghanistan, in Pakistan, in Timor, in Indonesia, in China, in Haiti, in Cuba, in Columbia, etc. etc. Chances are, the US will retaliate hard against someone (not necessarilly the culprit). This is a huge mistake; it's what creates terrorists in the first place. The only remedy for terrorism is defense and bringing peace to the troubled parts of the world, not counter-attack.

9-3-01

I've been thinking a lot lately about the comparison of "work" and "school". It seems that in the games industry, there is widespread acceptance that you have to crunch to finish a product (this is a belief held through most of the software industry). In school, someone who crunches to finish a report is a slacker, a procrastinator. Often, you can get the job done that way (in school), but it definitely doesn't produce the best results. The best work is done by getting as much done as early as possible. I was always a bit of a procrastinator when I knew I could get away with it, but whenever I got an assignment that was actually difficult I would say "oh crap" and immediately get to work. Now, in industry you could blame this on a couple of things. You could say it's due to bad scheduling, it's due to the difficulty of estimating how long things will take, it's due to the changing nature of the task, etc. However, all of these excuses presume that you originally intended to meet your deadline by steady even progress. I think that assumption is wrong. I think most executives and producers in the game industry have the intention from the beginning of making a hard crunch at the end. Now, almost all of them (except for the cowboys) will tell you that they don't have that intention, and some of them will even believe it when they say it (it's a truism that the higher you are in the corporate machine, the more you lie; that's not necessarilly a personal flaw, it's just a very strong pattern (part of the reason for that is just that the lower-rung people have less to lie about; they don't know the secrets so they can't keep them! (and let me qualify that again : much of the "lieing" isn't straightforward; it's usually in the form of not sharing all the information you have))).

Anyway, where does this come from? Certainly, in school, most people were procrastinators. Only a handful actually started early, and many of those were just brown-nosers, honor-rollers that end up going nowhere in their lives. So, what's left is a handful of magna-cum-laude who start things early, and a mess of procrastinating business (&c) majors. So, given those odds, chances are your boss is one of the latter. Now, I'm not sure this accounts for all of it. There are many more issues. One is that the schedulers have often never done the work they're scheduling. Because of that they really don't believe the truth that everyone in the business knows : when you work creative people beyond their limit, their net work goes down even as their number of hours goes up. This has been documented over and over in productivity studies, but the corporate machine just doesn't get it. The fundamental reason for this is that until you've experienced it, you just don't believe it. Most writers and composers know it; if you try to work too hard, you'll never get done at all. Dante wrote one page of the Inferno each day; this pace is normal for writers (though the regularity isn't). The other big issue is that the schedulers really believe that they'll get tons of work done in the final crunch. The really sad thing about this is that it's partially true. The damned employees are very irresponsible and just don't do the right work. It's not a matter of working hard, it's a matter of what you're doing when you work. They'll say "there're months left, no need to do the hard stuff, let's work on the fun stuff" and the hard stuff will never get done until crunch. There's also a way that crunch focuses you on really helping out the bottleneck in the pipeline, as opposed to just doing your own thing.

8-22-01

I was just thinking about cleaning the house, and it made me think of programming. When I clean, I tend to have one of two modes of operation. In one mode, I'm on a mission to eradicate every last ounce of filth. I usually start somewhere juicy, like the bathroom, and scrub and scrub for hours, dusting the ceilings, replacing the air filters, etc. Alas, once I've finished my one room, hours have passed, and I have no energy to clean any more. In the other mode, I'm just trying to straighten up for guests (or whatever); I attack only the very visible filth - clothes on the floor, dishes in the sink. Dust and grime goes completely ignored.

This strikes me as just what programming personalities are like - either meticulous and perfectionist, but isolated, or comprehensive but not thorough. Now, the ideal programmer will initially do the most important things, and then refine to get more thorough as necessary or as he ("he" not "she", let's not kid ourselves) has time. So, what's this like in a house? You do a first pass to clean the most obvious things, then a second pass to scrub the floor, next do the laundry, wash the windows, finally dust, etc. It's interesting that nobody actually works or lives like this. It's the logic thing, but it's just not human.

8-20-01

(very old) Interesting compression idea :

16-bit fixed width codes.

Basically, the 16-bits refers into a
static dictionary.

Two ways to generate :

1. Explicity dictionary.  Transmit the dictionary, or
precompute and store it for a set of data.  You compute
it by finding the most common 65536 strings of 1 or 
more characters and just listing them in order and
assigning each a code.

2. Implicit dictionary.  You just transmit probabilities
for all the characters, eg. order-0 statistics.  Then
you make the code by making the highest-probability 64k
combinations.  First, load in the 256 single-characters,
then add the highest-probability string, then the next,
etc.

8-20-01

I've been doing a lot of wacky template programming lately (I'll be posting some of it on my page as soon as I get around to it). It's helped me to become much more comfortable with it, which is somewhat of a bad thing. I no longer have such a nice healthy fear of templates. Of course I still fear the compile time, the code bloat, the many instructions generated from a single line, the exposing of functionality to headers, etc. ; what I'm losing is the concept of how damn confusing they are to people who aren't familiar with them. This is important - my code is becoming harder for people at large to understand, and that's a bad thing.

8-3-01

Excessive sarcasm makes my ears bleed.

4-4-01

The new Lexus SC 430 is a beauty. I must resist blowing all my cash on cars. One of my favorite quotes from John Carmack was in response to "why do you blow so much cash on cars?"; he responded with something like "I spend 90% of my time at work or sleeping; the rest of the time is spent primarily driving between work and home; I want that free time to be as pleasurable as possible".

The difference between great programmers and terrible ones is not that the great programmers are somehow much better at solving hard problems. They are, but that's not where the big difference (a factor of 2-10X productivity) comes from. The big difference comes from the fact that great programmers don't make the problems easy for themselves.

3-6-01

The grape boycott ended with a whimper a few months ago. In the 80's with Cesar Chavez at the helm, it was quite high profile. In the 90's, after beatings from teamsters and much apathy from the populace, the boycott was called off and hardly anyone actually noticed. There are more illegals and temporary workers in grape picking now, and the strength of the union is greatly decreased. In the mean time, we can all boycott Carl's Junior. The owner, Carl Karcher, is an ultra-right-wing political reactionary. He takes his profits from your hamburger purchases and gives the money to anti-abortion groups and other such insanity. Anyway, we should boycott Carl's Jr. just for the insult of those disgusting commercials.

2-16-01

Part of me loves coding on my own. I'm 2 or 3 times more productive when I'm working alone - no meetings, no bugs caused by other people, all the code is quality, and I know it all well cuz I did it, it's all in the style I find most readable and sensible, etc. For example, I did the whole "Galaxy" demo in about a week or two or real work time (I did it in the hours before and after the work day at Surreal). That would've taken months of developer work time as part of a team! Alas, whenever I work alone I come back to the same damn problems : 1. I can't make money doing that, and 2. I can never make anything really great that way, since there's only so much one person can do, and of course I'm missing and the art and etc. Hmm.. I must be unhappy no matter what I do !? (Addendum : reading Code Complete now, I see all kind of studies and figures which show how the productivity per person takes a *hard* dive as you add more people. They estimate that productivity (measured in lines of code) goes down by a factor of 10 (an order of magnitude) from an individual project to a large team).

2-16-01

Affirmative action based on race is preposterous. Medical schools and colleges let in rich spoiled caucausianized minorities because of it who have no business getting in that way. The whole idea of affirmative action is to account for previous disadvantages - those ricks blacks and latinos had no disadvantages! Now, affirmative action based on poverty does make sense and is reasonable. A child from the inner city has an unfair disadvantage on the SAT's (for example) regardless of race. The same is true for contractors and city jobs; most governments have an AA policy in hiring contract jobs; they should instead of poverty or neighborhood based policies.

2-12-01

I just found a Sushi Robo CD for 98 cents. It rocks. Also check out Grandaddy and Silkworm.

I went to the game developer "hard core" technical seminar last week. It was great to meet lots of people that I have been emailing with for the past two years; lots of smart guys there. I left like a lot of people were stuck on accuracy and CPU-intensive work, and not nearly enough people were blown away by just how hot current graphics hardware is, and how much we can do with it.

12-7-00

D3DX for DirectX 8 is better than most (all?) 3d engines out there. Yes, your 3d engine sucks (and so does mine). Why do I think it's so great? It's got a mesh optimizer for vertex cache, it's got a good implementation of VIPM progressive meshes, it's got a "Technique" abstraction of multiple passes with fallback techniques for older hardware, it's got an efficient smoothed skin mesh, it's got exporters to get meshes from popular 3d art packages, it's got a lean and efficient model class. Hmm.. that sounds like a pretty full feature list for a 3d engine, and while being full-featured it's also lean, efficient, and pretty well documented. By contrast, most current 3d engines don't have many of those features, and instead they have kludgy big inefficient memory-wasteful classes with bad art paths and bugs galore, poor 3d content exporters, no abstracted multi-pass fallbacks for old hardware, and very bad speed on GeForce2. Don't whine that you couldn't have done what D3DX does - you could easily have done all of that just using the DirectX 7 interfaces if you actually knew what to do with a 3d engine. I haven't seen a single 3d engine that made the right decisions about its feature set - D3DX gets them right (I certainly made the wrong decisions at Wild Tangent; I wasn't nearly quick enough to see the power of modern hardware, and how it should be pushed, and how important it is to have a minimalist 3d engine which is low-featured, but every feature is *quality*).

I (or you) could make the best 3D engine in the world by taking D3DX/Dx8 and slapping a scene-graph + collision wrapper on it.

No comments:

old rants