Program Correctness

Measuring Correctness Of Programs Using Test Results

Synopsis

Deductive proofs of program correctness are prohibitively expensive in the majority of cases. To what extent can test results be used as Bayesian evidence in confirmation of the hypothesis “this program is correct”?

Introduction

This report is about test results, how it can be used measure correctness of a program, or to what extent it can be used to support the hypothesis “this program is correct”. In this case, a program is basically a piece of computer software, and “correct” in this sense means that the program meets its initial requirements.

Computer programs are often tested and tagged “correct”. Testing is one of the most important and crucial part of program design. It is a way of measuring the correctness of a program whether it is complete, and it is in compliance with its specified requirements. Nowadays, programs have become very complicated and so has testing methodologies, it has become so vast that measuring correctness of a system is virtually very difficult to achieve. Extensive testing of such complex programs has become very expensive that is not wisely affordable. Since absolute correctness is virtually impossible to achieve, programs are being tested to a certain extent and are considered “fit” or “correct”.

The issue now is to what extent are the test results being measured and said to confirm the correctness of a program. There are different approaches used to determine the correctness of a program. These will be elaborated fully in the main content of this report. Also, how expensive are these “tests”? And why are they not affordable?

To be able to understand the scenario, there is need to evaluate some basic terms used like system test results, deductive proofs, program correctness, and prohibitively expensive.

What is meant by Deductive Proof?

Deductive proofs – This is where there are one or more indisputable facts that a certain thing is true. A strong proof where the facts used to support the truth of characteristics are true, then the characteristics most also be true. For example, if a person owns one million British pounds then he is a millionaire. If john owns ten million pounds, then from a deductive proof we can assume that john is a millionaire. If it is true that john has more than a million pounds, then it is true that john is a millionaire [1].

What is Correctness?

Program correctness – According to John Daintith, program correctness proof is a mathematical demonstration that the semantics of a program are consistent with some specifications of that program. And also state two prerequisites to the provision of such proof; there must be a formal specification for the program, and there must be some formal definition of the semantics of the program (John Daintith, 2004).

Software Testing Approach

Testing is a fundamental part in software development. It is largely deployed in every phase in the software development cycle. Usually, more than half of the development time is spent on testing. Testing is usually performed for the following motivations;

Testing motivation

Testing is actually a vital part in the software development circle, and these are some of the major motivation for testing a program;

  • To improve quality – computers and software are used in critical applications such as medical equipments, which a result of a bug will cause severe consequences. Quality means to its conformance the initial design requirements or specification
  • For Verification & Validation – In this case, testing serves as a metrics to ensure the correctness of the program in certain conditions
  • For reliability estimation – testing is done to ensure reliability of a program. A program may conform to the initial requirements but may fail in real-time due to pressure or other external factors.
  • In the Software Development Life cycle System Testing is the first level where the System is tested as a whole
  • The System is tested to verify if it meets the functional and technical requirements
  • The application/System is tested in an environment that closely resembles the production environment where the application will be finally deployed
  • The System Testing enables us to test, verify and validate both the Business requirements as well as the Application Architecture

Testing methods

This describes how and what components of the program are tested to ensure its conformance with its initial requirements. Below are some of the major testing methodologies in brief;

  • Correctness Testing – this testing approach is done to test the behaviour of the program, to ensure that the output is the right and not wrong.
    • Black-box Testing – a kind of testing approach where test data are derived from the specified functional requirements with regard to final program structure.
    • White-box Testing – a kind of approach in which testing is done based on the program structure and flow regardless of its initial requirements
  • Performance Testing – most programs do not have specification for performance. These are specifications that are implicit to the program. Performance bugs could cause a program to degrade since it’s not made to last forever. Resource use is considered in this kind of approach
  • Reliability Testing – this approach is about exercising a program so that failures are discovered and removed before they are deployed.
  • Security Testing – a program may run according to requirements, but may be vulnerable to intruders and unauthorised access for exploits. This is extremely dangerous and poses a threat to the integrity of the program.

Testing Automation

Testing is very costly, automation can be a very good way to cut down testing costs. Software testing tools and techniques sometimes lack applicability and scalability. The reason is basic. In order to automate the process, we have to generate test cases to test the target software against the program specification to decide their correctness. There is still need for human intervention in the process as there has not been any system that has achieved 100% automation.

Financial Implication of testing

Prohibitively expensive – “prohibitively expensive” in this sent means that is very expensive and not affordable to conduct extensive test to get a deductive proof that a program is correct.

Testing is important for software quality, but it can also be prohibitively expensive. Testing consumes up to 50% of development costs. It can locate defects but never demonstrate correctness. We have seen that testing is endless; it has financial implications as well. The better the testing, the lesser the risk incurred by the program. Annually, billions are lost because of improper testing; this is also due to the fact that a line has to be drawn to stop testing at some point. If the stopping point is miscalculated, the more risk is incurred. Below is a report made by NIST on billions of dollars that could be saved each year if improvements were made to the testing process.

nist-report
(NIST Report: The Economic Impact of Inadequate Infrastructure for Software Testing, 2002)

Realities of system testing

  • Not all problems will be found no matter how thorough or systematic the testing.
  • Testing resources (staff, time, tools, and labs) are limited.
  • Specifications are frequently unclear/ambiguous and changing (and not necessarily complete and up-to-date).
  • Systems are almost always too large to permit test cases to be selected based on code characteristics.
  • Exhaustive testing is not possible.
  • Testing is creative and difficult.
  • A major objective of testing is failure prevention.
  • Testing must be planned.
  • Testing should be done by people who are independent of the developers.

Prioritizing Test Cases

Once a test suite has been selected, it is often desirable to prioritize test cases based on some criterion. That way, since the time available for testing is limited and therefore all tests can’t be run, at least the “most important” ones can be. [4]
Bases for Test Prioritization

  • Most frequently executed inputs.
  • Most critical functions.
  • Most critical individual inputs.
  • (Additional) statement or branch coverage.
  • (Additional) Function coverage.
  • Fault-exposing potential.

When to Stop Testing?

Testing is potentially endless. We cannot stop testing until all the defects are unearthed and removed which is simply impossible. At a point testing has to be stopped and software is released. Example, Microsoft releases Windows 7 at some point, it becomes vulnerable at some point and users are advised to update with the necessary patches. The question is when to stop these tests.

Realistically, testing is a trade-off between budget, time and quality. It is driven by profit models on return on investment and risk based. The distrustful and unfortunately most often used approach is to stop testing whenever some or any of the allocated resources such as time, budget, or test cases are exhausted. The optimistic stopping rule is to stop testing when either reliability meets the requirement, or the benefit from continuing testing cannot justify the testing cost (Yang, 1995). This will usually require the use of reliability models to evaluate and predict reliability of the software under test. Each evaluation requires repeated running of the following cycle: failure data gathering, modelling, and prediction. This method does not fit well for ultra-dependable systems, however, because the real field failure data will take too long to accumulate. (Pan, 1999)

