Showing posts with label Update. Show all posts
Showing posts with label Update. Show all posts

Sunday, 18 October 2015

HB Blog 98: Go Programming Language - Google's Open Source Project.

Go, also commonly referred to as golang, is a programming language, an open source project developed at Google. It is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
Go was born out of frustration with existing languages and environments for systems programming. Programming had become too difficult and the choice of languages was partly to blame. One had to choose either efficient compilation, efficient execution, or ease of programming; all three were not available in the same mainstream language. Programmers who could were choosing ease over safety and efficiency by moving to dynamically typed languages such as Python and JavaScript rather than C++ or, to a lesser extent, Java.

Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing. Finally, it is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. To meet these goals required addressing a number of linguistic issues: an expressive but lightweight type system; concurrency and garbage collection; rigid dependency specification; and so on. These cannot be addressed well by libraries or tools; a new language was called for.

It is a statically-typed language with syntax loosely derived from that of C, adding garbage collection, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. Although it borrows ideas from existing languages, it has unusual properties that make effective Go programs different in character from programs written in its relatives. A straightforward translation of a C++ or Java program into Go is unlikely to produce a satisfactory result—Java programs are written in Java, not Go. On the other hand, thinking about the problem from a Go perspective could produce a successful but quite different program. In other words, to write Go well, it's important to understand its properties and idioms. It's also important to know the established conventions for programming in Go, such as naming, formatting, program construction, and so on, so that programs you write will be easy for other Go programmers to understand.
Refer below link to download the Go distribution:-
https://golang.org/dl/

Project structure:-
 Go code must be kept inside a workspace. A workspace is a directory hierarchy with three directories at its root:
    src contains Go source files organized into packages (one package per directory),
    pkg contains package objects, and
    bin contains executable commands.

The go tool builds source packages and installs the resulting binaries to the pkg and bin directories.
The src subdirectory typically contains multiple version control repositories (such as for Git or Mercurial) that track the development of one or more source packages.

To give an idea of how a workspace looks in practice, here's an example:

bin/
    hello                          # command executable
    outyet                         # command executable
pkg/
    linux_amd64/
        github.com/golang/example/
            stringutil.a           # package object
src/
    github.com/golang/example/
        .git/                      # Git repository metadata
    hello/
        hello.go               # command source
    outyet/
        main.go                # command source
        main_test.go           # test source
    stringutil/
        reverse.go             # package source
        reverse_test.go        # test source


This workspace contains one repository (example) comprising two commands (hello and outyet) and one library (stringutil).
A typical workspace would contain many source repositories containing many packages and commands.
Commands and libraries are built from different kinds of source packages.

Check that Go is installed correctly by building a simple program, as follows.
Create a file named hello.go and put the following program in it:
package main
import "fmt"
func main() {
    fmt.Printf("hello, world\n")
}

Then run it with the go tool:
$ go run hello.go
hello, world

If you see the "hello, world" message then your Go installation is working.

An interactive introduction to Go in three sections. The first section covers basic syntax and data structures; the second discusses methods and interfaces; and the third introduces Go's concurrency primitives. Each section concludes with a few exercises so you can practice what you've learned.
Refer below link to download the Go distribution:-
https://tour.golang.org/

Monday, 3 November 2014

HB Blog 32: What Is Android One?How Are Android One Phones Different From Other Android Phones?

Android One is a standard created by Google for Android systems, mainly targeted at people buying their first smartphone, and customers in the developing world.Google and its hardware partners - Micromax, Spice and Karbonn launched three Android One phones. 
What is Android One?
Android One is a Google programme where it is partnering with phone companies to create "high-quality" but low-cost Android smartphone. The programme was announced by Pichai and India is the first country where the company is launching Android One phones.According to Google, Android One programme is its attempt to create affordable smartphones so that billions of people who still use a feature phone can buy a smartphone.

How are Android One phones different from other Android phones?
Different phone companies take AOSP and then put their own user interface and apps in it. They also remove and add features. The end result is not exactly the Android that Google wants you to have. It is the Android that Samsung, LG or HTC want you to get.
For high-end phones, these customisations work decently well. But in the low-end phones, which don't have powerful hardware, the performance suffers.
Android One is different. First of all, it has- despite its similarities with the regular version of Android - some extra customisation that makes it more suitable to low-end hardware. Second, it doesn't have any third-party user interface or unnecessary features. It is the version of Android created by Google. This means when you buy an Android One phone, you get the Android experience that Google has designed for you and not Micromax or Spice.With normal Android phones, the company selling the phone is responsible for choosing right hardware and software for the devices. For Android One phone, Google is in the driver's seat. It finalises the hardware and software.More importantly, Google is also responsible for delivering software updates to Android One phones.This means you can expect Android One phones to get latest version of Android - next is Android,with auto version update as well.

