Java

Today, with technology such a part of our daily lives, we take it for granted that we can be connected and access applications and content anywhere, anytime. Because of Java, we expect digital devices to be smarter, more functional, and way more entertaining.

In the early 90s, extending the power of network computing to the activities of everyday life was a radical vision. In 1991, a small group of Sun engineers called the “Green Team” believed that the next wave in computing was the union of digital consumer devices and computers. Led by James Gosling, the team worked around the clock and created the programming language that would revolutionize our world – Java.

The Green Team demonstrated their new language with an interactive, handheld home-entertainment controller that was originally targeted at the digital cable television industry. Unfortunately, the concept was much too advanced for the them at the time. But it was just right for the Internet, which was just starting to take off. In 1995, the team announced that the Netscape Navigator Internet browser would incorporate Java technology.

Today, Java not only permeates the Internet, but also is the invisible force behind many of the applications and devices that power our day-to-day lives. From mobile phones to handheld devices, games and navigation systems to e-business solutions, Java is everywhere!

Computer Programming

Writing computer programs means writing instructions, that will make the computer follow and run a program based on those instructions. To explain how programming works, I will give a brief history. The basic instructions are composed of a sequence of ons and offs, that the computer follows as it runs them through the processor, turning switches on and off. The ons are coded (meaning written in programming) with an 1, and the offs with a 0. Numbers and letters are also represented by this; 0000=0, 0001=1, 0010=2, 0011=3, etc. In the beginning, programs looked like “1010100100101111010101010101″. Someone realized that since the purpose of writing programs is in order to make life easier, why don’t we write a program that will take a kind of code that is easier to create, and the program will translate it into computer code (1s and 0s). So, assembly language was created, where the code then looked like “add $5, $7, $8 #comment”, which although not completely readable, it was a lot better than “010101″. The program that converted the assembly language into computer code was called the assembler. Then someone decided, why don’t we make a program that will translate English-like words into assembly language, so we can write code in English. Thus modern “third generation” code was created. Now the programmer can write code like “x = 5 + 8;” or “String stupid = “You are not smart;”. (The first piece means that x will equal 5 + 8, and the second means that whenever the program writes stupid it means the words in the quotes. However, that is not important now, the important thing to realize is that programming is more “Englished” and understandable than before”.) Now, a compiler will translate the new code into assembly language, to which an assembler will translate into computer language, that the computer will execute into a series of ons and offs. This new way enabled writing more complex code, as it was now more readable and easy to program. Java is one of the newer languages that uses this third generation code writing technic.

In short, writing code means writing a bunch of instructions. Each instruction is relatively simple, yet because of the computer’s speed, it is able to run millions of instructions in a second. In order for a complex 3d game, like for example Diablo, millions of little code lines are being executed per second, as each code line only does very little. Your job as a programmer is to be able to not focus only on what the end product looks like, but on how each little piece runs, and then being able to write all of the little lines of code that enable the whole program to run. When you learn how to program you learn how to break up the objective into different chunks, and work only on that chunk at a time. This is in order to focus on what you need to do right now, and that which you don’t need to know is pushed off to be done at a different time. For example, when you are writing code for a game, when you are focusing on the good guy fighting, you ignore the rest of the game, and only focus on getting the guy to swing the sword, etc. When you are writing the code on how the good guy finds and picks up treasure, you write only the code for that, ignoring, the code on how he fights. Then, you take a step back and put the pieces together. Although this seems hard, it is one of the basic aspects that you are taught when you write programs, and you become extremely used to it. This is known as abstraction.

One writes code with a specific terminology for the language that he is programming in. The different terminologies can be grouped into the few categories of keywords, variables, operations and predefined classes (in Java). (This is an oversimplification, as I am trying to make this easy to be understood for beginners). Keywords are the words that have a specific meaning to the compiler. For example, “if” tells the compiler that “if the condition is true then run the next piece of code”. Operations are symbols that give specific meaning. For example, the operation of “+” can be used to add two numbers together. The operation of “=” means that the operand (the thing using the operation) on the left “gets” what is on the right. Variables are the values that you give to a word that you make up. For example, in Java the keyword “int” means a number. If you write “int sum = 8 + 7;” you are telling the compiler, I want a variable called sum to get the value of 8 and 7 added together. From now on until you change it, whenever you write “sum” in the program, the compiler reads it as “15″. For example if you were to write “if (sum==15)” means if that variable called sum equals 15 (which for now it has not been changed) then run the next piece of code.

