Saturday, March 16, 2019

ALL ABOUT KOTLIN

Image result for kotlin

WHAT IS KOTLIN?

Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of its standard library depends on the Java Class Library, but type inference allows its syntax to be more concise. Kotlin mainly targets the JVM, but also compiles to JavaScript or native code (via LLVM). Kotlin is sponsored by JetBrains and Google through the Kotlin Foundation.
Kotlin is officially supported by Google for mobile development on Android. Since the release of Android Studio 3.0 in October 2017, Kotlin is included as an alternative to the standard Java compiler. The Android Kotlin compiler lets the user choose between targeting Java 6 or Java 8 compatible bytecode.


KOTLIN EVOLUTION:

                   " Language design is cast in stone,
                    but this stone is reasonably soft,
                    and with some effort we can reshape it later. "
              ~Kotlin Design Team
Kotlin is designed to be a pragmatic tool for programmers. When it comes to language evolution, its pragmatic nature is captured by the following principles:
Keep the language modern over the years.
Stay in the constant feedback loop with the users.
Make updating to new versions comfortable for the users.
As this is key to understanding how Kotlin is moving forward, let's expand on these principles.


1.Keeping the Language Modern.


We acknowledge that systems accumulate legacy over time. What had once been cutting-edge technology can be hopelessly outdated today. We have to evolve the language to keep it relevant to the needs of the users and up-to-date with their expectations. This includes not only adding new features, but also phasing out old ones that are no longer recommended for production use and have altogether become legacy.


2.Comfortable Updates.


Incompatible changes, such as removing things from a language, may lead to painful migration from one version to the next if carried out without proper care. We will always announce such changes well in advance, mark things as deprecated and provide automated migration tools before the change happens. By the time the language is changed we want most of the code in the world to be already updated and thus have no issues migrating to the new version.


3.Feedback Loop.


Going through deprecation cycles requires significant effort, so we want to minimize the number of incompatible changes we'll be making in the future. Apart from using our best judgement, we believe that trying things out in real life is the best way to validate a design. Before casting things in stone we want them battle-tested. This is why we use every opportunity to make early versions of our designs available in production versions of the language, but with experimental status. Experimental features are not stable, they can be changed at any time, and the users that opt into using them do so explicitly to indicate that they are ready to deal with the future migration issues. These users provide invaluable feedback that we gather to iterate on the design and make it rock-solid.

Image result for pros and cons of kotlin


ADVANTAGES OF KOTLIN:


1. Language and environment are mature:


Unlike other languages like Swift, the Kotlin release has gone through many stages before releasing the final 1.0 release.This means that there are hardly any problems when working with Kotlin, everything works as you would expect


2. It makes Android development much easier:


If you’ve been reading this series of articles about Kotlin, you’ve probably seen it crystal clear many times.Kotlin is simplicity mixed with power, so you have an new world of possibilities if you’re coming from Java that you couldn’t even imagine.


3.  Shrinks the Base code to Enhance Productivity:


Developers often make certain shortcuts while programming to reach a deadline. This is called technical debt that generally reduces productivity and slows down the development.
Kotlin helps developers to reduce technical debt to a certain extent. It shrinks the base code and which further improves the code quality. If you shift to Kotlin, you will see a reduction in the number of lines of code. This makes code maintenance a lot easier.


4. Kotlin is Concise:


Kotlin is a way more concise than Java. It doesn’t only save time but also promotes readability and code maintainability.
If you are a developer, you won’t have to deep dive into the sea of logic and code to solve a simple bug. With Kotlin, you can read, write and change code more efficiently. Kotlin brings many useful features like smart casts, data classes, type interference, etc.


DISADVANTAGES OF KOTLIN:


Although Kotlin is great, it’s not perfect. Here are a few aspects of the language that I’m not in love with.


1. No namespaces:


Kotlin allows you to define functions and properties at the top level of your files. That’s a great feature, but it can cause some confusion when combined with the fact that all top level declarations are referenced unqualified from Kotlin. This can sometimes make it difficult to tell what a function is when reading one of its usages


