How To Restart Ubuntu Audio

Sometimes I have issues with audio on my Ubuntu installation, usually after some rogue Flash applet destroys it (don’t ask me why.) What works for me is the following:

$ pulseaudio -k

After I do that pulseaudio restarts itself, but in case there is no audio you can try to followup with:

$ pulseaudio

Use at your own risk (I guess the worst that can happen is that you’ll have to reboot)

Idea: Green Tail Lights For Accelerating Cars

This is an old idea of mine, but I’m writing about it now before self-driving cars take over and it won’t make any sense.

The idea is simple: add green lights to the array of tail lights in cars. When the car accelerates, the green lights will light up the same way red lights work when it decelerates.

“You must be crazy!” I hear you say. “This will just make everyone drive faster! Don’t we have enough accidents already?! ” But consider this: while the green lights signal to the driver behind you that you are accelerating, the lack of them signals that you are decelerating. And the advantages of having this information, I think, may outweigh the disadvantages of having the green lights on.

This is something we can experiment with, the same way they experimented in different countries with countdown timers for traffic lights. And this one is just about the Chinese traffic light experiment. In other countries the effect was different, so there really isn’t one answer whether this kind of an idea is good or bad – it depends on the driving culture per-country.

UPDATE: According to Wikipedia “Some jurisdictions, such as the US states of Washington, Oregon and Idaho, permit vehicles to be equipped with auxiliary rear signal systems displaying green light when the accelerator is depressed, yellow light when the vehicle is coasting, and red light when the brake is depressed. Such systems have in the past been sold as aftermarket accessories, but are today seldom seen in traffic.”

Google App Engine Shortcomings

I’ve been writing some Google App Engine code lately and while the framework is very compelling and has many great features (e.g. task queues) it also has its shortcomings. The ones that bother me most are:

  1. No shared memory among instances. I even wrote a StackOverflow question about it to see whether I was missing something. The only way to emulate memory that will last for the entire lifetime of your instances is to purchase a backend instance for a minimum of 58$/month.

    Why is this so important to me? Because I want to store a cryptographic key safely and in a way that even if someone has access to my computer, my Google account or my code, they will still need another piece of data that is either in my head or stored safely someplace else (think bank vault.) I do not want to persist the key in a data store.

  2. No https for custom domains. If you’re writing a website that requires a secure https connection, then essentially you are limited to https://yourapp.appspot.com. You can’t use your own domain name. I read somewhere that it’s on Google’s todo list for App Engine, but Google never states when they’re going to actually implement things, which is a shame.

    UPDATE: SSL for custom domains is available now. Make sure you consider the pricing if you’re going to use this option.

  3. Outgoing emails cannot be signed. This practically prevents use of App Engine’s outgoing email feature, since emails that are not signed with DKIM these days will probably go into the spam folder of major email providers. To circumvent this I use task queues (for rate control) and Amazon SES, which works OK but requires a lot of code to be written instead of the few lines it would have taken if Google provided proper facilities for signing emails.

    UPDATE (29-Feb-2012): Signing with DKIM seems to be enabled now. I haven’t tested it myself. The issue was opened nearly 2 years ago. I’m surprised it took so long as I consider sending emails from a web service a pretty basic thing.

Happy Birthday To Me. I’m 35

Wow. 35. This age comes with some serious what-am-I-doing-with-my-life kind of thoughts. Being unemployed, single and living with a cat at that age is hardly normative (at least in Israel) and despite being very content with the current situation it’s hard not to ponder other life choices.

In any case, it’s time for the yearly look back:

A year ago I left my job to start a new venture with a friend. We since grew to a 3-person team and by now we have a very early version of our product, while we’re still tweaking the requirements for the first release. Hopefully in a few months we’ll have something to show for. This is probably the year in which we’ll know for sure whether this project is destined to take off or not.

Being unemployed (and having no income) for so long is my biggest worry for the upcoming year. I was very willing to spend some of my savings on this project, but I was hoping it will be in a better place by now. Other than that, I don’t think there’s a lot to say about entrepreneurship that hasn’t been said before. The joys and sorrows of this road are well documented in countless articles. I’m otherwise happy with my life, something I wished myself a year ago on my birthday post.

Travelling: I was abroad twice – France/Germany and Switzerland. Both trips were great. Having already booked one trip for this year – to The Prodigy’s 3rd Warrior’s Dance Festival – I already made sure that I’ll keep “exploring the world” this year as well. Travelling has become one of my favorite things.

Side projects: I updated Dindy a few times in the past couple of weeks, hoping to address issues users have been experiencing for a while. I don’t plan to add any new features to Dindy – this was just to prevent it from rotting in the Android market. Unfortunately it hadn’t gained any new users for a long time now, yet it remains with a relatively high user score (4.2 out of 5.)

Another side project is my online will idea from nearly 3 years ago. I already have an almost fully functional version of it running on Google App Engine, but there’s still a long way to go as it lacks visual design (if you’d like to help me with that – let me know) and there’s still quite a lot of code to write.

Workouts: Having suffered some injuries I’m working out (running) only twice a week now. I’m not happy about it, but I’m still in pretty good shape so it’s not that bad. I hope my injuries will subside and that I’ll be able to get back to my 3-workouts-a-week routine at some point.

That’s about it, I guess. I hope you’re happy too.

Followup Dindy Update

A week after the previous update, I started getting crash reports on the Android developer dashboard. The core reason for the crashes was that I started building Dindy against a newer Android platform version. As a result, a compatibility hack related to how services are started stopped doing its work and Dindy started crashing.

To those of you who are interested, the difference is that Service.startService() started returning START_STICKY instead of START_STICKY_COMPATIBILITY.

I consider this very poor backward compatibility support on Android’s side. It also forced me to deal with Dindy’s service being killed by the Android platform at any given time. The solution wasn’t a trivial one – I had to add a new table to the database to save Dindy’s runtime state.

At least now hopefully (and excluding other bugs) Dindy will work on most phones, even those where the service is being killed for no reason.

It’s Going To Be A Great Year, Music-Wise Anyway

Two good things have happened in the past week, music-wise:

  1. The Prodigy have announced their 3rd Warrior’s Dance Festival to be held in Belgrade, Serbia September 15th. I already booked a VIP ticket to the show. Woohoo! If you want to come along, let me know :)
  2. The Mars Volta announced their 6th studio album, Noctourniquet, to be out March 27th. The Mars Volta has been my favorite Rock band in the past several years and a new album from them is bound to be something I’ve never heard before.

So as my 35th birthday is approaching it appears this year is going to be exciting, at least on the music front.

Not a bad start.