Error importing pictures in iPhoto

| September 19th, 2011

If you encounter this error when trying to import pictures from one of your iDevices, you may need to clear your iPhoto cache.  I’m not sure why this software exhibits this behavior; it appears to be a long-running bug, but this solution has worked for me on a number of occasions.  Simply unplug your device, then

% rm /Users/omeros/Library/Caches/com.apple.iPhoto/Cache.db

and restart iPhoto.  Good luck!

I’ve been exploring the OSX networking tools, and have stumbled on a few useful ones that I’d like to share.  There are times you want to know more about the network you’re connecting to; for instance, when you want to verify that your MAC address is properly spoofed for anonymity.

Run the following:

airport -z

You may find this easier if you link to this executable in your sbin directory:

sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport

Given this info, you can find out the BSSID and a bunch of other info that’s useful for connecting to and understanding networks:

dj8qw1f1:~ omeros$ airport  -I
agrCtlRSSI: -59
agrExtRSSI: 0
agrCtlNoise: -94
agrExtNoise: 0
state: running
op mode: station
lastTxRate: 54
maxRate: 54
lastAssocStatus: 0
802.11 auth: open
link auth: none
BSSID: 0:16:b6:d5:4d:6e
SSID: 360 Uno Espresso & Vino
MCS: -1
channel: 6

Good info, to be sure.

A NIC fit

| November 14th, 2010

One of our servers (the one hosting this site and a bunch of other personal sites) recently came through a month-long bout with a bad NIC.  We were getting all linds of weird messages in the logs.  It has now been resolved, so we’re expecting our sites to be available again.  Still can’t justify hosting these on someone else’s server.  That would just feel icky.

kern.log:

Oct 16 09:07:02 yasuo kernel: tg3: eth0: Link is down.
Oct 16 09:07:05 yasuo kernel: tg3: eth0: Link is up at 1000 Mbps, full duplex.
Oct 16 09:07:05 yasuo kernel: tg3: eth0: Flow control is on for TX and on for RX.
Oct 16 09:07:07 yasuo kernel: tg3: eth0: Link is down.
Oct 16 09:07:09 yasuo kernel: tg3: eth0: Link is up at 1000 Mbps, full duplex.
Oct 16 09:07:09 yasuo kernel: tg3: eth0: Flow control is on for TX and on for RX.
Oct 16 10:09:53 yasuo kernel: tg3: eth0: Link is down.
Oct 16 10:09:56 yasuo kernel: tg3: eth0: Link is up at 1000 Mbps, full duplex.

Oct 16 09:07:02 yasuo kernel: tg3: eth0: Link is down.Oct 16 09:07:05 yasuo kernel: tg3: eth0: Link is up at 1000 Mbps, full duplex.Oct 16 09:07:05 yasuo kernel: tg3: eth0: Flow control is on for TX and on for RX.Oct 16 09:07:07 yasuo kernel: tg3: eth0: Link is down.Oct 16 09:07:09 yasuo kernel: tg3: eth0: Link is up at 1000 Mbps, full duplex.Oct 16 09:07:09 yasuo kernel: tg3: eth0: Flow control is on for TX and on for RX.Oct 16 10:09:53 yasuo kernel: tg3: eth0: Link is down.Oct 16 10:09:56 yasuo kernel: tg3: eth0: Link is up at 1000 Mbps, full duplex.

dmesg.log:

ADDRCONF(NETDEV_UP): eth0: link is not ready

These make interesting messages when repeated every few minutes to hours in seemingly random distributions.  Oh well, at least the fit has been fought…

I am going out on a limb and guessing that you don’t want to see so many ads in your browser.  So you already have an adblocker installed?

Yes, install an adblocker plugin into your browser.  A complementary method is to redirect a list of known ad domains to your local computer.  An up-to-date (as of the date on this post) blacklist is available here.  Append this to your /etc/hosts on a Unix-based machine (Linux, OSX, etc.), and to these locations on a Windows machine:

  • Windows 95/98/Me – c:\windows\hosts
  • Windows NT/2000/XP Pro – c:\winnt\system32\drivers\etc\hosts
  • Windows XP Home – c:\windows\system32\drivers\etc\hosts

You can figure out from this where to put it on your Windows Vista and 7 machines.

Next, set up an Apache web server on your localhost, which won’t burn too many CPU cycles, and you’re set.  Set the error file to a simple 1 pixel image and you’ll have nice whitespace filling sections of the screen that will make most web browsing more pleasant.