Test results are said to be fit to validate a program when they prove that the program conforms to initial requirements. Also risk factor has to be considered, risk has to be prioritised and tested accordingly. For example, a banking program should have its risks sorted like in the description below,

AT&T Labs Research

(Source: Elaine Weyuker, Software Testing Basics – AT&T Labs – Research)

What is Inference?

Inference is the process of updating probabilities of outcomes based upon the relationships in the model and the evidence known about the situation at hand.

Bayesian evidence is a method used to calculate the probability of a hypothesis whether it is true. When a Bayesian model is actually used, the end user applies evidence about recent events or observations. This information is applied to the model by “instantiating” or “clamping” a variable to a state that is consistent with the observation. Then the mathematical mechanics are performed to update the probabilities of all the other variables that are connected to the variable representing the new evidence.

After inference, the updated probabilities reflect the new levels of belief in (or probabilities of) all possible outcomes coded in the model. These beliefs are mediated by the original assessment of belief performed by the author of the model.

The beliefs originally encoded in the model are known as prior probabilities, because they are entered before any evidence is known about the situation. The beliefs computed after evidence is entered are known as posterior probabilities, because they reflect the levels of belief computed in light of the new evidence. (Microsoft Research, 2010)

There are numerous real-world situations about which an analyst might wish to hypothesize and investigate, but it would be impractical to encode all of them explicitly in a support system for analysts. Instead, our approach is to represent fragments of situations and provide a mechanism for combining them into a wide variety of more complete ones (Michael et al, 2007). The combination occurs dynamically as evidence about a situation becomes available or as an analyst revises or enters new hypotheses. A fragment is represented as a Bayesian network with nodes for hypotheses, events, and evidence, and links for relating them. Our ability to combine the fragments into more complete situation models is dependent on having a consistent terminology in which the fragments are described. The focus of our work has been on

  • Defining and representing the terminology, including terms of a domain and terms for evidence in that domain,
  • Capturing new fragments from a variety of sources, and
  • Incorporating the terminology and BN fragments into an integrated end-to-end tool.

(Michael et al, 2007)

Conclusion

So, having looked at the processes involved in obtaining test results, how inferences are drawn to conclude on validity of a program and to what extent should programs be tested, I could easily draw some of these conclusions.

Testing is quite expensive, automated testing is a good way to cut down cost and time. Also, risk factor should also be thoroughly put in side by side when making a conclusion the correctness of a program. 100% testing is impossible, program complexity has been the root of the problem, and at some point software testing has to be stopped and shipped out. This is basically decided by time and budget of the project. Software is termed “correct” if the reliability estimate of the program conforms to the initial requirements.

In my opinion, the point where a line should drawn to say this “program is correct” is if the reliability estimate of the software product meets requirement. This should be the minimum amount of testing that should be conducted. There are different kind of programs and different levels of testing. Critical programs like medical, airplane, etc should have a more priority level of testing than word processing software.

Reference

  1. Randall Hudson. (2009). Inductive/Deductive Proofs. Available: http://teachers.net/lessons/posts/2724.html. Last accessed 1st Dec
  2. John Daintith. (2004). Program Correctness Proof. Available: http://www.encyclopedia.com/doc/1O11-programcorrectnessproof.html. Last accessed 1st Dec 2010.
  3. Microsoft. (2010). Basics of Bayesian Inference and Belief Networks. Available: http://research.microsoft.com/en-us/um/redmond/groups/adapt/msbnx/msbnx/basics_of_bayesian_inference.htm. Last accessed 1st Dec 2010.
  4. Elaine Weyuker . (2010). Software Testing Basics-AT&T Labs – Research . Available: www.cs.rice.edu/FORTE02/weyuker1.ppt. Last accessed 3rd Dec 2010.
  5. Yang, M.C.K.; Chao, A. Reliability-estimation and stopping-rules for software testing, based on repeated appearances of bugs; IEEE Transactions on Reliability, vol.44, no.2, p. 315-21, 1995
  6. Michael N. Huhns and Marco G. Valtorta. (2007). Ontological Support for Bayesian Evidence Management. Available: http://www.cse.sc.edu/~mgv/papers/oic-07.pdf. Last accessed 3rd

Stripping HTML from a field in Oracle

Hi everyone, If you happen to save text that contains HTML in you database column and you don’t know how to get the raw text without the HTML tags, well here is a hack which i’ve found very handy.

Example

Table: Comments
Column name: COMMENT_TEXT

SQL >  Select comment_text from comments;
Result > <p><strong>Hi everyone</strong>, this is a example on how to <span> strip HTML tags</span> from a SQL query in oracle</p>

Hack:
SQL >
select replace(replace(replace(replace(replace(REGEXP_REPLACE(COMMENT_TEXT, ‘< (.|\n)*?>’, ”), ‘&’||’nbsp;’, ‘ ‘), ‘&’||’ldquo;’, ‘”‘),’&’||’rdquo;’, ‘”‘),’&’||’ndash;’, ‘-‘),’&’||’amp;’, ‘&’) from comments;

Result > Hi everyone, this is a example on how to strip HTML tags from a SQL query in oracle

Hope this helps someone 🙂

html5 and css3

Accessibility in HTM5 and CSS3

INTRODUCTION
The web has now become an important aspect of our daily lives. This means that everyone needs to have access to it including the disabled. Accessibility on the internet has become a very important issue. People with disabilities need to have equal opportunities accessing resources on the web. The W3C set international standards for the web. Their Web Accessibility Initiative (WAI) published guidelines for making websites accessible. The guidelines are categorized into three levels, Level A, Level AA, and Level AAA. These guideline rates a website based on how accessible it is.

HTML is the basic technology for the web. A recent improvements made to it is known as the HTML5, adds new features with enhances accessibility. CSS3 is also an improvement made to the old CSS with new added features. These new features make the structure of information more presentable on the web.

This report investigates HTML5 and CSS3 technologies, and points out those new features in which a web developer could use to design a more accessible website.

WEB ACCESSIBILITY

WHAT IS WEB ACCESSIBILITY?
Accessibility generally refers to the ability of the abled and disabled persons to use a website. For example, a site consisting of images without alt tags is considered to be worthless for bland persons and therefore considered to have poor accessibility. When websites are correctly designed, it gives an equal opportunity for access to information and functionality. The needs that accessibility needs to address includes the following; visual, mobility, auditory, seizures, cognitive/intellectual.

The Web offers the possibility of unprecedented access to information and interaction for many people with disabilities. That is, the accessibility barriers to print, audio, and visual media can be much more easily overcome through Web technologies (www.w3.org).

