Oh, I got hot sause all over my bazito!

You know what this is? It's a brain sucker. You know what it's doing? Filing its tax return

If you wish to make an apple pie from scratch, you must first invent apple pie

The Adventures of Little Ed Brave

Tell airport security your name is McCannister because you can hide anything in a cannister.

You know what? Nobody notices when this changes anyway.

There are 10 types of people in the world: Those who understand binary, and STFU

What happens in a black hole stays in a black hole

The black hole draws you inexorably inward. Time slows. You are likely to be eaten by a grue.

I'd diddle little umdidlie... if she weren't my half-sister.

Abortion prevents pedophilia. In more ways than one!
Get Firefox!
I wrote a haiku

which I was about to share,

but then I thought, "screw it."
Level 1

Notice to all users of the Holodeck:

There are safety protocols in place that cannot be deactivated without the approval of two commanding officers or the captain to protect users of the Holodeck from potential harm. However, every time the Holodeck is ever used in a nontrivial manner, no matter what the safety protocols say, the Holodeck turns into a deathtrap.

Unless you believe yourself to be adept at constructing a forcefield from your communicator and 19th century Earth tools, or you're at the very least not wearing a red shirt, you are strongly advised not to attempt to use the Holodeck until a designer comes up with a safety protocol that doesn't kill you whenever somebody looks at it funny. Even when you're not on the holodeck. Or in the same quadrant. Or time period.

In fact, if you are wearing a red shirt, Starfleet may not be the job for you

Ed

Category: Programming

Pages: << 1 2 3 4 5 6 7 8 9 10 >>

Shockwave

Permalink 06/20/09 at 07:43:45 am, by Ed, 124 words   English (US)
Categories: Programming

And I'm talking about a real shockwave, not some crappy Flash knockoff from the 90's. I was originally using sin, cos, arctan, pow, AND sqrt, but this is totally more efficient.

for (int i = 0; i < d.Length; ++i) {
    PointF p = d[i];
    float dx = p.X - src.X;
    float dy = p.Y - src.Y;
    float distSquared = dx * dx + dy * dy;
    float mySpeed = speed / distSquared;
    p.X += dx * mySpeed;
    p.Y += dy * mySpeed;
    d[i] = p;
}

I just cooked that up this morning. The version in my game Ant Hill still uses all those things I mentioned. I'll probably change that around on Monday. I hope nobody steals it and claims it as their own. Frankly, it's not that complicated, I would think.

Ergonomic Keyboards are the crap

Permalink 06/13/09 at 08:51:21 am, by Ed, 73 words   English (US)
Categories: Work, Programming

I had my performance review yesterday. I got me a raise.

In other news, I've added some level of accountability to the website. Whenever my location is updated (anybody can do it! Just click on the first item in the sidebar on the left, just above "Main"), it's logged to a file, including the IP address, time, and the value it was changed to. It's good to keep records on file like this.

The royal we

Permalink 05/14/09 at 11:08:54 am, by Ed, 228 words   English (US)
Categories: Work, Programming

I have noticed that when I program, my comments are in the royal first person, that is to say, the nosism of the royal "we".

An example from my ant hill application:

//If we are being attacked, only run away if we aren't already attacking somethinig else

I don't know if this is normal, or if I just assume that all my actor classes are monarchs. It seems presumptuous, I know, but it just seems like the best solution. If I said "I" instead, it sounds like the class is talking for itself, which it is not, (I am talking for it). Using "You" is no better. I'm not talking to the class, I am making the class.

Really, "we" is the only option that makes sense in the context, unless you wish to take the utilitarian and ultimately dehumanizing route of "it". This is not to say that classes are human in the first place. It removes some of the feeling of sentience from the class, which is fine if you're working on a plain ol' BigInteger class or what have you (though I tend to even give those guys personality). But when you're working on something as visual as an ant, it just destroys the suspension of disbelief. Yeah, I totally just used that phrase while talking about programming. Big whoop, you wanna fight about it?

Ants are dumb

Permalink 02/27/09 at 02:06:03 pm, by Ed, 104 words   English (US)
Categories: Games, Programming

I've been working more on my ant hill "game" (those are the biggest finger quotes you can imagine). Right now, I'm making them shove rocks around. Basically, you throw rocks at ants, and they move them away from their hill, trying to keep it clean.

The stupid ants though, sometimes one ant would walk up to a rock and start pushing it, while ten other ants are already pushing it in the opposite direction, so the ant gets squashed under the rock.

"Stupid Ant," I say.

Only after this do I realize it's my programming that caused the ant to act that way. D'oh!

Watch me infringe patents!

Permalink 02/24/09 at 06:33:03 am, by Ed, 169 words   English (US)
Categories: Programming

You know what's silly? Everybody's been saying it: Any sort of patent that does not ascribe to the definition of a patent. Specifically:

Utility Patent

Utility patents may be granted to anyone who invents or discovers any new and useful process, machine, article of manufacture, or compositions of matters, or any new useful improvement thereof.

Design Patent

Design patents may be granted to anyone who invents a new, original, and ornamental design for an article of manufacture.

Plant Patent

Plant patents may be granted to anyone who invents or discovers and asexually reproduces any distinct and new variety of plant.

Notice that every single one of these refers to physical matter, or objects being manufactured. So what I'm complaining about is obviously software patents. The prime example everyone uses is Amazon's online purchasing patent. A subsection of the patent reveals that they patent the one-click feature on their website. Now watch as I infringe!

Click once to go to my home page!

Oh noes! Now I will be sued!

<< 1 2 3 4 5 6 7 8 9 10 >>