Brandon's Blog

1/12/2010

My Heroes

My good buddies at Yemek Sepeti have redone their website!  Without this site, a lot of foreigners would go very hungry.

1/9/2010

New Design

It was about time for a change.  Hope this one doesn’t blow up any browsers!

1/3/2010

Bye, Bye, Doggie

I find it funny that most of those Microsoft “animated characters” do a sort of farewell salute when you disable them permanently.

I’m never quite sure why this would be found useful, given those who disable such a feature probably don’t feel too sympathetic to the creatures to start.  Why are these things forced so hard on us, anyway?

Regardless, making a puppy sad is not exactly an uplifting computer experience whether you’re sympathetic to the little guy or not.  I almost wanted to say, “Come back!  You can help me find that file.”

But Clippy… no… Clippy had it coming.

1/1/2010

Haven't You Always Wanted a Monkey?

I have finally beaten Final Fantasy 4.  That’s a 15 year monkey off my back.

Happy New Year!

12/31/2009

Things Learned

In my opinion:

Never start a year or job with high-level labels on your mail folders.  Start with some serious detail, then start collapsing them into big folders all together once you understand what actual topics are going to matter after a month or two.

I think one of the reasons people can’t maintain an “Inbox Zero” philosophy is that their organization system for e-mails is too complex.

Mail filing is like having to act like your own little database system.  And, like a good database, efficiency boils down to things like indexing and sorting.  But efficiency has to be measured at least two ways, insert cost and search cost.

Insert cost is what I’m talking about.  When you make a labyrinthine folder structure for e-mail saving, you’re increasing your insert cost to theoretically/hopefully decrease your search cost in the future.

While this is all pretty complicated to measure in practice, you can basically say that if you do a lot of searching you should probably make your inserting costly, and if you don’t do a lot of searching you should slack off on the indexing.

How many e-mails do you actually need to look back and find?  How hard is it to identify them when you do need them?  If you’re like me, most e-mails are just stored for record-keeping or emergencies.  The vast majority that you drag to a folder will never need to be read again.

In general, sorting messages into folders by sender is really costly and especially hard to make efficient.  Since Outlook can sort, group, and filter based on sender, there isn’t much of a reason to break these out unless the message volume is so huge it would screw up the diversity of the folder (or even push size/performance limits).  Same goes for folders by month, etc.

I think people feel very organized and put-together when their insertion cost is high.  But, really, the time cost of a really nasty search through a big folder is nothing compared to how long it takes to maintain that level of structure.

I’m taking the same position with filing also.  For small projects, I’m just placing all the documents in a mailing envelope labeled with the project name.  I’ll probably never look at those again, so maintaining a binder or tabbed folder system would be excess work.

But, all this is contingent upon getting the right buckets set up.  And it’s my opinion this is very chancy to pull off on the first try, and it’s much easier to pour two buckets of water together than it is to split it after the fact.

12/31/2009

Çay

I finally got a mug of yellow-label Lipton sweetened well enough to taste like hot iced tea.  If I could find a few ice cubes around here at work I might have taken the leap, but no such luck.

People here drink a lightly cooled, un-iced cola drink in the summer, and everything in the winter is consumed at or near room temperature (or hotter, of course).  If you don’t do this, you’re looked at just about as crazily as when you don’t wear a jacket when the temperature is below 70 F.

I think I may finally get my SIM card today for the Skype project.

The office is not as empty as I would have expected today.  I had one day of vacation (officially; my privately-approved accounting due to the visa issues is strange to say the least) left for the year, but I didn’t take it because I’ve barely been here all month.

Celsius is a truly vile unit.  Fahrenheit was designed by an engineer: pragmatic, intuitive, unconcerned with theory.  0 is friggin’ cold, 100 is friggin’ hot.  Water freezes somewhere on the low side.  Double down on the hot side and water’s almost boiling.  Also, the unit is small enough you have the fitting amount of sensitivity in integer measurements.  If our apartment’s thermostat reads 20, it’s darn cold in there.  But 25 is like leave the house kind of hot.  I know this, because when the AC wasn’t turned on in early summer we got up to 27 for a while.