Accessibility is required by laws and policies in some cases.

MAKING THE WEB ACCESSIBLE

  • Your website must be able to function with all different browsing technologies
    The most important rule of web accessibility, not everyone uses the same web technology. Different browsers are compatible with different plugins and programs that are required for your website. This basically means that you ensure that you provide alternatives to images, JavaScript, flash, audio and video. Also you also need to be aware of support for CSS and how the web pages look where it is not supported.
  • Forms need to be accessible to web users
    Web forms must be accessible. For example, prompt text must be in appropriate position, visible form validations and more
  • It should be easy for all users to quickly process the content on your website
    Most users browse through a web page a quickly as possible to look for what they need or what stands out. Ensure the use of headings, links, bold text, and bullet points. Also use descriptive texts.
  • Structure and presentation should be completely separated
    This is to make it more accessible from devices success as PDAs, mobile browsers, WebTV, IPads and more. Structure is how the document is organized and presentation is how the words, images are presented to the end users.
  • The end user should ha control over your web pages
    All web users have different attitude on how they browse the internet, depending on browsers or kind of disability they may have. By handling control back to the users, it will enhance the accessibility of your website. This could mean allowing users to resize text, change background colour, font colour, and more.

WHY IS ACCESSIBILITY IMPORTANT?

The web has become an increasingly important part of life in the sense of education, employment, government, commerce, healthcare, recreation, and many more. It is important for the web simple in such a way that it provides equal opportunity and access to people with ability and disability. It helps disabled persons to be involved more in the society.

The Disability Discrimination Act states that the service provides must not discriminate against disabled people. A website is regards as a service to people and therefore falls under this law, and as such must be made accessible to everyone.

BENEFITS OF AN ACCESSIBLE WEBSITE

  • Increase in reach
    The website will have more users, because it is accessible by both the able and disabled users.
  • Website will be easier to manage
    An accessible website separates contents and presentation of each page. Each web page has a HTML document that’s contains the words and images of that page and calls up a CSS document that contains the presentation information. This CSS document is shared with all pages in the website. So to adjust the layout of your website, you only have to make changes to the CSS document, saving time and money.
  • Website becomes compatible with new web technologies
    PDAs, IPads, Mobile phones, in –car browsers are now regularly used to access the internet. You need to make you website accessible to these machines to be able to reach these target users.
  • Higher ranking in search engines
    Making a website more accessible to users, you are making it more accessible to search engines as well. Search engines cannot usually understand images and, JavaScript, flash, audio and video content. By providing alternative text and content to each of these, it will be more accessible to search engines (Moss, 2005).
  • Avoid legal fees
  • Download time will be improved
    Accessible websites generally download quicker than poorly accessible website. Just 25% of web users in the UK are connected to the Internet via broadband (source: National Statistics). If your website takes long to download, users may be clicking away (Moss, 2005).
  • Usability will be enhanced
    There is a certain amount of overlap between accessibly and web usability. A more accessible website enhances usability of that website.(Moss, 2005).
  • Better publicity
    A more accessible website surely gets better publicity amongst internet users.

HTML5

HTML was developed by the W3C until 2004, when members of the HTML working group grew disturbed with the direction the W3C was going with HTML. They felt that the W3C was not paying enough attention to the real-world development needs of the language and focusing too much on XML and XHTML. So they formed a new group called WHATWG (Web Hypertext Application Technology Working Group) devoted to evolving the Web. They started by working on a new specification of HTML – HTML 5 (Kyrnin, 2011).

HTML has been has been in continuous evolution since its formal introduction to the World Wide Web in the 1990s. HTML5 is the next major revision of HTML. It is the latest specification of HTML.

NEW FEATURES

  • New semantic elements
    HTML5 comes with new semantic headers such as <nav>, <header>, <footer> and <article>. Semantics are very important in HTML.
  • New form features
    HTML 4.01 already allows us to create usable, accessible web forms, but some common form features are fiddler than they should be, and require hacking to implement. HTML5 provides a standardized, simple way to implement features such as date pickers, sliders and client-side validation.
  • Native video and audio
    Video and audio on the web has been done using flash. This is because open standards failed to provide a cross browser compatible mechanism for implementing such things. HTML5 includes <video> and <audio> elements for implementing native video and audio players really easily with nothing but open standards, and it also includes an API to allow you to easily implement custom player controls.
  • Canvas drawing API
    The <canvas> element and associated API allows you to define an area of the page to draw on, and use JavaScript commands to draw lines, shapes and text, import and manipulate graphics and video, export in different image formats, and a whole lot more.
  • Web sockets
    This API allows you to open a continuous connection between a sever and a client on a specific port and send data in both directions until the port is closed. This improves the efficiency of web applications a great deal, as data can be continuously and accurately exchanged between client and server without constant page reloads, and without constantly having to poll the server to see if updates are available.
  • Offline web applications
    This feature allows a number of features of the website to run offline. Application Caches allow you to save a copy of all the assets and other files needed to run web applications locally, and Web SQL databases allow you to save a local copy of a web application’s data. Together, these allow you to continue using an application when it goes offline, and then synchronize changes with the master version on the server when the network is available again.
  • Web storage
    Cookies allow us some degree of local data storage, but their use is fairly limited. HTML5 Web Storage allows us to store a lot more data, and do a lot more with it.
  • Geolocation
    It’s a new API in the HTML5 in which an object can be used to programmatically determine the location information through a device’s user agent. Eg, mobile devices (Source: dev.opra.com)

CSS3

CSS3 is the style sheet language used to describe how the look and feel of a document is written in a mark-up language. In CSS3, there some new elements that take the web design to a whole new ball game. Such as the ability to allow a 4th field to define alpha value (rGBA colour), create rounded borders, drop shadow behind an element or even allow multiple images to be layered on the background. Even text is getting a makeover with the ability to define what happens if text overflows its space, use of drop shadows, breaking the flow of text into multiple columns based on the width of their containing element (Curto, 2010).

NEW FEATURES

  • Rounded corners 
    CSS3 implements a new property called border radius that allows you to easily add rounded corners to any element with border (Curtis, 2010).
  • Text shadow
    You will also be able to add a drop shadow to your text using CSS. This has been implemented in Opera 10, Chrome, Safari and Firefox 3.5. However, each browser renders it slightly differently, which might be very frustrating (Curtis, 2010).
  • Multiple backgrounds
    CSS3 will allow you to add multiple background images to a single element. This should significantly reduce the amount of wrapper and container divs that are created simply to add an extra background (Curtis, 2010).
  • RGBA, HSL and HSLA
    CSS3 implements three new methods for declaring an element’s colour. They are RGBA (red, green, blue, alpha), which allows you to specify the colour in RGB and specify its opacity; HSL, which allows you to specify your colour in hue, saturation and lightness; and HSLA (hue, saturation, lightness, alpha), which allows you to specify an HSL colour and its opacity (Curtis, 2010).
  • Attribute selectors
    You will be able to use a great deal of nice attribute selectors with CSS3, including being able to select specific child nodes of an element (including the ability to implement styles on every other child – particularly useful for alternating table rows), and being able to style your form elements more easily (Curtis, 2010).
  • Multi-column layout
    This is a huge new addition. With CSS3, you will be able to specify a specific width of columns or a specific number of columns and have your content automatically overflow properly into the columns (Curtis, 2010).