Artificial Intelligence

Artificial Intelligence, or AI for short, is a combination of computer science, physiology, and philosophy. AI is a broad topic, consisting of different fields, from machine vision to expert systems. The element that the fields of AI have in common is the creation of machines that can “think”.

In order to classify machines as “thinking”, it is necessary to define intelligence. To what degree does intelligence consist of, for example, solving complex problems, or making generalizations and relationships? And what about perception and comprehension? Research into the areas of learning, of language, and of sensory perception has aided scientists in building intelligent machines. One of the most challenging approaches facing experts is building systems that mimic the behavior of the human brain, made up of billions of neurons, and arguably the most complex matter in the universe. Perhaps the best way to gauge the intelligence of a machine is British computer scientist Alan Turing’s test. He stated that a computer would deserve to be called intelligent if it could deceive a human into believing that it was human.

Artificial Intelligence has come a long way from its early roots, driven by dedicated researchers. The beginnings of AI reach back before electronics, to philosophers and mathematicians such as Boole and others theorizing on principles that were used as the foundation of AI Logic. AI really began to intrigue researchers with the invention of the computer in 1943. The technology was finally available, or so it seemed, to simulate intelligent behavior. Over the next four decades, despite many stumbling blocks, AI has grown from a dozen researchers, to thousands of engineers and specialists; and from programs capable of playing checkers, to systems designed to diagnose disease.

AI has always been on the pioneering end of computer science. Advanced-level computer languages, as well as computer interfaces and word-processors owe their existence to the research into artificial intelligence. The theory and insights brought about by AI research will set the trend in the future of computing. The products available today are only bits and pieces of what are soon to follow, but they are a movement towards the future of artificial intelligence. The advancements in the quest for artificial intelligence have, and will continue to affect our jobs, our education, and our lives.

We have been studying this issue of AI application for quite some time now and know all the terms and facts. But what we all really need to know is what can we do to get our hands on some AI today. How can we as individuals use our own technology? We hope to discuss this in depth (but as briefly as possible) so that you the consumer can use AI as it is intended.

First, we should be prepared for a change. Our conservative ways stand in the way of progress. AI is a new step that is very helpful to the society. Machines can do jobs that require detailed instructions followed and mental alertness. AI with its learning capabilities can accomplish those tasks but only if the worlds conservatives are ready to change and allow this to be a possibility. It makes us think about how early man finally accepted the wheel as a good invention, not something taking away from its heritage or tradition.

Secondly, we must be prepared to learn about the capabilities of AI. The more use we get out of the machines the less work is required by us. In turn less injuries and stress to human beings. Human beings are a species that learn by trying, and we must be prepared to give AI a chance seeing AI as a blessing, not an inhibition.

Finally, we need to be prepared for the worst of AI. Something as revolutionary as AI is sure to have many kinks to work out. There is always that fear that if AI is learning based, will machines learn that being rich and successful is a good thing, then wage war against economic powers and famous people? There are so many things that can go wrong with a new system so we must be as prepared as we can be for this new technology.

However, even though the fear of the machines are there, their capabilities are infinite Whatever we teach AI, they will suggest in the future if a positive outcome arrives from it. AI are like children that need to be taught to be kind, well mannered, and intelligent. If they are to make important decisions, they should be wise. We as citizens need to make sure AI programmers are keeping things on the level. We should be sure they are doing the job correctly, so that no future accidents occur.

History of Javascript

When the World Wide Web was first created in the early 1990s all web pages were static. When you viewed a web page you saw exactly what the page was set up to show you and there was no way for you to interact with the page. Being able to interact with a web page – have it do something in response to your actions – required the addition of some form of programming language to “instruct” the page how it should respond to your actions. In order to have it respond immediately without having to reload the web page this language needed to be able to run on the same computer as the browser displaying the page.

