Category: Apps

Lean Code and API’s

API Resources

GeocodeResponse-OVER_QUERY_LIMIT

Using an Application Program Interface or API is not a new concept, is relatively simple, and easy to do.  However, developing applications using resources outside of your local controlled environment can present new challenges and opportunities.

In this instance, I was testing one of Google’s API resources and received an “OVER_QUERY_LIMIT” error message.  Although it’s not too often that this happens, apparently it can on occasion.

You have exceeded your daily request for this API.  We recommend registering for a key at the Google Developers Console:  https://console.developers.google.com/apis/credentials?project=

You typically need an API key before you can use an API such as the Google Maps Geocoding API.  For those of you thinking or wondering about security, you can place restrictions on the use of your API key.

Registering an API Key

APIs Credentials

If you already have a Google account, go to the “https://console.developers.google.com/apis/credentials?project=” link as shown in the error message above, sign in to your account and accept the terms and conditions.  You can then begin the process of creating your project and credentials.  Google will then generate an API key for your project to use in your application.

As of this writing, there are at least 184 API’s available where some of the more popular API’s include Google Drive API, Gmail API, Google Maps Android API, Google Cloud Translation API, and Google Maps Geocoding API.

Once you’ve enabled the API’s required for your project and set up your API Key, you can begin using and monitoring the services requested from your GoogleAPIs dashboard. The “Web Services > Geocoding API” page provides a simple example of getting and using the API Key in your application.

API’s can greatly simplify your application development and enables you to deploy features that would otherwise consume a lot of time and effort to implement.  The guides and documents in the API Library describe the scope of the API and provide sufficient information to begin using them to your advantage.

API Access Limits

Be aware that some API’s may have limits to the number of free “access requests” received and/or processed in a given day or over a given time period.  Users may encounter problems if requests from your site exceed this limit.  Increased access requests may be available if you are using a “fee-based” service or premium account.

For example, as of this writing, the Google Maps Geocoding API imposes the following Standard Usage Limits:  2,500 free requests per day and 50 requests per second.  A “pay-as-you-go” billing option or Premium Plan is also available with a maximum of 100,000 daily requests.

API Services

API services or resources may offer significant advantages for your application and are certainly worth an investment of your time to see what is available.  If your programming language, such as JavaScript or Python, provides a means of working with “http” requests, API’s are definitely worthy of your consideration.

API’s enable working with external resources both as a data source and for manipulating data.  The ability to programmatically work with data reduces the possibility of data entry errors and other human fallibilities.

Remember to use API key restrictions to control and prevent unauthorized access requests!  Making an attempt to use an API key from a site other than the one authorized in the restriction settings will return a “REQUEST_DENIED” status as pictured below:

API-Restricted-Access

Until Next Time – STAY lean!

Versalytics

Advertisements

Lean Code – Part 2

Our article on “Lean Code” strongly suggests that the principles of lean can also be applied to the realm of software development, applications, and more specifically, programming.

Python has evolved to become a very popular and powerful programming language.  However, as mentioned in “Lean Code“, the performance of your application or program is as dependent on the skills of the programmer as they are on the capabilities of the programming language itself.

An example of skill versus language can be found in “Python for Data Science – For Dummies – A Wiley Brand” by John Paul Mueller and Luca Massaron (ISBN:  978-1-118-84418-2).  Page 106 of the book states:

It’s essential to realize that developers built pandas on top of NumPy.  As a result, every task you perform using pandas also goes through NumPy.  To obtain the benefits of pandas, you pay a performance penalty that some testers say is 100 times slower than NumPy for a similar task.

The functionality offered by pandas makes writing code faster and easier for the programmer, however, the performance trade-off exists for the end user.  Knowing when to use one module over the other depends on the programmer’s understanding of the language as opposed to simply providing a specific functionality.

Python for Data Science provides sufficient information to decide the best fit case for either pandas or NumPy.  The relevance of sharing this is to stress the importance of continually reading, learning, and understanding as much as possible about your language of choice for a given application.

From the end user’s perspective, performance matters and everyone wants it “yesterday”.  So, the question is, “Do we code quickly and sacrifice performance or sacrifice delivery for quick code?  What would you do?

Until Next Time – STAY lean!

Versalytics - Logo (293x293)

Related Articles / Books:

 

Leadership – Get Thirsty …

Horses drinking from a fountain in Central Park
Horses drinking from a fountain in Central Park (Photo credit: tiseb)

We are likely to find as many definitions for leadership as there are leaders. I recently downloaded an excellent app titled “Leadership Development” from Apple’s App Store and this definition of leadership was presented in one of the many videos:

“Leadership is the process of influencing people by providing purpose, direction, and motivation to accomplish the mission and improve the organization.”

ADP 6-22

While the expression, “You can lead a horse to water, but you can’t make him drink,” may be true for some, true leaders recognize and understand the value of making the horse thirsty enough to want to drink on his own.

Your feedback matters

If you have any questions, comments, or topics you would like us to address, please feel free to contact us by using the comment space below or by sending an email to LeanExecution@Gmail.com. We look forward to hearing from you.

Until Next Time – STAY lean

Vergence Analytics