IMPROVEMENTS IN WEB ACCESSIBILITY FOR HTML5 AND CSS3

HTML 5 is not yet a standard, but browsers are set to support its features before it becomes a standard in the future. This is a welcome development in terms of accessibility, the new features in HTML 5 and CSS3 helps to break the current barriers that developers have been encountering trying to make a website more accessible. Most importantly web developers won’t have to do anything extra to enable most of this added accessibility features. It comes standard with the proper use of HMTL. The new features in HTML5 make HTML more powerful, and suitable for building accessible web applications.

  • New semantic elements – these include the header, footer, nav, section, article and aside tags. Usually, web developers make use of div tags to mark sections on a web page. The new semantic elements allow the web developer to specify different section with the appropriate section tags like header, footer, and articles. This makes the web page more presentable and more accessible.
  • SVG Support – HTML 5 broadens SVG support even though most browsers support it. SVG images are vector images; this makes it important for more accessibility because they can be scalable without loss of quality. This feature is important for those who need magnification.
  • Audio and Video elements – these have been a pain to web developers trying to make it accessible. Audio and video have been implemented through flash in the past. It has always been thought that is if these are embedded to the web page it will drastically improve its accessibility.
  • Drag and Drop – this is a great addition to the HTML, The element has been a difficult implementation. Complex websites can now be easily accessible. This is a feature which can be used to make a web page complex and accessible.
  • Advanced features like date/time picker, sliders, email. These add an extra functionality to the old form controls. This will make this more consistent as against the use of JavaScript.
  • Access Keys – CSS3 implements access keys which make web experience memorable and more accessible. It offers a convenient mechanism for people with motor skill disabilities , such as Cerebral palsy, Parkinson’s disease, Alzheimer’s disease, etc., to access links or interface elements without having to cycle through all of the other links and interface elements in the content. A developer could use this technique to assign shortcut keys that enable certain functionalities on a web page, and hence avoid the need of moving the cursor to the link or button, hence saving time and improve the work flow and experience.
  • Transformation in CSS3 makes it possible to use plain text and rotate, twist and tweak its looks via CSS. This is important to screen readers where they will still read the text OK because their reading order is not influenced by the visual appearance of the text. So even text rotated by 45 or 90 degrees will appear correctly in a screen reader’s virtual buffer (Marco, 2010).

CONCLUSION

Developing web applications can be so complex and overwhelming for anyone not groomed in computer programming. The advancements in HTML 5 and CSS3 technologies have allowed beginners to be able to create good accessible websites which could have been trickier with older versions. There is a lot of talk these days with regards to proper development practices and accessible web design. Many web developers overlook the importance of coding a website in proper and meaningful HTML. Utility programs for the blind such as text to speech software make use of alternate text for images and links name properly. Search engine send out their robots to browse through your website. These computers can learn more about your website if it is properly coded and better with the use of the HTML5 features.

People find it difficult to control a mouse with precision, and easily become frustrated while attempting to select a link. Websites need to allow enlargeable links and create larger clickable link whenever possible. With the new CSS3 Links could be styled better and made different from the body so even colour blind users could locate what they want immediately. Users can also be allowed to have control over the font colour and background colour. They could change them to suit their needs. Websites never used to rely on audio and video for accessibility. But HTML5 and CSS3 has made it possible to have some level of confidence using audio and video for accessibility. Video and audio, SVG and Canvas can be used in ways that will help people with cognitive disabilities.

REFERENCE

  1. Canon, Aaron. “With HTML 5, Much Accessibility Will Come Free – Straightforward Web Accessibility for Designers and Developers.” Cannon Access – Straightforward Web Accessibility for Designers and Developers. 20 Apr. 2010. Web. 15 Jan. 2011. <http://www.cannonaccess.com/2010/04/html5-much-accessibility-free/>.
  2. CSS3.com. “Posts Tagged “accessibility”” CSS3.com: CSS Reference Guide, and Blog. 30 Apr. 2009. Web. 15 Jan. 2011. <http://www.css3.com/tag/accessibility/>.
  3. Curtis. “A Look Into HTML5 and CSS3.” Web Development Blog – HTMLCenter. Web. 15 Jan. 2011. <http://www.htmlcenter.com/blog/a-look-into-html5-and-css3/>.
  4. Curto, Jackie. “An Introduction to HTML 5 & CSS 3.” EzineArticles. 1 Apr. 2010. Web. 12 Jan. 2011. <http://ezinearticles.com/?An-Introduction-to-HTML-5-and-CSS-3&id=3996563>.
  5. Davers, Chris. “Things To Consider About Web Accessibility | HTML 5.” Html 5 Sample. Web. 11 Jan. 2011. <http://www.html5sample.com/things-to-consider-about-web-accessibility/>.
  6. Kyrnin, Jennifer. “What Is HTML 5 – The Newest Version of HTML Is HTML 5.” Web Design – HTML XML – Web Development – Web Site Design. Web. 12 Jan. 2011. <http://webdesign.about.com/od/html5/qt/what_is_html5.htm>.
  7. Marco. “New Accessibility Support for HTML5 Elements and Attributes « Marco’s Accessibility Blog.” Marco’s Accessibility Blog. 9 Nov. 2010. Web. 12 Jan. 2011. <http://www.marcozehe.de/2010/11/09/new-accessibility-support-for-html5-elements-and-attributes/>.
  8. Mills, Chris. “Get Familiar with HTML5!” Dev.Opera. 14 Jan. 2011. Web. 16 Jan. 2011. <http://dev.opera.com/articles/view/get-familiar-with-html5/>.
  9. Moss, Treton. “Benefits of an Accessible Website – Part 2: The Business Case.” Webcredible.co.uk. Mar. 2005. Web. 13 Jan. 2011. <http://www.webcredible.co.uk/user-friendly-resources/web-accessibility/benefits-of-accessible-websites-2.shtml>.
  10. Playford, Robert. “HTML 5 and CSS 3 Elements: Forms, Web Sockets, Offline Access and Geo-Location (Part 2).” EzineArticles Submission – Submit Your Best Quality Original Articles For Massive Exposure, Ezine Publishers Get 25 Free Article Reprints. 23 Nov. 2010. Web. 15 Jan. 2011. <http://ezinearticles.com/?HTML-5-and-CSS-3-Elements:-Forms,-Web-Sockets,-Offline-Access-and-Geo-Location-(Part-2)&id=5425243>.
  11. Van Kesteren, Anne. “HTML5 Differences from HTML4.” World Wide Web Consortium (W3C). 13 Jan. 2011. Web. 15 Jan. 2011. <http://www.w3.org/TR/html5-diff/>.
  12. WC3. “Summary of Web Accessibility Standards and Guidelines.” VORD Web Design – Bedford UK. World Wide Web Consortium. Web. 14 Jan. 2011. <http://www.vordweb.co.uk/accessibility_standards.htm>.
  13. “Web Accessibility: The Basics.” Webcredible.com. Jan. 2004. Web. 14 Jan. 2011. <http://www.webcredible.co.uk/user-friendly-resources/web-accessibility/basics.shtml>.

 

