Friday, November 1, 2013

Nexus 5


I cannot wait!

Google+ Custom URL


I now have a custom URL! Find me at google.com/+jeffgarrett

Monday, August 12, 2013

Online Security

Sometimes I wish Lifehacker did a little bit more research. Here's a graphic ostensibly showing how to secure your online communication.

I'm no expert, but let's go through some of these recommendations.

DuckDuckGo... no. As has been revealed recently, they are essentially an open book to intelligence agencies. If you want security, use Google!

FireFox... yes. Good suggestion.

Opera... no. See here.

Tor... too much work and probably not effective.

Chrome... what is with the unsubstantiated (and as far as I know) false rumor?

HTTPS everywhere... yes. Good suggestion.

Secure email... are there any services left? and were they ever really secure?

Avoid hotspots... really???

Encryption... may be a good idea, but probably not truly effective since the government can always jail you until you tell them the key.

And what's with the repeated mention of advertising. Who cares if ads are displayed? This is supposed to be about keeping your communication private, not about preventing advertising.

Sunday, June 9, 2013

Medicare Cost Data and the Pixel

Extensive cost data for medical procedures has recently been released. I thought it might be interesting to explore it, and out of curiosity try to do so on the Pixel. Unfortunately, this highlights why ChromeOS still needs some work.

The spreadsheet cannot be uploaded to a Google Sheet, because it has more than 400 thousand cells. Oops. A second option was fusion tables, but fusion tables is unable to geocode addresses split into multiple columns. In fact, Google's recommended solution is to download and modify the file on something other than a Chromebook using Excel.

I was expecting problems with programming given the lack of editors, IDEs and build tools, but not basic spreadsheet tasks!

Saturday, June 1, 2013

More Pixel

After more Pixel use, I have encountered two minor issues with easy solutions to share.

Firstly, the clock was off by two hours this morning. Since it was previously correct, and the timezone was set properly, I suspected an underlying NTP problem. But I found this thread suggesting that the timezone setting is ignored in favor of the (unset) apps domain timezone setting. After setting the domain timezone, the time was correct again.

Secondly, hiding Gmail labels by dragging them into the "More Labels" section doesn't work. I found this thread explaining that the cause is the new "Touch-enabled" inbox view, and switching back to "Comfortable" returns the familiar behavior.

Wednesday, May 29, 2013

Pixel Suggestions

So I've been playing with my new toy, the Chromebook Pixel. Everyone knows ChromeOS as the OS which is only a browser, but it is surprisingly capable. Of course, everything which works in Chrome, works well on the Pixel. This includes many Chrome apps, a few of which Google suggests upon the first use. (Hint to Google: Fix all those broken links!)

As a developer though, I spend most of my time either in a browser or in a shell. And on my laptops, most of the shell time is spent in ssh. ChromeOS works reasonably well for this. There are two apps I want to highlight for users like me. There are Chrome apps for secure shell and VNC. So far, I have been able to live completely inside ChromeOS without resorting to developer mode. I will blog more tips as I find them.

I've found myself recommending the Pixel quite a bit. The free Drive storage offer is worth more than the cost of the machine. And ChromeOS can be replaced with your favorite Linux distribution. The screen is great, with more pixels per inch than Apple's "retina" MacBooks, and with a better aspect ratio too! A better machine, with Drive storage, without the Apple tax, and without OS/X's many flaws (window management???)... How could you pass it up?


Tuesday, May 28, 2013

Google I/O 2013: Part 1


Google I/O is over, and it was awesome! I've been too busy to summarize it, so I'll post in chunks. This is the first part. A lot of this has already been covered in the tech media, but this is my take.

Devices: There was little news on the device front. The rumored new Nexus 4 LTE and Nexus 7 refresh did not materialize. But, a pure Android version of the Samsung Galaxy S4 was announced. It will be sold on the Play store for $649 and is expected on June 26. And a white Nexus 4 made an appearance. It will be sold on the Play store for $299 and is expected on June 10 with Android 4.3.

Android: The rumored Android 4.3 was nowhere to be seen! Although we can infer some of the improvements scheduled for 4.3, this was a deliberate omission. It was Google's way of saying they don't need a new Android version to deliver improvements and new APIs. Considering the constant talk of fragmentation and handset makers struggling to keep up with upgrades, this is an interesting shift in policy.

