Tuesday, December 29, 2009

Facebook Makes Search Engine Friendly Note URLs

Maybe they’ve been doing this for awhile, but it’s the first time I noticed
it.

href="http://www.facebook.com/notes/navarr-barnier/she-knows-my-best-and-my-worst/222268802110">facebook.com/notes/navarr-barnier/she-knows-my-best-and-my-worst/222268802110


Notice how it has my name, the note title, and then the ID at the end?  By the way, that
ID is the only thing Facebook cares about in the entire URL.  This exact same link works and points
to the exact same note:

href="http://www.facebook.com/notes/good-day-sir/i-am-a-homosexual/222268802110">facebook.com/notes/good-day-sir/i-am-a-homosexual/222268802110


Just thought it was interesting, and I hadn’t seen it mentioned anywhere before.  So I
thought I’d take a moment to point it out.  It’s probably good information for brands who are
trying to get their Facebook Pages indexed by Google, they can customize the URL to their notes however they
want to when they link to them from their websites (If any brand in the entire world does this, anyway).

Tuesday, December 15, 2009

Settings Needed on Twitter

  • The ability to block someone from showing up in your timeline, but
    not block them from following you.
  • The ability to allow users to send you DMs, even if
    they’re not following you (and block them from doing so on an individual basis).
  • The
    ability to see all @replies from your friends – I WANT THIS BACK

That is all.

Hunting Down the Bugs – TwCLI on Chrome for Linux Beta

This is the first post of a new series, looking at some of the odder
bugs encountered while developing for the expanding Web, no matter how basic a bug it may be.


Thanks to twitter user @paperfairy,
a bug was discovered on my Command Line Twitter Client, href="http://twcli.koneko-chan.net/" rel="me">TwCLI.

For some reason, when
submitting a command in Chrome for Linux, the page would simply refresh, and the command would never be
sent.  At first, I had no possible way to track down this bug.  I didn’t have a linux box
(with a GUI, anyway) so I simply told him that it was unfortunate, but it’d have to stay a bug. 
Until a rel="nofollow">recent post on lifehacker brought my attention to href="http://lifehacker.com/5195999/portable-ubuntu-runs-ubuntu-inside-windows">Portable Ubuntu.
I immediately installed it, opened up the Chrome website in Firiefox, installed Chrome Beta, and headed over
to TwCLI to see what was amiss.

Of course, it was a single line in a detection script to
send Geo-Data to Twitter (as long as the user approved it, of course):