cloud computing

An Overview of Cloud Computing

Introduction
Cloud computing is a term used to describe anything that is involved in hosting services over the internet. It uses the internet and central remote servers to maintain data and applications. Cloud computing allow users and businesses to use applications without need for installation and access to personal files at a computer with internet access. Cloud computing allows for much more efficient computing by centralizing storage, processing, bandwidth, and memory. The term ‘cloud’ originates from the network diagrams that represented the internet. Cloud computing traces its history back to a time when computer systems remotely share resources and application. Currently though, it is more about many different services and applications being delivered in the internet cloud, and the fact that the devices used to access these services and applications do not require any special application or installation.

According to “What Cloud Computing Really Means” (Galen Gruman and Eric Knorr, InfoWorld, April 07, 2008), cloud computing can include everything from SaaS (Software as a Service providers) through development environment services (building applications on the service provider’s infrastructure which can then be delivered to users over the Internet.)

“Clusters of distributed computers (largely vast data centers and server farms) which provide on-demand resources and services over a networked medium (usually the Internet)” – Dr Nabil Sultan

But, in simple words,” Cloud Computing is more than the few internet based services which we access through our web browsers, it is the fundamental shift from the traditional client/server or n-tier architecture and it primarily focuses on the effective utilization of the IT INFRASTRUCTURE “ (Mahajan, 2011).

The analogy is, ‘If you only need milk, would you buy a cow?‘ All the users or consumers need is to get the benefits of using the software or hardware of the computer like sending emails etc. Just to get this benefit (milk) why should a consumer buy a (cow) software /hardware? (wikivest.com, 2011)

As a result, cloud computing has the potential to upend the software industry entirely, as applications are purchased, licensed and run over the network instead of a user’s desktop. This shift will put data centres and their administrators at the centre of the distributed network, as processing power, electricity, bandwidth and storage are all managed remotely. It affects not only business models, but the underlying architecture of how we develop, deploy and deliver applications.

Cloud computing is different from Grid computing, utility computing, or autonomic computing. It is a very independent platform in terms of computing. Example of cloud computing is Gmail, Yahoo mail, Hotmail etc. You don’t need a software ort a server to make use of the services. All needed is an internet connection and you start sending email. The email and server are all on the cloud and are managed by service providers such as Yahoo, Google, and Microsoft etc.

Cloud computing is broken in to three segments; Applications, Platforms, and infrastructure. With each segment serving different functions, and offers different products for business and individuals.

The main Idea behind cloud computing is to outsource information technology services usually hosted in local data centres to third party service providers called cloud providers, while using internet as the medium for service delivery. The consumers of the cloud services are known as cloud users. The cloud providers run large data centres across multiple geo-locations to meet the needs of the cloud users on their platform.

A major driver of cloud computing is the cost saving factor. The upfront expenditure on setting up infrastructure is totally eliminated as these are provided by the cloud provider. Also, the on-going operational cost of system maintenance is further reduced by the pay per use model adopted by most cloud providers. Using dis paradigm, small business are able start up with minimum capital and are able to deploy their application on the cloud within a very short period of time. The ability to access data and applications from anywhere via the internet and its scalability are also key driving factors of the cloud computing paradigm.

The cloud services consist of three levels; software as a service, which are basically end user applications on the cloud. Platform as a service, which is the platform for deploying cloud applications and data storage which is provided in the cloud infrastructure. Infrastructure as a service, which is basically an environment of virtual machines on the cloud. In all instances, the cloud user is distant from the underlying cloud hardware architecture and its maintenance.

Cloud computing is still not widely adopted despite the benefits and potential in poses in the near feature. This is attributed to some concerns raised by mostly security issues which are loss of data, privacy, loss of control, hacking, etc. The main focus of this paper is to give a detailed description of cloud computing, what it involves and what it is not.

KEY CHARACTERISTICS

  1. On Demand self-service – A user basically requires no help to be able to access resources. The best breed of self service is to provide users the ability to upload, deploy, schedule, manage, and report on their business services.
    The benefit of self service from users’ point of view is a level of authorization and freedom that yields significant business agility. Also a benefit from providers’ point of view is that less administrative involvement is necessary when self service is delegated to users. This characteristic saves time, money, and resources. It allows service providers to focus more on strategic responsibility and improvements.
    An Example is the Google Docs, which allows users to create and maintain their documents online. There is no need for any software installation. This is accessible from anywhere on the internet at any required time. Files can be shared with anyone from any location at a desired time. This self service allows users to be independent and Google staff to concentrate more on improving the application instead of providing support for the users.
  2. Measured/Metered Service (pay par use) – The typical billing of the cloud is pay per use. The users’ only need to pay for resources they use. Cloud computing platforms provide mechanisms to capture usage information that will enable reporting for billing purpose. The value of this to the consumers is that they only get to bay based on resources they consume. This includes power, storage, and/or bandwidth.
    Examples of this are the advertising models, etc. A scenario is the Official FIFA world cup site which gets extremely high traffic during the one month of the world cup. The site requires very high server usage during this period. For the rest of the year the site remains with minimal traffic and only needs to pay for the reduced usage.
  3. Rapid Elasticity – The computing cloud is elastic, meaning resources could increase and decrease on demand of its users. Elasticity enables scalability, which means that the cloud can scale upward for peak demand and downward for lighter demand. Scalability also means that an application can scale when adding users and when application requirements change (Hurwitz et al, 2010).
  4. Resource Pooling – Could resources are dynamically pooled and allocated to user base on demand. The users to not have the knowledge of the physical location of the server or hardware resources used, these resources are dynamically assigned to users in a multi-tenant model. Examples of resources include storage, processing, memory, network bandwidth, and virtual machines.
  5. Broad Network Access – Resources are available via a broad network which are accessible through standard mechanisms or devices which can access to the network platform (basically internet). Examples of such devices include mobile phone, PDA, laptops, and Computers.

