Development by Davis

Headlines

domingo, 30 de septiembre de 2012

Development by Davis

Development by Davis


Language Translator for Windows 8 Now Available!

Posted: 29 Sep 2012 08:54 AM PDT

Been working on porting my Translator to a Windows Store app and it is finally published!

Go get it here.

screenshot_en_01

Most features available in the Windows Phone and Desktop versions of the Translator are also available in this new version. However there is one new feature, available only thanks to Windows 8, that was my main driver to create this new port. This new feature allows you to send text for automatic translation directly from any other Windows Store app that supports sharing.

To send text for automatic translation from any Windows Store app that supports sharing:

1. Select some text in the Windows Store app, open the Windows 8 charm bar and tap on the Share charm.

screenshot_09292012_083809

 

2. On the Share charm tap on Language Translator.

screenshot_09292012_083706

 

3. The Language Translator will slide from your right, will auto detect the language of the text you shared and will immediately provide you a translated version in your language of choice.

screenshot_09292012_084150

 

If you find yourself using the Language Translation very frequently, you can take advantage of Windows 8 snapped view to snap the Language Translator to any side of your screen. It will resize properly and stay there for quick access for as long as you need it.

screenshot_en_04

 

I hope you enjoy using it as much as I enjoyed working on it. Please send me any feedback you might have on the Language Translator and, if you like it, would appreciate if you can rate it in the store.

 

Julio



sábado, 29 de septiembre de 2012

Development by Davis

Development by Davis


Coding for good: Highlights from the open source humanitarian movement

Posted: 28 Sep 2012 04:00 AM PDT

open source lightning talks

HFOSS, Humanitarian Free and Open Source Software, is a movement inspired first by the December 2004 Asian tsunami, and then by other humanitarian needs in the health, civic, finance and academic sectors (especially for women and people of color).

Leslie Hawthorn, part of Red Hat's Community Action and Impact team, gives example after example of how HFOSS has improved and made possible disaster preparedness and relief programs, as well as empowered other projects:

read more


This posting includes an audio/video/photo media file: Download Now

viernes, 28 de septiembre de 2012

Development by Davis: “Gamer contest hosted by Mozilla, Creative Commons, and others” plus 2 more

Development by Davis: “Gamer contest hosted by Mozilla, Creative Commons, and others” plus 2 more


Gamer contest hosted by Mozilla, Creative Commons, and others

Posted: 28 Sep 2012 02:00 AM PDT

Liberated Pixel Cup

The Liberated Pixel Cup is a two-part gaming contest. The first part involved participants who submitted art for the games. The second part, discussed here, focuses on the games themselves. The contest is organized by Creative Commons, Free Software Foundation, OpenGameArt, and Mozilla.

read more


WordPress 3.5 Beta 1 (and a bonus!)

Posted: 27 Sep 2012 03:37 PM PDT

I'm excited to announce the availability of WordPress 3.5 Beta 1.

This is software still in development and we really don't recommend that you run it on a production site — set up a test site just to play with the new version. To test WordPress 3.5, try the WordPress Beta Tester plugin (you'll want "bleeding edge nightlies"). Or you can download the beta here (zip).

In just three short months, we've already made a few hundred changes to improve your WordPress experience. The biggest thing we've been working on is overhauling the media experience from the ground up. We've made it all fair game: How you upload photos, arrange galleries, insert images into posts, and more. It's still rough around the edges and some pieces are missing — which means now is the perfect time to test it out, report issues, and help shape our headline feature.

As always, if you think you've found a bug, you can post to the Alpha/Beta area in the support forums. Or, if you're comfortable writing a reproducible bug report, file one on the WordPress Trac. There, you can also find a list of known bugs and everything we've fixed so far.

Here's some more of what's new:

  • Appearance: A simplified welcome screen. A new color picker. And the all-HiDPI (retina) dashboard.
  • Accessibility: Keyboard navigation and screen reader support have both been improved.
  • Plugins: You can browse and install plugins you've marked as favorites on WordPress.org, directly from your dashboard.
  • Mobile: It'll be easier to link up your WordPress install with our mobile apps, as XML-RPC is now enabled by default.
  • Links: We've hidden the Link Manager for new installs. (Don't worry, there's a plugin for that.)

