AdSense Mobile Ad

Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Thursday, April 5, 2012

Readability: An Alternative to Safari Reader for Google Chrome Users

The title of this blog post is intentionally misleading: Readability, in fact, was the project that "inspired" the Safari Reader. Nevertheless, many OS X users start using Safari as their first browser and, when switching to other browsers such as Google Chrome, tend to thinking that Safari Reader was the first implementation of such an idea.

Google Chrome has been experiencing a rapid growth since its inception and I recognize it's a great browser that shines, above all, for its speed. However, I never really switched away from Safari for the same reason I haven't switched away from iChat, iCal or Mail, either. Which one? Because of its tight integration, even across multiple Apple devices.

However, running multiple browsers side by side poses no problems and it's pretty common nowadays (most web developers are compelled to do so while testing their applications). Despite being a strong Safari user, Chrome is the browser I use while accessing Google's own services (such as Google+, GMail, Calendar and Blogger).

When Safari Reader made its appearance, I wasn't really impressed and wondered whether I would really use it. I was wrong. I find it's very useful. Not only to actually read a cleaned-up version of a web page (many websites already provided a specific CSS for printing that you can use for this purpose). Safari Reader lets you convert its output to PDF (using the standard OS X print dialog) or send that PDF by email with just one click.

Safari Reader - Toolbar

When I started using Google Chrome, the Reader was the feature I missed the most.

Readability

Readability is a Chrome extension that provides Reader-like features to Google Chrome. In fact, as stated earlier, Readability is the project that inspired Safari Reader (sometimes, though, inspirers are more obscure that fine-tuned copies). To install readability, just open the Chrome Web Store, search for Readability, and install it:

Chrome Web Store - Readability Application

Once you install it, it will be immediately available without even restarting your browser.

You can access the Readability features by using its icon in the Chrome toolbar or using one of its keyboard shortcuts (more on this later).

Chrome Toolbar - Redability icon

Clicking the Readability icon will open its main menu and you soon realize that it offers more than the Safari Reader does: you can Read Now (the equivalent feature of Safari Reader), you can Read Later (Safari also offers this: it's called Reading List) and you can Send to Kindle.

Redability Menu

In this post we will only focus on the Read Now feature. Here's the same New York Times articles as shown by Readability:

Readability

In my opinion, apart from correctly displaying far more pictures than Safari Reader does (as well as some ad too), Readability produces better-looking previews of most web pages I visit.

The features that the "preview" window offers are superior to Reader's:
  • You can print the article (and produce PDF files).
  • You can tweak the page appearance.
  • You can send the converted article by mail.
  • You can share it on social networks (Twitter and Facebook are currently supported).
  • You can produce a short URL to it.

Small Glitches on OS X

I don't know how many OS X are really affected by this issue (given their historic idiosyncrasy to using the keyboard :), but Latin languages speakers (such as Italian and Spanish) surely are.

First of all: the OS X keyboard shortcut to cycle between the windows of an application is ⌘-` (Command-`). Guess which is the default keyboard shortcut that Readability assigns to some of its functions? Yes, you're right. The ` character.

I really don't know what the developers were thinking about when they chose this character. They surely aren't Latin languages speakers, otherwise they would have devised how often this character is used. And they surely aren't Mac users either, otherwise they would have realized how annoying it is, too.

Don't worry, though. They're really easy to change. Just right-click over the Readability icon and choose Options. In the configuration window, just assign the keyboard shortcuts you like or do as I did: disable them all.

Readability - Keyboard Shortcut Configuration

Conclusion

This blog post is not about which browser you should use: it's your choice and, as I stated, you can run multiple ones side-by-side. However, many Safari users switching from Safari often look to alternatives to the Safari Reader as well.

If you're using Chrome, you're lucky because the Readability extension provides the same features provided by the Safari Reader (and even more). Moreover, in my opinion the layouts produced by Readability are superior and far better looking than those produced by Safari Reader. You'll be surprised.

Wednesday, December 21, 2011

Google Authenticator: Using It With Your Own Java Authentication Server

