Skip to main content

ES6 101 - Map

ES6 101 - Map
ES6 Map is the topic of today’s post which also is the 11th in the ES6 101 Series. Map is going to be fairly easy, so before jumping into it, if you want to look at other features we have covered so far, here is a quick list for your reference.Fat Arrow FunctionsLexical Declarations - LetLexical Declarations - ConstSpread OPeratorTemplate LiteralRest OperatorDefault parametersDestructuringFor…ofSetNow let’s see what Map has to offer. As opposed to Set (which by the way, I highly recommend reading), Map saves values as key-value pair. Let’s see for ourselves how this works!Example of ES6 Mapvar dummyMap = newMap(); dummyMap.set("1"); // Method is set as against add in ES6 Setconsole.log(dummyMap); // [["1",null]] dummyMap.set("1", "one"); console.log(dummyMap); // [["1","one"]] dummyMap.set("2", "two").set("3","three"); console.log(dummyMap); // [["1","one&…

The new Google Privacy Policy

             A lot of talk is going on these days regarding the changes in the “Google Privacy Policy”. I thought of going through the privacy policy and decided to share my understanding with you all.

             This Google Privacy Policy applies to all of the services offered by Google Inc. and its affiliates, including services offered on other sites (such as Google’s advertising services), but excludes services that have separate privacy policies that do not incorporate this Privacy Policy. This clearly means that, though the new Privacy Policy is more generic and user understandable than its previous versions, it does not state any details for individual services offered by Google. All Google services like Google Maps, Google Earth, Google Gears, etc. which have their own privacy policies, may not share a lot of policies from this more generic Google Privacy Policy. Privacy policies of these Google services will state their own, more service relevant policies.

          I have tried to keep the content as simple as possible and have also tried to not make it boring…What follows are the highlights of the new “Google Privacy Policy” that will be coming in effect from March 1, 2012.

The “Google Privacy Policy” explains 3 key points:
  • What information Google collects and why it collects that information.
  • How Google uses this information. 
  • The choices that Google offers to users, including how to access and update the information.

Let’s have a look at each of these points in further details.

Information that Google collects
Google collects information in 2 ways:
·         Information that the users provide. Several of Google’s services require the user to sign up for a Google Account, where the user is required to provide information like name, email address, phone number or even a credit card number in some cases, e.g. when you are signing up for a Google Maps API Premier (licensed) service or for any other licensed Google service. If the user wishes to take full advantage of the sharing features that Google provides, then the user might have to create a publicly visible Google Profile with a photo and name.


·         Information that Google gathers from the users’ use of various Google services. Google may collect the information about how and which service is being used by the user. For example, if the user visits a website using the Google Ads services and interact with the ads there, then Google may keep a log of the nature of ads clicked to get you more relevant ads the next time you visit the same website. Let’s take a detailed look into what all information Google gathers:
o   Device Information
Google may collect device-specific information (such as the user’s hardware model, operating system version, unique device identifiers, and mobile network information including phone number). Google may associate the user’s device identifiers or phone number with his/her Google Account.

o   Log Information
When a user uses a Google service or views content provided by Google, Google may automatically collect and store certain user information in server logs. This information is generally in the following format.

123.45.67.89 - 25/Mar/2003 10:15:32 -
      http://www.google.com/search?q=cars -
      Firefox 1.0.7; Windows NT 5.1 - 740674ce2123e969

Here, you can see that this information includes the user’s IP, the date and time of accessing Google search page, the search query, the type of browser and local browser language, user’s OS and the unique cookie ID. Google may also maintain telephony log information like the user’s phone number, calling-party number, forwarding numbers, time and date of calls, duration of calls, SMS routing information and types of calls. This information is usually gathered when a user is using the Google Voice service.

o   Location Information
When a user uses a location-enabled Google service, Google may collect and process information about the user’s actual location, like GPS signals sent by a mobile device. Google may also use various technologies to determine location, such as sensor data from the device that may, for example, provide information on nearby Wi-Fi access points and cell towers. This sort of information is maintained by Google to show search results using the Places API service, where the user can search for a place near his/her current location using some keyword like “garage”.

                         


o   Unique Application Numbers
Certain services like Google Earth, Picasa, Google Desktop, etc. include a unique application number which bears the information about the user’s installation (for example, the operating system type and application version number) and this information may be sent to Google when the user installs or uninstalls that service or when that service periodically contacts Google’s servers for automatic updates. Another example is when a user wants to download chrome , Google Gears, Lively or Google Earth’s plug-in, Google first downloads a small setup file that needs an internet connection to obtain the actual software.

o   Local Storage, Cookies and Anonymous Identifiers
Google may collect and store information (including personal information) locally on the user’s device using mechanisms such as browser web storage (including HTML 5) and application data caches. When a user accesses a Google service, Google may send one or more cookies and anonymous identifiers – “A random string of characters that is used for the same purposes as a cookie on platforms, including certain mobile devices, where cookie technology is not available.” Google uses these cookies and identifiers, also when a user interacts with services that Google offers to its partners such as the advertising services.