2. No static modifier:


Following on the previous point, Kotlin has unusual handling of static function and property declarations that are called from Java. It’s not bad, but it feels dirtier than necessary.


3. Automatic conversion of Java to Kotlin:


This was the first topic in the list of things I like about Kotlin, and it works well. But because it work so well 80% of the time, many of the cases where it fails can be frustrating.


4.Closed by default:


Every downside to Kotlin I’ve talked about so far are mostly small syntax details that are not quite as clean I’d like, but aren’t a big deal overall. But there’s one design decision that is going to cause a huge amount of pain in the future: All classes and functions in Kotlin are closed by default. It’s a design decision pushed by Effective Java, and it might sound nice in theory, but it’s an obviously bad choice to anyone who’s had to use a buggy or incomplete third-party library.

Image result for kotlin

WHY YOU SHOULD SWITCH TO KOTLIN:

Why would a Java Developer switch to Kotlin?
Java is a widely used programming language and forms the basis of Android development. There can be many reasons why Java cannot always be considered the best choice for Android development.


Reasons can be:


o   Java is not a modern language.
Android only supports a subset of Java 8 features. In a way, Android developers are not able to reap full benefits of Java. In case they require making use of Java, then they will have to stick to Java 7.

o   Java comes with some well-documented language issues like endless try-catch blocks, null-unsafety, NullPointerExceptions and lack of extendability.

o   Java is still a procedural language although it is starting to add lambda expressions and functional interfaces recently

o   The syntax of Java is very complex and writing longer code can always be prone to more errors and bugs

o   Java can create issues with Android API design

o   Do you still need to remember most of the code while you code in Java? It can be creepy and messy sometimes!


Image result for kotlin and android


WHY IS GOOGLE SUPPORTING KOTLIN FOR ANDROID DEVELOPMENT?


1. The Modernity:


Having Java integrated in your work life is a good thing, but more than often you look at a problem, stop for a second to think to yourself : “Is this really the best way I can do it in Java?”.
Well, Kotlin has all the features of modern languages you’d want! Kotlin has a safe Nullability system, Lambdas and Method references for clean connections between parts of your App, a built in Mutability/Immutability property system, a clean and easy to use Stream operators(filter, map, reduce..), to improve your development life and productivity!


2.  The Interop:


Yeah all the features above sound pretty decent, and one might think, okay, but how will this affect my legacy code, or current state of a newly started project? You don’t have to worry a single bit, Kotlin and Java are 100% interoperable, meaning you can have any percentage of code written in Kotlin, and the rest in Java, and it will all just work together!
Even better, there is a tool in AS that allows you to instantly “translate” Java into Kotlin, which works quite well most of the time, so you can have a glimpse into what does a method in Java look like in Kotlin.


3. The Community:


Java is great, it has a large number of users, the tutorial sea is vast, and you can pretty much find an answer to any problem on SO right? But the language itself is very closed, it’s development is hardly influenced by the needs of Java developers. Kotlin is quite the opposite! Jetbrains team takes every idea and proposal from the community and keeps them in mind while developing the language.
The language is also Open sourced on Github, so you can check it out anytime!


4.  The Native:


This might not be an Android specific reason, but it’s definitely worth the mention. Kotlin Native is a milestone Jetbrains is working on reaching, with the idea of running Kotlin code in mutliple platforms, without having to compile it down to JVM, making it much faster, and not requiring Java. The platforms to be are Web (both backend and frontend), iOS (yes!) and Game development.


TO KNOW WHICH BOOKS TO REFER GOTO:

REFERENCES:

Monday, March 4, 2019

BIG DATA- WHAT IS SO BIG ABOUT IT?


  • BIG DATA

