Wednesday, May 16, 2012

Google

Mia Skinner

What is Google?

Wikipedia describes Google as "an American multinational corporation which provides Internet-related products and services, including Internet searchcloud computing, software and advertising technologies. Advertising revenues from AdWords generate almost all of the company's profits."


History: An Overview

Google began sixteen years ago with two Stanford graduate students, Larry Page and Surgey Brin. They began working on a search engine called BackRub. At first it was hosted at Stanford, but quickly used up too much bandwidth for the university to support. In 1997, the two decide that BackRub needs a new name and decide on Google, a play off of the numerical term "googol" for the number represented by a 1 followed by 100 zeros. They hoped to one day create a search engine that would seamlessly organize an infinite amount on the web. August 19, 2004, they had their initial market offering (IPO) and hired Eric Schmidt for an agreed term of 20 years (until 2024). After the IPO, the founders Surgey Brin and Larry Page reduced their salary to $1.They deemed the phrase, "don't be evil" as their unofficial slogan. Their current headquarters is in Mountain View, California, where they currently offer free wi-fi access to the town. 




Products & Services 


Google's rapid growth since its incorporation triggered many products, acquisitions and partnerships far beyond the company's core web search engine. Google has acquired many companies, focusing on small venture capital companies, including the following:


  •  Keyhole, Inc. -  start-up company developed a product called Earth Viewer that gave a three-dimentional view of the Earth (Was renamed to Google Earth in 2005)
  • YouTube 
  •  DoubleClick (Gaining relationships with advertising companies)
  • GrandCentral (Later renamed Google Voice)
  •  Aardvark - a social network engine


Google has endless products across the web and mobile devices that enhance our day to day lives. All of which come to consumers as FREE. However, there is a price to pay for all of the free services that Google provides- ninety-nine percent of their revenue is derived from its advertising programs. The last one percent of their revenue is generated through licencing and other means. Google acts as a broker across the web, providing us with useful tools, that otherwise would have been monopolized upon by other companies, such as Google Sites (free website building and hosting), Google Drive (free cloud file hosting), and Google Docs (free cloud word processing suite). A complete list of  Google's products and services can be found at http://www.google.com/about/products/. On Demo Slam, videos demonstrate uses for Google's products. 

Google's main advertising system is a two part program, AdWords and AdSense. Google AdWords allows advertisers to show their ads in the Gole content network through either a cost-per-click or cost-per-view schematic. The sister service, Google AdSense, allows website owners to display advertisements on their website, and earn a portion of the income every time an ad on their site is clicked. 

Besides Google's web search services, they offer a variety of free online productivity tools. Gmail is their free email client that was the first service to provide a gigabyte of free email storage. Gmail is well known for its use of AJAX, a programming technique that lets web pages be interactive without refreshing the page. Google Docs is another useful tool that allows its users to create, edit and store documents, spreadsheets and presentation slides online. Google Calendar was another productivity tool created to keep calendars online, as well as synced with personal phones and devices. They have also created a web browser, Google Chrome. 


How Google Influences the Web

Today, Google.com is one of the most visited websites across the web, available and well known all over the world. With its multitude of services and Android mobile services, Google is one of the leaders of the World Wide Web. Google helps individual users search the vast web, day to day, while also providing those users with useful tools on the web, for all to use, free of charge. In that sense, Google is a unique company where it puts the cost of operations on other companies and not the individual users. I believe Google will remain a staple of the web, and continue to innovate and provide free services to help promote the "open web". Google constantly is challenging the web, and helping other companies to also innovate and come up with creative ways to provide services to their customers. 


Sources

http://en.wikipedia.org/iki/Google

http://www.google.com/intl/en/about/company.html

Friday, May 11, 2012

What You Should Know About Instant Messaging

History

The use of the Internet gave rise to the significance of E-mail, as the Internet revolutionized the way people interact and communicate. While there are many benefits to E-mail, faster forms of communication is sometimes needed. The need for faster and more efficient forms of communication via the Internet gave rise to instant messaging (IM), which is an instantaneous form of communication between senders and receivers based on a text-based transmission of information that occurs real-time. IM-chat is effective and efficient such that there is immediate receipt of acknowledgement and reply between two or more participants over the Internet. There are several aspects that frequently come with IM programs: instant messages, chat rooms, video, images, sounds, files, talk, streaming content, and mobile capabilities.

