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 >>

Conflicting Messages! Gah!

Permalink 02/19/09 at 06:38:24 am, by Ed, 470 words   English (US)
Categories: Programming

If there's one thing I've learned from HTML development, it's that I shouldn't use <table>s. And if there's one thing I've learned from iPhone development, it's that I should use tables.

Allow me to expand on this: <table>s should only be used to display tabular data. Like the calendar over there. That is a valid situation in which a table can be used. To create the layout of a website is a totally, completely invalid situation to use tables.

Don't look at me, I didn't design this website.

Anyway, most anything that could be done using tables, should be done using DIVs and stylesheets. It makes it much quicker for the browser to render it, and much easier to make a dynamically-sized site.

On the flip side, the iPhone's suggested method of showing information in any form is to use a UITableView. They're everywhere and everything. The settings application is nothing but tables. Contacts are shown in a table, when you view an individual contact, it shows the different aspects of that contact in a table, most of their example code uses a table to navigate. According to them, it's essentially useless to have any other UI controls in your application. You could probably write a text adventure using tables if you wanted to.

Except their tables are broken. There are two bugs we've discovered in less than a week with their implementation of tables alone.

It's not just the tables, there are many bugs in their framework. Their NSDateFormatter class is my favorite example. You pass in a date, and get a string. For example, you pass in a date representing the 5th of May, 2009, at 5:30 PM, Central Standard Time, and you request a string of the format "MM/DD/YYYY". It will return "05/05/2009". If you request it in the form of "MMM 'YY" it will return "May '09". Essentially it's a way to format data in a nice, user-friendly format.

But here's the catch: There's a bug. For most years, a seemingly random number of days at the end of the year will show up as belonging to the next year. The only year I've seen that isn't affected is 2005. For other years, it will decide to show, for example, a date representing the 28th of December, 2008 as "12/28/2009".

"Wait," you think to yourself. "That doesn't seem right".

I know! On average, it's 3 days at the end of the year that will show up as in the next year. I've seen as many as 5, as few as none, but that's not often. You would think some gigantic bug like that would get noticed. Apparently not.

I've sort of rambled on this one, but it's only because I've been trying to take up time waiting for my thing to finish uploading. It hasn't yet.

Ants, ants everywhere, not a drop to dr..ewww

Permalink 01/24/09 at 07:18:03 am, by Ed, 819 words   English (US)
Categories: Programming

Have you ever heard of Koi Pond? Not the thing you do for fun in Japan-copied culture, but the app on your iPhone.

There's really not much to it. There's a pond, and there are koi fish swimming around in it. You give your iPhone a shake, and fish food sprinkles down and they rush up to eat it. You tap it, and it makes ripples in the pond and the fish scurry away. Then if you leave your finger there long enough, they return to investigate, apprehensive at first, but like a new castle or spaceman that blows bubbles, they get used to it.

Can they even do that? Scurry I mean. And not just koi, but fish in general. Does that word apply to... what... fins? Yeah. Does that apply to fins? I mean, scurry sounds like something a mouse would do. With its legs. Or maybe a really quick spicy dinner. Neither of which fish have mind you.

I mean, it doesn't apply to legs in general either. You don't see an elephant scurrying, do you? A koi is more likely scurry away when you invade its space than an elephant. Which I do not recommend. Invading an elephant's space, I mean. It's kind of hard for you to get in there in the first place, what with all the fences, and then you don't spend five minutes in there before the guards came and took me away anyway, so what's the point? Trespassing on elephant property isn't really one of the things they tell you about, but apparently it's illegal. Like the twelfth amendment or something.

And you definitely don't see fish-elephants scurrying about. Mostly because you don't see fish-elephants. But even if you did. Maybe, like, a manatee. They sure as heck don't scurry. Even if they wanted to, I think their sheer surface area against the water creates too much... water resistance. Like, whatever the word for wind resistance under water is.

So there's this koi pond application, which as I previously explained, is nothing but watching, feeding, and invading the privacy of fish. They've added updates, like "Holiday Mode". And nibble vibration! When they nibble your finger, it vibrates the phone! You distinctly do not get your jugular torn out.