Developers: We love you. We do. And one of the things we strive to do with every release is be compatible with all existing plugins and themes. To make sure we don't break anything, we need your help. Please, please test your plugins and themes against 3.5. If something isn't quite right, please let us know. (Chances are, it wasn't intentional.) And despite all of the changes to media, we're still aiming to be backwards compatible with plugins that make changes to the existing media library. It's a tall task, and it means we need your help.

Here's some more things we think developers will enjoy (and should test their plugins and themes against):

  • External libraries updated: TinyMCE  3.5.6. SimplePie 1.3. jQuery 1.8.2. jQuery UI 1.9 (and it's not even released yet). We've also added Backbone 0.9.2 and Underscore 1.3.3, and you can use protocol-relative links when enqueueing scripts and styles. (#16560)
  • WP Query: You can now ask to receive posts in the order specified by post__in. (#13729)
  • XML-RPC: New user management, profile editing, and post revision methods. We've also removed AtomPub. (#18428, #21397, #21866)
  • Multisite: switch_to_blog() is now used in more places, is faster, and more reliable. Also: You can now use multisite in a subdirectory, and uploaded files no longer go through ms-files (for new installs). (#21434, #19796, #19235)
  • TinyMCE: We've added API support for "views" which you can use to offer previews and interaction of elements from the visual editor. (#21812)
  • Posts API: Major performance improvements when working with hierarchies of pages and post ancestors. Also, you can now "turn on" native custom columns for taxonomies on edit post screens. (#11399, #21309#21240)
  • Comments API: Search for comments of a particular status, or with a meta query (same as with WP_Query). (#21101, #21003)
  • oEmbed: We've added support for a few oEmbed providers, and we now handle SSL links. (#15734, #21635, #16996, #20102)

We're looking forward to your feedback. If you break it (find a bug), please report it, and if you're a developer, try to help us fix it. We've already had more than 200 contributors to version 3.5 — come join us!

And as promised, a bonus:

We're planning a December 5 release for WordPress 3.5. But, we have a special offering for you, today. The newest default theme for WordPress, Twenty Twelve, is now available for download from the WordPress themes directory. It's a gorgeous and fully responsive theme, and it works with WordPress 3.4.2. Take it for a spin!


This posting includes an audio/video/photo media file: Download Now

AMD AppZone Brings Graphics-Accelerated Windows and Android Apps to PCs Worldwide

Posted: 27 Sep 2012 12:00 AM PDT

AMD (NYSE: AMD) today announced the launch of AMD AppZone, an online showcase for applications and games accelerated by AMD Radeon™ graphics processing units (GPUs) and AMD accelerated processing units (APUs). In addition to featuring some of the most recognizable PC game...


jueves, 27 de septiembre de 2012

Development by Davis: “The new software hygiene: Declare a license or risk losing participation” plus 4 more

Development by Davis: “The new software hygiene: Declare a license or risk losing participation” plus 4 more


The new software hygiene: Declare a license or risk losing participation

Posted: 27 Sep 2012 03:00 AM PDT

desire path

I had the privilege of working with David Tilbrook almost 25 years ago. He was the first person with whom I ever worked that clearly articulated proper software construction discipline for collaborative endeavours and captured a summary of it under the title, Washing Behind Your Ears: Principles of Software Hygiene.

read more


This posting includes an audio/video/photo media file: Download Now

Beth Noveck predicts two phases of open government in TED Talk

Posted: 27 Sep 2012 02:00 AM PDT

A new dawn

I recently watched a new TED Talk by the first and former White House Deputy CTO Beth Noveck, delivered in Edinburgh, Scotland. She is really the initial instigator of the modern open government movement in the United States and is now working to make it a reality worldwide. What I like best about her talk is the litany of examples that are happening all over the world—from painting the national budget on hundreds of walls so that locals can comment on it to a Texas wiki that lets citizens and businesses comment on regulations. Take a look:

read more


Google Play services and OAuth Identity Tools

Posted: 26 Sep 2012 12:27 PM PDT

Posted by Tim Bray

Google Play services has started to roll out and should arrive on virtually all Android 2.2+ devices with the Google Play Store in the very near future. At that point, all those devices will have new tools for working with OAuth 2.0 tokens. This is an example of the kind of agility in rolling out new platform capabilities that Google Play services provides.

Why OAuth 2.0 Matters

The Internet already has too many usernames and passwords, and they don't scale. Furthermore, your Android device has a strong notion of who you are. In this situation, the industry consensus is that OAuth 2.0 is a good choice for the job, offering the promise of strong security minus passwords.

Google Play services make OAuth 2.0 authorization available to Android apps that want to access Google APIs, with a good user experience and security.

Typically, when you want your Android app to use a Google account to access something, you have to pick which account on the device to use, then you have to generate an OAuth 2.0 token, then you have to use it in your HTTP-based dialogue with the resource provider.

These tasks are largely automated for you if you're using a recent release of the Google APIs Client Library for Java; the discussion here applies if you want to access the machinery directly, for example in sending your own HTTP GETs and POSTs to a RESTful interface.

Preparation

Google Play services has just started rolling out, and even after the rollout is complete, will only be available on compatible Android devices running 2.2 or later. This is the vast majority, but there will be devices out there where it's not available. It is also possible for a user to choose to disable the software.

For these reasons, before you can start making calls, you have to verify that Google Play services is installed. To do this, call isGooglePlayServicesAvailable(). The result codes, and how to deal with them, are documented in the ConnectionResult class.

Choosing an Account

This is not, and has never been, rocket science; there are many examples online that retrieve accounts from Android's AccountManager and display some sort of pick list. The problem is that they all have their own look and feel, and for something like this, which touches on security, that's a problem; the user has the right to expect consistency from the system.

Now you can use the handy AccountPicker.newChooseAccountIntent() method to give you an Intent; feed it to startActivityForResult() and you'll launch a nice standardized user experience that will return you an account (if the user feels like providing one).

Two things to note: When you're talking to these APIs, they require a Google account (AccountManager can handle multiple flavors), so specify GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE argument as the value for the allowableAccountTypes argument. Second, you don't need an android.accounts.Account object, you just use the email-address string (available in account.name) that uniquely identifies it.

Getting a Token

There's really only one method call you need to use, GoogleAuthUtil.getToken(). It takes three arguments: a Context, an email address, and another string argument called scope. Every information resource that is willing to talk OAuth 2.0 needs to publish which scope (or scopes) it uses. For example, to access the Google+ API, the scope is oauth2:https://www.googleapis.com/auth/plus.me. You can provide multiple space-separated scopes in one call and get a token that provides access to all of them. Code like this might be typical:

  private final static String G_PLUS_SCOPE =         "oauth2:https://www.googleapis.com/auth/plus.me";    private final static String USERINFO_SCOPE =           "https://www.googleapis.com/auth/userinfo.profile";    private final static String SCOPES = G_PLUS_SCOPE + " " + USERINFO_SCOPE;

In an ideal world, getToken() would be synchronous, but three things keep it from being that simple:

  1. The first time an app asks for a token to access some resource, the system will need to interact with the user to make sure they're OK with that.

  2. Any time you ask for a token, the system may well have a network conversation with the identity back-end services.

  3. The infrastructure that handles these requests may be heavily loaded and not able to get you your token right away. Rather than keeping you waiting, or just failing, it may ask you to go away and come back a little later.

The first consequence is obvious; you absolutely can't call getToken() on the UI thread, since it's subject to unpredictable delays.

When you call it, the following things can happen:

  • It returns a token. That means that everything went fine, the back-end thinks the authorization was successful, and you should be able to proceed and use the token.

  • It throws a UserRecoverableAuthException, which means that you need to interact with the user, most likely to ask for their approval on using their account for this purpose. The exception has a getIntent() method, whose return value you can feed to startActivityForResult() to take care of that. Of course, you'll need to be watching for the OK in the onActivityResult() method.

  • It throws an IOException, which means that the authorization infrastructure is stressed, or there was a (not terribly uncommon on mobile devices) networking error. You shouldn't give up instantly, because a repeat call might work. On the other hand, if you go back instantly and pester the server again, results are unlikely to be good. So you need to wait a bit; best practice would be the classic exponential-backoff pattern.

  • It throws a GoogleAuthException, which means that authorization just isn't going to happen, and you need to let your user down politely. This can happen if an invalid scope was requested, or the account for the email address doesn't actually exist on the device.

Here's some sample code:

       try {              // if this returns, the OAuth framework thinks the token should be usable               String token = GoogleAuthUtil.getToken(this, mRequest.email(),                                   mRequest.scope());              response = doGet(token, this);            } catch (UserRecoverableAuthException userAuthEx) {              // This means that the app hasn't been authorized by the user for access              // to the scope, so we're going to have to fire off the (provided) Intent              // to arrange for that. But we only want to do this once. Multiple              // attempts probably mean the user said no.              if (!mSecondTry) {                  startActivityForResult(userAuthEx.getIntent(), REQUEST_CODE);                  response = null;              } else {                  response = new Response(-1, null, "Multiple approval attempts");              }            }  catch (IOException ioEx) {              // Something is stressed out; the auth servers are by definition               //  high-traffic and you can't count on 100% success. But it would be               //  bad to retry instantly, so back off              if (backoff.shouldRetry()) {                  backoff.backoff();                  response = authenticateAndGo(backoff);              } else {                  response =                       new Response(-1, null, "No response from authorization server.");              }            }  catch (GoogleAuthException fatalAuthEx)  {              Log.d(TAG, "Fatal Authorization Exception");              response = new Response(-1, null, "Fatal authorization exception: " +                                  fatalAuthEx.getLocalizedMessage());          }

This is from a sample library I've posted on code.google.com with an AuthorizedActivity class that implements this. We think that some of this authorization behavior is going to be app-specific, so it's not clear that this exact AuthorizedActivity recipe is going to work for everyone; but it's Apache2-licensed, so feel free to use any pieces that work for you. It's set up as a library project, and there's also a small sample app called G+ Snowflake that uses it to return some statistics about your Google+ posts; the app is in the Google Play Store and its source is online too.

Registering Your App

Most services that do OAuth 2.0 authorization want you to register your app, and Google's are no exception. You need to visit the Google APIs Console, create a project, pick the APIs you want to access off the Services menu, and then hit the API Access tab to do the registration. It'll want you to enter your package name; the value of the package attribute of the manifest element in your AndroidManifest.xml.

Also, it'll want the SHA1 signature of the certificate you used to sign your app. Anyone who's published apps to Google Play Apps knows about keystores and signing. But before you get there, you'll be working with your debug-version apps, which are signed with a certificate living in ~/.android/debug.keystore (password: "android"). Fortunately, your computer probably already has a program called "keytool" installed; you can use this to get the signature. For your debug version, a correct incantation is:

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -v -list

This will print out the SHA1 signature in a nicely labeled easy-to-cut-and-paste form.

This may feel a little klunky, but it's worth it, because some magic is happening. When your app is registered and you generate a token and send it to a service provider, the provider can check with Google, which will confirm that yes, it issued that token, and give the package name of the app it was issued to. Those of you who who've done this sort of thing previously will be wondering about Client IDs and API Keys, but with this mechanism you don't need them.

Using Your Token

Suppose you've registered your app and called GoogleAuthUtil.getToken() and received a token. For the purposes of this discussion, let's suppose that it's "MissassaugaParnassus42". Then all you need to do is, when you send off an HTTP request to your service provider, include an HTTP header like so:

Authorization: Bearer MissassaugaParnassus42

Then your HTTP GETs and POSTs should Just Work. You should call GoogleAuthUtil.getToken() to get a token before each set of GETs or POSTs; it's smart about caching things appropriately, and also about dealing with token expiry and refresh.

Once again, as I said at the top, if you're happy using the Google APIs Client Library for Java, it'll take care of all the client-side stuff; you'll still need to do the developer console app registration.

Otherwise, there's a little bit of coding investment here, but the payoff is pretty big: Secure, authenticated, authorized, service access with a good user experience.


Join the discussion on
+Android Developers


The elusive book publishing process: A little risk, a little reward

Posted: 26 Sep 2012 04:00 AM PDT

Publishing the open source way

My favorite thing about the Internet is the way it makes so many of us into storytellers. It turns people on to sharing their own experiences, especially experiences they might be uncomfortable relating in person. My enthusiasm for the Internet's encouragement of transparency extends beyond digital confessionals and group therapy and well into the mundane: instruction manuals; wikis packed with the sort of minutiae one used to have to wait to overhear at a cocktail party; and the open listserv a friend maintained as a shared journal, where my every entry addressed the lone lurker no one knew (but who seemed to be named Paul and kept showing up in the output of a REVIEW DIARY-L).

read more


Taking reality seriously: Towards a more self-regulating management model at Statoil

Posted: 26 Sep 2012 03:00 AM PDT

steel worker

Statoil is a Norwegian oil and gas company with activities in 34 countries, 20000 employees and a turnover of around USD 90bn. The company is listed in New York and Oslo. On Fortune 500, it ranks #67 on size but #1 on Social Responsibility and #7 on Innovation.

read more