Google Drive API

Introduction

Google Drive is out! Yes that’s right, Google’s Drive project which allows users to store content onto a Google server and pull it from any device is now available. This product offers 5GB free to google users with additional packages for extra money.

This is a pretty cool thing and not just because Google is doing drop box properly but more so because they are doing drop box across the Google platforms and offering an API to those of us that are interested in developing for it.

My plans

My plan over the next couple of days is to create a way to store server logs and general statistics for my server to the Google Drive. This will allow me to easily check on how things are going from my mobile device.

Google Drive API

If you are interested in working with Google Drive than I suggest that you take a look at the API that Google has provided us. https://developers.google.com/drive/v1/reference/

If you are going to work with the API that is available you will have to register your own app. https://developers.google.com/drive/register

Performance

The API has some interesting features for performance. When performing an update you can receive a partial response. This response type will only return the specific fields that you ask for rather than the entire object. The API also supports a header type of gzip to allow for speedier and smaller sent and received packets of information.

For more information on Google Drive API performance: https://developers.google.com/drive/performance

Tags: , ,

Decrease Javascript Load Times and Increase Script Speed

Javascript is not the fastest of languages but it is one of the most adaptable and dynamic of languages. Because the script runs at run time there is no single compiled code base there for there is going to be some overhead assuming you are coding with industry standards.

Compression

One of the best ways to increase javascript efficiency that requires almost no time at all is to add all of your scripts into one file. Not only will this only send one request to the server it will allow you to compress all of the contents and greatly decrease the through the wire size of the content. (pending on your server zip settings) Compressing code will remove everything that is not required to run the script such as white space and comments. Compressing the code in this way will also change the names of variables and functions to shorten the file as much as possible.

Here is an excellent application created by google that will allow you to compress the javascript file. http://closure-compiler.appspot.com/home 

Efficiency

Another way to greatly improve efficiency within a js file is to decrease repeated operations as much as possible. This consists of optimizing object handlers and adding dynamic event listeners in larger applications. Should you be using set interval it is a good idea to lessen the amount of times that the value is refreshed by. An animation of ui elements do not require a high frame rate to seem impressive.

Profiling and Debugging

Many developers like to use an application called FireBug. I prefer to use the built in utilities that come along with Google Chrome. Both of these options allow profiling and debugging options for your javascript application along with a console that allows you to trace methods and objects within your development process.

Unit Testing

The final thing that I would like to mention for those using javascript at home or in the office is that they should use unit tests to make sure that their code is solid and stable. There is a full set of how you can use JsUnit to tests here.

 

Zend Studio Shift Tab Fix

When switching over to Zend Studio at work I discovered that there was poor support for shift + tab. Whenever using this keyboard short-cut I could only go back as far as I had previously tabbed from which means that any imported code from another IDE would not shift back so many spaces.

The Fix

By going to ‘Window’ => ‘Preferences’ => ‘PHP’ => ‘Code Style’ => ‘Formatter’ you can create a new profile. In this profile you can keep everything as the default but rather than keeping the tab key set to tabbing you can change it to spaces and then select the amount of spacing that you would like. Now save your profile, make sure that it is selected and press ‘OK.’

Flex Data Service Debugging Software

I wanted to share an exceptional piece of software that I was recommended to use at work as an excellent debugging tool. The software is called Charles and comes with an excellent demo version that closes every thirty minutes and will give you a little window telling you that you are using a demo from time to time but aside from those two draw backs they haven’t left a whole lot out.

I needed some software after being unable to figure out why we were unable to connect to a data service with Flex. This software upon launch quickly showed us the response that we were not being displayed through Flex and allowed us to quickly sort out our gateway issues. Even though we used this software to help debug flex we have also been using for a lot of http requests and all other browser based debugging that involves sending and retrieving data.

If you aren’t convinced as to download the free copy yet I should probably mention that the software only costs about $30 for a full license and comes in better packages based on how many copies of the software you purchase. It also comes with the ability to throttle your own bandwidth and latency to test in slow conditions which is great when testing against a local server.  The software also allows you to change and resend requests to test back end services which is a huge benefit as a server guy.

The software package comes available and fully supported for Linux, Mac, and of course Windows.

I’m not a software review nor am I paid to voice my opinions but I would advise that any company that wants to save some serious time on debugging should buy this software. It is great for everything web.

Web Browsers for Web Developers

Introduction

This articles focus is fully based on what browsers are best for web development and industry standards say that we need to be developing to support all major browsers and IE 7+ however, this does not mean that you should be using some of theses browsers in your day to day activities on the web.

In my eyes there are only two main browsers that are acceptable as primary browsers, the first is Google Chrome and the second is Mozilla Firefox. Both of these browser have their pros and cons and thus I will be going through why I picked one over the other for primary use.

The Chrome

I’m just going to throw out there that I am a rather large fan of Chrome and thus it is my automatic choice but both browsers have merit. The reason that I pick Chrome over Firefox is because of the slick and easy inspect element feature that is very handy in checking for ajax calls and responses, along with JavaScript errors and the ability to use an incognito window. This kind of window does not hold cookie information or anything else after the window is closed. This means that you can throw up multiple incognito windows which can really step up your ability to debug server requests.

And Firefox

Firefox has an excellent tool set that can be installed and this tool set is known as firebug. It can tell you returned responses that are not visible to the user in something like Google Chrome. Firefox is also an excellent use for Flex 4 debugging which is why I do end up using it a fair amount when working on side projects.

The Comparison

There really isn’t that much to compare, both browsers have merit and I often switch between each of the two as a primary browser. Each browser has a lot of html 5 support but Chrome features things such as browser side storage. The only thing that you should take out of reading this rather short article is that it is time to switch away from Internet Explorer and probably Opera.

Firefox - good support for html5 and css3 along with great debugging features.

Chrome - excellent support for html5 and css3 and it has an excellent amount of pre-built in features for debugging.

Safari – Even though I am not a supporter of Apple this browser is great for supporting modern features but has a poor set of built in tools for debugging when it is right out of the box.

Opera – It has a decent support for the new features but is not in the same class as Firefox and Chrome.

Internet Explorer – Horribly supported and should be renamed “download Firefox or Chrome.”

How to Remove Avira Pop ups on Vista

Avira and AVG are two of the greatest and most popular free anti-virus programs on the web today. Both of these programs offer deluxe versions of their software that will give you more protection and some perks but the advertisements can be really annoying.

I only mention AVG in this article because it is something of an alternative to Avira and is slowly being replaced, however, Avira has pop ups that are very annoying and are very close to spam. It isn’t something that comes up when you least expect it but something that will pop up while you are watching the season premier of House. Not cool…

avira_file_directoryThere is a way to remove these pop ups on Microsoft Windows Vista. In order to stop these ads from coming up you will need to follow the following instructions. First open ‘Start’ > ‘Computer’ > OS C: (or whatever drive your operating system is on.) > ‘Program Files’ > ‘Avira’ > ‘Avira Desktop.’ Now you will need to locate the file called. “avnotify.exe.” Right click this file and go down to properties. A window will appear, you will need to click on the security tab then click edit halfway down the window. Now you will need to adjust the read & execute and set it to deny. If the read does not automatically fill in you will need to deny that as well.

avira_permissions

Now just close the file and go back to coding without ever having the Avira adverts annoy you again.