It was like I was reenacting Cool Hand Luke from the couch.

12/30/2009

News Reader's Lament

Well, in case the one or two substantive articles on CNN’s entire front page get you down, you can always turn to the love doctor for a little anti-male relationship advice.  I was going to say it’s infotainment but maybe it’s more like “info-pandering” (“infandering”?) to the least common denominator.

Maybe it’s time I figured out how to set up a good Google News page.

In other news, the iPhone still doesn’t have Flash?  There goes my MUD client idea.

12/28/2009

Proposal

Things will be delightfully slow at work this week, so I’m definitely planning to revive this my favorite therapeutic dialogue between myself and a blank page.

It’s totally off-task in terms of getting the project to a concrete waypoint in its progression, but while combat trucks along I have thought a lot about the potential to make Sigma compatible with iPhone/smartphone usage.

Maybe not for the overall health of HTTP’s design, but for selfish reasons it’s a bit of a shame that it’s still very hard to push arbitrary data to a webpage.  It’s very easy to get data from a browser, but sending information without prior announcement looks pretty hackish.

Of course, any kind of “chat” (a MUD is essentially a very, very advanced form of chat server) will require live sending and receiving, and receiving doesn’t always immediately follow a send.  Meaning if somebody else walks into a room, the client must receive the information in order to announce it, but there was no warning anything would happen since the user did not initiate that action.

You can do this without Flash, but it’s one of those things that you can’t really assume will work in all cases.  Google apparently uses something like this to achieve Google Talk within the Gmail interface.  It works, but it’s not smooth to implement.

There is a Flash object called XMLSocket that enables two-way socket communication within a webpage, with the only penalty seeming to be the vice of using Flash at all.  Well, that and you have to implement a non-HTTP socket server (which doesn’t seem that bad when you already have a MUD server going).

With that and a little glue you pretty much have two-way communication, so you can update the output window with server events and send input back to the server.

On the Sigma side, implementation is a cinch due to our nice forward-looking object oriented structure.  A new socket type and protocol just means a new Player class.  Any input from the client is captured as normal (in a different control loop) and just injected into the command queue like anything else.

You don’t even need Adobe to compile ActionScript to an SWF, and jQuery has a plugin that optimizes web effects for the iPhone (if necessary).  Implementing via web rather than a native App makes you portable and removes the App Store from the equation outright.

It’s tempting to give it a try.

12/22/2009

Project Frankenskype Update

All concepts have been proven or rejected at this point, with the main telecom trunk of the system a complete success.  I’m basically limited by using almost every component in the system as something for which it was not designed.

SMS retrieval from my Nokia 6300 is not supported by Gammu, which is the only reasonable means of doing such a thing via command line or Python.  Maybe if I stole Kristin’s smartphone it would work, but for that hunk of standard-issue junk it just can’t happen.

Dialing out via AT commands (using Gammu) is supported, which is super, as that may be the only way to establish a link on the cell side of the system automatically (besides a call-in from the remote side, but that has its own problems as we will see).

A diagram (BT = Bluetooth):

Skype <===> Computer <==BT==> Nokia 6300
                                  ||
                              Remote Cell

This is pretty simple, but establishing four directions of input via the Nokia 6300 (at least going the right directions) is no simple task.

              Remote Mic
                  ||
BT Speaker ======6300====== BT Mic
                  ||
             Remote Speaker

The Bluetooth-y way to solve this four-way intersection from Hell is a relationship between two “roles” called Headset and Gateway.  A cell phone serves as a gateway when it connects to a standard Bluetooth headset.  This is the conventional four-way communication pattern (where BT Speaker and BT Mic above are the speaker and mic on the headset).

Normally, when you use Bluetooth audio on a computer, you’re pairing a headset with a computer.  In that case, the computer becomes the gateway.  Instead of a cell radio on the other side, it’s Skype or Sound Recorder or Audacity or somesuch.

But I need to keep the gateway as the cell phone to use its cell radio, so the computer actually has to become the headset.  The Wicomm Bluetooth stack (which most built-ins in laptops seem to have) implements this role for the computer, so the phone looks for “audio enhancements” as usual and finds the computer, which is emulating a headset.