The Google Authenticator application for mobile devices is a very handy application that implements the TOTP algorithm (specified in RFC 6238). Using Google Authenticator you can generate time passwords that can be used to authorize users in an authentication server that shares the secret key of the requesting users.

Google Authenticator is mainly used to access Google services using two-factor authentication. However, you can take advantage of Google Authenticator to generate time based password to be authenticated by a server of yours. The implementation of such a server is pretty simple in Java and you can get some inspiration getting the source code of the Google Authenticator PAM module. In this blog post, we will go through a simple implementation of the TOTP algorithm in a Java class.

Generating the Secret Key.

To generate the secret key we will use a random number generator to fill up a byte array of the required size. In this case, we want:
  • A 16 characters Base32 encoded secret key: since Base32 encoding of x bytes generate 8x/5 characters, we will use 10 bytes for the secret key.
  • Some scratch codes (using Google's jargon).

// Allocating the buffer
byte[] buffer =
  new byte[secretSize + numOfScratchCodes * scratchCodeSie];

// Filling the buffer with random numbers.
// Notice: you want to reuse the same random generator
// while generating larger random number sequences.
new Random().nextBytes(buffer);

Now we want to extract the bytes corresponding to the secret key and encode it using the Base32 encoding. I'm using the Apache Common Codec library to get a codec implementation:

// Getting the key and converting it to Base32
Base32 codec = new Base32();
byte[] secretKey = Arrays.copyOf(buffer, secretSize);
byte[] bEncodedKey = codec.encode(secretKey);
String encodedKey = new String(bEncodedKey);

Loading the Key Into Google Authenticator

You can manually load the key into Google Authenticator, or generate a QR barcode to have the application loading it from it. If you want to generate a QR barcode using Google services, you can generate the corresponding URL with a code such as this:

public static String getQRBarcodeURL(
  String user,
  String host,
  String secret) {
  String format = "https://www.google.com/chart?chs=200x200&chld=M%%7C0&cht=qr&chl=otpauth://totp/%s@%s%%3Fsecret%%3D%s";
  return String.format(format, user, host, secret);
}

Verifying a Code

Now that we've generated the key and our users can load them into their Google Authenticator application, we need the code required to verify the generated verification codes. Here's a Java implementation of the algorithm specified in the RFC 6238:


private static boolean check_code(
  String secret,
  long code,
  long t)
    throws NoSuchAlgorithmException,
      InvalidKeyException {
  Base32 codec = new Base32();
  byte[] decodedKey = codec.decode(secret);

  // Window is used to check codes generated in the near past.
  // You can use this value to tune how far you're willing to go. 
  int window = 3;
  for (int i = -window; i <= window; ++i) {
    long hash = verify_code(decodedKey, t + i);

    if (hash == code) {
      return true;
    }
  }

  // The validation code is invalid.
  return false;
}

private static int verify_code(
  byte[] key,
  long t)
  throws NoSuchAlgorithmException,
    InvalidKeyException {
  byte[] data = new byte[8];
  long value = t;
  for (int i = 8; i-- > 0; value >>>= 8) {
    data[i] = (byte) value;
  }

  SecretKeySpec signKey = new SecretKeySpec(key, "HmacSHA1");
  Mac mac = Mac.getInstance("HmacSHA1");
  mac.init(signKey);
  byte[] hash = mac.doFinal(data);

  int offset = hash[20 - 1] & 0xF;
  
  // We're using a long because Java hasn't got unsigned int.
  long truncatedHash = 0;
  for (int i = 0; i < 4; ++i) {
    truncatedHash <<= 8;
    // We are dealing with signed bytes:
    // we just keep the first byte.
    truncatedHash |= (hash[offset + i] & 0xFF);
  }

  truncatedHash &= 0x7FFFFFFF;
  truncatedHash %= 1000000;

  return (int) truncatedHash;
}

The t parameter of the check_code method and verify_code methods "is an integer and represents the number of time steps between the initial counter time t0 and the current Unix time." (RFC 6238, p. 3) The default size of a time step is 30 seconds, and it's the value that Google Authenticator uses too. Therefore, t can be calculated in Java as

t = new Date().getTime() / TimeUnit.SECONDS.toMillis(30);

Download the Library

A ready to use library can be downloaded from GitHub, where Mr. Warren Strange kindly started a repository with the code from this post and packaged it in a Maven project. The library contains a complete implementation of the server-side code, better documentation and some example code in the test cases.

Conclusion

You can now use the Google Authenticator applications and use it to generate time based passwords for your users, authenticated against your own authentication server.

As you can see, the required code is pretty simple and all of the required cryptographic functions are provided by the runtime itself. The only nuisance is dealing with signed types in Java.

Enjoy!

Wednesday, May 19, 2010

Adding Google Analytics Tracking Code to JIRA

Some posts ago I described how you can easily add the Google Analytics Tracking Code to your Confluence instance.

In the case of JIRA it's just as easy although it might not be intutiive: the quickest place where you can put the Google Analytics Code is in the "Announcement Banner." As of JIRA 4.1, Pasting your Analytics code there won't have any side-effect in the way the JIRA user interface appears in your browser. And yes, you will still be able to add an announcement banner text.

Sunday, February 28, 2010

Adding Google Analytics tracking code to Confluence

If you're using Atlassian Confluence as your content management system and you'd like to collect statistical information about its web traffic, Google Analytics is probably the tool you're looking for.

Google Analytics is an extremely powerful and flexible tool: I'm using it to monitor the web traffic to the sites I own and I'm very happy with it. Getting started with Analytics is very simple: just install the tracking code in the pages whose web traffic you want to monitor.

If you're using Confluence it's pretty easy to do: Confluence uses a flexible templating engine and modifying a page layout for a given space is straightforward indeed.

If you want to monitor all of the web traffic to your Confluence instance, though, the best option is using the Custom HTML option in Confluence Administration ConsoleCustom HTML lets you define fragments of HTML code to be inserted in the following positions in the generated page:

  • At the end of the HEAD tag.
  • At the beginning of the BODY tag.
  • At the end of the BODY tag.


Just insert your Google Analytics tracking code in the appropriate place, which is usually at the end of the BODY tag and you're done! Your Confluence web traffic statistics are now being collected by Analytics.


If you're willing to experiment, Google has recently launched an asynchronous version of its Analytics tracking code which improves load times and accuracy, amongst other benefits. More information can be found here.


Sunday, September 27, 2009

Googlle?


As I'm a customary animal, everyday I open my browser and go along the same Internet path. As I'm a faithful Google user, one of the pages I often open is iGoogle. Today I thought my eyes were failing when I realized I was seeing the simplest and oddest Google doodle I've ever seen. Who can I ask about it? Google, of course. The first thing I did was saving that doodle to the disk and its very name gave the answer:
11th_birthday.gif.

Happy birthday Google!

Pushing gmail to your iPhone (without GPush)

As I told you some posts ago I bought GPush and struggled to make it work. At the end I started to be notified about incoming mail, although with some glitches from time to time. Now, very shortly after GPush was released, you don't need it anymore: Google Sync is now pushing mail to your iPhone.

This is really good news because now you can sync your mail, your calendar and your contacts with your iPhone. As I was already using Google Sync for contacts and calendars, setting up GMail push was really easy: just the flip of a switch!



If you haven't set up your Google Sync account on your iPhone, just follow the instructions on the Google Sync web site.

As far as I can tell, mail is pushed to the iPhone almost instantaneously. Nonetheless, there's a thing I'm not really happy about. I miss is a notification popup: no one is ever shown and the counter on the mail icon is the only information you're given when a mail is pushed:


I would expect a mail to be managed just like an SMS or even a phone call: checking periodically sort of defies the purpose of a push notification...

Wednesday, August 26, 2009

An update about GPush: it finally seems to work

If you're part of the club that wanted Google mail pushed onto your iPhone, the release of the GPush application did sound like good news. Unfortunately the application hasn't worked that well after its release and people started to complain. I was one of them: in this blog and directly to Tiverias Apps.

It was probably a scalability problem: they never tested an application with such a great number of users and GPush wasn't exactly the kind of application that passes unobserved. We were waiting for it! On its website support page Tiverias Apps has been constantly giving feedback to the users about the problems that we were experiencing. Finally I'm glad to state the following: GPush is working flawlessly for me since a couple of days.

There's some glitch, still, but I'm confident they will be resolved in a GPush application update. Specifically, I still can't change my account settings without uninstalling and reinstalling the application. It just ignores the change.

It was worth what I paid for it.

Update: You don't need GPush anymore if you want to have your google mail pushed to your iPhone.

Thursday, August 20, 2009

Don't buy GPush (yet): it's not working

So happy was I, yesterday: I thought my emails were going to be pushed to my iPhone, thanks to GPush, something many users were waiting for.

Yesterday I bought the application and I had no problem configuring it. It's a pity that, since then, I just receive one (yes: one...) notification. After that, silence.

Tiverias Apps, GPush producers, states that they're experiencing problems with their servers and that their developers should have isolated the code paths which are causing the problems that we're experiencing. Just hope it's not a scalability issue: sending push notifications to a great number of GMail users seems no easy job to me.

If you feel like buying the app, please wait for these problems to be solved.

Update: GPush has started to work.

Wednesday, July 29, 2009

Google Voice banned from the App Store. No VoIP, no Skype, no Voice. Which application will be killed next?

The title is ironice. Skyp, indeed, is there, but Skype calls over 3G aren't allowed due to contractual restrictions. Taking into account that Skype won't stay logged in unless you don't keep the application open, I fail to understand what should the application worth for. Anyway, today, while checking the news, I stumbled upon this article.


Earlier today we learned that Apple had begun to pull all Google Voice-enabled applications from the App Store, citing the fact that they “duplicate features that come with the iPhone”.


Oh yes, the iPhone is a phone. Using your voice to make calls indeed seems a functionality duplication. But that's not the point. The point is that Apple has created sort of an ecosystem (which is exaggeratedly proud of) around the iPhone SDK and the App Store. It seems that things are all there to start a developers' competition. Something which, in principle, goes at progress' and users' sake. With some gotchas, to use an euphemism. The reality is bitter than that: Apple itself is a blocker. Its dos and don'ts too often play against the end users' interest, as is the case with its Google Voice ban. AT&T being the evil behind the scene is not a justification to me. It's Apple who's banning. I won't either comment on Apple's ethics, if it's true that Kovacs himself personally approved Google's project. Was it true... well, it would simply confirm that Apple's more interested to worthy compromises rather than its users, which are still a wealthy niche.


This brings me back to the adagio: open or closed platforms (and formats)?

Wednesday, July 22, 2009

Syncing your Google contacts and calendars on your iPhone with Google sync

And got a bit of push, too (without paying a dime).

Instead of uselessly duplicate your information over the net (or paying Apple for its expensive Mobile Me service), you can just use Google and synchronize the information you need on your iPhone. The instructions are very easy and can be found on Google Sync home page. Basically the service uses aMicrosft Exchange account to set up synchronization for contacts, calendars and, who knows, possibly mail in the future.

I'm very happy with the service. That's the best approximation to push I've reached so far with my iPhone.

Just one warning for non-English users: when I did set up my iPhone, I went to the Sync home page with the iPhone integrated web browser just to discover that the service is not yet available for my phone model. That message was shown in Spanish language. Switching Google's language to English let me access the Sync service options instead.

Thursday, July 9, 2009

Google Apps are out of beta

Yesterday I was talking about the Google Chrome OS, the clearest move Google has done in order to provide a lightweight OS and a set of (enterprise) application running entirely in their servers on web.

Today Google did another step forward announcing that Google Apps have ended their beta program. We all know that Google beta tags have been sticking around for years, in some cases: Gmail is such an example. Nevertheless, Google has been offering such applications to enterprises with service level agreements and support around the clock. Beta doesn't frighten me, if it's a Google tag. This announcement isn't surprising either, it was just a matter of time. The interesting thing is the timing: the Chrome browser, the Chrome OS, now Google Apps. Google's engines are hot since a long time, now I'm just waiting for the big move. Google is boldly going where no enterprise has gone before: will they succeed in beating Microsoft where no OS and no application hasn't succeeded yet? I'm speaking about an OS for mobile phone (Android vs. Windows Mobile) or netbooks (Chrome OS vs. Windows, no PCs, though), office applications (Google Apps vs. Microsoft Office), enterprise servers (Google Apps vs. Microsoft Exchange)?

I'm really looking forward to knowing who will win this battle. I'm a Solaris freak, nevertheless I'd really like a Linux-centric enterprise to win such a game. It would be a win for open source software. It would mean real competition and it would benefit the real winners: the users.

Wednesday, July 8, 2009

Google introduces the Chrome OS

On July 7th Google has introduced its brand new web-centric operating system: the Google Chrome OS.

The official statement leaves no doubt:
Google Chrome OS is being created for people who spend most of their time on the web [...]
It also makes it clear how Google's OS vision different from Microsoft's. Internet Explorer was born and still is an extension of the Windows OS. Google Chrome OS is a natural extension of Google Chrome, Google's browser.

Years have passed since Sun was claiming that The network is the computer. It clearly was too early, but the path was laid. Google's innovation haven't only been technical, Google has really changed the way users experience the web and their web applications.

Google has undoubtedly dominated the market of search engines, changing the way we search for information and the quality standards we demand. Search engines quality have been measured against Google, since then.

Years later, there came Google Mail. Once more, Google changed the way users use their mail and their expectations. Mail was everywhere. No need to set up a mail client or fall back to a cluttered web interface. No need to constantly delete messages because mails were being bounced back because of mailbox space exhaustion. Competitors, at the end, had to adapt. Google mail was so fast (at least as far as it concerns an email provider) and mailbox size was so big that even libraries appeared to mount a mailbox inside an UNIX OS.

Since then, Google introduced more and more services (which enjoyed pretty different levels of fortune). Some of these products, such as Google Docs, were one of the first tries, at least as far as it concerns such big an entity, to move native desktop applications to the web. The next step seems to be, finally, to move the OS, at least for the users who just live in the web. Google is promising that Google Chrome OS-powered PCs will just work, such as any other home appliance you're using. Sort of on/off OS which starts up in a few seconds (I said few seconds) and connects you to the net.

I think it's not only just a good idea. There are great examples out there of this way of rethinking and approaching the user experience. Think about Google Android, the iPhone OS, or even the Mac OS/X itself. It's pretty much a (slower) electrodomestic with its power on button and there you are. A (beautiful) desktop and all the apps the typical users need. And much more. The iPhone its a step further towards simplicity, although it's obviously not comparable with a netbook, it still is more a PC than a cellular phone.

I'm not the kind of user targeted by Chrome OS. Neither by OS/X. I'm a (nostalgic and) efficient CLI gui. But I think it's time for users such as my sister and my father to just:
  • buy a machine wondering about its color and not about its RAM
  • unpack it
  • power it up
  • use it!
without all the hassle which, inevitably, comes with standard (or legacy?) OSs we're accustomed to. Mac OS/X is the latest and greatest approximation to this philosophy. That's why Apple succeeded in pushing an UNIX into the desktop of so many users. It's not just aesthetic and fashion. Mac OS/X powered machines just do their job. Well. And moreover they're aesthetically pleasant. What would an user desire?

I wonder if this announcement will reignite an OS war.

Tuesday, February 24, 2009

GMail has gone down (and it seems I lost some setting...)

It's sort of a news I won't tell you anything new because all of the world is talking about this: GMail has been down for hours and Google hasn't (yet) given any explanation about the service outage. The thing that drives me crazy it's that it seems I lost the labels' configuration: they all reset their color to that pale yellow they had before customizing (each of) them.

Yes, it's not that bad: I could have lost data, who knows... and it wouldn't be the first time for it to happen with GMail. But these little details throw a shadow about the reliability of a service I'm running without any concern or doubt about its stability. I'm acting as if I thought it was absolutely bullet-proof. I do no gmail backup and never store a copy of my emails in any of the computers I use. I don't even backup my contacts or calendar details.

My fault, I admit, but Google service quality and ubiquity made me accustom to them: I know they're there, when I want, wherever I want, whichever device I could be using.

Should think about that very famous beta tag and value my personal data for what they're worth.

Edit on 02/25/2009: Today I opened the browser and discovered that the settings made their way back into my account! Google accustomed us to high levels of service and we tend to magnify the importance of every problem, even though taking into account the critical importance these services have for the tenths of thousands of users that every day log in in Google servers. If I paid for it, I would expect something more from it, especially in terms of post-mortem diagnosis and explanations from Google. Today, I still don't know what happened yesterday to GMail.

Saturday, January 17, 2009

Google Chrome internet browser loses its beta label

After a testing phase unusually short for Google's standards, the Mountain View internet browser has already lost its beta label. The announcement was published on 12/11/2008 with an official google blog post. Google promises improvements in many areas including:
  • Stability and plugins: many bug fixes were related to media playback, especially in the case of video playback. This new version of Google Chrome should deliver a much better user experience and a higher availability of plugins for the browsers. To say the truth, indeed, plugins were something that the few Google Chrome users were really missing.
  • Performance: the already fast Google Chrome and its V8 JavaScript engine has been improved and benchmarks show an 1.4x improvement
  • Bookmarks and privacy: this new version of the browser deliver a less geeky configuration user interface. Privacy and security related options are now grouped together with detailed explanations for the novice. Data import from other browsers' configuration sets have been improved. Bookmark management has been improved too, with a particular attention for bookmark bulk management, in the case you have tons of bookmarks to import and export
I'm very curious and I'll have a Google Chrome test drive on a Windows image running on Sun xVM VirtualBox. Google has also announced an extension platform and support for Mac OS X and Linux, but I don't think this will help seeing Google Chrome running on Solaris very soon...

Wednesday, November 12, 2008

Google launches voice chat for gmail users and google talk users (and why I'm not going to use it)

Once more, winds of innovation come from Mountain View. Google has launched another offensive against Microsoft and... Skype. Yes, because it just added new voice and video call support into google chat and gmail.

Since the first time I saw the spartan google search engine main page, I felt sympathy for Google and the quality of its software (well, google software I use) never deceived me. I'm not the average user: as soon as I login I open a terminal window and start typing, rather than moving a mouse. Even in gmail I use the keyboard interface. The real Google revolution, in my opinion, it's in the fact that even in a world in which the great majority of the host operating systems is Windows (sadly), when an user logs in he usually opens up a browser and "googles" for something, looks for addresses or routes in Google maps, manages its photos with Picasa, writes its blog with Google docs and shares it with blogger, etc. Summarizing: the real desktop, for many people, is made up of a browser and Google software.

When people realize that they can speak and see their friends at the eyes without even leaving the gmail tab in their browsers, they'll probably uninstall (or leave there to rot) their copies of Skype or similar software. This is partially true, in reality, because Skype users often call landlines phones but at the end, there'll be a reason less to rely on Skype or Microsoft Messenger.

I'll be clear: I like what Google does, and I like the way Google does it, most of the times. I use Google software every day and, as far as it concerns my out-of-business activities, Google is probably the provider of most of the software I use. Google search engine, Gmail, Google docs, Google calendar, Google reader and so on: they're all part of the toolbox I use every day. I don't even feel like making the list, because probably I could just cut and past the list of Google software and remove a few entries.

Now, why am I not going to use it, then? Well, I would really like to explore this new functionality and satisfy my (technical and non) curiosity without having to look for information on the net. But I can not, because I'm a 95% Solaris user and the remaining 5% I'm a GNU/Linux user. And the beta version of this service, which relies on a browser plugin, is only available for Windows users and I'm not hoping to see it, ever, on Solaris. Just as it happens with Skype and many other proprietary software. If I were a 100% GNU/Linux user, moreover, I would probably be disappointed: my experience with GNU/Linux versions of some software bundles (such as Skype) is negative. Skype for Linux sucks (even more when compared with Windows or Mac OS X editions), and Picasa for Linux is even worse: I never thought I would see a customized Wine distribution to run a Windows binary on GNU/Linux, and less if who's doing this is Google. And I won't talk about Apple, who left us without Quicktime even if it ported ZFS on Mac OS X ;)

I won't trade off the proverbial stability of my Solaris for another OS. Neither I'll run (yet another) branded zone just to play with that plugin. I'll stick with VoIP and you, who can, enjoy.