Instant messaging began before Internet during the 1960s on multi-user operating systems that were used as simple notification systems, such as for printing. The Zephyr Notification Service that was invented in 1980s allowed service providers to send messages to users. The first online chat service is known to be the CompuServe CB Simulator in 1980.

Real-time text in instant messaging existed in early versions, where characters appeared as they were typed. This real-time feature exists in modern versions as well, such as AOL’s Real-Time IM.  From 1985 to 1995, Quantum Link, a U.S. and Canadian online service for Commodore 64 and 128 personal computers operated a Q-Link which featured electronic mail, public domain file sharing libraries, instant messaging, etc. The instant messaging was known as “On-Line Messages” (OLM) that was later known as “FlashMail.”




The modern graphical user interface (GUI) that we see today began during the mid-1990s, with clients such as PowWow, ICQ, and AOL Instant Messenger. With this interface came more features including emoticons and the ability to send pictures between users of the IM client.  Instant Messaging has grown to encompass many more features since the mid-1990s including the ability to do voice and video chat, the use of IM in webtop applications (shown by Meebo and Gmail), sharing of desktop and files, and sharing of hyperlinks.  The use of instant messaging has also came to social networking sites as it provides a quicker way to interact with your network online.


Technology


The technology in an all-in-one instant messenger controls both your user interface and your connections to each instant message protocol. Each one includes some way to keep track of the profiles you add, such as saving this information in a user profile or configuration file on your computer. Besides maintaining this and other common features, developers for all-in-one instant messengers have to decide how to keep up with the latest updates to each protocol.

Each protocol needs to know specific characteristics included in each message the user sends or receives. First, it needs to know the data types that the protocol handles, and how the service expects that data to be encoded. Second, it needs to know how to recognize a packet associated with that protocol, which involves frame types and headers used in TCP/IP networks. Finally, it needs to know the application programming interface (API) that directs the server and clients for that protocol.

Some businesses behind some proprietary instant message protocols have tried to limit use of those protocols to their own client applications. They have refused to publish the data type, packet or API information about their protocols. However, enthusiastic developers have found ways to capture each protocol's packets from network traffic, study the data, and reverse-engineer the protocol. With this information, they've added each protocol in their own instant message clients.  Some approaches allow organizations to deploy their own, private instant messaging network by enabling them to restrict access to the server and administer user permissions. Other corporate messaging systems allow registered users to also connect from outside the corporation LAN, by using an encrypted, firewall-friendly, HTTPS-based protocol. Usually, a dedicated corporate IM server has several advantages, such as pre-populated contact lists, integrated authentication, and better security and privacy which is important in a workplace environment for communication with team members and support personnel.

With growth in the open source movement, some companies have opened up the API for their instant message protocols, making it easier for them to keep up with ongoing changes. For example, AOL opened its OSCAR protocol as part of its Open AIM 2.0 Developer Program in March 2008. OSCAR is the protocol currently used by AOL Instant Messenger (AIM) and ICQ.


Importance


Business Application: Instant messaging has proven to be similar to personal computers, email, and the web in that its adoption for use as a business communications medium was driven primarily by individual employees using consumer software at work, rather than by formal mandate or provisioning by corporate information technology departments. Tens of millions of the consumer IM accounts in use are being used for business purposes by employees of companies and other organizations.




This can be seen in the financial industry as many more brokers are using IMs to communicate information about trading quickly.  As voice has its limitations, especially in the stressful environment of the trading day on the trading floor, IMs are used to quickly send information about order volume and price with a record of what was communicated earlier.

In addition, IM has proved to be a powerful tool in customer service.  It is not uncommon now to see vendors provide support or debugging solutions via an IM service on their website to a trained technician.  Customers are now able to interact with a technician at the onset of a problem without wait time on hold when they call the company.  The technician is also able to see the user’s computer and the specific issue first hand, instead of having the user explain it to them.  Technicians are also able to handle multiple customer issues at once as they are able to switch in and out of IM windows for each client.

Personal Benefits: IM also has many social benefits.  First and foremost, you get real time interaction with the other person. This lets you see how they handle conversation, are they responding to your questions quickly and in good humor or do they seem distracted, taking a long time to respond or ignoring your direct questions.  In addition, the other person is able to respond to your messages when they want if something else comes up and they are able to juggle multiple conversations at once.  It provides an open communication portal to the other person that can be accessed as needed unlike phone conversation where it would seem strange to sit on a conversation without saying anything for many moments.  Using instant messaging also lets you have a first interaction in a totally anonymous way, so just in case you don't get a good feeling about this person, you can simply shut down the conversation.

