Saturday, October 03, 2015

Setting the Home Time Zone on the Galaxy S6

This post is targeted at people trying to set the Home Time Zone on their Galaxy S6. When traveling, the S6 tries to show the time at home on the lock screen, which could be quite useful. However, I found it quite difficult to figure out how to set the home time zone properly.  I finally figured out how to do it:
  1. Go to Settings -> Lock screen and security -> Show information -> Dual clock
  2.  Tap "Set home time zone," and choose appropriately.

Wednesday, October 16, 2013

Using an older Mac Mini as a DVR

I'm not a cable TV subscriber, but we occasionally watch shows on broadcast TV that come in over the antenna. Recently, I decided to enhance our setup with DVR functionality using an older Mac Mini (from 2009) that was already connected to the TV. Long story short, I went with the combination of an HDHomeRun tuner, MythTV 0.27, and a Schedules Direct subscription, and things are working great. Some notes on the process:
  • Web searches for "mac dvr" and related terms often lead to EyeTV products and software. I went with the HDHomeRun instead of EyeTV hardware since EyeTV doesn't seem to have anything available in the US that can pull signals directly from a coaxial cable (instead there are analog RCA inputs to get signals from a cable box). I skipped the EyeTV software since MythTV is free and I could deal with the painful setup process.
  • I set up MythTV following the instructions here and here. One issue I ran into was that the setup program would crash on opening for me until I addressed the issue with MySQL time zone tables. Otherwise, things went smoothly, though the process was quite tedious.
  • It took some tinkering to find an appropriate playback profile for my older hardware. Right now, I'm using the VDA Slim profile, which doesn't drop any frames but leaves some interlacing artifacts.
Overall, I'm quite happy with the setup. The MythTV front end interface has some rough edges, but the underlying features are rock solid so far, and you can't argue with the price. It's great to finally have basic DVR functionality; watching TV "live" now seems very primitive.

Sunday, May 19, 2013

Gmail Notifr

I recently discovered Gmail Notifr (via The Changelog), and in spite of the odd name, it's the best Gmail notifier for Mac that I've found. I figure it's time to reduce my dependence on Sparrow, since it's unmaintained, and so far this notifier + Gmail in Firefox is working well (with multiple accounts).

Sunday, April 21, 2013

Infinite Call-String Sensitivity and Object Sensitivity are Incomparable

I just returned from a fantastic week at Dagstuhl, discussing the ins and outs of pointer analysis. I wanted to briefly write up one technical point regarding the comparability of call-string-sensitive and object-sensitive points-to analysis that seemed to not be as widely known as I had thought. For some background on terminology, etc., you can see Milanova et al., Lhoták and Hendren, Smaragdakis et al., or our recent book chapter (not an exhaustive list).

Milanova et al.'s original work on object sensitivity states:

In general, object sensitivity (an instance of the functional approach to context sensitivity [Sharir and Pnueli 1981]) and call chain context sensitivity (an instance of the call string approach) are incomparable in terms of precision.
But, no examples are given to illustrate this point. It's fairly clear how to construct examples showing that k-limited call strings can be more precise than k-limited object sensitivity, and vice versa. But, without k-limiting, i.e., with "infinite" call strings or object sensitivity (ignore recursion for the moment), the question of incomparability becomes a bit murkier. So, here are a couple of examples to show that incomparability holds even without k-limiting.

An example showing call strings to be more precise than object sensitivity isn't too tricky: (The comments name the objects being allocated or indicate the points-to relationships caused by the statement.) A call-string-sensitive analysis analyzes the calls at lines 10 and 11 separately, but an object-sensitive analysis does not, since both have the same receiver object a1. Hence, the object-sensitive analysis computes the imprecise points-to facts z -> o2 and w -> o1. Note that k-limiting plays no role here.