Big Data basically refers to, huge volume of data that cannot be, stored and processed using the traditional approach within the given time frame.The next big question that comes to our mind is?
How huge this data needs to be? In order to be classified as Big Data?
There is a lot of misconception, while referring the term Big Data. We usually use the term big data, to refer to the data, that is, either in gigabytes or terabytes or petabytes or exabytes or anything that is larger than this in size. This does not defines the term Big Data completely. Even a small amount of data can be referred to as Big Data depending on the context it is used.

  •    TYPES OF BIG DATA

Big Data could be found in three forms:
  1. Structured
  2. Unstructured
  3. Semi-structured
Structured data:-Any data that can be stored, accessed and processed in the form of fixed format is termed as a structured data.
Unstructured data:- Any data with unknown form or the structure is classified as unstructured data. In addition to the size being huge, un-structured data poses multiple challenges in terms of its processing for deriving value out of it.
Semi-structured data:- Semi-structured data can contain both the forms of data.
Image result for big data whats the difference
  •     USES OF BIG DATA

Location tracking :-  
 Logistic companies have been using location analytics to track and report orders for quite some time. With Big Data in the picture, it is now possible to track the condition of the good in transit and estimate the losses. It is now possible to gather real-time data about traffic and weather conditions and define routes for transportation. This will help logistic companies to mitigate risks in transport, improve speed and reliability in delivery.
Advertising :-
Advertisers are one of the biggest players in Big Data. Be it Facebook, Google, Twitter or any other online giant all keep a track of the user behaviour and transactions. These internet giants provide a great deal of data about people to the advertisers so that they can run targeted campaigns. Take Facebook, for example, here you can target people based on buying intent, website visits, interests, job role, demographics and what not. All this data is collected by Facebook algorithms using big data analysis techniques. The same goes for Google, when you target people based on clicks you will get different results and when you create a campaign for leads that you will get different results. All this is made possible using big data.
Entertainment and media:- 
In the field of entertainment and media, big data focuses on targeting people with the right content at the right time. Based on your past views and your behaviour online you will be shown different recommendations. This technique is popularly used by Netflix and YouTube to increase engagement and drive more revenues.

Pros and cons of big data
Image result for pros and cons of big data
PROS:
  • Fraud detection: Another common use for big data analytics — particularly in the financial services industry — is fraud detection. One of the big advantages of big data analytics systems that rely on machine learning is that they are excellent at detecting patterns and anomalies. These abilities can give banks and credit card companies the ability to spot stolen credit cards or fraudulent purchases, often before the cardholder even knows that something is wrong.

  • Savings – Even though implementation of real-time big data analytics can be expensive, the high value of immediate data analysis can make up for this expenditure.

  • Strategies toward competitors – Competition scares many people in the market today, and big data analytics assists in providing a detailed picture of competitors, such as launching a new product, lowering/increasing prices for a particular duration or focusing on users from a specific location.


CONS:
·       Privacy:- De-identification or the process of anonymizing data by removing personally identifiable information as a way of justifying mass collection and use of personal data. Big Data can be compliant with the existing regulatory and legal frameworks on data protection.
·       Security:-The larger the quantities of confidential information stored by a certain company in their databases would specifically attract potential hackers. Also, it is a duplication of data to many locations to optimize data queries processing that may result in difficulty in locating and securing all items and personal information.

·       Distraction:At times, the Data Visualization apps create reports and charts laden with highly complicated and fancy graphics, which may be tempting for the users to focus more on form than on function.


 The Future of Big Data:
 Image result for why choose a career in big data
·        Privacy Will Be the Biggest Challenge.

·        Data Scientists Will Be In High Demand.

·        Businesses Will Buy Algorithms, Instead of Software.

·        More Developers Will Join the Big Data Revolution.

·        Big Data Will Help You Break Productivity Records.



Thank You for Visiting Techtical .That was all about Big data. Let us know in the comments section about your thoughts on Big Data. Stay tuned for more interesting blogs on popular topics.






                                                             

R ~ NOT JUST AN ALPHABET

R is a programming language and software environment for statistical analysis, graphics representation and reporting. R was created...