It would be incomplete to not mention the language impact that the use of instant messaging has had on our culture.  This has stemmed from the use of text slang such as the replacement of words with letters (“you” becomes “u”, “are” becomes “r”, etc.) and the use of widely known acronyms (such as “lol” – laugh out loud).  This has increased the consolidation of unnecessary speech when communicating short messages between people and has increased the effectiveness of information sending with short messages between people.  The addition of emoticons to speech has made it possible to also send visual representations of emotions along with messages, enhancing communication based on text alone.  There are both advocates of the change in language siting that it has a positive effect on grammar and phonetics, and people against it as they believe it is damaging the linguistic development of many young people.


Future


The future of instant messaging from a technology standpoint is the aggregating of different IM protocols to a consolidated number of outlets.  This will allow different IM providers (Gmail, AOL, MSN) to communicate with each other.  Essentially, by consolidating the different paths that IMs travel across, users will be able to interact with users in other IM programs and will be able to reach the people they need to talk to easier.  The recent opening of IM APIs is a large step in the consolidation of protocols.

As indicated by CNET’s view on the future of IM, the providers of the service will have increased access to the user due to the penetration of broadband and WIFI into the home and through mobile devices.  As it stands now, communication through IM and email labels users with a username.  The IM providers will essentially become like current telecom companies as they will control the information of communication to users.  Telecom providers can only access users as far as the phone wire goes or access to a cell tower is close.  With IM providers, the messages can reach the end user if the user is offline or online and the user only needs access to internet.  IM providers are also able to access users internationally through the same service; a advantage that telecom companies are unable to provide.

From there, IM providers will  bundle their service with other communication needs for consumers including internet.  For example, if AOL could bundle their communication service (IM in the future) with the internet access of Comcast for a bundle to sell to consumers that would encompass all the consumers telecom needs.  This is a trend that has occurred in the telecom industry (Verizon’s FIOS, Comcast’s Triple Play, etc.) and is anticipated in the IM world.  

Tuesday, May 8, 2012

Reddit



For a long time, news was a resource available only from papers. Later, additional media developed to provide information for the masses:  TV and the internet. With news programs on cable and websites like CNN or BBC, people have had more and more immediate access to what’s happening. However, there is one significant downside to all these sources: you only see what the publishers want you to see. Fox News will only post stories written by Fox News, about whatever they think is important. There is no sorting of information, and no individual contribution. What if you only want to read about news in the Middle East? What if you’re interested in cooking and just want to read what other people have created? Maybe you’ve even created something yourself to share with the world, but how?

Reddit stands out as a content aggregator and community unlike any other. Every day, thousands of people share information ranging from international politics to cat pictures. It is the perfect place to find and share information.


What is it?


Reddit is a social news website where users can submit content, from personal stories and pictures to jokes, news, and more. Other users then vote on the content, rating it positive (upvote) or negative (downvote). The most popular articles are shown on the front page. Users can comment on these posts and reply to others’ comments. Thus, not only are you able to see popular posts, you can also discuss your opinions about them.

Now, at first, this might not seem that exciting. Other sites have done similar aggregation. For example, Digg came before Reddit, and functioned similarly. Google news provides an excellent way to search for articles from just about anywhere. So what sets Reddit apart? Probably the most important feature is the ability users have to create separate pages, or “subreddits” for specific content. They are specified by appending “/r/<subredditname>” to the end of the reddit url (example: reddit.com/r/worldnews) When an article is posted, it can be posted to a specific subreddit. Users can subscribe to subreddits they are interested in, meaning they will only see content relevant to themselves. When a user logs in, the front page they are greeted with is filled with content from their subreddits (and nothing else), providing a unique experience for each user. Visitors to the site who are not logged in see posts from popular subreddits (such as /r/funny and /r/politics).

What this allows is a huge amount of diversity within a single website. Communities form around subreddits, with unique, user-created guidelines and policies intended to make it as enjoyable as possible to browse the content you want to browse. It is almost impossible to think of a topic for which there isn’t a subreddit. Cute pet pictures? Try /r/aww. Religious subreddits? Popular ones include /r/Christianity and /r/atheism, but you can find just about any religion you want (/r/Sikhism, anyone?). There are Reddit-community based subreddits as well. Go to /r/askreddit if you want advice, /r/todayilearned if you want fun facts, or /r/lifeprotips if you want to know how to make your life a bit better. Most colleges have subreddits devoted to them, as do most sports teams, states, cities, and more. Basically, if you’re interested in something, chances are there is a subreddit for that something.