How Google uses and shares the information it collects
          Google uses all the information collected from the user to provide the user with tailored content to make the user’s Google experience better. The other thing that they do use this information is to provide, maintain, protect and improve the existing Google services and also generate new services. Google may combine a user’s information provided for one service with all other services that he/she uses thereafter. Google does not share any sort of personal information of any user with anybody outside Google, unless under following circumstances:
  • The user has provided opt-in consent on sharing the information. 
  •  If the user’s Google account is managed by a domain administrator (usually in case of Google Apps users) then the domain administrator and resellers who provide user support to the user’s organization will have access to the user’s Google Account information (including your email and other data). 
  •  Google provides personal information to its affiliates or other trusted businesses or persons to process it for them, based on Google’s instruction and in compliance with a Privacy Policy and any other appropriate confidentiality and security measures. 
  •  Google will share personal information with companies, organizations or individuals outside of Google if they have a good-faith belief that access, use, preservation or disclosure of the information is reasonably necessary to:
§  meet any applicable law, regulation, legal process or enforceable governmental request.
§  enforce applicable Terms of Service, including investigation of potential violations.
§   detect, prevent, or otherwise address fraud, security or technical issues.
§  protect against harm to the rights, property or safety of Google, our users or the public as required or permitted by law.
  • Google may share aggregated, non-personally identifiable information publicly and with their partners – like publishers, advertisers or connected sites. This information is usually used to share trends of use of a particular Google service or to bloggers to show the trend of users from various regions across the globe that access the blog, trends of the OS these visitors use, etc. Google trends usually appear as seen in the image below.

 
Google strives to maintain transparency in their privacy settings and hence allows the user to control the privacy of his/her content and information.

Information the user shares
          Several Google services like Google office, Google Fusion Tables allow the users to share information with others users. If this content is shared publicly, then it would become indexable by search engines. However, Google services provide various options on sharing and deleting the data.

Recommended for You

ES6 101 - Spread operator

ES6 101 - Spread Operator
Welcome to the fourth post in the ES6 101 series and the topic of discussion today is the Spread operator or the dot dot dot operator.... It is not very common to call it the “dot dot dot” operator, but I just kind of like the ring to it! Also when you say “dot dot dot” it actually helps me visualize unpacking multiple gifts from a gift box. Wondering why I am taking about gifts and gift boxes and “dot dot dot”. Well, the spread operator... is actually more like unwrapping gifts from a gift box. The spread syntax allows an iterable such as an array expression to be expanded in-place. Let’s actually dive into some examples straight away. It is much more simpler that way!Examples of the ES6 Spread Operator ...Example #1Problem statement: Let’s write a function to display the sum of 3 numbers passed to it in an array.

We would have done this as follows in the old ES5 way. 😏var arr = [1,2,3]; functionsum(a,b,c) { var output = a + b + c; consol…

Diwali Wishes

Happy Diwali 2017
We are already on the brink of the new year and the festival of lights is already here!May this festival of lights, bring joy, peace and prosperity to you and your loved ones! Wishing you a very happy Diwali and a prosperous new year!For your holiday family portraits and baby shoots I would recommend a really talented and professional photographer in the SF Bay Area. Her portfolio would speak for itself!Happy holidays and have a safe Diwali!

ES6 101 - Destructuring

ES6 101 - Destructuring ES6 Destructuring assignments is the topic of this post and we will take a look at what destructuring means and we will look at multiole examples to understand the concept. As the name suggests, using the destructuring syntax, we would be breaking down values in an array or properties in an object into seperate variables.Arrays and objects allow you create, on-the-fly various packages of data.let a = [1,2,3]; ES6 destructuring uses similar syntax, however the LHS will now be a variable that would hold the package that you need to create. Sounds complex? πŸ˜“ Not really, just move ahead to the example that follows and you should get the hang of it.let a = [1,2,3]; let [x,y] = a; // We are now assigning array 'a' to a new arrayconsole.log(x); // 1console.log(y); // 2let [m,n,o] = a; console.log(m); // 1console.log(n); // 2console.log(o); // 3This helps us clearly see what destructuring does for an array! It basically unpacks the values in the array a…

ES6 101 - For..of

ES6 101 - For..of This is the 9th post in the ES6 series and we have looked at a whole bunch of some amazing and highly productive ES6 features that you can start using right away! Here is a comprehensive list of all the features that we have covered so far. 😍Fat Arrow FunctionsLexical Declarations - LetLexical Declarations - ConstSpread OPeratorTemplate LiteralRest OperatorDefault parametersDestructuringNow let’s look at what for..if has to offer us. Essentially, for..of does exactly the opposite of what for..in does. Let’s see what the difference is.// Using for..inlet someVar = [1,2,3,4,5] for(let item in someVar) { console.log(item); // The index values would be consoled. } When you execute the above code snippet, you will observe that, you get all the index values 0 1 2 3 4 of the array in the console. If you had to get access to the values at these indexes in the array, you would have to add the following to the above snippet in the for..in loop.console.log(`${it…

ES6 101 - Set

ES6 101 - Set
This is going to be the 10th post in the ES6 101 series and the topic for today is Set. Set object is a collection of values and is iterable. One cool thing about the values in set is that these are unique. This means that a set can have a value only once. Moreover you can think of a set as an actualy set in Mathematics. We will see a few samples to understand this concept of set.Examples of ES6 SetCreating a new set and adding values to it.Let’s create a new set and add some values to it and then discuss it further.let dummySet = newSet(); // That's it! A new set object is created dummySet.add(1); console.log(dummySet); // [1] dummySet.add(1); console.log(dummySet); // [1] and not [1,1]. This is because, values in a set are unique. dummySet.add(2).add(3).add(4); console.log(dummySet); // [1,2,3,4] dummySet.add('The UnderTaker').add('John Cena'); console.log(dummySet); // [1,2,3,4,'The UnderTaker…