The example showing object sensitivity to be more precise is a bit trickier (and perhaps less widely known): Here, p is a boolean with some unknown value, so z can point to either a1 or a2. With object sensitivity, the call at line 12 is analyzed separately for receiver values a1 and a2, yielding the points-to facts shown. A call-string-sensitive analysis only analyzes the call once, and therefore computes the imprecise facts a1.f -> a2 and a2.f -> a1. Again, k-limiting plays no role. This example shows that object sensitivity is providing a form of path sensitivity that is truly orthogonal to the call-return matching obtained via call strings.

Note that both of these examples are contrived, and it's unclear whether this incomparability has any implications for analysis of real programs, since for the most part, only k-limited variants are used in practice. For an empirical evaluation of call strings vs. object contexts, see Lhoták and Hendren.

Anyway, hopefully this post has been useful in clarifying a small point regarding these analyses.

Friday, February 08, 2013

Long-Form Article Search

There is a lot of long-form journalism and magazine-style writing available for free online these days (see Longreads, Longform, The Feature, etc.). While there are more new articles published each day than most people can keep up with, I've often wanted to search for long-form articles on a particular topic. So, I threw together a quick Google Custom Search:

(You can access the search page directly here.) I didn't spend much time on this, but it turns up surprisingly good results, perhaps because even articles that peripherally mention your search terms are often still interesting. Some examples:

The search returns results from sources that (1) I think have generally good writing, (2) make some / most of their articles freely available, and (3) are amenable to restricting results to longer articles via URL patterns. (I had to exclude a couple sources that I wanted since their sites didn't meet criterion (2) and/or (3).) It's not perfect; e.g., searches for actors / directors will often turn up a lot of film reviews. But, it seems to work reasonably well. If you have any feedback, let me know.

Friday, November 23, 2012

On Conference Paper Bidding

I spent nearly a full day bidding for papers to review for a couple of conferences last week, which led me to think about bidding strategies. As brief background, program committee (PC) members for a conference are often asked to bid on paper submissions to help the PC chair assign reviewers to papers. Typically, possible bids are something like:

  • high interest
  • moderate interest
  • definitely not interested (i.e., block the paper)
  • neutral

By default, a neutral bid is entered for all papers. A reviewer could be assigned any paper that she hasn’t blocked, but the PC chair attempts to line up the assignments with reviewer interests as much as possible, subject to other constraints (e.g., a minimum number of reviewers per paper).

One question that comes up is when to block papers. I tend to not block papers: rather than deciding which papers to block, I try to enter enough moderate+high bids that it’s unlikely I’ll be assigned many papers that I haven’t bid on. This strategy has worked ok thus far, but I wonder if it would be worth the additional effort to distinguish papers that I really don’t want to review.

I also wonder how to balance current interests vs. expertise. Say you’re an expert in some research topic A, but your current research interests are in other areas. Should you bid on papers on topic A since you can give an expert review, even though you’re not so interested in that area anymore? Or should you not bid on those papers, to increase the likelihood of being assigned papers you are more interested in? In such cases, I’ve mostly been giving moderate interest bids to topic A papers, particularly if I’ve seen papers on A accepted to other conferences that I would have reviewed negatively. But, I’ve heard of reviewers going as far as simply blocking papers they don’t want to review, independent of expertise level.

Anyway, I’m relatively new to this process, so I’d be interested to hear thoughts on bidding strategies that are good for reviewers, good for overall paper review quality, etc. Pointers to existing resources are also welcome (I found this interesting discussion via a quick search).

Update: See Mike Hicks's comment below on a cool solution to the interests vs. expertise issue he devised for POPL 2012.

Update (12/4): Check out the Toronto paper matching system, which does an algorithmic paper assignment based both on bids and by matching submitted papers against a "publication profile" for each PC member.

Wednesday, February 29, 2012

Online Supplements for Alex Ross's Books

I've been slowly working my way through Listen to This, Alex Ross's excellent second book. His first book, The Rest Is Noise, was also mind-blowingly good. I wanted to point out that the online audio guides for these books are also highly worthwhile, with many music excerpts to go along with each chapter of each book. (The only problem is you may spend a lot more time on those pages than you intended.) I've already bought a couple recordings based on the excerpts he linked, and I still have many chapters to go.

Saturday, February 25, 2012

Ranking Shows by Season using IMDB

I enjoyed this recent post by Matt Zoller Seitz ranking the first 14 seasons of The Simpsons. I wondered how this ranking would compare to a ranking based on episode ratings on IMDB. I did some tinkering with node.js and jsdom and came up with this. Sorting the output (and eliding non-existent seasons) yields:

8.34 average rating for season 6
8.33 average rating for season 5
8.31 average rating for season 7
8.26 average rating for season 4
8.18 average rating for season 8
8.16 average rating for season 3
8.01 average rating for season 2
7.91 average rating for season 9
7.82 average rating for season 1
7.63 average rating for season 10
7.39 average rating for season 12
7.35 average rating for season 11
7.17 average rating for season 23
7.10 average rating for season 16
7.09 average rating for season 18
7.04 average rating for season 13
6.98 average rating for season 19
6.96 average rating for season 17
6.96 average rating for season 15
6.92 average rating for season 20
6.91 average rating for season 22
6.90 average rating for season 21
6.90 average rating for season 14

I didn't do anything fancy like try to weight ratings by the number of votes, but the results are still interesting, and pretty similar to Zoller Seitz's ranking. To try another show, just change the URL in the script to the IMDB URL for the show with /eprate tacked on the end.

Sunday, January 23, 2011

Best Classical Composer on All Our Ideas

I had a lot of fun reading Anthony Tommasini's ranking of the top 10 classical music composers of all time. Just the other day, I saw an interesting crowd-sourced ranking of computer science departments (via in theory) on the neat site All Our Ideas. It seemed easy enough to set up a classical composer ranking on All Our Ideas, so I did it. You can add more composers pretty easily, and results are here. Have fun!

Saturday, January 15, 2011

Bill Maher Podcast with Audio Only

I listen to the podcast of Real Time with Bill Maher pretty regularly, but the feed is annoying in that it includes both audio from the show (which I want) and video excerpts (which I don't want). I made a Yahoo! Pipe that filters out the video entries; RSS (which can be used as a podcast URL) is here.

Update (1/30/2011): For some reason, the first link to the pipe doesn't actually show the recent Maher audio podcast entries, but the second link to the podcast URL works fine. To add the podcast to your podcatcher, right-click on this link and copy the URL ("Copy Link Location" in Firefox), and then add the feed to your podcatcher (in iTunes on Mac, do Advanced -> Subscribe to Podcast... and then paste the URL).

Tuesday, December 07, 2010

NYTimes App in Chrome Web Store

The New York Times Chrome App looks kind of familiar :-). From playing with it a bit, it looks quite beautifully done. It also looks like they have some the same troubles I did with counting pages accurately and keeping the columns properly aligned with the pages. As far as my Greasemonkey script goes, I've had very little time to update it recently. If / when I do get any time, I'd like to do a significant rewrite, basing the article text extraction on Readability and maybe just doing the whole thing as a bookmarklet. Perhaps a good project for the holidays...

Sunday, October 17, 2010

Camcorders and Interlaced vs. Progressive Video

My Canon FS100 camcorder records video in the funky MOD file format, making the video files rather difficult to work with using standard software. I recently spent some time trying to figure out a better way to deal with these files and learned a few things about video formats that I thought I'd write down to possibly save someone else time.

Why are the FS100's MOD files hard to work with?

MOD files from the FS100 basically have MPEG-2 video with AC3 audio, which works great for burning to a DVD. However, I mostly want to share the videos on sites like YouTube, for which purpose the MOD files are problematic in two ways: (1) the aspect ratio of the video is not marked properly within the file (fairly easy to fix), and (2) the videos are interlaced (a bigger problem).

What is interlaced video?

Wikipedia explains things pretty well. Basically, in interlaced video, only half the horizontal lines are recorded / drawn in each frame (odd lines in one frame, even lines in the next). This technique saves significant bandwidth compared to progressive scan video (which records every line in each frame) without much (any?) quality loss on older CRT TVs. But, interlaced video looks terrible on LCD TVs and computer monitors (which are progressive displays) due to combing artifacts.

How does one convert the FS100's interlaced videos to progressive?

Apparently, deinterlacing a video is a really hard problem. The best free solution I've found is HandBrake; see their deinterlacing guide. In the process of deinterlacing, I also re-encode the video as MPEG-4. It would be nice to avoid this re-encoding, but the need to deinterlace makes it pretty much necessary (VLC can deinterlace video during playback, but you have to enable it manually, and most players don't have this feature).