History

Reddit was founded in 2005 by Alexis Ohanian and Steve Huffman. They received initial funding from Y Combinator (a startup funding venture capitalist firm). Much of the site was coded by the two In October 2006, they sold the site to Conde Nast. In 2011, they were split from Conde Nast to become a separate subsidiary under Advance Publications, Conde Nast’s parent company.

Reddit went through a large growing phase, but was always built on the premise that it was to be mainly user-driven. The content posted on the site was to be completely unrestricted and left up to the users (known as Redditors) discretions. It picked up where others failed by being more expansive and flexible than anything before. Digg, which was popular before Reddit was created, fell in popularity when it became apparent that it was very difficult to get your content to be seen on the front page – the only people who seemed to be able to accomplish this task were a selective few “power users”, and this felt too much like a normal news website. Additionally, Digg only had a set number of different sections to post information, which limited diversity.


Why does it matter?



Reddit is a big deal. It is currently ranked in the top 50 websites in the US for daily traffic. With over 13 million unique visitors per month and over one billion pageviews per month, it is clear that Reddit hosts a huge quantity of people. And since it is a heavily community-oriented site, Reddit has the potential to affect real-world scenarios much like any other large community. Redditors have been known for deeds as small as helping raise money for a school and as large as staging global rallies. For example, Redditors helped raise money and garner support for Jon Stewart and Stephen Colbert's "Rally to Restore Sanity and/or Fear" campaign, aimed at promoting reasoned discussion in the political battleground. Like it or not, Reddit is a large community with a significant impact on the real world. 


-Arjuna Hayes


Sources

Sunday, May 6, 2012

Viruses on the World Wide Web


Blog Entry
70-643 Publishing on the World Wide Web
Dr. Anthony Stanton
Carlijn Valk

Viruses on the World Wide Web
What is a Virus?

Viruses are unauthorized computer programs that are capable of spreading from one computer to another by attaching itself to either a file or other program. Because most files or programs that viruses are attached to are executable files, a virus can exist in a computer, dormant, till the user actually opened the infected file or ran the infected program. Some computer viruses are more malicious then others. Some viruses can take sensitive information off of your computer or seriously reduce the computers productivity or damage data. Often people confuse viruses and other forms of malware, because in some cases they act in similar ways.  The term malware includes a wide variety of unauthorized, computer harming programs not all of which function in the same way as a virus. A worm, which is very frequently confused with viruses, functions much like a virus only it, unlike a virus, does not need any human help to spread it. Unlike a virus that needs the user to open the infected file or run the infected program, because worms take advantage of information on your computer to duplicate itself and send its self to a lot of different computers. Trojan horses are also often confused with viruses because like viruses they are attached to useful or legitimate seeming file such as helpful looking software updates. When run on your computer however the Trojan horse can either delete important files or open a back door to your computer giving a hacker access to all your personal or sensitive information. Trojan horses are not viruses though because they cannot spread themselves from one computer to another computer.


When did viruses first start spreading?

Computer viruses only really came around the 1980s when home desktop units became more affordable and thus more popular. One of the very first viruses was allegedly created by a 15-year-old high school student as a prank in 1982. This early computer virus was called Elk Cloner, written for Apple II systems, was not particularly malicious, but it could in some cases over write reserved space on some floppy disks. Its only intended purpose was to display a poem every 50h boot. The virus spread by implanting itself into the memory of the computer from an infected floppy. Then when a non-infected floppy was inserted into the infected computer the virus would infect that floppy and consequently any other computer that it was inserted into.


What is the purpose of Viruses?

Though this early virus created as a prank was not intended to directly harm the computer or user, today there are very harmful computer viruses circulating the online community. The purpose of these viruses varies. Some perform identity theft, overload a server, occupy the control function of a strangers hard drive, and some are even born out of an intellectuals simple desire to prove their proficiency at their craft. The Internet is littered with untrustworthy downloadables and sketchy updates but most computer users protect them selves from viruses and other forms of malware with firewalls and antivirus scanners.


In future the battle between Viruses and those who protect people against Viruses will continue as both parties improve their skill and strategy.

