Seen in a long conversation on a list which will go unnamed:
I deleted all your comments to save some bandwidth.
Seen in a long conversation on a list which will go unnamed:
I deleted all your comments to save some bandwidth.
"I can work all weekend, whether I want to or not."
The Flash 7 release notes explain that mousewheel support was added for windows only. Parse that and rearrange a bit, and you get, "the mousewheel is not supported on the mac in flash player 7." Flash doesn't support it, so OpenLaszlo doesn't support it, so (sadly) Laszlo Mail can't support it.
We've been getting user comments about this, so I know it doesn't work in some cases (including on my favorite dev machine) but I'm not sure if it does work in any cases. Luckily, I don't have a windows box with a mouse with a scroll wheel to try it out on.
Sarah Allen, the director of the Laszlo applications group, told our team about a planning exercise: give everyone on the team a hundred dollars, assign relative costs to features and open bugs, and let the team members "buy" features. At the end of the exercise, the features which have been paid for go on the "to do now" list, and the others wait for later. Our graphic designer, Peter Andrea, asked, "What about stealing? I want to steal features." "That's what weekends are for," Sarah responded.
Similarly, Sarah told me the first eight hours of work she does a day are what Laszlo needs done; after that, she does the work that she wants to do. Quite a lot of the time, what I want to do is the same as what Laszlo needs done; this is just about the definition of "the perfect job for me." When what I want to do isn't quite what Laszlo needs done, I work weekends. As our CTO, David Temkin, said yesterday, "implemented code is nine-tenths of the law."
Constraints are incredibly tasty for rapid prototyping, but they can lead to performance problems. Each constraint, of the form
<view name="nugget" width="${thingy.width}" ... / >
becomes, at runtime, something like this:
<method event="onwidth" reference="thingy" args="w" >
nugget.setWidth(w);
</method>
Every time thingy's width is changed, nugget's width is changed; that's the point of the constraints. If you don't care about maintaining that relationship, or if you know thingy.width is never going to change, then you're bloating the runtime with event handlers you don't need.
The $once "constraint" avoids the extra event handlers:
<view name="nugget" width="$once{thingy.width}" ... />
My understanding is that this constraint is just evaluated once, when the view's attributes are first set. This will only work for static layouts, of course, and only if instantiation order works right. In this case, thingy must be constructed, and its width attribute must be set, and "thingy" must be in scope, in order for the $once form to work.
I feel guilty when I make images. I feel like I "should" be coding... When I make images there's a tape playing in my mind: "You're not a real designer. This isn't going to look like a real designer made it. This isn't professional quality. This is going to have to be thrown out and replaced by a real designer. You don't know how to use these tools. You're so slow. You're wasting time when you should be coding. Give it up." ...as if my making images was actually wasting someone else's time.
My time is mine to waste! I'm off to make pictures!
OpenLaszlo/Flash is more write-once-run-anywhere, more zero-install, than anything else I've developed in. However, the linux flash player has some problems which affect Laszlo Mail:
Laszlo Mail is live. It's a webmail client and server, designed for licensing to ISP's and content providers. It's swooshy and smooth... I love the visual and interaction design. Please check it out and let me know what you think. This is what I've been working on since I came to Laszlo this summer, and the rest of the team has been working on it for more than a year before that. Try registering and logging in; see what it feels like.
I've been reading The Great Influenza: The Epic Story of the Deadliest Plague in History by John M. Barry. It's shocking and terrifying. This is the biggest thing I'd never heard of, and learning about it makes me wash my hands a lot. I'm thinking of stocking up on gauze masks. Seriously.
The "spanish" flu of 1918 killed 30,000 people in New York City and more than half a million in the United States. It was most likely to be fatal in otherwise healthy adults aged 20-40. Healthy immune systems attacked the virus so powerfully that debris from the immune response clogged the lungs. People suffocated in their own blood. Overcrowded army barracks and troop movements facilitated the rapid spread of the virus. They were running out of coffins in New York City. Corpses literally piled up. The flu could kill within hours of exposure. The virus can stay viable in the air for an hour.
Here's the scenario that scares me:
That's probably enough of that: easy transmission in close conditions, rapid virus replication and shedding while asymptomatic, viral infection raises susceptibility to bacterial infection. Breakdown of healthcare institutions, then breakdown of civil society. It's going to happen. I'm not worried about will I get sick and die? I'm worried about, will modern society survive the pandemic?
Yesterday I wandered into a Circuit City after a long day of pretty damn good programming. I had a few minutes to kill so I walked the retail circle... and I came upon the iPod Shuffle. So I'm thinking, "Well, I've been working hard, and my iPod is broken, and having an iPod is pretty crucial to going to the gym, and I'd really like a tiny one like the shuffle, and the nano is out of my price range..." Staring lovingly at the white sliver of plastic, part of that thought caught my attention. My iPod is broken. Wait. This is the third iPod I've had. This is the second iPod i've paid for. This is the third iPod that's broken, and the second iPod that's broken out of warranty. Why on earth would I buy another iPod? I walked out of the Circuit City with all the cash I had when I came in, pleased with myself that I hadn't bought another fragile, doomed gizmo.
I buy apple hardware because I love OS X, which I can only get on this hardware, and because I love the industrial design. I can have the fundamental experience of walking around listening to MP3's with a gadget from any manufacturer, and toughness matters more than looks. I'm not going to throw away another hundred dollars away on shininess.
I'm in my "one week, no software configuration" blackout, but a Mandriva Linux 2006 install cd fell into my linux box's cd-rom drive a few days ago, and when I restarted, it booted from the cd and asked very nicely from which media I would like to install. My local linux guru told me that installation would be super and wonderful and good, so I hit install. Ah, apparently the whole install was not on the cd. The installer asks if it can go out to the web to get the rest of the pieces. I say, okay sure. A few clicks later, I was looking at delightful illustrations of penguins and promo text reading "Quick & Easy Installation!" At the bottom of the screen there's a long progress bar captioned, "Time Remaining 4:47." Yes, hours. Arg! Apparently it's got a whole lot of bits to download.
The question now is, do I cancel the installation so I can get work done tonight?
[later]
I tried to cancel the install both by hitting the "Cancel" button and the "Exit Installation" button. There's no indication that it got my click for a few minutes, and then a content-free large grey rectangle appears. A few more minutes go by, and it's replaced by a progress output list labeled "Installing" that lists all of the packages its installing. I told it to cancel!.
[later]
"Time Remaining 01:02"
[later]
"Time Remaining 01:04"
I am now rather pleased with my habit of daily backups to alternate media.
I've been in this job for four months, and I think I have the development environment I want. Things are fitting together more nicely than they have in a long, long time. Fundamentally, I'm using the mac for client side computing, and whatever I can find for a server.
What I'm not using:
So, look at that: a few small-to-moderate tools, each focused on one goal. From the universe of software and methodologies, I'm picking the ones that work best for me... Tiny tools which work together. I wonder what government would look like if I could set it up just like my development machine.
I will only buy wireless input devices from now on. Last week I tripped on a power cord for my laptop; the power jack was bent but the laptop was fine, despite crashing to the ground. (Good thing my host had a nice thick throw rug.) Then just now, I tripped over the cord to one of the weirder input devices I've owned, the Belkin Nostromo n52. Elementary physics indicates that when a cable connecting two items of unequal mass is tugged in the middle, the item with lesser mass will move. The heavier object (the laptop) will require more force to overcome static friction, especially if it has little sticky rubber feet.
little rubber feet
The little rubber feet keep coming off my powerbook. Over and over. When apple repaired it the first time, they replaced all the feet. Now one of the feet has started falling off again. I'm hoping some superglue will fix the problem, but it's a pretty small area for adhesion.
Bit of a design problem, there: the feet are high-friction so that the computer doesn't move when it's on a smooth surface, but that means the feet will stick when I put the computer down and slide it. This makes me think something about coefficient of static friction.
I hereby commit not to buy a new powerbook until Apple releases intel-based notebooks. I might, however, have to buy a Sun Ultra 20.
life is good
Another afternoon spent in bed... but that was after a very out-and-about morning. I spent the middle of the day shopping with Money-D. We discovered that Cheap Pete's really does have low prices on frames, that the waitresses in dim sum restaurants look at you funny if you ask them for the check (you have to ask a guy in a suit), and that the giant Macy's furniture store on El Camino in San Mateo really is a furniture store (not an abandoned warehouse). We ran into Frisco while driving around -- hard to miss a squareback VW -- and he was going to taco bell, of all places. Taco Bell! In the middle of California! It was a nice small-town feeling to see him. And just generally nice to spend a big chunk of my day with other people.
Since returning from my errands, I've been in bed watching 5ive Days to Midnight, a miniseries from the SciFi channel. So far it's rather good, except for a major sensation-of-disbelief requirement. Whoever did the soundtrack could make
I really need to go grocery shopping, but mmm, my bed is so nice and warm. Also, it's 69 in my apartment and I just set the thermostat to 72. Mmm, how tasty is that? Central heating, a thermostat, a bed with blankets. Life is good.
twenty four hours without designers
Sometimes I like to pretend I'm nearly a designer, but then I get reminded that I'm lost without the real designers. One of them is at the roller derby and the other is on a farm in Pennsylvania. I'm working on adding a little tidbit to the promotional sequence, from a rather lovely comp. I built out the static view, but then when I went to integrate it into the animation sequence, I had no idea how to animate it.
"Fine," I think, "I'll just fade it in." Nope, Flash doesn't allow for text's opacity to be anything but zero or one. I'm sure Bret knows a trick for doing this, but he's on the aforementioned farm. Then I think, "maybe I can slide it in? the sliding looks so nice when Bret does it." But no. We've already got one thing sliding on the screen, so the other thing sliding too would look wrong.
I'm a coder, though, so I'll do a little refactoring to prepare for when the designers tell me how they want it to act. I miss them. Come back soon, designers.
In his occasional column on NPR, Andre Cordescu suggests keeping the sabbath. Driving home from a long but rewarding work week, I thought, "Damn, that sounds nice." Then I planned my weekend:
Saturday: pay bills, vacuum, go grocery shopping, add a new feature to Laszlo Mail
Sunday: go furniture shopping with Money-D (aka David Nault, who seems to be an ungoogleable except for this odd tidbit.) Eat dim-sum. Change kitty litter. Figure out how to use datahandlers.
But then my coffee plan fell through... I walked to Whole Foods for lunch and coffee. I can't stand Starbucks coffee because it all tastes so powerfully burnt to me. Whole Foods usually has a nice light roast, so I was distressed when I took a sip of today's offering and found it bitter. Acrid! Burnt! I started talking to one of the bakery staff, and asked her to brew a cup of real light roast for me. She suggested that the coffee I was drinking really was a light roast, but it was strong in a way that reminds the palette of bitterness. She gave me a lesson on coffee beans, roasts and origins, complete with several tastings and instructions on how to use a french press. Then a bunch of other coffee-shoppers descended, and I retreated... but without a blessed paper cup full of light and sweet coffee. I drank the remainder of my sample, then left, embarrassed to ask for the rest of one of the tasting pots.
Back at my apartment, I really wanted to take a nap, so I did. I'm honestly not sure whether it's a good thing or not. In the "observe the sabbath day" sense, it's a good thing, but in the cognitive-behavioral therapy way, not so much. Does napping lead to more napping? Or to renewal?
Ah, I think I get it. It's good to not work all the time, but "not working" doesn't necessarily mean "napping." So now that I'm awake, do I resume my litany of errands? Or start working on that feature the designers want? Or go see Serenity?
Sorry this domain has been down; I just got it back up a few days ago. Life is busy and wonderful. I now have an apartment, a truck, a job, a bed, a desk, blankets, food in the fridge... Amazing, since I arrived in California with two bags, two cats, and $30 five weeks ago.
Right now I'm in Los Angeles, attending SIGGRAPH 2005, and getting ready to give a presentation on Cave Writing. I'll post here, later, with all the things I forgot to say in my presentation!
I'll be at the Brown Alumni Dinner tonight, which (I'm pretty sure) is at McCormick & Schmitt at around 7 pm. Drop by if you're around! Also, I'm staying at the Westin Bonaventure; call my room there if you want to get together.
It's been at least a day since I wrote about how excited I am to be working with Laszlo. Oliver Steele posted a job description which may or may not be the job that I'm filling, but it's close, especially in values and mood. Scott Evans also posted about working at Laszlo. These are cool people, is my point.
I'm going to be in San Francisco/San Mateo from Sunday to Saturday of next week.
Bill Clinton says he weighs just about as much as he did when he graduated from high school.
Dana and I worked through some OpenGL setup stuff, and we got C++ OpenGL calls rendering to my .NET control. I get the HDC in C# from the PaintEventArgs, and pass the HDC through to my C++ OpenGL rendering code... and it draws! Mostly.
With my current code, I only see the opengl-painted stuff when I minimize, then maximize the window; my opengl code gets called every paint event, but it only gets drawn visibly after a maximize event. I'm not yet very worried about this, because I'm making a new wglContext every paint event, which is not ideal. My next step is to make one wglContext for a ManagedWindow, and reuse it for subsequent redraws.
Here's the most important nugget of the code
// C#
// Paint handler for my .NET control
private void LeoControl_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
System.IntPtr hdc = e.Graphics.GetHdc();
// Call the C++ internals to render some stuff onto this widget.
CSCppWrapper wrapper = new CSCppWrapper();
// initHDC also draws some test stuff into the HDC
wrapper.initHDC(hdc);
e.Graphics.ReleaseHdc(hdc);
}// C++
void
CppInternals::initHDC(HDC hdc)
{
_hdc = hdc;// create and enable the render context (RC)
_hrc = wglCreateContext( _hdc );PIXELFORMATDESCRIPTOR pfd;
int format;
// set the pixel format for the DC
ZeroMemory( &pfd, sizeof( pfd ) );
pfd.nSize = sizeof( pfd );
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 24;
pfd.cDepthBits = 16;
pfd.iLayerType = PFD_MAIN_PLANE;
format = ChoosePixelFormat( _hdc, &pfd );
SetPixelFormat( _hdc, format, &pfd );renderScene();
// pair with create context call.
wglDeleteContext( _hrc);}
void
CppInternals::renderScene() {// Tell it to render to the context we initialized in initHDC
wglMakeCurrent( _hdc, _hrc );.
.
.
// make some opengl calls here to draw stuff
// ....
.
.
.// Actually put this opengl stuff on the screen!
// Except, this doesn't seem to actually put the stuff on the screen... I don't think.
SwapBuffers(_hdc);// Let go of this context
wglMakeCurrent( NULL, NULL);}
This makes me so very very happy.