What to DVDs and DVD players do about this interlaced vs. progressive issue?

DVDs almost always hold interlaced video. For video from a television source, no conversion is needed. For film sources, conversion to interlaced video is usually accomplished as part of 2-3 pulldown (aka 3:2 pulldown), which also serves to fix the frame rate mismatch between film (24 progressive fps) and NTSC video (60 interlaced fps). David Bordwell wrote a fascinating post on this topic a while back.

A progressive scan DVD player outputs a progressive signal on those outputs that support it (e.g., HDMI). For film sources, the original progressive frames should be recoverable if the proper MPEG-2 flags were used on the DVD, though 2-3 pulldown is still necessary if the display is 60Hz. For television sources, algorithmic de-interlacing must be performed.

Note that for displays with a refresh rate that is a multiple of 24 (e.g., 120Hz), it's possible to "undo" the 2-3 pulldown (known as reverse telecine) and simply repeat each frame a constant number of times to match the display's refresh rate, removing some artifacts.

120Hz / 240Hz LCDs are supposed to reduce motion artifacts for sports, etc. How does this work when the input signal is 60fps, e.g., a TV broadcast?

Since there aren't any additional frames in the input signal to display, these TVs typically reduce artifacts by interpolating new frames or by darkening the display between frames.

Monday, September 13, 2010

Thoughts on Droid Incredible

So I finally joined the smartphone world. I went with the Droid Incredible—I didn't want an iPhone (wanted to stay with Verizon and didn't like the programming restrictions, though they have now been relaxed to some degree), didn't like the size of the Droid X, and didn't want the additional bulk of the physical keyboard on the Droid 2. Overall, I'm pretty happy with having a smartphone, Android, and the Incredible in particular. Other disorganized thoughts:

  • One big annoyance is that the Bluetooth functionality is rather broken on the Incredible and it won't pair in our car; see here. Apparently it's a software problem which you can get around by rooting and installing a different MOD. I'm still hoping an update will fix the problem.

  • (9/29/2010) I had a strange problem with voice quality a couple days after I first got my phone; others said my voice was very distant during calls. After searching all over the web for a solution, I went to a Verizon store and they couldn't find the problem either. Finally, I stared at the mic and noticed a speck of dust seemed to be blocking it. The Verizon guy blew it out with some compressed air, and them problem was solved. I'm really glad I didn't return the phone at that point.

  • Having the phone is great for running outside. I get some music going and then start up SportyPal, which tracks my route on a GPS and shouts times in my ear every so often. Later, I go online to check my pacing to see how I could run slightly less slowly next time. Update (10/7/2010): I forgot to mention that this armband fits the Incredible pretty well, though not perfectly (adjusting volume is a pain).

  • I set up Subsonic on a machine at home with our music and use the Android app to listen on my phone. It's not quite as good as having all my music on the phone (you need to remember to grab what you want ahead of time if you're not going to have a data connection, e.g., on an airplane), but it works quite well. I'm still looking for a good solution for managing podcasts. Update (10/5/2010): I bit the bullet and bought doggcatcher for podcasts. I was impressed that the developer worked around a bug with the 2.2 ROM on the Incredible that thoroughly broke seeking; this bug made using other apps like Google Listen very painful.

  • Astrid Tasks synced to Producteev is working well for managing TODOs, grocery lists, etc.

  • The camera is great to have in a pinch, but it's missing some basic features like image stabilization (many photos without flash end up being blurry) and adjusting zoom while shooting video.

  • Google Navigation generally works great, including the new walking navigation. But, in some cases it would be problematic to rely on it, since it needs a data connection to compute an initial route or (I think) to re-route if you miss a turn. If you're heading out into nature a lot, it's not a replacement for an app that downloads maps and computes routes locally or a standalone GPS.

  • In general, the app version of popular sites like Facebook, Twitter, and NYTimes are obviously better than the mobile web versions, which is kind of disappointing given the hype around the web platform. I'm not sure if this is because the web platform still needs work or because the sites aren't fully optimized for Webkit-based browsers (it's probably some of both). The Gmail and Google Reader mobile sites are pretty competitive with comparable apps, though.

  • Catch (formerly Snaptic) seems decent for jotting down and syncing notes. I tried Evernote first, but the Android app is just broken; you can't even read your notes without a data connection.

  • I wish I could try Swype.

  • Should I join Foursquare?


Anyway, it's the best new toy I've gotten in a while. Hopefully I'll be able to make some time to hack up a couple apps of my own eventually.

Thursday, April 08, 2010

Programming Languages on the iPhone

So I read about how Apple banned many programming languages from use for iPhone apps today, and I had a reaction similar to Rob's. John Gruber thinks that Apple did this to prevent frameworks from targetting both the iPhone and other platforms like Android, but he also argues that applications built using such frameworks usually suck. This seems like a contradiction to me: if apps built these frameworks suck so much, why take the trouble to ban the frameworks? To me, the ban seems like an admission that many apps could in fact be "good enough" when built on such a framework. Apple simply wants to make life harder for developers of such apps who want to target multiple phones, in the hopes that they will decide to just focus on the iPhone. What a lame move.

Monday, September 07, 2009

Bagels outside NYC

Vaguely related to Cog's recent post on American yogurt, what's the deal with the sub-par bagels outside the New York City area? We just got bagels from what is supposedly the best bagel place in Boulder, and they weren't even close in taste to our bagel place of choice in Westchester. Why are the bagels so much better in the NYC area? If there were some ingredient local to NYC that didn't travel well, I could understand, but that doesn't seem to be the case.

Monday, May 11, 2009

New Times Reader

I just installed the new Times Reader on my Mac, and it seems to work very nicely. This blog post discusses many of the improvements. For text layout, it uses a new framework implemented on Adobe AIR. Of course, the downside is you have to pay to get the full product; for free, reading the Times on the web with my multi-column Greasemonkey script is a decent substitute :-).