Clearly viruses have come a long way from copying themselves off of floppy disks, and hackers have, too, developed their skill and the complexity of the viruses they write. So protective software programmers too have developed their skill in preventing these malicious attacks from viruses. It seems likely that in the future the computer community will continue to be plagued by various attempts at virus infiltrations of our private systems but similarly the systems in place to protect users from these malicious viruses will keep in proving and thus the battle between software hackers and software protectors will continue as an ever lasting struggle between good and evil.

Thursday, May 3, 2012

Cloud Computing


Cloud computing, a new and exciting way a third party company offers users the ability to save their personal applications, documents, computer preferences, and personal information on a server so that it is all accessible from any computer – anywhere in the world. Gaining momentum and popularity amongst users, cloud computing is a tool that is meant to connect people of the 21st century to their technological lives remotely and efficiently by giving them a hub to save and access their computer’s content as if it were their personal hard drive.

The history of cloud computing does not span very far back. The start of this technology grew with the development of the Internet, servers, and truly flourished with the rise of large Internet server databases such as Google, Yahoo, Bing, and American Instant Messenger. The growth of user trust in saving their documents and information in the form of email on such large servers with the convenience of being able to access it from any given computer with internet connection gave start to the new era of server dependent information storage. Today, with the world spinning faster than ever before, society is in search for solutions that can replace the slow technologies of the­ past with newer and faster ones that will be as swift and efficient as the people of the the 21st century.

In essence, cloud computing is simply a user’s browser communicating with a main server and asking it for information. Servers are used in several different respects by almost all computers in order to access information desired by the user that is not stored on the user’s hard drive. Web based servers and personal browsers work together in a very consistent manner through protocols and connections in order to deliver information to the user. It all begins at the user’s end while surfing the web and they request an access to a web page.  Once the request has been made, the user’s browser breaks down the request into three parts: host name, domain name, and top-level domain name. An example would be if a user is on Carnegie Mellon University’s home page and after seeing the advertisements for this year’s graduation keynote speaker, Patrick Wilson, decides to read more into it and clicks the “read more” link, the process to retrieve that information begins. The link the user is trying to access reads “http://www.cmu.edu/homepage/society/2012/spring/wilson-to-address-grads.shtml” and the user’s browser begins by breaking this link down into three simpler parts; the protocol (“http”), the server name (“www.cmu.edu”), and the file name “homepage/society/2012/spring/wilson-to-address-grads.shtml”. Because humans remember words and phrases much easier than arrays of numbers, servers are given masking names that are in word form and parallel the numerical ID that the computers and servers communicate in (8 number IDs called IP addresses). This causes an additional step in the process of accessing a link because the browser then needs to take the server name and accesses a set of servers called the Domain Name Servers, which serve as the directory for IP address, and derives the IP address translation for the given server. Once the browser receives www.cmu.edu ‘s  IP address, the browser communicates with the Carnegie Mellon server and asks for the file “homepage/society/2012/spring/wilson-to-address-grads.shtml”. The Carnegie Mellon server then sends the HTML text for the requested web page to the browser. The browser then translates the HTML text and formats it into a legible and stylized version that appears on the user’s screen. Like this, cloud computing works through a set of communication connections and protocols between the browser and the servers where the user’s information is being stored.

There is no difference between cloud computing and Web servers for they are both built and meant for storing and accessing information. Both of these mechanisms allow you to edit pages, revisit them, and access it from any computer in the world that is connected to the Internet. The only thing that sets cloud computing apart from normal web servers is the way in which its used is applied. Cloud computing’s uniqueness is anchored in the way in which people are provided with a setup that is displayed in a fashion that is identical to formats that they are used to and allows them to function and save to this server in a way appears familiar to them. The only change that exists between cloud computing and normal computer application is where the files are ending up at the end of the session – in a server located in a hub sum thousands of miles away.

Hosting as a cloud computing server is not an easy job due to the complexities and complications that can arise from thin air. As a server host it is important to account for and take all precautions to protect your users’ information. With the common failure and crashing of servers, server hosts must always have their information backed up on more than one secondary device – much like individuals tend to back up their hard drives on USBs or other external devices. But these precautions and server set ups are extremely expensive, and can only be afforded by a hand full of the largest leading companies of this century that have both user trust and the funds to implement and support a network for cloud computing. Currently the most eligible companies for this job include Apple Inc, Google, Yahoo, Microsoft, IBM, Amazon – and some of them such as Apple and Google have already gotten a head start on building such a network for public cloud computing.