Of course, this method won’t block Flash-based ads, or ads from sites not in the blacklist.  Some options there — disable Flash by default and turn it on only when you want the content found in embedded Flash apps, and whenever you find ads on pages, add these domains to the blacklist using your favorite text editor.

This simple technique may have the effect, long term, of downing sites that you rely on for information.  For instance, most guitar tablature sites plaster their virtual real estate with banner and pop up ads, claiming that these keep them in business.  I, for one, don’t buy this argument, nor do I click on ads or support the notion of an ad-based web.

At the same time, I understand that, when it comes to things online, if you’re not paying for it, you’re not the customer, you’re the commodity.  So charge me $5 a month for the sites I visit most for ad-free versions.  But here is where I can’t help but delve into politics, so I’ll stop now.

Until then, I’ll use these methods to block ads. . .

Write in(jection) candidates

| October 20th, 2010

Some workmates and I discussed the upcoming midterm elections, and our general annoyance with the system had us posing ideas that might bring attention to the digital election process.  We were talking about how funny it would be to try an SQL injection in the write-in candidate forms.  It would be the last time someone took the county treasurer seat for granted…

Soon thereafter, this xkcd comic surfaced, with a similar tongue-in-cheekness to it: http://imgs.xkcd.com/comics/exploits_of_a_mom.png.

What the heck, it’s something to do for fun in a lackluster election cycle…

Defending WordNet

| October 13th, 2010

I proposed a WordNet based semantic-similarity refinement to one of our predictive models for collusion in online fraud detection the other day at work.  I put together a presentation motivating and describing my approach and presented it today.

One question was, “how would your approach work on multi-word search keywords?”  I had thought this through as well, and I presented the idea I had in mind.  The eyes began to clear and heads began to nod as the idea too hold.

Another question was, “but this approach wouldn’t see ‘applesauce’ as being semantically similar to ‘baby’ and ‘food’… you [linguists] have been working on this for 30 years, right?”  It seemed I was not only defending WordNet, but linguistics as a whole.

There were a number of questions and critiques of using a taxonomy for this task, but in the end I convinced them to let me continue, after describing how these measures would better inform our vector space models.

It turns out (as I worked out in the final 15 minutes of our meting), using my approach, “applesauce” and “baby food” are calculated to be .76 similar.  This aligns with the intuition that one of our technical founders / investors who had posed the original challenge.

So, I’ve passed the first gate.  I’m sure there’s plenty more to argue / discuss, but this is healthy, and I’m up for the challenge.

Been working on a net that’s split across two subnets, so I’ve had to set a static route to ssh into a few of the Linux boxes in the colo.  Under Linux, this would have been a snap, but it’s been awhile since I’ve had to work with OSX’s underlying BSD to set a route.  Here’s the simple route I wanted to set, where the first IP is the network, the second the netmask, and the third the route for the packets to take:

route add 10.10.4.0 mask 255.255.255.0 10.10.1.4 -p
route add 192.168.1.0 mask 255.255.255.0 10.10.1.4 -p

I found a couple of resources online, but each presented a syntax that led me astray.  After delving into the man pages and tinkering with a few settings, I arrived at the following modification to get the route running under OSX:

route -nv add -net 10.10.4.0 10.10.1.4 255.255.255.0
route -nv add -net 192.168.1.0 10.10.1.4 255.255.255.0

So, under OSX, remember, place the net first, followed by the route, and then the netmask.

Started a new job with a fast-moving company called Click Forensics in west Austin.  Good times ahead as I explore applications of machine learning and computational linguistics to the determination of Internet traffic quality.  There are many applications of semantic technologies to traffic quality problems, well beyond simple keywords.  With the host of customers this company is signing up, there will be plenty of data to delve into and I just can’t wait.  Data makes all the difference; it’s the only way to truly evaluate technical solutions to research problems.

With the new job, I have a brand new company MacBook Pro, which I’m busy setting up with the tools of the trade — emacs, weka, gimp, r, postgresql, mongodb, python extensions out the wazoo.  The list goes on.  This machine, named mondas after the home of the Cybermen, has been compiling code non-stop for two days now as it it churning out a beautiful masterpiece of a development environment, built on GNU and other tools of its ilk.

Great to be back out in the commercial world!  I expect to post a number of software quirks and triumphs as I work with these tools for the foreseeable future.  I also expect to get back to my work in interactive fiction, document summarization, document classification, and talking bots.