Tuesday, July 25, 2017

Java Version-wise Features History


Have you ever wondered what are the new features released in all Java versions? Well, if it not your case, it was mine =) 
These are pretty much frequently asked questions in java interviews. In this page, I listing down all JDK changes from JDK 1.x to Java SE 8, sequentially. Though I have tried to cover as much as information I can gather, though if you know something which I missed below, please let me know and I will add that information.

Java SE 9 Features

Possible Release Date : September 21, 2017. Please see the updated release info here.

Proposed features are:
  • Support for multi-gigabyte heaps
  • Better native code integration
  • Self-tuning JVM
  • Java Module System
  • Money and Currency API
  • jshell: The Java Shell
  • Automatic parallelization

Java SE 8 Features

Release Date : March 18, 2014
Code name culture dropped. Included features were:

Java SE 7 Features

Release Date : July 28, 2011
This release was called “Dolphin”. Included features were:

Java SE 6 Features

Release Date : December 11, 2006
This release was called “Mustang”. Sun dropped the “.0” from the version number and version became Java SE 6. Included features were:
  • Scripting Language Support
  • Performance improvements
  • JAX-WS
  • JDBC 4.0
  • Java Compiler API
  • JAXB 2.0 and StAX parser
  • Pluggable annotations
  • New GC algorithms

J2SE 5.0 Features

Release Date : September 30, 2004
This release was called “Tiger”. Most of the features, which are asked in java interviews, were added in this release.
Version was also called 5.0 rather than 1.5. Included features are listed down below:

J2SE 1.4 Features

Release Date : February 6, 2002
This release was called “Merlin”. Included features were:
  • assert keyword
  • Regular expressions
  • Exception chaining
  • Internet Protocol version 6 (IPv6) support
  • New I/O; NIO
  • Logging API
  • Image I/O API
  • Integrated XML parser and XSLT processor (JAXP)
  • Integrated security and cryptography extensions (JCE, JSSE, JAAS)
  • Java Web Start
  • Preferences API (java.util.prefs)

J2SE 1.3 Features

Release Date : May 8, 2000
This release was called “Kestrel”. Included features were:
  • HotSpot JVM
  • Java Naming and Directory Interface (JNDI)
  • Java Platform Debugger Architecture (JPDA)
  • JavaSound
  • Synthetic proxy classes

J2SE 1.2 Features

Release Date : December 8, 1998
This release was called “Playground”. This was a major release in terms of number of classes added (almost trippled the size). “J2SE” term was introduced to distinguish the code platform from J2EE and J2ME. Included features were:
  • strictfp keyword
  • Swing graphical API
  • Sun’s JVM was equipped with a JIT compiler for the first time
  • Java plug-in
  • Collections framework

JDK 1 Features

Release Date : January 23, 1996
This was the initial release and was originally called Oak. This had very unstable APIs and one java web browser named WebRunner.
The first stable version, JDK 1.0.2, was called Java 1.
On February 19, 1997, JDK 1.1 was released havind a list of big features such as:
  • AWT event model
  • Inner classes
  • JavaBeans
  • JDBC
  • RMI
  • Reflection which supported Introspection only, no modification at runtime was possible.
  • JIT (Just In Time) compiler for Windows
Again, feel free to suggest any java feature in any java version which I missed in above lists.
Happy Learning !!







Programming thought of the day:
  • 1f u c4n r34d th1s u r34lly n33d t0 g37 l41d.


Friday, June 30, 2017

Wolfram Alpha


https://www.wolframalpha.com/

Wolfram Alpha is a computational search engine (sometimes referred to as an "answer engine"). The interface looks similar to that of a regular search engine but queries typed into the search box result answers to specific questions rather than listings of websites that may be relevant to the query.

The Wolfram Alpha search box accepts natural language input in keyword, phrase, or sentence format, as well as mathematical equations. The results are dynamically computed. The project website lists the system's components:
  • Linguistic analysis
  • New kinds of algorithms for 1000+ domains
  • Curated data
  • 10+ trillion pieces of data from primary sources with continuous updating
  • Dynamic computation
  • 50,000+ types of algorithms & equations
  • Computed presentation
  • 5,000+ types of visual and tabular output.
Here are a few examples -- from a huge number of possibilities -- of categories, queries and results:

Units and Measures - Includes conversions, calculations, industrial measures, and so on. Under "units," examples include "get information and conversions for a unit," "get unit conversions for a quantity," "convert to a specified unit," "do a calculation with units," and "compare physical quantities and compute dimensionless combinations." Entering "1500 sq. ft primer" into the search box results in "18.7 liters" - the amount of primer required to cover that square footage. The result can be changed to display in gallons rather than liters. Typing in "U.S. women's size 5 shoe" yields a list of the dimensions of that size and its equivalent in other countries.

Physics - Includes mechanics, electricity and magnetism, thermodynamics, particle physics, quantum physics, and so on. Under "particle physics," examples include "get information about a particle," "specify a particle symbol," "compare several particles," "request a property of a particle," "do a calculation on particle properties," "compute the reduced mass of a system of two particles" and "get information about a particle accelerator." Typing "proton" into the search box yields the particle's mass, electric charge, particle type, quark content, quantum numbers, lifetime, symmetry operations and excitations.

People and History - Includes people, genealogy, political leaders, historical events, and so on. Under "people," examples include "get information about a person," "compare several people," "find a date or place associated with a person" and "use a birth or death date in a computation." Typing "Charlie Parker" into the search box yields the information that he was a jazz musician, along with his full name, places and dates of birth and death, an image and a timeline.

Wolfram Alpha was developed by Wolfram Research, a maker of mathematical software including Mathematica. The WolframAlpha website describes the ultimate goal of the project:

"We aim to collect and curate all objective data; implement every known model, method, and algorithm; and make it possible to compute whatever can be computed about anything. Our goal is to build on the achievements of science and other systematizations of knowledge to provide a single source that can be relied on by everyone for definitive answers to factual queries."

In this video, Stephen Wolfram, CEO of Wolfram Research, demonstrates and explains Wolfram Alpha:







Programming thought of the day:
  • My New Years resolution is 1080p.


Thursday, June 8, 2017

What is an Integration Test ?


What is an Integration Test ?

Sometimes there is not a clear distinction on what is an integration test and what is a unit test.

My basic rule of thumb is that if
  • a test uses the database
  • a test uses the network
  • a test uses an external system (e.g. a queue or a mail server)
  • a test reads/writes files or performs other I/O

…then it is an integration test and not a unit test. I have seen several developers who talk about “tests” and either they mean both or just integration tests. Here is also a brief comparison between the two.

Unit testIntegration test
Results depends only on Java codeResults also depends on external systems
Easy to write and verifySetup of integration test might be complicated
A single class/unit is tested in isolationOne or more components are tested
All dependencies are mocked if neededNo mocking is used (or only unrelated components are mocked)
Test verifies only implementation of codeTest verifies implementation of individual components and their interconnection behaviour when they are used together
A unit test uses only JUnit/TestNG and a mocking frameworkAn integration test can use real containers and real DBs as well as special integration testings frameworks (e.g. Arquillian or DbUnit)
Mostly used by developersIntegration tests are also useful to QA, DevOps, Help Desk
A failed unit test is always a regression (if the business has not changed)A failed integration test can also mean that the code is still correct but the environment has changed
Unit tests in an Enterprise application should last about 5 minutesIntegration tests in an Enterprise application can last for hours
You should now know the difference between the two....well, I hope so =)

How to write an integration test

Writing an integration test is heavily dependent on your environment. The first thing that you should decide is the scope of your integration test. So, let's say we are building a huge RESERVATION SYSTEM, we could write integration tests for:
  • Verifying correct integration of the RESERVATION SYSTEM with the printer (in a staging environment of course)
  • Verifying correct integration of this RESERVATION SYSTEM with the mail server
  • Verifying correct reading/writing of invoices from/to the DB
  • Verifying the whole data flow of receiving an order, creating an invoice, saving it to the DB and mailing it to the client. This is an End-To-End integration test
Since some of the integration tests in the case of this RESERVATION SYSTEM, use a staging environment (e.g. the mail server) it is also important to document these dependencies so that his fellow developers know about them. I always hate it when I run the test suite on a new application and half the tests fail because my workstation has no network access to the testing database!

A second point with integration tests that must be accounted is the use of detailed logging. When a unit test fails it is very easy to understand why since the scope is very narrow. When an integration test fails, things are not so simple. Because by definition an integration tests is based on many components and a specific data flow, identifying the failure cause is not always straightforward.

My recommended way to alleviate this problem, is the use of detailed logging statements (that are always needed in an Enterprise application regardless of unit tests). This way, when an integration test fails you can examine the logs and understand if the issue is in the code or in an external resource used by the test.