SERVICE MODELS
Once the cloud is established, computing services are deployed and differ depending on requirements. The primary service models known are as follows:

  • Software as a service (SaaS)
    This refers to applications provided to the end users by the cloud providers. These kind of applications run on the cloud infrastructure. They are made accessible to the user from any convenient location through a thin client application such as a web browser (e.g. Web-based email). This eliminates the cycle of packaging distributing and installing software on user’s machine. The user does not manage or control the underlying cloud infrastructure but can subscribe to use the applications (e.g. Google Docs).
  • Platform as a service (PaaS)
    A capability provided to users to deploy created applications or store data unto the cloud infrastructure using programming languages and tools supported by the cloud provider. Users could get their applications running in a very short time. Examples of PaaS are Google App Engine, and Force.com.
  • Infrastructure as a service (IaaS)
    This is the delivery of cloud infrastructure as a service (typically a platform virtual environment) to users. This leverages significant technology, services and data centre investment to deliver IT as a service to users. The users are provided with provision, storage, networks, and other fundamental computing resources where the can deploy and run arbitrary software, which may include operating systems and applications. E.g. Host firewalls, and Eucalyptus etc.

DEPLOYMENT MODELS
Deployment models here refer to the scope of the systems. It defines the user base and model of accessibility for cloud services.

  • Private cloud
    This is basically a cloud system owned by an organization or members of its group. It may be managed by the organization or a third party and may on premises or off premises of the organization. The resource are only accessible my members of the organization. The security risk here is reduced to minimal because it is within controlled boundaries of the owners.
  • Community cloud
    This is an extension of the private cloud where organisations with common interests come together to share cloud infrastructures. It may be managed by the organisations or a third party. Cloud infrastructure may exist on or off premises and are tightly monitored.
  • Public cloud
    This is the common notion of cloud computing as it is known today. This refers to the cloud infrastructure that is available via the internet. It is accessibly by a very large user group. The services provided are of wide range and there is much security concern dues to the large user base and limited control.
  • Hybrid cloud
    The hybrid is the combination two or more of the deployment models mentioned above. They remain unique entities but are bound together by standardised or proprietary technology that enables data and application portability.

CLOUD COMPUTING PROVIDERS
Gartner predicts that cloud computing will surge to 150 billion dollars by 2013. Below is a partial list of companies that provide cloud computing services:
Amazon, Google, Microsoft, Salesforce.com, Citrix, IBM, Mozyhome, Sun, cohensiveFT, Icloud, Nivanix, VMware, Flexscale, Joyent, Rackspace, and 3tera etc. (Global Knowledge, 2010)

OTHER FORMS OF COMPUTING

  • Grid computing
  • Utility computing
  • Green computing
  • Distributed computing

ADVANTAGES OF CLOUD COMPUTING
According to International Data Corporation (IDC), “The proliferation of devices, compliance, improved systems performance, online commerce and increased replication to secondary or backup sites is contributing to an annual doubling of the amount of information transmitted over the Internet.” The cost of dealing with this amount of data is something that companies must address. In today’s economy, companies are looking at any cost saving measures, and the bottom line is that cloud computing provides much greater flexibility than previous computing models.

  1. Storage – The cloud holds up more storage than the personal computer. It takes away the need to upgrade the memory of the personal computer, this helps to keep the bring don cost for users and companies alike.
  2. Mobility – it Allows users to connect even without their own personal computers, which means that users can connect from anywhere around the world as long as u have access to internet and computer.
  3. Reduced cost – This a major factor for the wide cloud computing adoption. It keeps the costs down for both users and business owners. The cloud eliminates the upfront capital expenditure on servers, cooling, administration, and energy supplies to deploy an application. Operational cost is also reduced to amount of resources consumed. I.e. pay per use model which make cloud computing more desirable because of the cost savings.
  4. Flexibility – It has more flexibility than other network computing systems. For large enterprises, the ease of deploying a full service set without having to set up base infrastructure to support it can be even more attractive than cost savings
  5. Shared Resources – A key component of cloud computing is that resources are shared. With cloud computing, companies and individuals could have access to resources via the cloud, this saves business time and money by placing their resources all in one location that is easy for them to access.
  6. Scalability – With cloud providers constantly increasing the data centers and dynamically scalable services, it has been a key motivator for organizations and individuals to move data and applications to the cloud.
  7. Reduced maintenance – The cloud users do not take responsibility for the system maintenance. The burden of maintaining the cloud is in the hands of the cloud provider.
  8. Ease of Integration – An increasing number of enterprise applications require integration with third-party applications that are often hosted outside the enterprise firewall. The cloud, with its configuration flexibility, integrated security and choice of access mechanisms, has a natural advantage for serving as a core platform and integration fabric for these emerging applications (Hemachandran, 2010).

CONCERNS IN THE CLOUD
Cloud computing frees both individuals and organizations from the cost and hassle of installing, maintaining and constantly upgrading software applications on their desktops and in their data centres. It also allows companies to focus on their core competencies, rather than investing in centralized computing facilities that have to be maintained and upgraded and that may not be utilized at an optimum capacity. This said the many critics of cloud computing point to the fact that users become totally reliant on a high quality Internet connection. Cloud computing also creates a reliance on external suppliers which may also raise potential business continuity, data protection and security risks (explainingcomputers.com, 2010).

  • Availability – One of the risk of outsourcing data and applications to a cloud provider is not is non-availability of service. This could be due to attack, theft, disaster, or unplanned outage on the provider’s infrastructure.
  • Privacy – There is a growing concern of both the academia and computing industry about how to specify policies for usage of data stored on the cloud providers’ servers. The cloud user should be able to specify policies on how their data are stored, used and disseminated by the cloud provider. Most of the cloud providers do not provide a transparent means for the users to control how their data is being managed.
  • Vendor Lock-in – This is the lack of standard formats for exchanging data between different cloud applications and services. This makes it specific to a particular vendor. A cloud user is likely to be locked by the provisions of a cloud provider or not be able to use multiple platforms.
  • Auditing information finding – It is often difficult to verify the auditing compliance with requirement of services provided in the cloud. Th is because cloud providers provide many services to the cloud users making it difficult to track ech services requested by a user.
  • Maintenance and management change – The users are responsible for maintaining applications deployed on the cloud providers’ servers. Cloud providers normally make upgrades and install patches sometimes affect user’s applications. In such cases, users will have to make sure that applications are well maintained and are compatible with cloud provider’s upgrades.
  • Security – Cloud users are sceptical about the data security because of third party vendor and multi tenancy. Choice of cryptographic and hash algorithms used, how it works at transport layer and how data protected from other tenants being the centre issue. Multi-tenancy is the obvious choice for the cloud vendors for scalability but large enterprises see it as a weapon to exploit their huge database (Mahajan, 2011).

