Wednesday 30 August 2017

HTML vs HTML5

Difference between HTML and HTML5The term markup language may not ring the bell for an individual who has never been a part of the web designing universe but for the professionals, it is no less than the gravitational force that keeps the world wide web organized and accessible. The markup languages are basically used to process, embed, manage and manipulate text in style files and tags by making them easier for computers to understand and control. The markup languages laid the foundation of World Wide Web years ago and all that you see in organized format is due to the perfect combination of design (CSS), text (markup) and their interaction with the help of front end scripts.
HTML
HTML (Hyper Text Markup Language) was the first out and out markup language for web development purposes and all the web pages that we see in an organized and interactive format with engaging multi media, styled texts, and many more things are due to some form of variation of the latest HTML language version. The language allows developers to organize text, hyperlinks, and multimedia in the form of interactive and engaging content in web browsers. The text structures are defined by various tags and these tags are defined by < and > characters. World Wide Web Consortium is responsible for regulating the HTML standards and its developing guidelines and works ethics since 1997. The language has evolved greatly from its primary days of complicated style and content tags principle in one single go to use of style sheets and content defining tags separately.
HTML5
The HTML markup language has very much evolved with time and HTML5 is the latest version that comes with a plethora of new features and efficiency in the web development galaxy. The latest version is a better integration of CSS, Java and HTML components that are focused to make it easy for developers to create better apps and make the whole technology better accessible for the mobile devices.

Difference between HTML and HTML5

HTML
HTML5  
Allows the JavaScript to run only in the browser interface but not originally in the browser background.
The JavaScript can actually run in the background of the browser itself through JS web worker API.
Does not allow audio <audio> and video <video> tags.
Does allow audio and video controls and the tags.
One cannot draw various shapes (circles, triangles, rectangles, and others) in older HTML versions.
HTML5 allows one to draw various shapes (circles, triangles, rectangles, and others).
Older HTML versions are less mobile-friendly.
HTML5 language is more mobile-friendly.
Supports vector graphics only with the help of programs like Flash, Silver-light, and VML.
HTML 5 allows the use of virtual vector graphics without the help of programs like Flash, Silver-light, and VML.
Doctype declaration is too long and complicated in HTML.
Doctype declaration is quite simple and easy in HTML 5.
Character encoding is long and complicated in HTML.
Character encoding is pretty simple and easy in HTML 5.
It uses cookies to store temporary data.
It uses SQL databases and application cache to store offline data.
Tracking the GeoLocation of a user browsing any website through HTML is almost impossible.
One can track the GeoLocation of a user easily in HTML 5 by using  JS GeoLocation API.
Old elements still exist in older HTML.
strike, frame, frameset, font, center, tt, big, dir, acronym, basefont, noframes, applet, isindex and various other deprecated elements are dropped completely in HTML 5.
Attributes like charset, async and ping are absent in HTML.
Attributes of charset, async and ping are a part of HTML 5.
Parsing rules are less efficient and overall compatibility across various platforms is obsolete.
HTML 5 possesses better parsing rules and compatibility across various platforms.
It does not allow drag and drop effects.
HTML5 allows drag and drop effects.
IT technology is susceptible to changes and upgrades over the time and the fact that changes are inevitable holds true even in terms of markup languages. The HTML5 language has provided more benefits to developers in terms of better audio and video support with the help of incorporating the use of third party plug-ins which was not possible with the earlier versions. The various other differences between the two markup languages are:
  • The latest version of HTML (HTML5) boasts off more API’s than its predecessor. For example, HTML did not allow Java Script to run within the web browser but the latest version does support Java Script to run in background by using JS web worker API.
  • HTML5 supports the Vector graphics without colligation of programs like Flash, Silver-light, and VML.
  • The mathematical notations are better presented in HTML5 than its previous versions through the use of MathML.
  • The latest version of the markup language allows better drag and drop effects that were not possible with the previous versions.
  • HTML5 provides better compatibility across all platforms due to the much-improved parsing rules that it possesses over other versions.
  • HTML5 allows SQL databases and application cache to store temporary (offline) data while in the previous versions; only browser cache was available for serving the cause.
  • The HTML5 allows better input attributes and form controls than its predecessors like email, date and time, URL, range, tel, search, number and much
  • The deprecated elements like strike, frame, frameset, font, center, tt, big, dir, acronym, basefont, noframes, applet, isindex are dropped completely in the latest version of markup language.
  • The new and improved HTML5 consists of various new elements like; nav, audio, figcaption, progress, command, time, datalist, video, figure, meter, data, section, time, aside, canvas, summary, rp, rt, details, wbr, header, footer, keygen, embed, article, hgroup, bdi, mark, output, source, track, section, ruby and many more.
  • HTML5 also possesses the attributes like charset, async and ping, which were not present in the earlier versions of the web designing language.
  • Tabindex, id and repeat can be applied for all the elements in the latest version of markup language.