At the time there were two browsers that were reasonably popular – Netscape Navigator and Internet Explorer. Netscape was the first to bring out a programming language that would allow web pages to become interactive – they called itLivescript and it was integrated into the browser (meaning that the browser would interpret the commands directly without requiring the code to be compiled and without requiring a plugin to be able to run it). This meant that anyone using the latest Netscape browser would be able to interact with pages that made use of this language.

Another programming language called Java (which required a separate plugin in order to run) became very well known and so Netscape decided to try to cash in on this by renaming the language built into their browser to Javascript. Note that while some Java and Javascript code may appear similar, they are in fact two entirely different languages that serve completely different purposes. Not to be left behind Internet Explorer was soon updated to support not one but two integrated languages. One was called vbscript and was based on the BASIC programming language and the other was called Jscript and was very similar to Javascript. In fact if you were very careful what commands you used you could write code that would be able to be processed as Javascript by Netscape Navigator and as Jscript by Internet Explorer.

At the time Netscape Navigator was by far the more popular browser and so later versions of Internet Explorer implemented versions of Jscript that were more and more like Javascript. By the time that Internet Explorer became the dominant browser Javascript had become the accepted standard for writing interactive processing to be run in the web browser. The importance of this scripting language was too great to leave its future development in the hands of the competing browser developers and so in 1996 Javascript was handed over to an international standards body called ECMA who then became responsible for the subsequent development of the language. As a result of this the language was officially renamed ECMA Script or ECMA-262 but most people still refer to it as Javascript.

 

Generation Four

As we all know and appreciate, the Internet has changed our lives over the last decade in ways that we never could have imagined. Communication is faster with the additions of Emails and Instant Messaging (IMs) to our lives; Research is simpler and more extensive, as boundless sources of information inhabit thousands and thousands of online Encyclopedias and Articles; and keeping up with Friends and Colleagues is very easy with the invention and seemingly endless expansion of Social Networking sites like Facebook, Orkut, MySpace, Twitter etc.

When talking about 4G Technology, the first question that comes in our mind is What is 4G? 4G stands for Fourth Generation Technology and is successor of 3G Technology. In 2009, the ITU-R organization specifiedthe IMT-Advanced (International Mobile Telecommunications Advanced) requirements for 4G standards, setting peak speed requirements for 4G service at 100 Mbit/s (Mega bit per Second) for high mobilitycommunication (such as from trains and cars) and 1 Gbit/s (Gega bit per Second) for low mobilitycommunication (such as pedestrians and stationary users)!

A 4G system is expected to provide a comprehensive and secure all-IP (Internet Protocol) based mobile broadband solution to Laptop Computers, Wireless MODEMs, Smartphones, and other Mobile Devices. Facilities such as Ultra-Broadband Internet access, IP telephony, Gaming Services, and Streamed Multimedia may be provided to users.

The Internet is enjoying even greater heights of speed and convenience because of wireless companies like Clear 4G etc. With the spread of wireless Internet usage, many people are now connected to the Web just about twenty four hours a day, meaning that they can send and receive Emails more efficiently, are practically never out of touch, and can access any information on the Internet with the click of a single button, no matter where they are. In fact, Wireless Internet is becoming such a widespread reality that it is now very important to look into signing up with a suitable provider so as not to be left behind.

The first thing to consider when choosing a Wireless provider is that if you want to, you can look beyond the big, standard cellular companies. Because these companies constantly advertise their smart phones’ access to 3G and 4G Wireless Services, many people assume that they are the only companies that actually offer these services. However, in reality, there are also companies that do not necessarily sell Cellular devices or Laptops, but they specializes in providing you with cheap and clear Wireless Service!

With such services, all you need is to plug-in a MODEM to your Laptop or Wireless Device, and you will immediately gain access to the Internet, no matter what your current location is, as long as you are within the range of a 4G Network (a range that is getting wider and wider). This means that whether you are sitting in the stands watching a football game, lounging in a bookstore or cafe, or simply staying at home, you can access the Internet on your own, without needing to know the name and password of any specific wireless network, as your own device will have its own connection.