Why integration tests should NEVER run together with unit tests


Now we reach the most important point regarding unit tests. In a big enterprise application integration and unit tests MUST be handled differently. Here is an all too common scenario that I have personally seen multiple times.

Some developer has created a lot of unit and integration tests. All of them are executed by Maven when the test goal is run. However during a server migration some of the integration tests stop working. However everyone on the team is busy and nobody fixes the IPs in the configuration files.

Soon after some integration tests that depend on an external system run really slowly. But nobody has time to investigate the cause. Developers no longer run tests before committing code because the test suite is very slow. More unit tests break as a result, since developers do not maintain them.

New developers come into the team. They start working on the RESERVATION SYSTEM and soon find out that half the test suite is broken. Most of them do not even bother with unit tests anymore.

A valiant developer comes into the team and says that this madness must stop. He spends a day and finds out that the effort required to fix all tests is not realistic for the current time-frame. He also finds out that in several cases the unit tests are broken because of changes in the business requirements. So fixings the tests is not a straightforward process since somebody has to adapt them to new code.

By this point it is clear that tests are not actually used in this project. New developers simply declare that “writing unit tests is a waste of time” and they are right from their point of view, since nobody wants to work with a broken test suit.

This is a scenario that we need to avoid!


Delegating integration tests to Maven Failsafe plugin


There are many ways to split unit and integration tests. My suggestion is to use the Maven failsafe plugin.

Unit tests should follow the naming convention introduced in the first part of this series. Unit test classes are named with “name of class + Test”. Then they are placed in the test directory of the Maven project structure.

The unit tests are executed automatically when the test goal is run.

Next you should add the failsafe plugin in your pom.xml file.

<project><build>
    <plugins><plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.13</version>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
          <execution>
            <id>verify</id>
            <goals>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


Your integration tests however have a different naming convention. They are named as “name of class + IT”. IT stands for Integration Test.

Now the test goal will ignore them. Instead these tests will be executed by the integration-test goal which is a built-in goal into Maven. Here is a table that summarizes this split

Unit testsIntegration Tests
Located inMaven test directoryMaven test directory
Naming conventionname of class + Testname of class + IT
Example class nameBasketWeightTest.javaInvoicingProcessorIT.java
Managed byMaven surefire pluginMaven failsafe plugin
Executed in test goalYesNo
Executed in integration-test goalNoYes


How to run integration tests in your build process


Now that all these changes are done you have great flexibility on how you run unit tests. Most importantly your build server (e.g. Jenkins) should contain a mixture of jobs that deal with both kinds of tests. Here is a overview of suggested jobs.

Job typeScheduleDescriptionTests
Main buildEvery 15 minutes or half hour.Only compiles and runs unit tests. Should finish in 15-20 minutes maxOnly unit tests
Integration buildEvery 24 hours (usually at night)Runs integrations tests. Can run for 2-3 hoursAll tests
QA buildManuallyDeploys to a QA environmentAll tests

The suggested workflow is the following
  1. Developers run the test goal during development
  2. Developers run the test goal before any commit
  3. Developers run the integration-test goal before a major commit with many side effects
  4. Build server compiles code and runs the test goal every 15-30 minutes (main build)
  5. Build server compiles code and runs the integration-test goal every day (integration build)
  6. Build server compiles code and runs the integration-test goal before a release to QA
With this workflow it is clear that developers get fast feedback from the unit tests so anything that breaks can be fixed immediately. The boring process of running integration tests is left to the build server which runs them automatically in a well defined schedule.


Conclusion


In this post we have finally tackled integration tests. We showed you the differences with unit tests regarding test focus, external systems and running time.

We also hope we convinced you that they must be handled differently. Our suggested method for splitting tests is the maven failsafe plugin.

Finally we proposed some combinations of build jobs and how they run different types of tests.

Feel free to post your suggestions below regarding unit and integration tests.




Programming thought of the day:
  • Me: Siri, why am I alone? 
  • Siri: *opens front facing camera*


Wednesday, May 17, 2017

Python pathlib - Move and rename documents placed in several nested folders into a new single folder


Let's say I have these files across several folders like this:

dir
├── 0
   ├── 103425.xml
   ├── 105340.xml
   ├── 109454.xml

│── 1247
   └── doc.xml
├── 14568
   └── doc.xml
├── 1659
   └── doc.xml