Conclusion:
Change is the rule of nature and information technology is no exception to this rule. The fickle technology aspect is consistently improving by leaving behind old technology and embracing the new. The markup languages are focused on providing a better web experience for developers and end users alike and also to make World Wide Web more accessible to the people living in even the world’s remotest corners and only better technology and attributes can help in that process.
The advanced HTML 5 is always a better prospect than the older versions due to the simple fact of more audio and video controls available with the interface. The developers who want to stay relevant with the latest technology and practices should never shy away from the latest version of the markup language. The future roll outs of the language are expected to provide better privacy tools and other core applications foundations along with digital rights management tools as stated by the World Wide Web Consortium.
The HTML horizon will expand more in upcoming years and in order to combat the needs of modern day users and to provide a better web browsing experience to them will definitely require the present developers to unravel new ways and use better technology to cater the needs of social media and mobile interface that are constantly changing the face of the digital media industry. It is very important that the web developing professionals embrace the latest version of markup language to not only stay relevant with the present demands of the industry but also to use the latest technology to overcome the challenges posed in terms of mobile technology, more responsive designs and better compatibility of the overall web applications.
Source : CrazyProgrammer

Thursday 17 August 2017

Difference between Tree and Graph Data Structure

Trees and graphs are two well known mostly used data structures in algorithms.
Tree Data Structure
In Computer science, a tree is a widely used Abstract Data Structure (ADT). It can be defined recursively as a collection of nodes, where each node contains a value, starting with root node and list of references to other nodes (children), with the constraint, that no reference from it, is called leaf node.

Graph Data Structure
In Computer science, graph also an abstract data structure (ADT), that is mean to implement undirected graph and directed graph concepts of mathematics especially the field of graph theory. Graph is a mathematical representation of a set of objects and relationships or links between objects. We represent objects as nodes or vertices in graph and relations between vertices as edges or arcs. So, we can define that graph is set of vertices V and set of edges E. These edges may be directed or undirected.
Now let’s see what are the differences between graph and tree in tabular form.

Difference between Tree and Graph

Trees
Graphs
1. A tree is a special kind of graph that there are never multiple paths exist. There is always one way to get from A to B.
1. A graph is a system that has multiple ways to get from any point A to any other point B.
2. Tree must be connected.
2. Graph may not be connected.
3. Since it connected we can reach from one particular node to all other nodes. This kind of searching is called traversal.
3. Traversal always not applicable on graphs. Because graphs may not be connected.
4. Tree contains no loops, no circuits.
4. Graph may contain self-loops, loops.
5. There must be a root node in tree.
5. There is no such kind of root node in graphs
6. We do traversal on trees. That mean from a point we go to each and every node of tree.
6. We do searching on graphs. That means starting from any node try to find a particular node which we need.
7. preorder, inorder, postorder are some kind of traversals in trees.
7. Breadth first search, Depth first search, are some kind of searching algorithms in graphs.
8. Trees are directed acyclic graphs.
8. Graphs are cyclic or acyclic.
9. Tree is a hierarchical model structure.
9. Graph is network model.
10. All trees are graphs.
10. But all graphs are not trees.
11. Based on different properties trees can be classified as Binary tree, Binary search tree, AVL trees, Heaps.
11. We differ the graphs like directed graphs and undirected graphs.
12. If tree have “n” vertices then it must have exactly “n-1” edges only.
12. In graphs number of edges doesn’t depend on the number of vertices.
13. Main use of trees is for sorting and traversing.
13. Main use of graphs is coloring and job scheduling.
14. Less in complexity compared to graphs.
14. High complexity than trees due to loops.


Example

Tree:
Tree Data Structure
Graph:
Graph Data Structure


Wednesday 2 August 2017

Why Are Some Programming Languages Faster than Others Programming Language ?

There are a number of programming languages out there, each with their own quirks and features. Due to different design choices and use cases, some are faster or slower than others. Of course, this speed (or the lack of it) usually comes at a price. Put simply, it’s these differences that cause these performance changes.

