Previous Articles »

“Articles”

More formal and structured posts

Radio Frequency URI

Friday, September 30, 2011 by darco

Over the past few weeks, I've been thinking that it would be useful to have a URI format for describing a radio frequency or channel. Such a URI scheme would be useful for hyperlinking to a specific frequency from a link and for exchanging radio frequency lists between devices, programs, and people. (Think QR-codes)

I looked around to see if such a URI scheme had been developed, but I couldn't find anything. Since I think such a scheme would be useful, and I would like to use such a scheme in the future, I decided to go ahead and throw together an informal proposal for what such a scheme would look like and how it would work.

For now the scheme identifier is "x-freq" because it is experimental at this point. If this scheme is ever formalized into a real standard then the "x-" prefix would be dropped. UPDATE: (2014-01-08) According to RFC6648, the practice of prefixing "experimental" protocol identifiers with "x-" is now deprecated. As such, you should just use "freq" as the scheme identifier instead of "x-freq".

Here are the use cases that I would like to be able to specify this this URI scheme, along with some examples:

  • A specific single frequency.
    Ex: <freq:107.9m>
  • A frequency with a repeater input shift.
    Ex: <freq:145.23m-0.6>
  • Split receive and transmit frequencies.
    Ex: <freq:145.93m/435.75>
  • Modulation type and other parameters.
    Ex: <freq:145.23m-0.6?m=fm;dv=5;ts=100>
Read the rest of this entry »

Locks, Deadlocks, and Evil

Tuesday, November 9, 2010 by darco

I have a firm belief that locking primitives (Often called mutexes, or just "locks") are evil, and should be avoided if at all possible. I realize this may sound like blasphemy, but in practice I've found that in most cases a race condition is better resolved using a more disciplined strategy than carelessly adding another lock.

There is nothing inherently wrong with the concept of a lock. Sometimes their use is unavoidable—a necessary evil. If we all used locks properly and were fully aware of all consequences of using them in a given context then there would be no problems at all. The problem is us: we are human, not omnipotent—correct concurrent programming is hard.

Read the rest of this entry »

X10 vs UPB vs... ybox2?

Tuesday, March 16, 2010 by darco

Now that I finally have a house, I can start doing what I've been looking forward to for a very long time—home automation. One big part of that is being able to control lights and appliances in an automated fashion.

The idea is that you have some sort of automated switch or dimmer module that allows you to control its state via some signal. The trick is how to get the signal to the module. In general, there are three categories of signaling for home automation systems: powerline carrier, wireless, or via a separate signaling cable (such as ethernet). I'm not a big fan of using wireless for permanent non-mobile installations, so that leaves powerline carrier and separate signaling cables.

Modules which use the powerline as the carrier for signaling are extraordinarily convenient from an installation standpoint because it uses the cables already in the walls. While there may be a handful of applications where I end up using separate cables for signaling, I hope to primarily use a system that is based on a powerline carrier. There are two protocols that I am considering: X10 and UPB.

Read the rest of this entry »

Thoughts on Prius Acceleration

Tuesday, March 9, 2010 by darco

I own a 2004 Toyota Prius, and it is the best car I have ever owned. The only car I want more than my current Prius is the 2010 model. And, yes, I have even experienced the "sudden unintentional acceleration" issue several years ago that so many people are up in arms about these days. Why am I still a loyal Toyota fan?

It was quite startling not having the gas petal bounce back to my foot after pressing down on it hard, but I survived because I am familiar enough with my car to know how to put it into neutral. At highway speeds the Prius requires you to hold it to neutral for a full half-second to engage. I was able to stop the car and figure out what happened.

Read the rest of this entry »

Thoughts on Facebook Chat

Monday, February 15, 2010 by darco

I was quite excited last Wednesday to discover that Facebook has finally delivered on their promise of exposing an XMPP client interface to their integrated chat system. After the initial euphoria wore off, I started to realize that there is still a lot of work to be done.

In terms of duplicating the chat experience that already exists via the Facebook website, the XMPP implementation they have set up does a wonderfully adequate job.

The problem is that the XMPP interface to Facebook Chat is really only a gateway. It is similar in concept to how XMPP transports allow you to use closed IM networks via XMPP, except they are exposing a client interface (C2S) instead of a server interface (S2S). While this approach is adequate for simple chat, it means that the only features supported are features that already exist in Facebook chat—which is pretty much bare bones chat.

Read the rest of this entry »

IPv6 Security and those damned dirty NATs

Saturday, February 6, 2010 by darco

With less than 10% of IPv4 addresses remaining unallocated, IPv6 has been getting a lot of attention lately. As such, hardware vendors and ISPs (like Comcast) are now starting to figure out how best to deploy IPv6 connectivity to residential customers.

IPv6 would effectively make the use of IP masquerading (A form of Network Address Translaton used in practically all residential gateway routers) unnecessary. Unfortunately, the current ubiquity of IP masquerading has caused vendors and ISPs to be suspicious of allowing proper end-to-end connectivity to residential customers. I have even heard that some are even considering using the same IP masquerading mechanism for IPv6—for security reasons!

This would be a very bad thing for the future of the IPv6 internet, so I wanted to elaborate on the motivations people have for doing this and ways that it can be avoided altogether.

Read the rest of this entry »

Calendar Federation and XMPP

Monday, July 13, 2009 by darco

Why can't sending an event invitation to someone be as easy as sending an email? Why can't I check a friend's availability if they aren't using the same calendar server? Why can't I share a calendar with my friends who don't have an account on my calendar server?

For some reason or another, the concept of Calendar Servers has captured my imagination over the past year or so. I believe this technology could change how people think of time management, but I think it needs three things before it can get to that point:

  1. Ability to invite someone to an event who is using a different calendar server.
  2. Ability to view availability of someone who is using a different calendar server. (And, as a corollary, the ability to control who can see your availability)
  3. Ability to share calendars and events with people who don't have an account on my calendar server.

The key to make all of this possible is something I call Automatic Federation.

UPDATE: After writing this post, individuals have brought to my attention RFC-2446, RFC-2447, and the iSCHEDULE Technical Committee. At first glance, it looks like this may make the stuff I was proposing here somewhat irrelevant, but some investigation is still warranted. I'm not yet sure how these specs prevent abusive things like spoofing and who is allowed to see free-busy information.

Read the rest of this entry »

Objective-C Memory Management

Wednesday, July 8, 2009 by darco

A while back a friend of mine mentioned that for programmers starting to learn Objective-C often have difficulty fully understanding how Objective-C handles memory management. Objective-C memory management isn't really all that difficult once you get the gist of it, but it can be confusing at first.

This short article covers the basics of the normal reference-counted Objective-C runtime. Garbage collection can wait for another day.

Read the rest of this entry »
Previous Articles »