A computer is no dumb headset, though, even when pretending to be one.  The sound card continues to do crazy things that I must exploit to get the headset to act as a fake gateway of its own, by forwarding and receiving the proper audio to and from Skype.

The first thing to take care of is to reconfigure what the sound card sees as its actual input.  Normally, this would be the computer microphone, but it can’t be in this case.  The “input” to the sound card will be sent to the headset, which in turn sends to the remote cell, which in turn runs it through its speakers as the other talker’s voice.

This needs to be the audio output from Skype (since that is the foreign talker in this case), so we have to switch from “Microphone” input to “Stereo Mix” input.  Your “advanced” controls in the standard Volume applet in Windows likely has this option on the input side of the card.  “Stereo Mix” means “Whatever should come through my speakers should also be treated as microphone input,” which is exactly what I need.

The above is the magic “aha!” moment of the project.

Getting audio to Skype actually is the easy part, because the Bluetooth headset role is essentially forwarding the remote cell caller’s talking through the sound card input.  Skype easily recognizes this as a microphone and sends it right out to the Skype side of the system.

Now for the stuff that doesn’t work: I can’t make these audio setting changes automatically, let alone the Bluetooth connections, so these have to be quickly set up when the system is started.  Not so bad.

Like I said, I can’t receive SMS.  That sucks, because I was going to just text from the cell phone who I wanted to call and all this would kick off.  I’m going to implement this via e-mail (which my work phone has), but nothing would be better than SMS if it worked.

So, on the process side, here’s what happens:

Remote cell sends an e-mail to a special e-mail box.

Python poller on computer checks e-mail once a minute.

When an e-mail is received from the box, read the message body to find out who to call on Skype (shortcuts will be possible).

Use the AT dialing capability of Gammu (via Python or command line) to call the remote phone (the one that e-mailed the request).  Just having just one phone allowed to do this simplifies the picture, as you always know the number to dial.

After pausing for a moment for the remote to pick up the phone, initiate the Skype call via command line.  At this point, all lines are singing and the call can proceed!

I need to buy a prepaid SIM for the Nokia, but otherwise this thing is ready to go.

12/21/2009

Queue the Toto

Well, clearly it’s been crazy when I have three different Picasa albums below this post and haven’t written in a month or so.

When we got back from Prague my internal clock was totally screwed, and sleep debt was definitely working against me.  Today finally feels like I have my stuff together and can resume life as normal, until Thursday at least.  Thursday morning sees us flying out to Tunis, Tunisia, which is Carthage of old.  It’s a pretty exciting trip, partly because it’s Kristin’s and my first time in Africa (hopefully at least two more to go after this, though), but mainly because it really seems like a quirky, interesting place to go.

No visa woes or anything, but visiting there is a different experience.  It’s illegal to import or export their currency, so you have to keep your receipts from currency exchanges to document what went in and out.  Definitely seems like it’s the nicest place to go as an American in all of North Africa.

It’s kind of weird feeling like we’ve already passed Christmas and festivities are basically absent.  That’s a lot of the reason to go to North Africa (despite being way out of season).  Better than sitting at home (or even worse, working) while the day passes by.

In hobby news, I have devised a way to provide a local call-in bridge to Skype using only a dedicated cell phone and a computer with a decent Bluetooth stack.  The concept has been proven (actually made a call with some manual setup required), but now I can’t remember exactly how I pulled it off and am working tirelessly to recreate it.

The automatic solution involves sending an SMS to the dedicated phone, which indicates who you want to call.  The Bluetooth-linked computer then initiates a Skype call and dials your remote phone back.  Therefore, Skype and your cell are ringing concurrently.  When you both pick up there is an actual end-to-end link between Skype and your cell.  I’ll do a detailed writeup when it’s complete.

Important to note that this is just academic in America, as Skype offers this service via a 1-800 number either free or cheap.  But, in more exotic locations your best bet is to dial internationally or pay Skype big rates to route to your cell phone.  This system is just a local call between two phones.

> Newer Posts

< Older Posts