What Is a Programming Language?

No matter how programming languages look, they’re still doing the same thing: getting your computer to do something. All lines of code are eventually translated to a series of obscure numbers (also known as machine code). It could be said that all programming languages past machine code (including assembly, which maps numbers to readable words) are designed to make creating software easier.
assembly
These languages can be classified by looking at the level of abstraction they do for programmers. Basically, that’s how much is taken care of by the language itself, things that on a lower level would be handled manually. This tends to make higher-level languages much easier to program in, because there’s a little less to learn and remember about.
An example of this is memory management. For some languages with less abstraction, a programmer has to manually say how much RAM they need for the task on hand, and then release it once it’s done. If they don’t do this, or if something happens that they don’t account for, this memory usage might grow and grow. Higher-level languages such as Java do this automatically.

The Cost of Automation

That being said, there are certainly some downsides to using higher level languages. Namely, speed. Sometimes, the more that’s taken out of a programmer’s control, the less efficient a program might become.
For example, languages with automatic memory management (usually called garbage collection) can be slower than ones which do not implement this. This is because the program needs time to go through itself and clear out memory at specific intervals.
garbage collection

Compiling: Your Mileage May Vary

Generally, programs written in languages such as C and C++ are said to be faster than most. Most operating systems are written using them, along with some even lower level assembly code. One of the main factors of this comes from them being compiled (as compared to being interpreted).
What this means is that before being run, the source of the program is first translated down into a lower level: machine code. The resulting products are called binaries (e.g. DLL files), which are linked together with the relevant files to make them work, creating what’s called an executable.
binaries
However, one drawback of this is the time it takes to actually compile such programs. Large ones such as Mozilla Firefox can take up a good half an hour or so. Fortunately, most software these days do this process beforehand, making it easier to just install and use.
Since the end result is written in a language that a computer can directly understand, it tends to be quite fast. Compare this to interpreted languages, which go through another step. Having said that, not all compiled languages are the same.

Compiler Efficiency

To translate any sort of code into something a computer can understand (machine code), it needs to be run through a special program called a compiler. One language can have multiple compilers for it. For example both GCC (GNU Compiler Collection) and Clang can be used to compile programs written in C.
Since it’s the compiler’s job to translate a program into machine code, how well it does this can impact its speed somewhat. The same source can have slightly different results, depending on how the compiler is configured, for example.
gcc compiler
This can also mean that different compiled languages can perform faster or slower than others. Generally, C and C++ are said to be very fast, since the compilers for them have gone through years of development and improvements. Other languages don’t always have that maturity

Interpreted Language: One More Step

As said before, interpreted languages are not compiled beforehand. Instead, they are translated whilst being run, usually by a separate program known as an interpreter. For example, Java programs are run through something called the JVM (Java Virtual Machine).
Because these languages don’t need prior compilation, programs written in them are generally much easier to make and test. As a result however, the software itself can be significantly slower. Interpreters execute the source of a program line by line, which incurs a speed penalty. Along with this, the interpreter itself needs a little time to start up.

Bytecode: A Slight Compromise

Due to their somewhat slower nature, many interpreted languages actually use some form of compiling to speed up their performance. Before running, these programs are translated down to bytecode, a type of language easy for interpreters to work with. For example, both Java and Python do this before running, creating CLASS and PYC files, respectively.java bytecode
Basically, it’s a bit of a compromise between ease of development and speed. It’s faster than just interpreted code, and easier to set up than its fully compiled counterparts. Bytecode also has the added benefit of being more portable compared to programs compiled to machine code. If the interpreter exists for the CPU architecture, it will run.
In some languages, there’s also something called JIT (just-in-time) compilation. Basically, it takes bytecode and compiled bits of it down to machine code. Like the name suggests, this happens while the program is running. It’s meant to speed up execution, at the cost of a slower first start since parts of it need time to compile.

Don’t Sweat It

All this being said, these differences are not really a problem for most people, especially with computers becoming faster and faster every year. While some programming languages are certainly faster than others, what really matters is it gets something done.
Sure, if you’re very experienced with programming, it’s fine trying to eke out performance from your code. But if you’re just starting out, it’s much better to worry about learning the motions in the first place. It doesn’t matter how fast or slow a language is considered if nothing is written in the first place after all.
There’s also the matter of using the right tool for the job. Assembly language for example is very good for writing operating systems, because it’s so low level. But it’s overkill for regular desktop applications. There are also languages designed for the web, and so on.