COMMUNICATION IN THE CLOUD
Designing applications for the cloud depends on the type of service and the devices being used to access it. This may be as simple as clicking on the required webpage or it involves an application using an API accessing other services in the cloud.

Communication service extent the capabilities to provide new interactivity to the current service. Cloud- based communications services enable businesses to embed communications capabilities into business applications, such as ERP or CRM systems. These applications can be accessed through a smartphone or PDAs supporting productivity. “These services are over and above the support of service deployments of VoIP systems, collaboration systems, and conferencing systems for both voice and video. They can be accessed from any location and linked into current services to extend their capabilities, as well as standalone as service offerings” (dialogic, 2010).

To have access to communication capabilities, this is achieved through APIs. Applications developed outside the cloud i.e. deployed on user devices could take advantage of the communication infrastructure with the cloud. These APIs open a range of communication possibilities.

To deliver on the scalability requirements for cloud-based deployments, the communications software should be capable of running in virtual environments. This allows for easily increasing and decreasing session densities based on the needs at the time, while keeping the physical resource requirements to a minimum (dialogic, 2010).

CONCLUSION
Cloud computing provide a significant competitive advantage to the initiative. It allows organizations to deliver highly scalable and reliable applications faster and cost effectively. This produces a terrific advantage for the industry that depends on or benefits from large scale applications.

With cloud based applications in place, these cloud providers are freed to deliver new services to the cloud users more rapidly. Because they are not constraint by scale, they are also able to make better business decisions by intelligently analysing the bulk of data which they can access. Also enjoying the less complicity of the IT environment and ability to scale resources in response to changing market conditions creates a more agile organization.

No matter what your organizational requirements are, you might find that cloud services make sense. If not a complete switch to a cloud service, possibly a partial hybrid switch might work. This is what Microsoft sees as the way forward, and thus, they have built their cloud solutions based on hybrid type offerings.

While cost and ease of use are the two major drivers of cloud computing, there are significant security concerns that need to be addressed when considering moving critical applications and sensitive data to public servers and shared environments. To address these concerns, the cloud provider must come up with sufficient controls to provide a certain level of security that the cloud user will have if the cloud were not used.

In the future, more cloud adoption is certain by more organization. The recent move to the cloud by organizations has been tremendous. The cloud expands in a geometrical ratio because it makes businesses grow. Cloud Computing holds a lot of promise and we believe that it is likely to be a major influence on hosting and application development.