Instead, the majority of platform updates were bundled into a library, Google Play Services, which is available on Android devices back to Android 2.2 and which auto-updates just like the Play Store. The functionality in Play Services includes a battery-friendly location provider, geofencing, activity recognition, cross-device notification syncing, Google+ cross-platform single sign-on, the Maps API, Cloud Messaging, and multiplayer gaming functionality.

The gaming functionality will also be available on iOS.

Sunday, February 3, 2013

Robust buildout

If you followed the pyramid instructions from a previous post, you have a buildout.cfg file which lists package dependencies. Unfortunately, buildout by default lacks some reproducibility. Follow these instructions to specify the exact versions of the packages to use, which can be determined with the following command:

bin/buildout -Novvvvv|sed -ne 's/^Picked: //p'|sort -u


Saturday, February 2, 2013

100 Best Companies to Work For (2013)

Fortune recently released their updated "100 Best Companies to Work For" list. CNNMoney has great coverage of the list with the particulars of each company. The only thing missing is a map. I mapped the corporate headquarters of each company. Check it out:

Tuesday, January 29, 2013

OS/X and terminals

Being new to OS/X, my first concern is a usable terminal. Here are a few tips...

iTerm2
Apparently, Apple's terminal app really sucked in a previous life. It's better now, but iTerm2 had a head start. One of the most useful features is "mouseless copy," i.e., copy by highlighting, which will be familiar to all Linux users. Other neat features include the  exposé tabs and search capabilities.

Fonts
Monaco is good. Other popular options are Inconsolata and Source Code Pro, a monospace relative of Source Sans Pro.

Color Schemes
Solarized is available for iTerm2 and vim. Here are other options.

Mind Blowing
The potentially awesome feature of iTerm2 is tmux integration! You can attach to tmux sessions, and have their windows treated as normal tabs. It is a killer feature. A special patched version tmux is required, and it has plenty of drawbacks, but it's new. I've used screen over tmux in the past, but this could be worth the change.

Sunday, January 27, 2013

App Engine and Pyramid

There are so many interesting libraries and frameworks which help bootstrap and start building modern web apps. I decided to explore some of the choices for a personal project. I want this project to run on Google's App Engine, using python on the server. Everything else is negotiable.

Saturday, December 22, 2012

Threads and Exceptions

I learned something recently. One should be careful with catch(...). And one should be very careful with pthread_cancel.

The catch-all has a limited uses of course, since you usually know the types of exception to expect. However, there is the rare occasion for its use. What I learned is that you must always re-throw the caught exception. If you don't, pthread_cancel and pthread_exit may break.

The reason is that on Linux, those functions work by throwing a special exception. This exception is special and does not derive from std::exception. You must re-throw it. It is possible to catch this exception alone and re-throw. In order to do that, see this post.

The same logic also implies that when using pthread_cancel, you should not use functions which serve as cancellation points in destructors. In other words, it is best not to use pthread_cancel.

In summary:

  • When using catch(...), always re-throw.
  • Do not use pthread_cancel.

Note: the same does not appear to be true on Solaris.

References: Ulrich Drepper's blogKenneth's blog.

Monday, December 3, 2012

runonce

I sometimes need a process running in the background. Long ago, I wrote a very simple script which runs a command if not already running. Now, it's updated for OS/X.

https://github.com/jeffgarrett/scripts/blob/master/runonce

Sunday, December 2, 2012

MathJax for Blogger

For basic MathJax support in Blogger, all you have to do is edit the HTML of your template and put the following before </head>:
<script type='text/x-mathjax-config'>
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']],
                     displayMath: [['\\[','\\]'], ['$$','$$']]}});
</script>
<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' type='text/javascript'>
</script>
This is all you have to do if you aren't using Blogger's dynamic views. The principal issue with this method is that RSS readers do not render the LaTeX. This was the justification for the LaTeX for Blogger user script. But MathJax looks so much better on a retina screen!

It is possible to have the best of both worlds, and maybe one day I'll blog how...
$$\int_0^1 x^2 dx = \frac{1}{3}$$ Source: checkmyworking.com

Edit: Set your mobile template to "Custom" to pick up the MathJax on mobile.

Friday, November 30, 2012

New MacBook Suggestions

So I have a new MacBook. It's my first and only Apple product. Any suggestions?

I'm looking for a good terminal app and a good tiling window manager (a la i3). Also, is there a way to maximize windows without making them full-screen?