Source :- MAKEUSEOF

Saturday 17 June 2017

Do Computers really generate random numbers?

If you needed to make a choice at random, you might flip a coin or roll a die. If you did, you'd have a leg up on your computer. That's because computer software can never generate a truly random number. That's not so important when you want to play a favorite album on shuffle, but when it comes to high-stakes areas like security and gambling, it can mean everything.
Pick A Number, Any Number
Modern computers can do some pretty amazing things. So why can't they do something as simple as simulating a dice roll? It all comes down to the way computers are programmed. Computers follow algorithms, which are essentially just lists of instructions on how to carry out tasks. They're slaves to their instructions, so they're completely predictable. Still, engineers are pretty savvy, and they've come up with a few different ways to make computers generate something very close to random numbers, even if they can't generate true randomness.
As Close As Random Gets
One way to come up with seemingly random numbers is with a pseudo-random number generator. Those algorithms use things like mathematical formulas or predetermined number tables to create number sequences that appear random. These days, the algorithms that generate pseudo-random numbers are so good that it would take some real detective work to determine that the numbers aren't actually random. Still, it's possible. With the right programming chops, you could reverse-engineer the pseudo-random numbers used to run an online poker game or encrypt sensitive data and come out with a lot of other people's money.
You could argue that true random number generators, the second method, actually do produce randomness. But we'd have you on a technicality there. Here's why: true random number generators use physical phenomena to extract actual randomness, which they then use to generate a random number. Those physical phenomena could be as simple as a roll of real dice, but they're more often easier-to-measure things like radioactive decay, background noise in the atmosphere, or even the amount of time between a person's keystrokes. But that just provides the seed. There are still algorithms involved in true random number generators, and algorithms are never truly random.
Source :- Curiosity.com

Tuesday 13 June 2017

In India, IT Giants at Talent War



Microsoft, LinkedIn, Oracle, Facebook and Google are increasing their staff in India triggering a talent war with Indian information technology (IT) services providers.
These US-based firms are seeking Indian engineers to work on technologies similar to their global counterparts even as they face rising protectionism in their home market.
“Facebook, LinkedIN and other companies are increasing headcount in India. Some of them doubled the number in the last four months,” a source said.
Facebook, Google, LinkedIn, Microsoft, Oracle and Apple did not comment for this article.
Sources said Indian delivery centres of these companies were on a par with global resources and they were trying to create competence instead of acting as backend offices.
Other US-based companies like Target and Lowe’s are hiring engineers in India in areas like machine learning, big data analytics and networking.
“India is a hotbed for experimentation in digital technologies,” said Anand Subramaniam, engagement manager, Zinnov, a management consultancy and research firm.
Target India, which has 2,500 employees in India, will hire professionals in technology and areas such as marketing, supply chain and animation.
“We will hire talent with Java and Open Source capabilities and for niche areas with expertise in machine learning and neuro-linguistic programming. In addition to technology, India has a talent pool in computer-generated imagery and animation. Our marketing team is looking to expand our CGI capabilities and tap this pool,” said Shalini Natraj, head of HR at Target India.
A Bain & Company report published last month said global in-house centres (GICs) in India would play a bigger role for enterprises. “Indian GICs will play a more active role in driving top-of-mind investment priorities of global C-level executives at Fortune 1,000 companies in the next three to five years. In addition, more senior leaders of the enterprise, particularly those two levels below CEOs, will operate out of Indian GICs over this period,” the report added.
Lowe’s, a $65 billion home improvement company that has 1,000 employees in India, said its IT and analytics capabilities in the country would amplify its growth strategy.
“We are hiring people in e-commerce and digital technologies, retail and supply chain technologies, core engineering and infrastructures such as networking, virtual infrastructure and containerisation, analytics and big data, and project management,” said James Brandt, managing director, Lowe’s India.
Subramaniam said the India centres of global companies would want to create new capabilities for the parent organisation and build competence in niche technology areas.
Cloud over hiring clears
  • Currently, there are about 1,100 GICs in India, employing more than 800,000, says Bain & Company
  • India centres of US-based firms ramped up hiring sharply in 4 months
  • Apple had said it would, directly and indirectly, employ 4,000 here
  • Report says Indian GICs will play big roles in global decision making over next two-three years
  • Thousands of people with knowledge in machine learning, data analytics are added by technology companies