A few days ago, I got an email from my boss, where the subject was "Ant hill images". I often get emails about images, because the image tracker sends out emails to everybody any time anybody requests new graphics for an application. So I thought he was requesting graphics for one of our games for some new distribution website that decided to call itself Ant Hill. We get lots of those funny websites, and everybody has their own requirements for how the images should look, be formatted, etc. I didn't happen to actually look at the email before my boss called me into his office to tell me about what I'd be working on next.

Since I'd finished working on my other applications, I would be moving on to my next project. We'd be basing it on Koi Pond. Except there are ants. I was told to make an ant hill application. And that was all I was told. He sent me some pictures of ant hills. For... inspiration? I guess? Can you call it that? I mean... it's just a picture of an ant hill.

So he showed me Koi Pond, and said we want to make something like that, except with ants. And it'll be graphically interesting rather than productively useful or something that you can make progress in while "playing". The extent of his instructions were along the lines of, "we want it to be interactive. We don't just want it to be a video that you watch. Maybe when you shake it, they can all fly off or something."

Well, that's not a whole lot of direction, but I figured I'd start out with the basics. I got some sweet ant AI running. They can walk, stop, turn left, or even turn right! Once they're done taking one of those actions, they pick a new action semi-randomly, and pick a semi-random amount of time to do that action. Now I've got ants scurrying about the screen... well, not really scurrying. I mean, ants could definitely scurry if they wanted to, but I slowed these guys down, so they look like ants just crawling around.

I've moved on to make it a little bit interactive since then. Right now, you can feed them, or burn them to a crisp with a magnifying glass. I'm sure more will come of it eventually. Mostly I've just been spending my time burning ants to near-death, then replenishing their health by feeding them, only to almost kill them off again once they're all grouped around the food. Bwahahaha!

Also, I thought that they should allow more than one contraction per word. Like, "We'dn't've".

Permalink 11/05/08 at 06:38:43 am, by Ed, 89 words   English (US)
Categories: General, Programming

I read today that on November 1st, Microsoft has thrown in the towel, and officially ceased issuing licenses for Windows.

...3.x

...the last version of which was released in 1993, superseded by Windows 95, released in August of 1994. And they were still selling it as of October 31st, 2008? More importantly, people were still buying it?

What scares me is that the people who were still buying it were embedded systems developers for airlines. Admittedly, they were in-flight entertainment systems. But seriously, aren't there better options? Like... any better options... at all?

I'm a PC, and I still don't use Windows

Permalink 10/03/08 at 06:56:23 am, by Ed, 124 words   English (US)
Categories: General, Work, Programming

Hello, I'm a PC, and that doesn't necessarily imply that I use Windows. Actually, as of late, I use Mac OS X. But that's only because I'm developing for the iPhone now. And let me tell you, Objective C is a screwed up language. At least, coming from C# and Java, and PHP and Javascript and even Visual Basic, it is a screwed up language.

On the other hand, even on my PC I don't use Windows, so that's the problem I've always had with those ads. They're targeting Windows specifically, but they generalize to the point that they also include Linux (and other variants of Unix) when talking about the PC. Which is funny to me, because Mac OS is a Unix-based OS.

Hand-To-Forehead moment

Permalink 09/17/08 at 08:07:04 am, by Ed, 196 words   English (US)
Categories: Programming

I was having a heck of a time figuring out why my program wasn't working correctly. It's basically a go-between server designed to allow certain client computers that can only communicate one-way (to the server) to still act like it's receiving messages from the server as well.

Each client gets its own SessionUser object on the server that has two threads running on it. If there are no messages from the client for an extended period of time, the server times out and disconnects the client.

It achieves this by setting a single value, bQuit, to true, which the threads listen for and exit when they find it to be true. I was having a heck of a time figuring out why my system stops working after awhile. Were there too many threads? Why was my system randomly not scheduling these threads to run at all?

But then I found out that I had set bQuit to be static. That meant that any time a SessionUser changes bQuit, ALL of the SessionUser objects quit, not just the one that set it. I just feel silly now. It's a "find hand, apply directly to the forehead" moment.

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