Reference
1. Chee, Brian J. S., and Curtis Franklin. Cloud Computing: Technologies and Strategies of the Ubiquitous Data Center. Boca Raton, Fla. [u.a.: CRC, 2010. Print.
2. Chorafas, Dimitris N. Cloud Computing Strategies. Boca Raton, FL: CRC, 2011. Print.
3. Ebhostingreport.com. “The Advantages of Cloud Computing.” Best Web Hosting | Website Hosting Reviews and Ratings 2011. Web. 25 Feb. 2011. <http://www.webhostingreport.com/learn/advantages-of-cloud-computing.html>.
4. Explainingcomputers.com. “CLOUD COMPUTING: AN INTRODUCTION.” ExplainingComputers.com by Christopher Barnatt. 11 Dec. 2010. Web. 23 Feb. 2011. <http://www.explainingcomputers.com/cloud.html>.
5. Global Knowledge. “Top 10 Security Concerns for Cloud Computing.” Infosec Island. 13 July 2010. Web. 22 Feb. 2011. <https://www.infosecisland.com/blogview/5300-Top-10-Security-Concerns-for-Cloud-Computing.html>.
6. Hemachandran, Satish. “The Key Advantages of Cloud Computing.” CTO Edge. 29 Nov. 2010. Web. 27 Feb. 2011. <http://www.ctoedge.com/content/key-advantages-cloud-computing>.
7. Kumar, Arun. “What Are the Advantages of Cloud Computing?” Find Health, Education, Science & Technology Articles, Reviews, How-To and Tech Tips At Bright Hub – Apply To Be A Writer Today! Ed. Rhonda Callow. 4 Feb. 2011. Web. 25 Feb. 2011. <http://www.brighthub.com/environment/green-computing/articles/10026.aspx>.
8. Magalhaes, Ricky M. “Cloud Computing; The Past, The Present, The Future (Part 1).” Network Security Articles for Windows Server 2003, 2008 & Vista. 22 July 2009. Web. 21 Feb. 2011. <http://www.windowsecurity.com/articles/Cloud-Computing-Past-Present-Future-Part1.html>.
9. Mahajan, Harsh. “Security Issues with Cloud Computing.” Windows 7 Tips, Downloads, Security, News, Phones, Office, Live. 30 Jan. 2011. Web. 25 Feb. 2011. <http://www.thewindowsclub.com/security-issues-with-cloud-computing>.
10. Orlando, Dan. “Cloud Computing Service Models.” IBM – United States. 8 Feb. 2011. Web. 25 Feb. 2011. <http://www.ibm.com/developerworks/cloud/library/cl-cloudservicemodels/?cmp=dw&cpb=dwcld&ct=dwnew&cr=dwnen&ccy=zz&csr=021011>.
11. Rittinghouse, John W., and James F. Ransome. Cloud Computing: Implementation, Management, and Security. Boca Raton: CRC, 2010. Print.
12. Still, Beth. “Cloud Computing – Usage and Advantages.” Web Design | Website Design & Magento Ecommerce. 3rd Nov. 2009. Web. 28 Feb. 2011. <http://www.junowebdesign.com/web-industry-news/cloud-computing-usage-and-advantages>.
13. Tek-Tips. “Defining Cloud Computing’s Key Characteristics, Deployment and Delivery Types | Tek Tips Whitepaper Library.” Tek-Tips Whitepaper Library. 30 June 2009. Web. 25 Feb. 2011. <http://tek-tips.nethawk.net/blog/defining-cloud-computings-key-characteristics-deployment-and-delivery-types>.
14. Widener, Joey. “5 Essential Characteristics of Cloud Computing | Networking Exchange Blog.” Networking Exchange Blog | a Place for Business Leaders to Learn, Share, and Engage with Networking Experts on Advancing Business Goals through Technology Innovation. 18 Feb. 2011. Web. 23 Feb. 2011. <http://networkingexchangeblog.att.com/technology/5-essential-characteristics-of-cloud-computing/>.

Tips on creating a secure password

Tips on creating a secure password

Method 1

1. Think of two words e.g. Apple and Orange
2. Take two letters e.g. Ap
3. Add a number e.g. 5
4. Then add another two letters at the end e.g. Or
5. The secure password is Ap5Or

Method 2

1. Think of a word e.g. Westminster
2. Replace characters for numbers in the same way you would see on a personalised car number platese.g. ‘e’ becomes 3, ‘t’ becomes 7, ‘i’ becomes 1
3. The secure password is W3stm1nst3r

Database Connection Utility Class in Java

You will find this useful when connecting to a database and running queries in you application. will a little modification and you are good to go. Just add your database connection string, username and password!

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Database object to load drivers and perform queries
 * @author Abdulsalam Umar blog.salamtura.com
 */
public class DataService {

    private static Connection con;
    private static final String Driver = "oracle.jdbc.driver.OracleDriver";
    private static final String ConnectionString = "Your database connection string";
    private static final String user = "username";
    private static final String pwd = "password";

    /**
     * create Database object
     */
    public DataService() {
    }

    /**
     * to load the database base driver
     * @return a database connection
     * @throws SQLException throws an exception if an error occurs
     */
    public static Connection loadDriver() throws SQLException {
        try {
            Class.forName(Driver);
        } catch (ClassNotFoundException ex) {
            System.out.println(ex.getMessage());
        }
        con = DriverManager.getConnection(ConnectionString, user, pwd);
        return con;
    }

    /**
     * to get a result set of a query
     * @param query custom query
     * @return a result set of custom query
     * @throws SQLException throws an exception if an error occurs
     */
    public static ResultSet getResultSet(String query) throws SQLException {
        Connection con = loadDriver();
        ResultSet rs;
        PreparedStatement st = con.prepareStatement(query);
        rs = st.executeQuery();

        return rs;
    }

    /**
     * to run an update query such as update, delete
     * @param query custom query
     * @throws SQLException throws an exception if an error occurs
     */
    public static void runQuery(String query) throws SQLException {
        Connection con = loadDriver();
        ResultSet rs;
        PreparedStatement st = con.prepareStatement(query);
        st.executeUpdate();
    }
}

Reading a File into Byte Array

This example implements a method that reads the entire contents of a file into a byte array.

// Returns the contents of the file in a byte array.
public static byte[] getBytesFromFile(File file) throws IOException {
    InputStream is = new FileInputStream(file);

    // Get the size of the file
    long length = file.length();

    // You cannot create an array using a long type.
    // It needs to be an int type.
    // Before converting to an int type, check
    // to ensure that file is not larger than Integer.MAX_VALUE.
    if (length > Integer.MAX_VALUE) {
        // File is too large
    }

    // Create the byte array to hold the data
    byte[] bytes = new byte[(int)length];

    // Read in the bytes
    int offset = 0;
    int numRead = 0;
    while (offset < bytes.length
           && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
        offset += numRead;
    }

    // Ensure all the bytes have been read in
    if (offset < bytes.length) {
        throw new IOException("Could not completely read file "+file.getName());
    }

    // Close the input stream and return bytes
    is.close();
    return bytes;
}

Learning Java – Introduction

As a beginner in programming, the first thing I always do to put one through is to first explain explain the JVM, Source format and the IDE. This gives a basic understanding of what you are getting into and an idea of the structure on how it works.

Java is just another programming language (like c#, c) with more powerful features and more platform independent. Java runs on all the major OSs on PCs, laptops,Palm tops, tablets and mobile devices.

Firstly, you write you code/logic in a file and save it in file with .java extention (g.e Hello.java). This is an important step because this get starters really frustrated, you will really need to understand how to create a source file and how it works. Find a more detailed explanation below;

Source File Layout

Basic syntax of a Java source file:

[<package_declarations>]
[<import_declarations>]
<class_declarations>+

Example, the VehicleCapacityReport.java file

package shipping.reports;
import shipping.domain.*;
import java.util.List;
import java.io.*;

public class VehicleCapacityReport {
			private List vehicles;
			public void generateReport (Writer output) { . . . }
}

The package Statement

Basic syntax of the package statement

package <top_pkg_name> [.sub_pkg_name];

Examples:

package shipping.reports;

  • Specify the package declaration at the beginning of the source file
  • Only one package declaration per source file
  • If no package is declared, then the class “belongs” to the default package
  • Package names must be hierarchical and seperated by dots

The import Statement

Basic syntax of the import statement

import <pkg_name>[.sub_pkg_name>].<class_name>;

Or

import <pkg_name> [.<sub_pkg_name>].*;

Examples:

import shipping.domain.*;

import java.util.List;

import java.io.*;

  • Precedes all class declarations
  • Tells the compiler where to find classes to use
SUPA polo 2012

My passion for Polo

I’ve had passion for horses since when I was very young (about 5 years), I come from a town called Hadejia (in Jigawa, Nigeria) which is popular for the peoples’ culture and passion for horse keeping. Even though I never lived in the village, I often visited during holidays and festive seasons, and my main activity while I was there was horse riding. Then, I’ve always been the fearful one and opted for easy going horses to ride.
I became interested in the sport through my uncle who played in Kano. I got inspired by him when I watch him play and I always get a taste of riding the ponies which was ever fun. Since then I have developed a keen interest in polo and my passion grew when I was given polo pony for a present. The horse was called Lugard, I had him for 7 years and those were the best years of my childhood. I learnt a lot about horse keeping, and riding. I had memorable moments with Lugard that I will always remember. Sadly, I came back home one saturday morning from a school lesson to find out he was gone. My dad had gotten rid of Lugard because he was getting old.
I started playing Polo in secondary school, I had a short spell playing stick and ball before I had to abandon it because it was a form of distraction to my academics at that time. I later picked up while studying for my masters degree at the University of Birmingham in 2010, joining the school Polo club which offered affordable Polo lessons and tournaments at university level. I had weekly lessons at Rugby Polo Club with very good instructors Glen and Philip Baker. Soon I played for my university at the largest polo tournament in the UK (SUPA Nationals) in June 2011 and February 2012. Since then, I’ve found polo to be my hobby and a thing I look forward to be doing for a very long time.

Typing Master

The “Typing Master” game

Typing Master is a typing game I designed with intent to improve on typing speed. I normally find it boring using a typing lesson software because it just looks too serious.  Learning to type is extremely boring and stressful, and people prefer to chat on IMs to improve their typing skills.

I chose the “Boko Haram” scenery to add more fun to the game. The whole hype and situtation of the Boko Haram in Nigeria makes people really excited about it. It’s all about having fun while typing and nothing more.

People have asked me several questions like “how did you do it?”, “how long?”… well I smile about it all the time. It took me half a day at work to develop it! I was bored and had time to spare. I had an idea of designing a game already  and I had checked my Twitter timeline and all I could see was updates about Boko Haram, then I thought why shouldn’t I do something that people could play, have a laugh about and get some value out of it.

For those that have asked about technologies I used, here is a list and you can do it too!

  • JQuery/Javascript
  • HTML5
  • CSS
  • Fireworks/Photoshop

Here is a link to play  : Typing Master and make you you share with your pals 🙂

Anyway that’s about it

Thanks

Salamtura