My Thoughts About the Google Street View and Privacy

As I sit here on a hot, humid Friday night with my scotch and my laptop (21st century #fail), in a thoroughly air-conditioned room, I try to make myself useful. In this unbearable heat, only a desperate socialite would even think about going out. I, myself, much prefer pointlessly scrolling through the day's worth of tweets, catching up on the discussions about Google Street View and privacy. Not even sure how old this stuff is, I start to slowly type my thoughts on the subject.

To make my thoughts look more respectable, I organize them in a bulleted list. I will attach a pie-chart later.

  • In case you did not know: between Facebook, professional spammers and the government (not just yours, too), you have no privacy to begin with. The only thing anybody does not know about you is what they don't care to know about you. So, please come down the high horse and wake up.
  • Google Street View is the most amazing technology we have in 2010 (except maybe for Twitter). If you don't believe me, check this out: I am sitting on my couch in North America and am browsing streets in Australia. Beat that.
  • Google Street View does not go into anybody's home. It only captures public places, so just be a decent human being when you are outdoors and you should be fine.
  • Did I mention Street View is a piece of art and a global treasure? Yeap, it is.

With the final score of 4:0, I am all for Google Street View and I think, in this case, Google is the victim: offering a wonderful service for free, getting little gratitude for it.

Peace.

LAMP Settings for a High-Performance Small Server.

With the VPS expansion you can now get a (very) small virtual private server (VPS) for a very affordable price. However, when you get a server with something like 256MB or 512MB RAM and a portion of CPU power, using default MySQL/PHP/Apache settings is a pretty bad idea.

Performance and scalability tuning of a server is more of an art than science, in the sense that there're no ready-to-use formulas. Optimal server settings depend on many unique factors: web-app code, traffic to the site, site's information architecture among other things. It's virtually impossible to really optimize server settings without thorough understanding of the web application and a lot of testing.

That said, you are not going to run newsweek.com or huffingtonpost.com on a 256MB slice. Also, the default settings are typically so off that it is possible to give you a much better starting point. I'd like to share with you some settings that have worked well for me. I am assuming you are running a small site or a blog, with the traffic of several thousand page-views/day, using Wordpress, Drupal or something of that kind. I highly recommend getting at least a 512MB VPS, but these settings are better than the default for a 256MB server, as well.

Following are some variables for various settings files that have been modified from their default values.

Installing GoogleCL On a Mac

GoogleCL is a command-line client to Google services that was released recently. It should appeal to Web geeks, many of whom, in my non-scientific observation, are Mac users.

GoogleCL documentation suggest you use MacPorts to install it on Mac.

Now, I have to admit - it really pisses me off when people talk about installing simple Unix utilities on Mac using MacPorts (or Fink or that new kid on the block called HomeBrew). People, Mac OS-X 10.5 and up is a POSIX Unix system! If you have Dev Tools installed, and Terminal does not scare you, you should not need a crappy thing like MacPorts to install a simple unix utility like Git, SVN or GoogleCL. If you can not install them as you would install on most Unix systems, MacPorts will probably fail you too, so no need to pile garbage on your shiny Mac.

If you don't have DevTools installed on your Mac, stop calling yourself a Mac geek until you go to http://developer.apple.com/, download and install Dev Tools.

The pre-requisites to GoogleCL are Python 2.5+ and Gdata Python Client Library. OS-X versions 10.5 and 10.6 have proper Python version pre-installed. Installaltion of the rest is as easy as:

mkdir ~/src
cd ~/src
curl -O http://gdata-python-client.googlecode.com/files/gdata-2.0.10.tar.gz
tar
xzvf gdata-2.0.10.tar.gz
cd gdata-2.0.10
sudo python setup.py install

curl -O http://googlecl.googlecode.com/files/googlecl-0.9.5.tar.gz
tar
xzvf googlecl-0.9.5.tar.gz
cd googlecl-0.9.5
sudo python setup.py install

Fix: Yum Error: ValueError: need more than 1 value to unpack

yum clean all 
yum clean metadata 
yum clean dbcache 

and then:

yum makecache

Changes Since Last Push in Git

The "git status" command only shows uncommitted changes locally. But what if we need to see "what files would get pushed if we did a push now?". The answer is not trivial (and no, "git push --dry-run" is not useful since it does not show changed files).

I've been looking for an answer, and since I am no git expert, it took me a while to find one, until @iosebi came to rescue. Apparently, what you need is this line of code:

git log origin/master.. --stat

Thank you, @iosebi! I probably hate git a little less, now :)