Apple’s recent development of MobileMe, an application that syncs up all of your apple products, constantly updating ones products cohesively, has offered users the ability to access their personal updated information from any device synced to the user’s own personal network, around the globe for an annual subscription fee. Now, with the update to iCloud, Apple has established itself as the first to popularize cloud computing by making it easily and readily available to the public. Allowing users 5GB of free storage space and authorize up to 10 devices to access your Apple information, the technology has been gaining momentum and awareness. Users have become spoiled by the ease of having all of their personal information, applications, settings, and documents readily available at a click of a screen – any screen. Google has also begun investing its abilities in cloud computing with its “Google Docs” online application offering a service for easily accessible documents all saved up onto Google’s servers. As a free service, Google’s “Google Docs” application has proven to appeal greatly to users and has served as a convenient hub for user collaboration and interaction with their editable spreadsheets and documents.

Currently, the future is looking bright and clear for web and technology companies Apple Inc. and Google due to a new partnership – an effort to build a network for public cloud computing. Proving to be the perfect pair for the job, Apple with its ever-changing innovative developments of hardware technology and Google’s enormous server network and database experience, they both have plenty to bring to the table in setting the stage for public cloud computing and bringing it to the next level.

In theory, cloud computing sounds like a brilliant plan, but many worry that when executed, the drawbacks may outweigh the benefits.

The benefits of cloud computing seem endless, and for some users are worth overlooking the negative aspects. In my opinion, the true destiny of cloud computing will lie in the way in which it caters to different computing and storage needs – if it can provide enough worthwhile features to be useful for the majority of the public, cloud computing will it will provide convenience and ease for some and will be rendered useless for others.  
Benefits of cloud computing include:
·      Cheaper Hardware Prices – larger servers (no cd drive, no USB drives, no hard drive) everything will be run wireless because anything plug-in will be uncommon (USBs, external hard drives, etc)
·      Ability to access personal documents/applications/etc from any device any where
·      Increase connected-mobility
·      Will de-personalize personal computers – any computer/device can act as your personal comp (including personal settings and such)
·      Easier for companies to distribute software and buy applications (wont need to buy a software license for every computer at the company – just one for their server)
·      Easy for the user to manage – no change on the forefront of the screen (the only real change happens behind the scenes and is nothing the user has to worry about)
Concerns for a future with cloud computing
·      Information security
·      Intellectual property identification – if its all out there then who does it belong to? And what is the extent of the ownership? If someone manipulates someone else’s intellectual property, whose is it? the manipulator or the original creator?  
·      Eliminate demand for IT jobs (Technical Support)
·      Will draw a lot of electricity and power in order to cool the large servers that are supporting/storing the cloud information

With lots of excitement, cloud computing is sure to become a computing system of the future.  The popularization of cloud computing could change the application of the World Wide Web forever. Computing will become a matter of the Internet, as the technology will run solely on Internet connection – much like the World Wide Web. Unique for its ability to be accessed from any computer and with swiftness and ease, the world wide web has developed a method and system that will now be applied to a new application – cloud computing. In context of the World Wide Web, cloud computing is important because it takes the entire computing experience to the same level of convenience as the web. The World Wide Web will serve cloud-computing junkies as an example and a learning device for figuring out the current kinks, flaws, and concerns with virtual computing. The technology, having been present and right before our eyes for years, seems to have been perfected and if made big enough, will be able to run cloud computing for the rest of the world.

Wednesday, May 2, 2012

Dart



Background

For web developers today, there is a relatively small range of tools for client side coding. Most developers turn to Javascript, which is supported well by all major browsers and has very many libraries written for it such as jQuery. Some developers choose to use Flash or Silverlight, but those are on the decline as it appears that Microsoft is switching over to Javascript with their Windows 8 runtime, Apple still refuses to support Flash, and Adobe just announced that they will stop supporting Flash for Linux machines. HTML5 and CSS3 aim to give developers more power with the client-side functionality that Javascript has, but they are not yet standard ready nor production ready, and they also don't have the sheer power that Javascript does. So at the end of the day, almost all client-side web developers are stuck using Javascript, they have little other choice.


Why Javascript Is Bad