Friday, 1 August 2014

HB Blog 6: New Google Play Store API v2 For Developers.API That Gives Total Control Over APK Updates And Product Listings.

The Google Play Developer Console has undergone some pretty major changes over the years, including a complete overhaul 2 years ago. While the improvements continue to make for a more powerful and usable tool, some developers still find areas where it could be better. Google's engineers don't have time to build everything for everybody, but a new version of the Google Play Developer API makes it possible to build quite a few things for yourself. The new API allows developers to programmatically upload apks and modify almost every detail about your store listings.
2014-07-28_19h54_05
The new web API allows developers to build scripts or applications to automate deployment and update product listings quickly and without directly working with the Developer Console. Most of the new functionality is bundled into the Publishing API, a transaction-based system for managing Play Store listings and apks. It exposes the ability to change just about every field, image, and apk based on language. Further, apks and expansion files can be uploaded to select tracks (i.e. alpha, beta, production, rollout). It's even possible to make modifications to testing groups as needed. It's also possible to change pricing for in-app products, but it is done outside of the transactional model.
The Publishing API will probably become a staple in the distribution systems of larger publishers. Companies will be able to build custom software to enforce their own policies and limit the changes employees can make based on their roles. For example, a marketing manager might be limited to modifying descriptions and featured images, but cannot affect pricing, screenshots, or apk updates. This will also allow publishers to rapidly launch promotions and major updates across several countries and different apps instantly.
Version 1.1 of the API was dedicated to accessing the status of an individual in-app purchase or subscription, and cancelling subscriptions. These functions were available so external servers could fulfill in-app transactions (e.g. giving a paid item to a customer after their purchase is complete) and occasionally for customer service. While the original versions of these methods should remain functional for a long time, new names have been given to these methods, which should probably be used in all future development.
Google hasn't made an announcement regarding these changes (a brief note in the developer console mentions it, thanks Matthieu HarlĂ©), but its cached pages show that the documentation was updated sometime after July 4th. If you're interested in automating some of your Play Store distribution, or even building an app or web service for other developers to use, check out the developer docs for more details.

Thursday, 10 July 2014

HB Blog 2: How To Update the Google Play Store on your Android without an APK




It’s usually best to be on the latest version of the Google Play store app on your Android device since from time to time Google releases bug fixes, updates the UI and packs in even more new features.

Most people either wait until the newest version hits their device or downloads an APK from somewhere on the Internet, but there’s a much simpler way and it requires no downloading APKs and sideloading the app. 
Here is what to do:
  1. Open the Google Play Store app
  2. Open the side slide-out menu by clicking the three lines at the top left
  3. Select “Settings”
  4. Scroll down until you see “Build version”
  5. Click on “Build version”
If a new build of the Play Store is available, you will be prompted to download and install it. If it’s already the latest, you will get a message that reads, “Google Play Store is up to date,” as you can see in the photo above.

Friday, 4 July 2014

HB Blog 1: ART android runtime Ahead-of-time (AOT) compilation.

Ahead-of-time (AOT) compilation

ART introduces ahead-of-time (AOT) compilation, which can improve app performance. ART also has tighter install-time verification than Dalvik.
At install time, ART compiles apps using the on-device dex2oat tool. This utility accepts DEX files as input and generates a compiled app executable for the target device. The utility should be able to compile all valid DEX files without difficulty. However, some post-processing tools produce invalid files that may be tolerated by Dalvik but cannot be compiled by ART. For more information, see Addressing Garbage Collection Issues.

Improved garbage collection

Garbage collection (GC) can impair an app's performance, resulting in choppy display, poor UI responsiveness, and other problems. ART improves garbage collection in several ways:
  • One GC pause instead of two
  • Parallelized processing during the remaining GC pause
  • Collector with lower pause time for the special case of cleaning up recently-allocated, short-lived objects
  • Improved garbage collection ergonomics, making concurrent garbage collections more timely, which makes GC_FOR_ALLOC events extremely rare in typical use cases
ART currently does not use compacting GC, but this feature is under development in the Android Open Source Project (AOSP). In the meantime, don't perform operations that are incompatible with compacting GC, such as storing pointers to object fields. For more information, see Addressing Garbage Collection Issues.