Friday, January 23, 2009

NYMag Top Chef Posts

For those Top Chef fans out there, I created a Yahoo! pipe that has the New York Magazine Grub Street posts on the show: here you go.

Thursday, December 04, 2008

Exporting Powerpoint Figures to Latex on Mac

I wanted to quickly write down how to export Powerpoint figures to use within pdflatex on Mac OS X, since a quick Googling didn't turn up a straightforward explanation:
  1. Ensure the figure is on its own slide.
  2. Print the slide to a PDF.
  3. Open the PDF in Skim.
  4. Do Tools -> Select Tool.
  5. Select the figure and adjust the borders of the selection appropriately.
  6. Do Tools -> Crop Page.
  7. Do File -> Export..., pick a file name, and choose "PDF with Embedded Notes" as the file format.
  8. Include the resulting file in the Latex document, e.g., using graphicx.

Monday, October 27, 2008

The Office has jumped the shark

I found the first four episodes of this season of The Office to be distinctly worse than the best episodes of past seasons. The show is getting too weighed down by several long-running plot lines, none of which are interesting dramatically. (Jim and Pam's story was never interesting, and neither was the equivalent plot in the British Office.) Hopefully this is just a bad streak, but I think it's more likely that the show has just jumped the shark.

Wednesday, June 25, 2008

Updated version of Multi-column articles

I've updated my multi-column articles Greasemonkey script to coincide with the release of Firefox 3. The coolest new feature is automatic hyphenation (only works in Firefox 3), accomplished via the awesome hyphenator script. In my experience, automatic hyphenation sometimes provides a significant improvement in readability. Also, support for many more sites has been added in the last few releases, along with other bug fixes. If you installed my script a while ago, it's a good time to update (which requires uninstalling the script and then installing the new version; not sure how to do better).