Javascript may be the most commonly used client-side scripting language, but it has a lot of disadvantages that make it very difficult for programmers to use. For starters, Javascript is dynamically typed. This means that given a variable in Javascript called "windowSize", a person does not know if it is an integer, a string of text, or some other object. For small programs, this is a feature, as drafting out a program can be really quick when there's little text to write, and you know exactly what all of your variables are. But when programs start getting big dynamic typing starts to get painful. For example, look at this snippet of code:

 var i = 1;  
 // some code
 i = i + ""; // oops!
 // some more code 
 i + 1;  // evaluates to the String '11'
 i - 1;  // evaluates to the Number 0

The person originally had i as the number one. But then he added an empty string of text to the number. At this point, most languages would simply cause an error, but Javascript is fine with it. And after that, weird things start happening. i + 1 evaluates to the string of text '11', but i - 1 evaluates to the number zero.

That's a pretty bad scenario, but most of the time people won't make such silly mistakes in their own code. However, people will make such silly mistakes when they use other people's code. Look at this example:

 function substr(str, start, end) {
 
   if (arguments.length !== 3) {
     throw new Error();
   }
 
   if (typeof str !== "string" ||
       typeof start !== "number" ||
       typeof end !== "number") {
     throw new TypeError();
   }
 
   // actual code is commented out

 }

This is the kind of code that needs to be written every time someone writes a function in Javascript. The declared function clearly has 3 arguments, but the language doesn't stop people from using it with 2 or 4, so the programmer does a manual check that it has been given 3 arguments. And of course, because Javascript is dynamically typed, the programmer also had to check that the first argument is a string, and the other two arguments are numbers. If the programmer hadn't done this, then someone else might have been using their code and passed in a string instead of a number (like in the first example). And it might even happen, that the function would work, it would just do something very unexpected. This manual checking makes programming in Javascript painful and obnoxious, but if you don't do it, you're allowing your code to fail and work wrong without you noticing. A team of engineers at Google recognized these problems (and many more!) in Javascript, and strongly believed that that they were insolvable within the language. They decided that they had to make their own scripting language, similar to Javascript, but without all the mess and problems. They decided to call this language Dart.



Dart

The Dart language is like Javascript in the fact that it is designed for web scripting. Its syntax is very similar so that people that use Javascript would have an easier time switching to it. However Dart is much more friendly towards programmers. Dart is optionally typed, which means that like Javascript, the type of variables does not have to be declared. However, this does not mean that it works the same way. For example, if someone were to try to add a number to a string in Javascript, it would work but have unpredictable results. In Dart, it would cause an error, because doing a math operation with a number and text doesn't make any sense. The reason why it is called optional typing is because specifying the type is optional, so that if a programmer wants to, he can declare that a variable is a number, or a string of text, or a function. Then the dart editor checks this code for correctness while it is compiling, while Javascript can only be checked for correctness by being run.
document.queryAll('a.person').on.click.add((e) => print('Person clicked'));


One thing that makes Javascript so powerful is the jQuery library. jQuery makes it simple to scan through HTML documents, animate them, and handle events. Dart also has support for all the things that jQuery does, but they are built into the language rather than being part of a separate library. Dart also has support for classes and inheritance, something which Javascript tries to emulate this with something called prototypal inheritance, but it can noticeably decrease the performance of a Javascript program.

Javascript is unsafe by default, it has to be thoroughly tested before people can deploy it. Dart is safer, but it nothing can be perfectly safe in just compile time, so Dart also has two modes, production mode and checked mode. Production mode causes the Dart compiler to produce code that is optimized for speed that is considered ready to be deployed. Checked mode causes the Dart compiler to emit extra debugging code that helps testing of code so it can be deployed faster.

Dart also has support for generic programming. Combined with its support for classes and interfaces, Dart allows programmers to write generic container objects that can get compiled to very efficient code.

interface Cache<T> {
    T getByKey(String key);
    setByKey(String key, T value);
}


Dart has a lot of features that Javascript doesn't, such as generics and inheritance. But it is also a simpler language than Javascript. One controversial feature of Javascript is the eval() function, which can execute arbitrary Javascript code. This function is very powerful and also very dangerous. For example, a lot of malware hidden inside PDF files is actually embedded Javascript in the PDF that calls eval() on malicious code. 

Javascript has many flaws, which is why some folks over at Google decided that a new language was needed to replace it. And that is their aim, to replace Javascript, not to have a competing language. So far, Dart is still in development and the language is still changing, but it is changing for the better. Today, Javascript is pervasive in browsers. In two years, Dart might take its place.


References