Adding Drupal, Django and JQuery Support to Espresso

MacRabbit's Espresso (http://macrabbit.com/espresso/) has been my favorite editor for server-side scripting for a while now. I was an avid Coda user before that, and Coda is a fine editor, but I like several features of Espresso better (e.g. large file browser in the center and ability to simultaneously open files from any number of servers).

Espresso is much "younger" than Coda and it was a little behind on language support (and availability of plugins in general), initially. We even had to post a hacking instruction for how to "teach" Espresso Drupal files.

The situation is much different now. There's a wonderful abundance of quality plugins now at http://fileability.net/coffee/ that work like a charm. We are using Combined Python&Jango, JQuery, YAML and Drupal-PHP sugars and they are simply awesome. To install, all you need is download appropriate tar.gz, unarchive. rename resulting folder so it has extension .sugar and move that to ~/Library/Appplication Support/Espresso/Sugars

Best jQuery Book Ever

An absolutely awesome jQuery book: http://jqueryenlightenment.com/

It's this simple: if you are a Web developer, you need this. And you will support the project. And PDF version is dirt-cheap.

Prevent Terminal from timing-out SSH on Mac.

If you use Terminal application on Mac OS-X to connect over SSH, you have most probably been annoyed by closed connections. Following is a quick recipe to prevent timeouts:

Open Terminal

> sudo vi /etc/ssh_config

Edit the file to make lines 20-21 look like:
Host *
    ServerAliveInterval 5

Save file and restart Terminal. Your connections won't time-out nearly as frequently.

Font Sizes

Following is a handy matrix for those among us who like to indicate HTML (font) sizes in "em"s. All modern browsers use a 16px default font size. Specifying the font-size and line-height in ems (relative to the 16px default font) allows the user to resize the font in the browser and produces the most consistent results across different browsers.

For more about using em's, read: http://www.alistapart.com/articles/howtosizetextincss

Now, the matrix:

 font-size: .625em;            = 10px 
 font-size: .6875em;           = 11px 
 font-size: .75em;             = 12px 
 font-size: .8125em;           = 13px 
 font-size: .875em;            = 14px
 font-size: .9375em;           = 15px
 font-size: 1.0625em;          = 17px
 font-size: 1.125em;           = 18px     
 font-size: 1.188em;           = 19px      
 font-size: 1.25em;            = 20px   
     
 font-size: 1.313em;           = 21px        
 font-size: 1.375em;           = 22px         
 font-size: 1.438em;           = 23px         
 font-size: 1.5em;             = 24px
 font-size: 1.563em;           = 25px         
 font-size: 1.625em;           = 26px          
 font-size: 1.688em;           = 27px         
 font-size: 1.75em;            = 28px         
 font-size: 1.813em;           = 29px          
 font-size: 1.875em;           = 30px           

Tutorial: Installing Django 1.1. on CentOS 5.4

This step-by-step tutorial walks you through the installation of Django 1.1 with Apache and MySQL. on CentOS 5. The example VPS used during the walk-through is the popular SliceHost from RackSpace ™ The steps involved should be quite similar for any properly installed CentOS 5.x (or RedHat EL 5.x).

We use the latest stable version of Python: 2.6 and mod_wsgi (far superior alternative to mod_python), in this tutorial. Django is not, yet, compatible with Python 3.x branch (few things are).

Syndicate content