style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom:
4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%;
padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr;
max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right:
silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
else             style="color: #0000ff">if(google.gears) {




This
single line was throwing an exception I hadn’t encountered in other browsers – Google wasn’t defined. 
Oddly, I thought it would handle that properly, since google wasn’t defined, it would just skip over it, but
instead it threw an error and halted all further javascript code.



The
fix was simpler than tracking down the bug, I simply had to add this to the start of the javascript code:



style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom:
4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%;
padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr;
max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right:
silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt;
border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px;
font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none;
color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">

try{ if(!google)
{ google = 0; } } catch(err) { google = 0; }






And
voila, I had both a check for google, and a catch if it decided to throw errors while checking for it.



Whether
this is a Chrome bug or not, I don’t know – I simply don’t know enough about JavaScript in order to say so
either way.  But, are undefined variables supposed to throw errors, or are they simply supposed to
return false?

Friday, December 11, 2009

JavaScript & CSS3 Lightbox

src="http://gist.github.com/254614.js?file=css3_lightbox.js">


Usage:


  • Call createLightbox(); to create the actual lightbox element (does
    not display anything).

  • Call fillLightbox(string
    content) to fill the lightbox with RAW HTMLor

    Call
    appendLightbox(element childElement)
    to append a DOM Node directly into the lightbox.

  • Call setLightboxSize(int
    width, int height, null, string unit) to set
    the width and height of the lightbox.  Unit will default to pixels “px” if not specified.


  • Call showLightbox() to actually display the lightbox to the user.


  • Call boolean lightboxVisible() to determine if
    the lightbox is still visible or not.

  • Call hideLightbox()
    to remove the lightbox from view.

  • Call cleanLightbox()
    to delete all content inside the lightbox container.

Thursday, December 10, 2009

Quickly Romanize Japanese using Google Translate

style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top:
0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image"
src="http://tech.gtaero.net/wp-content/uploads/2009/12/image_thumb.png" width="504" height="284" />

For those starting to learn Japanese, you may be stuck trying to figure out how to
pronounce some new Kanji you just found (at least, in their current sentence).  Normally, you’d
have to look in a Jisho (Dictionary) and try to figure out how they might be modified in their current form. 
Luckily, Google Translate is much, much more helpful.

Just plug in the Japanese, tell it
to translate from Japanese to Japanese, and then click the “Show Romanization” button and voila! 
You have instant Romanization of your unknown kanji.  Of course, in order for you to make use of
Google’s output, you might need to know some language constructs.

For example, in the
image above we see Google says “Ganba~tsu te” where we had “頑張って.”  Knowing how っ works, we’re able
to deduce that Google meant Ganbatte.

Wednesday, December 9, 2009

5 Top Publishers Plan Rival to Kindle Format, Ignore Existence of PDF

Five of the nation's largest publishers of newspapers and
magazines are teaming up to challenge Amazon.com Inc.'s Kindle electronic-book reader with their own
technology that would display in color and work on a variety of devices.
- Ryan
Nakashima, The
Washington Post
.

As I’m sure you all know by
now; I am a coder above all else.  With this one piece of data, you should know there are two
things I despise in this entire world:

  • Flash and

  • PDF

Why?  Because they’re closed off, proprietary, and
quite frankly a bitch to deal with on computers.  However, that doesn’t stop me from advocating
their use for WHAT THEIR ACTUAL PURPOSE is (or, in the case of flash – should be).

So, it
should come as only a slight surprise that I’m incredibly agitated over these new formats.  You’re
creating “book” file formats that will “display in color” and “work on a variety of devices.”  Huh,
isn’t there already a format specifically for publications, made to work on any multitude of devices? 
Let’s see, oh, right Portable
Document
Format
– A
file format made SPECIFICALLY to render the same way on any device.

Kudos, Publishers –
You’ve just re-invented the wheel.

Thursday, December 3, 2009

I’m sorry but we need government

href="http://protoblogger.com/2009/12/03/im-sorry-but-we-need-government/">by Dave Winer on Protoblogger

/>When I was coming of age, in the time of Watergate and Vietnam, like many others I was so fed up with
government, that I came to believe that we needed to fuck up the government so it could stop fucking with
us. The United States was bad, that’s what we thought, and there was a lot of justification for that point
of view. I voted for Reagan, as a lot of other people did, because he said what we believed. Let’s get on
with doing our thing, and keep the government from screwing up. Of course it turns out that isn’t what
Reagan was doing, he was just saying that to get our votes. Figures.

LOL @ 1984

style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top:
0px; margin-right: auto; border-right: 0px" title="Cadets listen to the President Barack Obama's
speech at the U.S. Military Academy at West Point in West Point, N.Y., Dec. 1, 2009. (Official White House
Photo by Pete Souza) This official White House photograph is being made available only for
publication by news organizations and/or for personal use printing by the subject(s) of the photograph. The
photograph may not be manipulated in any way and may not be used in commercial or political materials,
advertisements, emails, products, promotions that in any way suggests approval or endorsement of the
President, the First Family, or the White House. " border="0" alt="Cadets listen to the President Barack
Obama's speech at the U.S. Military Academy at West Point in West Point, N.Y., Dec. 1, 2009.
(Official White House Photo by Pete Souza) This official White House photograph is being
made available only for publication by news organizations and/or for personal use printing by the subject(s)
of the photograph. The photograph may not be manipulated in any way and may not be used in commercial or
political materials, advertisements, emails, products, promotions that in any way suggests approval or
endorsement of the President, the First Family, or the White House. "
src="http://tech.gtaero.net/wp-content/uploads/2009/12/4153678305_0d253070f7_o11.jpg" width="454"
height="305" />

Look, I’m not going to play the political game here – I LOVE
Obama and even though I don’t agree with his recent decision on the Afghan War will continue to support him
– but seriously, giving your speech at a Military Academy?  I couldn’t have possibly kept myself
from commenting on how funny it is that almost your entire audience is dressed nearly IDENTICALLY.


How can you not compare this event to the 1984 stereotype?

For reference, the
Apple 1984 Commercial (remake):

id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:61bb014e-df5f-4734-b04a-5baf5896391f"
class="wlWriterEditableSmartContent">
name="movie" value="http://www.youtube-nocookie.com/v/BxShzoUjiAQ&hl=en_US&fs=1&rel=0&hd=1"> name="allowFullScreen" value="true"> src="http://www.youtube-nocookie.com/v/BxShzoUjiAQ&hl=en_US&fs=1&rel=0&hd=1"
type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480"
height="385">

Tuesday, December 1, 2009

Word 2010 Blogging

Toying around with the interface for publishing blog posts in Microsoft Word
2010 Beta.

src="http://tech.gtaero.net/wp-content/uploads/2009/12/120109_2055_Word2010Blo1.png" alt=""/>

It truly is fascinating, but I don't think it'll manage to replace Windows Live Writer,
which definitely has a much better, and more blog-specific user interface.