├── 10450
   └── doc.xml
├── 10351
   └── doc.xml
but my goal is to place all files like this:

dir
├── 0
   ├── 103425.xml
   ├── 105340.xml
   ├── 109454.xml

│── 1247
   └── doc.xml
├── 14568
   └── doc.xml
├── 1659
   └── doc.xml
├── 10450
   └── doc.xml
├── 10351
   └── doc.xml
So basically I want to Move and rename documents placed in several nested folders into a new single folder.

Using Python should be enough to complete this task. Pathlib is a module that manipulate filesytem paths as string objects. This module is best used with Python 3.2 or later, but it is also compatible with Python 2.7. If using it with Python 3.3, you also have access to optional openat-based filesystem operations.
This Python code will do the job:

import os
import pathlib

OLD_DIR = 'files'
NEW_DIR = 'new_dir'

p = pathlib.Path(OLD_DIR)
for f in p.glob('**/*.xml'):
    new_name = '{}_{}'.format(f.parent.name, f.name)
    f.rename(os.path.join(NEW_DIR, new_name))





Programming thought of the day:
  • If Bill Gates had a penny for every time I had to reboot my computer ...oh wait, he does.


Tuesday, April 4, 2017

Python DataSets and Pandas


Python is a powerful, flexible, open source language that is easy to learn, easy to use, and has powerful libraries for data manipulation and analysis. Its simple syntax is very accessible to programming novices, and will look familiar to anyone with experience in Matlab, C/C++, Java, or Visual Basic. Python has a unique combination of being both a capable general-purpose programming language as well as being easy to use for analytical and quantitative computing.

For over a decade, Python has been used in scientific computing and highly quantitative domains such as finance, oil and gas, physics, and signal processing. It has been used to improve Space Shuttle mission design, process images from the Hubble Space Telescope, and was instrumental in orchestrating the physics experiments which led to the discovery of the Higgs Boson (the so-called "God particle").

Python is easy for analysts to learn and use, but powerful enough to tackle even the most difficult problems in virtually any domain. It integrates well with existing IT infrastructure, and is very platform independent. Among modern languages, its agility and the productivity of Python-based solutions is legendary. Companies of all sizes and in all areas — from the biggest investment banks to the smallest social/mobile web app startups — are using Python to run their business and manage their data.




This tutorial was developed using Eclipse IDE.
In order to run Python in Eclipse, go to Help -> Install new Software ... -> and use: 'Pydev p2 Repository - http://pydev.sf.net/updates/'

This tutorial was developed using Python 3.6.1
To Download Python:
https://www.python.org/downloads/

Installing packages (Pandas) :
Next, go to your terminal or cmd.exe, and type:pip install pandas. Did you get a "pip is not a recognized command" or something similar? No problem, this means pip is not on your PATH. Pip is a program, but your machine doesn't just simply know where it is unless it is on your PATH. You can look up how to add something to your path if you like, but you can always just explicitly give the path to the program you want to execute. On Windows, for example, Python's pip is located in C:/Python34/Scripts/pip. Python34 means Python 3.4. If you have Python 3.6, then you would use Python36, and so on.

Thus, if regular pip install pandas didn't work, then you can do
C:/Python34/Scripts/pip install pandas

Matplotlib library:
C:/Python34/Scripts/pip install matplotlib


I am going to show you some Python code in which we can see how to manipulate some data using Pandas module ...

The next code pulls data for Exxon from the Yahoo Finance API, storing the data to our data1  variable.

from pandas_datareader import data
import datetime as dt

''' This pulls data for Exxon from the Yahoo Finance API '''
ticker = 'XOM'  

start = dt.datetime(2010, 1, 1)
end = dt.datetime(2015, 8, 22)
data1 = data.DataReader(ticker,'yahoo',start,end)

print(data1)
print(data1.head())


Pandas works great with other modules, Matplotlib being one of them. Let's see! Open your terminal or cmd.exe, and do pip install matplotlib. You should already have got it I am prety sure with your pandas installation, but we want to make sure


from pandas_datareader import data
import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style

''' This pulls data for Exxon from the Yahoo Finance API '''
ticker = 'XOM'  

start = dt.datetime(2010, 1, 1)
end = dt.datetime(2015, 8, 22)
data1 = data.DataReader(ticker,'yahoo',start,end)

style.use('fivethirtyeight')

data1['High'].plot()
plt.legend()
plt.show()



