Sunday, November 29, 2009

 

Quote o' the Day

Google Wave was a program built to show younger people how older people feel when they attempt to use the internet.
-- jeff_phillips (Although he may not have been the originator.)

Tuesday, November 17, 2009

 

User Scripts for more compact, netbook friendly Gmail and Google Reader

My wife has a netbook that I occasionally swipe to browse the web, which usually consists of at least peeking at Gmail and Google Reader. On the netbook's tiny screen, both feel like they could afford to have some of their cruft removed. I went searching and found scripts that I could hack up into what I wanted.

Gmail

This just removes the right column when you view a conversation. That means that you lose ads and Gmail's smart parsing of your email to offer to help you track packages and schedule events.
 // borrowed from http://userscripts.org/scripts/show/43495
var css = "table[class='Bs nH iY'] tr td[class='Bu']:last-child {display:none !important;}";

if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
}


Google Reader

This is a bigger change. It smashes together many elements at the top of the page above the item list, violating a host of aesthetic principals, making graphic designers everywhere weep. It also reduces the whitespace inside the display of individual items. Finally it removes the bar at the bottom of the item list. I believe that my changes from the original were primarily around restoring a few things the original hid and fiddling with the styling.
// From: Google Reader Compact & Clean
(function() {
var css = "/* Hide all the elements that take up space */ #logo-container, #gbar, #global-info, .gbh, #lhn-add-subscription-section, #viewer-footer, #chrome-view-links, #viewer-refresh, #viewer-details-toggle, #chrome-header, #chrome-lhn-toggle, .scroll-tree .icon, .entry .entry-title .entry-title-go-to, #entries.list .collapsed .entry-main .entry-original { display: none !important; } /* move the main window up to the top to fill in leftover space */ #main, #settings-frame, #settings { top:0 !important; margin: 0 !important; } /* tighten up the vertical padding on header bars */ #viewer-top-controls, #chrome-header { padding: 2px 0 2px 5px !important; } /* right-justify the \"Loading...\" and other messages so they don't obscure other elements */ #loading-area, #message-area-outer { width: auto !important; left: auto !important; right: 0 !important; top: 26px !important; } /* right-align search bar and hide buttons until hovering */ #search { left: auto !important; right: 10px !important; top: 1px !important; width: 210px !important; height:23px !important; overflow: hidden !important; } #search:hover { width: 403px !important; height:323px !important; overflow: visible !important; } #search-restrict-button .goog-menu { left: auto !important; right: 0 !important; } #chrome.search-stream #viewer-search-parent { text-align: left !important; } /* shrink the navigation sidebar */ #nav, #nav * { max-width: 200px !important; } #chrome { margin-left: 200px !important; } .lhn-hidden #chrome { margin-left: 1px !important; } #entries .entry-body { max-width: none !important; } /* remove icons from navbar and tighten the left margin for folder/subscription entries */ .scroll-tree .expanded .toggle { background-position: 3px -58px !important; } .scroll-tree .collapsed .toggle { background-position: -20px -58px !important; } #lhn-subscriptions .scroll-tree li a { padding-left: 0 !important; } #lhn-subscriptions #sub-tree ul ul li a { padding-left: 10px !important; } #lhn-subscriptions .scroll-tree .toggle { width: 16px !important; } /* shrink titles, but add underlining for visual identification */ .entry /*.entry-title { font-size:100% !important; background-color: #FFFFFF !important;}*/ /*REMOVING UNDERLINE*/ /* tighten up spacing around entries */ /* expanded view */ #entries .entry { padding: 5px !important; margin: 0 !important; background-color: #FFFFFF !important; } #entries .card-content { padding: 2px !important; } #entries .card-common { padding: 0 !important; margin: 0 !important; border-width: 2px !important; } #entries .collapsed { padding: 0px !important; border: 0 !important; } /* list view */ #entries .collapsed .entry-date { margin: 0 2px 0 0 !important; } /*CHANGING BACKGROUND COLOR*/ #entries #current-entry .collapsed { background-color: #FCFCFC !important; } #entries.list .collapsed .entry-icons, #entries.list .collapsed .entry-main .entry-original { top: 1px !important; } #entries.list .collapsed .entry-secondary { top: 0px !important; margin-right: 7em !important; background-color: #FFFFFF !important;} #entries.list .collapsed { text-decoration: none !important; background-color: #FFFFFF !important;} #entries.list .collapsed .entry-source-title { top: 0px !important; background-color: #FFFFFF !important;} #entries.list .collapsed .entry-title { text-decoration: none !important; background-color: #FFFFFF !important;} /* make entries borders square for consistency with new design */ .entry .card, .card .card-bottom { -moz-border-radius: 0 !important; } /* Hide Like feature */ /*#entries .entry-author { display: none !important; }*/";
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
}
})();


