Posted
9 months
ago
A few years ago, I broke my wrist in a snowboarding accident and hired an assistant to help me type, in a setup which gave me a simulation of near-perfect speech recognition:
If I don't look up from the screen, I can pretend he's not there
... [More]
and that I have the world's most powerful voice recognition engine. So I have a sneak peek into what computers will be like when voice recognition works really well. … It is fun to try technology years before it exists. I wonder if there are other things we can simulate like this?
Today I learned that in the field of human-computer interaction, this type of simulation is known as a Wizard of Oz experiment.Some people apparently call it "Flintstoning."
So, the question stands. What else can we simulate with a man behind the curtain? [Less]
Posted
9 months
ago
I have ranted about the iPhone’s horrible iPod interface in the past, and any improvement they can make is certainly welcome. But the improvements in the iPhone OS 3.0 update seem more half-assed than a true solution. Yes, the ability to skip
... [More]
back 30 seconds will be nice, but it’s still a ham-fisted solution to the problem of exact scrolling inside a 70 minute podcast. And the “scrubber” interface seems complicated and error-prone. Apple already has the One True User Interface for playing audio: the click-wheel. With its handling of acceleration you can both seek through hours of audio extremely quickly while still giving you the one-second resolution to seek to the exact point you want, and I don’t understand why it isn’t emulated on the iPhone and iPod touch. At this point, I have to believe that there is some limitation of the touchscreen hardware which prevents it. Sigh. [Less]
Posted
9 months
ago
Ok, so I am a huge fan of the Silverlight development environment, C# and XAML represent one of the best UI design paradigms in computing today. Needless to say, I cannot thank the Moonlight project enough for bringing Silverlight support to Linux.
... [More]
The problem is, Microsoft either want’s me to develop a desktop application or a web-based application…. And only one of those is cross platform. Needless to say, if I restrict my WPF application to exclusively Silverlight-available libraries, I can get it to run on Linux. This is far from seamless, but in a pinch, it can be an option.
However, a far better solution would be to load Silverlight in the browser, while offline. (Taking advantage of the Silverlight plugin and its packaging). Utilizing Google Gears, I was able to serve up the compiled .xap file and run the Silverlight app in Firefox without a connection to the server hosting it. I haven’t had a chance to test how IsolatedStorage behaves under these conditions, or how Moonlight handles it (couldn’t get the latest 2.0 to build), but here is the VS2008 solution I used to get everything working.
Offline Silverlight Via Gears Demo [Less]
Posted
9 months
ago
I wanted to apologize, my Wordpress install was compromised. I’m restoring a backup now.
Posted
9 months
ago
Now it seems like forever ago, but I have been on the hunt for a good Django IDE for a very long time. I have tried PyDev, Aptana, Komodo, TextMate, Vim, Emacs, Wing IDE and every variation in between, but was never satisfied with the featurset. I
... [More]
wanted complete python language support and completion, complete support for Django Templates, total HTML support, as well as complete Javascript (specifically jQuery) support. Most editors made the mistake of having support for some of those individually, but I can’t get javascript support inside of a Django Template etc.
The magical and awesome app that represents the first real attempt at a complete Django development environment? Netbeans!
I know it sounds crazy, but progress is being made, and while its a boatload of effort to get it built, and even then, not much of the promised featureset actually works. But those are just details, examination of the code available at:
http://code.google.com/p/netbeans-django/
shows some real work being done towards a Django project type. Moreover, a recent blog post from someone at Sun alludes to this support being available as soon as Netbeans 7.0.
Perhaps this is just another let down waiting to happen, but the existing Python code support is fantastic, and significant strides appear to already have been made towards the goal of total Django integration. If you want to try out the existing language support, just grab the Netbeans 7M2 build and install the Python plugin! [Less]
Posted
10 months
ago
The other day at work we encountered an unusual exception in our nightly pounder test run after landing some new code to expose some internal state via a monitoring API. The problem occurred on shutdown. The new monitoring code was trying to log
... [More]
some information, but was encountering an exception. Our logging code was built on top of Python’s logging module, and we thought perhaps that something was shutting down the logging system without us knowing. We ourselves never explicitly shut it down, since we wanted it to live until the process exited.
The monitoring was done inside a daemon thread. The Python docs say only:
A thread can be flagged as a “daemon thread”. The significance of this flag is that the entire Python program exits when only daemon threads are left. “
Which sounds pretty good, right? This thread is just occasionally grabbing some data, and we don’t need to do anything special when the program shuts down. Yeah, I remember when I used to believe in things too.
Despite a global interpreter lock that prevents Python from being truly concurrent anyway, there is a very real possibility that the daemon threads can still execute after the Python runtime has started its own tear-down process. One step of this process appears to be to set the values inside globals() to None, meaning that any module resolution results in an AttributeError attempting to dereference NoneType. Other variations on this cause TypeError to be thrown.
The code which triggered this looked something like this, although with more abstraction layers which made hunting it down a little harder:
try:
log.info("Some thread started!")
try:
do_something_every_so_often_in_a_loop_and_sleep()
except somemodule.SomeException:
pass
else:
pass
finally:
log.info("Some thread exiting!")
The exception we were seeing was an AttributeError on the last line, the log.info() call. But that wasn’t even the original exception. It was actually another AttributeError caused by the somemodule.SomeException dereference. Because all the modules had been reset, somemodule was None too.
Unfortunately the docs are completely devoid of this information, at least in the threading sections which you would actually reference. The best information I was able to find was this email to python-list a few years back, and a few other emails which don’t really put the issue front and center.
In the end the solution for us was simply to make them non-daemon threads, notice when the app is being shut down and join them to the main thread. Another possibility for us was to catch AttributeError in our thread wrapper class — which is what the author of the aforementioned email does — but that seems like papering over a real bug and a real error. Because of this misbehavior, daemon threads lose almost all of their appeal, but oddly I can’t find people really publicly saying “don’t use them” except in scattered emails. It seems like it’s underground information known only to the Python cabal. (There is no cabal.)
So, I am going to say it. When I went searching there weren’t any helpful hints in a Google search of “python daemon threads considered harmful”. So, I am staking claim to that phrase. People of The Future: You’re welcome. [Less]
Posted
10 months
ago
From the Safari 4 beta release:
* Full History Search, where users search through titles, web addresses and the complete text of recently viewed pages to easily return to sites they’ve seen before;
If you’ve been a Beagle
... [More]
user in the last 3 years this has been supported for Firefox and Epiphany users. But I wouldn’t mind seeing Firefox have this sort of indexing and search built-in either… the AwesomeBar was a great first step in that direction. [Less]
Posted
10 months
ago
Been a hectic few months, but I could hardly miss posting about this. Some of you might remember the little F/OSS miniconf, we did last year at Techkriti, IIT Kanpur’s technical festival. FOSSKriti ‘08 sparked off a number
... [More]
of great F/OSS events in colleges across the country. FOSSKriti ‘09 is now here, bigger and badder than ever (for small values of ever :P)!
Last year, we started planning the event sometime in mid-Jan, and we did the best we could in about a month. This year, Shashank (better known as Chintal), Zakir, Surya, and the rest of team had more time, and you can tell that they’ve been busy. The theme for this year is "The Open Web", and we have an awesome line-up of talks, workshops, and hackfests around this theme. We’ve got folks from Mozilla, Drupal, Yahoo, and Sahana and more. It’s going to be four butt-kickingly amazing days!
Bottom line: If you’re in the vicinity, be there. It’s happening from Feb 12th to 15th, at IIT Kanpur.
p.s.: It blows that I can’t make it. :( [Less]
Posted
10 months
ago
Been a hectic few months, but I could hardly miss posting about this. Some of you might remember the little F/OSS miniconf, we did last year at Techkriti, IIT Kanpur's technical festival. FOSSKriti '08 sparked off a number of great
... [More]
F/OSS events in colleges across the country. FOSSKriti '09 is now here, bigger and badder than ever (for small values of ever :P)!
Last year, we started planning the event sometime in mid-Jan, and we did the best we could in about a month. This year, Shashank (better known as Chintal), Zakir, Surya, and the rest of team had more time, and you can tell that they've been busy. The theme for this year is "The Open Web", and we have an awesome line-up of talks, workshops, and hackfests around this theme. We've got folks from Mozilla, Drupal, Yahoo, and Sahana and more. It's going to be four butt-kickingly amazing days!
Bottom line: If you're in the vicinity, be there. It's happening from Feb 12th to 15th, at IIT Kanpur.
p.s.: It blows that I can't make it. :( [Less]
Posted
10 months
ago
So, I still get hundreds of hits each day looking for my linq to sqlite provider, which is quite outdated. To prevent anyone else from falling prey to bitrotten code, I have taken down the link, and created this brief walkthrough.
For
... [More]
starters, you need to download sqlite for ADO.Net here: http://sqlite.phxsoftware.com/
You will also need the ADO.Net Entities Framework and Visual Studio 2008.
First, install the Sqlite Provider that you downloaded, and when prompted, choose to install DesignTime support for Visual Studio 2008.
Now, open Visual Studio and create a new project.
Expand the Server Explorer on the left and add a new connection.
Select the Sqlite provider.
Once you have a Sqlite Connection, create your schema.
Next, Create a new ADO.Net Entities Model, and choose to generate models from a database. Select your Sqlite Connection.
Viola! We now have objects representing our SQLite database that can be queried and modified!
I’ll upload a screencast in a few days when I can get my hands on a screencast recorder for Windows. I’m also working on the means to generate those ADO.Net entities under Mono, but I am still researching what is out there. [Less]