You can download the complete project with this Python code using Pandas to manipulate data from my GitHub repository:

https://github.com/rolando-febrero/Python_DataSets_and_Pandas





Programming thought of the day:
  • Funny facts about Google users:
    50% of people use Google well as a search engine.
    The rest  50 % of them use it to check if their internet is connected ....


Friday, March 31, 2017

Microservice Architecture - Explanation, pros and cons


As most Software Developers out there, most of my experience is with (huge) monolithic apps. So when I first read or heard about microservices I was a little confused about how they work and how to implement this kind of architecture, and most important.. does it work? any pros and cons? is it the next step in the development process?

I don't believe microservices can be considered "the best aproach" in every single situation. However, it looks like a good option. But, as everything in life, all is relative...

I'll show you some facts I found on the internet about microservices architecture so you can have a better understanding about it. It you are confused (as I was), hope it helps to clarify some concepts....


1. What is Architecture (Software)?

Architecture is the fundamental organization of a system embodied in its components (i.e. Web Server, Application Server, Databases,Storage, Communication layer, etc…), their relationships to each other, and to the environment (i.e. deployment environment shared server, dedicated server, cloud deployment, etc..), and the principles guiding its design and evolution.

2. What is microservice architecture ?

Microservice means developing a single, small, meaningful functional feature as single service, each service has it’s own process and communicate with lightweight mechanism, deployed in single or multiple servers.

3. Advantages of microservice architecture ?

Each micro service is small and focused on a specific feature / business requirement.
Microservice can be developed independently by small team of developers (normally 2 to 5 developers).
Microservice is loosely coupled, means services are independent, in terms of development and deployment both.
Microservice can be developed using different programming language (Personally I don’t suggest to do it).
Microservice allows easy and flexible way to integrate automatic deployment with Continuous Integration tools (for e.g: Jenkins, Hudson, bamboo etc..).
The productivity of a new team member will be quick enough.
Microservice is easy to understand, modify and maintain for a developer because separation of code,small team and focused work.
Microservice allows you to take advantage of emerging and latest technologies (framework, programming language , programming practice, etc.).
Microservice has code for business logic only, No mixup with HTML,CSS or other UI component.
Microservice is easy to scale based on demand.
Microservice can deploy on commodity hardware or low / medium configuration servers.
Easy to integrate 3rd party service.
Every microservice has it’s own storage capability but it depends on the project’s requirement, you can have common database like MySQL or Oracle for all services.

4. Disadvantages of microservice architecture ?

Microservice architecture brings a lot of operations overhead.
DevOps Skill required (http://en.wikipedia.org/wiki/DevOps).
Duplication of Effort.
Distributed System is complicated to manage .
Default to trace problem because of distributed deployment.
Complicated to manage whole products when number of services increases.

5. In which case / requirement microservice architecture best fit ?

When you need to support Desktop, web , mobile, Smart TVs, Wearable, etc… or you don’t know in future which kind of devices you need to support.

6. Which products / companies are using Microservie architecture?

Most large scale web sites including Twitter, Netflix, Amazon and eBay have evolved from a monolithic architecture to a microservices architecture.

7. How independent micro services communicate with each other?

It’s depend upon requirement, normally developers use HTTP/REST with JSON or Protobuf (Binary protocol) but are free to use any communication protocol.

8. Why is it that everyone are talking about microservices now?

It’s been nearly 15 years since the concept of Service Oriented Architecture really took hold. With the improvement of RESTful web service and JSON as a data interchange format has made it easier than ever to build easily interconnectable services simply and quickly.

9. Presentation

http://www.infoq.com/presentations/Micro-Services



10. Video





11. Picture: Monolithic vs Modular vs Service oriented architecture







Programming thought of the day:


  • Are you an exception? I bet I can catch you. =)

Thursday, March 9, 2017

The Top 10 AI And Machine Learning Use Cases Everyone Should Know About


This is an interesting article I found at Forbes.com . This might help to understand and visualize how important and critical is working with Machine Learning technology. Possibilities are endless, but for now, we are going to focus on 10 examples.... enjoy!


by: Bernard Marr

Machine learning is a buzzword in the technology world right now, and for good reason: It represents a major step forward in how computers can learn.

Very basically, a machine learning algorithm is given a “teaching set” of data, then asked to use that data to answer a question. For example, you might provide a computer a teaching set of photographs, some of which say, “this is a cat” and some of which say, “this is not a cat.” Then you could show the computer a series of new photos and it would begin to identify which photos were of cats.