No doubt, Wireless Internet is an amazing tool for Businesses, Schools, Entertainment, and many other aspects of life, and is something that you can easily gain access to.

3D Television

3D TV is an emerging technology that allows consumers to enjoy three-dimensional movies, television programs and video games in their homes. Several companies have developed viable 3D technology for the home theater environment, but the reality of seeing 3D TV in the average household is probably years away. That’s primarily because the technology requires the purchase of new television equipment, including a 3D-ready TV and a 3D-capable Blu-ray player.

The good news is that the Blu-ray Disc Association recently approved standards for encoding 3D content.

A number of TV manufacturers, including Panasonic, Sony and Samsung, are manufacturing 3D TVs, and their technology is not standardized. At this point, it’s anyone’s guess whose 3D TV technology will have the greatest long-term success, but the Blu-ray 3D standards are platform agnostic, meaning 3D Blu-ray discs should play on any manufacturer’s 3D-enabled set.

One of the big questions about 3D TV is, “Will viewers have to wear glasses in order to enjoy 3D effects?” For the most part, the answer is, “Yes.” Although there are companies working on 3D television technology that does not require glasses, the systems that are coming out now use glasses.

Another thing slowing the adoption of 3D TV is the fact that content is scarce, but there are those who believe that will change in the next three to four years.

Parallax Experience

Parallax is a difference in the in the apparent position of an object viewed along different lines of sight. The term derives from the Greek word parallaxis, meaning alteration. In web design, the parallax effect is a relatively new trend. The effect itself has been around for a while, but lately is becoming more used and talked about. The Parallax effect or parallax scrolling in web design is the technique that features layered images that move around the website in different speeds/perspectives creating a nice and interesting 3D illusion. We gathered some examples of websites using the parallax effect to inspire you. This effect certainly makes scrolling around websites an interesting experience.

The parallax illusion is one of the coolest effects to hit the world of web design. Some use the effect to add a subtle treat to the website’s background, whereas others use the parallax effect more prominently to create an exciting browsing experience.

The parallax effect has been around for years in classic video games, but came into trend in the web design community when it was implemented into the background of the Silverback app website. The simple type of parallax effect seen on the Silverback site was used to spice the design with a hidden treat, only visible when the user’s browser is resized. The effect has since evolved and is now commonly seen as part of the scrolling feature of a web page, where multiple backgrounds seem to move at different speeds. Fast forward to recent months and the latest incarnation of parallax effects was pioneered by the Nike Better World website, where the whole site is based on one big parallax effect to create an interesting browsing experience.

WordPress Tips

Design with WordPress in mind to begin with

If you can, ideally, know that you are going to use WordPress when you begin designing your site, then you may be able to take some precautionary steps to make creating your WordPress themes a bit faster when it comes to developing. Spend some time looking around the WordPress Dashboard and, especially, the different Widgets that come standard and what sort of Plugins you might want to add. Knowing what to expect will give you an upper hand in the end.

Don’t bother with the WordPress theme editor

The WordPress default install includes a theme editor, with the idea being that users can make modifications to the themes they are using and customize their blog. Updates are supposed to be on the way to the theme editor in WordPress 2.8, but for now things like syntax highlighting or advanced formatting features aren’t there. While the theme editor will come across as convenient, remember that it is intended for users, and not developers. You are a developer, and you need to create a different environment for your own work. Users may need to spend five or ten minutes in the theme editor. You are going to be spending hours creating your theme.

Use the right text editor

It’s no question that the one thing you’ll be using more than anything else when creating your themes will be your text editor. Take the time to find the text editor which fits your particular style. Pay particular attention to those text editors which allow for syntax highlighting, since the highlighting of different pieces of code will make it that much easier to cruise through and create what you need to create.

Use the right software

Your text editor is an important part of your theme development workflow, but it’s not the only application you’ll want to have around. Your web browser and FTP program are both important as well.

Having an FTP program is critical for developing on the web, especially if you want to work quickly with WordPress. Nothing will slow down your development more than sticking to the default theme editor, in your browser.

Devise your plan of attack before jumping in