I like both of these enough that I ended up using them on systems with decent sized monitors, too. They're particularly handy for making my favorite Google apps fit getter when I'm trying to put two windows side-by-side on a widescreen monitor.

Saturday, November 14, 2009

 

Google Wave

I've had a Google Wave account for a month or two and I've just now found some value in it. All of the playing around I'd done to explore it really turned me off to the product. It was too rough and very annoying to use. Those negatives weren't offset by obvious utility that it offered over my existing channels (IM, email, phone, wiki, and blog).

However, twice at work recently I've found it to be the best tool for a job. We're talking about a major new feature for our product that we really don't understand. Wave has given us a nice place to dump ideas, meeting notes, and research as we flail to comprehend what we're getting ourselves into. As new entries are added, team members will occasionally stop by the wave and comment on what's been added. Wave's threading is handy for that. At the same time, Wave allows you to edit entries written by others, thereafter attributing the block to both of you.

I see that as enormously advantageous over email which tends to branch into multiple threads. Once an email chain has branched or reached adequate length, it's hard and time consuming to reconstruct a coherent view of the conversation.

I think wave is also more useful than a wiki in this context because it essentially merges a wiki page's content and its discussion page. On Wikipedia that would be annoying, but for the purpose of our collaboration which doesn't need to produce a final document, but rather a documented, researched consensus, it's really nice to be able to get a quick overview or drill into the spiraling discussion on the same document.

I also found Wave to be the best channel when, while I was working from home, a coworker asked how to solve a sticky problem. I needed to show her the rough code outline of my solution while talking on the phone. Wave's continuously updating content allowed us to both edit and see what the other meant very quickly. Short of some sort of fancy screen sharing or collaboration software that neither of us had installed or were signed up for (e.g., Bespin or the reviled LiveMeeting) I don't have another channel in my toolbox that would've worked nearly as well.

The greatest shortcoming of Wave is that it lacks undo. Yes, it has the fancy timeline, but that's mostly useless. Firstly, loading the timeline takes forever for a moderately large document. Secondly, when I fat finger something and delete most of my thread, I don't want to go to the timeline; I want to hit Ctrl-Z and see my prodigal content return.

So, yeah, I like Wave, but it's not going to be replacing any tool that I was particularly happy with anytime soon. It's a specialized tool that I'll pull out occasionally.

I have a few invitations to give out. Let me know if you'd like one.

Wednesday, November 11, 2009

 

Puzzle solving with regular expressions.

The puzzle this week from NPR's Weekend Edition is
If you write "WOW" in capital letters and hold up a mirror at the side of the word, you'll see "WOW" perfectly reflected in the mirror. Here's the puzzle: Think of a nationality and write it in capital letters. If you remove one stroke from the first letter, and one stroke from the last letter, and hold up a mirror at the side, the name of the nationality will be perfectly reflected in the mirror. What nationality is it?


The steps to my solution were:
  1. Grab a list of nationalities.
  2. Delete all entries which consisted of multiple words.
  3. Make the remaining words singular and all upper case letters.
  4. Search for items which matched the regular expression /^.[AHIMOTUVWXYZ]+.$/
  5. Pick the obvious answer out of the six matches.

This page is powered by Blogger. Isn't yours?