Machine learning then continues to add to its teaching set. Every photo that it identifies — correctly or incorrectly — gets added to the teaching set, and the program effectively gets “smarter” and better at completing its task over time.

It is, in effect, learning.


1. Data Security

Malware is a huge — and growing — problem. In 2014, Kaspersky Lab said it had detected 325,000 new malware files every day. But, institutional intelligence company Deep Instinct says that each piece of new malware tends to have almost the same code as previous versions — only between 2 and 10% of the files change from iteration to iteration. Their learning model has no problem with the 2–10% variations, and can predict which files are malware with great accuracy. In other situations, machine learning algorithms can look for patterns in how data in the cloud is accessed, and report anomalies that could predict security breaches.

2. Personal Security

If you’ve flown on an airplane or attended a big public event lately, you almost certainly had to wait in long security screening lines. But machine learning is proving that it can be an asset to help eliminate false alarms and spot things human screeners might miss in security screenings at airports, stadiums, concerts, and other venues. That can speed up the process significantly and ensure safer events.


3. Financial Trading

Many people are eager to be able to predict what the stock markets will do on any given day — for obvious reasons. But machine learning algorithms are getting closer all the time. Many prestigious trading firms use proprietary systems to predict and execute trades at high speeds and high volume. Many of these rely on probabilities, but even a trade with a relatively low probability, at a high enough volume or speed, can turn huge profits for the firms. And humans can’t possibly compete with machines when it comes to consuming vast quantities of data or the speed with which they can execute a trade.


4. Healthcare

Machine learning algorithms can process more information and spot more patterns than their human counterparts. One study used computer assisted diagnosis (CAD) when to review the early mammography scans of women who later developed breast cancer, and the computer spotted 52% of the cancers as much as a year before the women were officially diagnosed. Additionally, machine learning can be used to understand risk factors for disease in large populations. The company Medecision developed an algorithm that was able to identify eight variables to predict avoidable hospitalizations in diabetes patients.

5. Marketing Personalization

The more you can understand about your customers, the better you can serve them, and the more you will sell. That’s the foundation behind marketing personalisation. Perhaps you’ve had the experience in which you visit an online store and look at a product but don’t buy it — and then see digital ads across the web for that exact product for days afterward. That kind of marketing personalization is just the tip of the iceberg. Companies can personalize which emails a customer receives, which direct mailings or coupons, which offers they see, which products show up as “recommended” and so on, all designed to lead the consumer more reliably towards a sale.

6. Fraud Detection

Machine learning is getting better and better at spotting potential cases of fraud across many different fields. PayPal, for example, is using machine learning to fight money laundering. The company has tools that compare millions of transactions and can precisely distinguish between legitimate and fraudulent transactions between buyers and sellers.

7. Recommendations

You’re probably familiar with this use if you use services like Amazon or Netflix. Intelligent machine learning algorithms analyze your activity and compare it to the millions of other users to determine what you might like to buy or binge watch next. These recommendations are getting smarter all the time, recognizing, for example, that you might purchase certain things as gifts (and not want the item yourself) or that there might be different family members who have different TV preferences.

8. Online Search

Perhaps the most famous use of machine learning, Google and its competitors are constantly improving what the search engine understands. Every time you execute a search on Google, the program watches how you respond to the results. If you click the top result and stay on that web page, we can assume you got the information you were looking for and the search was a success. If, on the other hand, you click to the second page of results, or type in a new search string without clicking any of the results, we can surmise that the search engine didn’t serve up the results you wanted — and the program can learn from that mistake to deliver a better result in the future.

9. Natural Language Processing (NLP)

NLP is being used in all sorts of exciting applications across disciplines. Machine learning algorithms with natural language can stand in for customer service agents and more quickly route customers to the information they need. It’s being used to translate obscure legalese in contracts into plain language and help attorneys sort through large volumes of information to prepare for a case.

10. Smart Cars

IBM recently surveyed top auto executives, and 74% expected that we would see smart cars on the road by 2025. A smart car would not only integrate into the Internet of Things, but also learn about its owner and its environment. It might adjust the internal settings — temperature, audio, seat position, etc. — automatically based on the driver, report and even fix problems itself, drive itself, and offer real time advice about traffic and road conditions.





Programming thought of the day:

  • Maybe if we start telling people the brain is an app they will start using it.