There’s a common saying when it comes to discussing the virtues of well laid plans:measure twice, cut once. The cut itself, the work, is important enough that it’s worth spending twice as much time making sure it’s going to be correct.

When it comes to developing WordPress themes, there are so many ways to do it wrong, and relatively fewer ways, in each case, to get it right. While analyzing your design and determining just how to break your design apart for the HTML/CSS development, also take the time to consider just how your theme will operate. Some questions to consider:

  • Is this content best served as post/page content, or through a widget?
  • Is this functionality something I should build directly into the theme, or is it better suited for a WordPress Plugin?
  • How best can I leverage the functions of WordPress to make as much of this dynamic as possible?

Begin at HTML/CSS, then move to WordPress

There are two paths when developing sites for content management systems (WordPress and others) that you can choose to go down. On the one hand, there are those who develop their website markup and styles directly into their theme, essentially building the front end code at the same time as adding the back end functionality.

On the other hand, there are those who swear by first creating a plain (read: static) HTML/CSS/JS site first, and then working the WordPress functionality into it afterward. By creating the static HTML version first, you can stay on your hard drive and not have to mess with uploading to the web quite yet. Developing soon-to-be-themes as HTML/CSS first allows to create the code as they should be, and then take the time to make WordPress fit the mold of the site, instead of the other way around.

Have a framework to start from

The word framework can mean a number of different things. A CSS framework  is used to lay out your HTML content into a CSS layout quickly: A WordPress theme framework, though, is intended to speed up your theme development. The best thing is to create your own framework and use it on all of your themes.

Keep snippets of code close at hand

Odds are that as you develop your themes, using at least HTML, CSS, and PHP, you’re going to run across snippets of code that you will want to use over and over again. Rather than typing these bits out over and over again, why not save these snippets somewhere so they are always close at hand?

Limit the number of theme files you use

One of the easiest way to slow you up now, and end up complicating things down the road, is to create too many theme files for yourself to manage. In my case, I find the following theme files to be just the right amount I need to make the kind of theme I want:

  • 404.php — you definitely want to keep your 404 page helpful
  • archive.php — you can control all of your archive pages (posts by month, categories, etc.)
  • comments.php
  • footer.php
  • functions.php
  • header.php
  • index.php
  • page.php
  • search.php
  • sidebar.php
  • single.php
  • style.css

Bookmark useful WordPress theme related web pages

This one works in a similar way as the tip about saving code snippets listed above. There are always — always — going to be little things about WordPress that you are going to forget and need to look up. Rather than running a Google search for something over and over again (we’ve all done it) just keep a list of bookmarks handy.

Test your themes on a dedicated WordPress testing install

At some point you’re going to need to get your theme online and test it live, or at least live for yourself. There are a couple of ways to do this. One way is to create single test locations for WordPress themes. Another idea is to run a WPMU setup and create blogs on a whim to test for each project you run, to save yourself having to install WordPress over and over again.

Have content ready to test with

In order to make sure you are being thorough on any site you develop, you should fill it with content of all kinds, ideally using real content but alternatively using Lorem ipsum text. You have to be sure to use headings, blockquotes, lists, tables and every HTML element that seems appropriate, just to be sure you’ve got it all together.

Keep a list of your go-to Plugins

Much like the tip regarding test content above, having a list of Plugins that you always end up using hanging around can speed up your live testing.

I wouldn’t suggest keeping the actual downloaded files for Plugins in a folder somewhere, since they may be out of date unless you keep re-downloading them. You’re really better off just keeping a list of links (wherever you save things like links) to each Plugin so you can jump to them quickly when you’re installing them on your blog.

Y2K38 Problem

The Year 2000 problem is understood by most people these days because of the large amount of media attention it received. Most programs written in the C programming language are relatively immune to the Y2K problem, but suffer instead from the Year 2038 problem.This problem arises because most C programs use a library of routines called the standard time library .This library establishes a standard 4-byte format for the storage of time values, and also provides a number of functions for converting, displaying and calculating time values.

The source of the problem is actually the way some(major) applications store their date/time data types. Programmes using POSIX time representation will be affected by this problem. The structure time_t is a value type which stores time in a 32-bit signed integer. It stores the time as number of seconds elapsed since January 1, 1970. So it is capable of representing time which can be addressed within total of 231 seconds. According to this, the latest time that it can store is 03:14:07 UTC,Tuesday, January 19, 2038. After this time, the sign bit of the 32-bit signed integer will be set and it will represent a negative number. As I said, the time is stored as number of seconds elapsed since1st January 1970, this negative number will be added to compute the time as per the POSIX standards. But this being a negative number it will calculate the time by subtracting this many seconds from 1st January 1970 which will eventually generate a historical date-time which will cause the applications to fail. This time will be Friday, December 1901 and is called the wrap-around date. Applications written in C in many operating system will also be affected as the POSIX presentation of time is widely used there. The animation below visualizes actual scenario in an easier manner. This bug is often denoted as “Y2038″, “Y2K38″, or “Y2.038K” bug.

Y2K38

The standard 4-byte format assumes that the beginning of time isJanuary 1, 1970, at12:00:00 a.m.This value is 0. Any time/date value is expressed as the number of seconds following that zero value. So the value 919642718 is 919,642,718 seconds past 12:00:00 a.m. on January 1, 1970, which is Sunday, February 21, 1999, at 16:18:38 Pacific time (U.S.). This is a convenient format because if you subtract any two values, what you get is a number of seconds that is the time difference between them. Then you can use other functions in the library to determine how many minutes/hours/days/months/years have passed between the two times.

A signed 4-byte integer has a maximum value of 2,147,483,647, and this is where the Year 2038 problem comes from. The maximum value of time before it rolls over to a negative (and invalid) value is 2,147,483,647, which translates intoJanuary 19, 2038. On this date, any C programs that use the standard time library will start to have problems with date calculations.

The following ANSI C programme when compiled simulates the bug. The output produced by the programme is also attached below the code.

#include <stdlib.h>

#include <stdio.h>

#include <unistd.h>

#include <time.h>

int main (int argc, char **argv)

{

time_t t;

t = (time_t) 1000000000;

printf (“%d, %s”, (int) t, asctime (gmtime (&t)));

t = (time_t) (0x7FFFFFFF);

printf (“%d, %s”, (int) t, asctime (gmtime (&t)));

t++;

printf (“%d, %s”, (int) t, asctime (gmtime (&t)));

 

return 0;

}

Output :

1000000000, Sun Sep 901:46:4020012147483647,

Tue Jan 1903:14:072038-2147483648,

Fri Dec 1320:45:521901

This problem is somewhat easier to fix than the Y2K problem on mainframes, fortunately. Well-written programs can simply be recompiled with a new version of the library that uses, for example, 8-byte values for the storage format. This is possible because the library encapsulates the whole time activity with its own time types and functions (unlike most mainframe programs, which did not standardize their date formats or calculations). So the Year 2038 problem should not be nearly as hard to fix as the Y2K problem was.

Solutions:

1. Re-define the time_t structure as 64-bit.

This is not a solution as the binary compatibility of the software would break here. Programmes depending on the binary representations of time would be in trouble. So we can not even think of this one.

2.Change time_t from 32-bit signed to 32-bit unsigned.

This seems to be good at first look, but this would just delay(post-pone) the judgement day to the year 2106 as it will give some more scope by adding another usable bit. You will be in the same trouble by then. So this is a feasible solution but not a practical one.

3.Shift from 32-bit systems to 64-bit systems.

Most 64-bit architectures use 64 bit storage to represent time_t. The new wrap-around date with this new (signed)64 bit representation will not come before 290 billion years. It is positively predicted that by the year 2038 all 32-bit systems will be phased out and all systems will be 64-bit.

Lunar Puzzle

This is a little lunar problem. Consider that NASA is planning to build space stations on the surface of the moon. Let us assume that moon is a perfect sphere. We don’t know exactly how many space stations they are planning to build but NASA is firm on the rule that the mutual distances between each space stations must be equal. For example if there are 10 space stations, such as S1, S2,…..S10, then the distances between S1S2, S1S3,S 5S3, S4S8  etc should be equal. Considering all these factors, how many space stations can be build on the lunar surface?? Answers are welcome but with explanations…