ITTreats.com
Enter your Search term and Hit "Enter"

Thu, 11 Mar 2010 10:42:52 PM +00:00

Latest 'ITTreats'


coding standards in JAVA

coding standards in JAVA

Introduction

Having worked as a software developer and consultant for many years, I have seen a large amount of code in a variety of programming languages. It has run the gamut from elegant to ugly, and unfortunately much of it has been ugly. I hope to persuade you, and my fellow developers, that we should give as much attention to the style of our code as we give to the user interface and other visible parts of an application. In this the first part of a two part series, I explain why we should care about how our code looks and illustrate some general elements of good Java style. More . . .

SCJP Practice questions – 1

SCJP Practice questions  – 1

Questions
________________________________________
Question 1)
What will happen when you attempt to compile and run this code?
abstract class Base{
abstract public void myfunc();
public void another(){
System.out.println(“Another method”);
}
}
public class Abs extends Base{
public static void main(String argv[]){
Abs a = new Abs();
a.amethod();
}
public void myfunc(){
System.out.println(“My func”);
}
public void amethod(){
myfunc();

}
}
1) The code will compile and run, printing out the words “My Func”
2) The compiler will complain that the Base class has non abstract methods
3) The code will compile but complain at run time that the Base class has non abstract methods
4) The compiler will complain that the method myfunc in the base class has no body, nobody at all to looove it

________________________________________

More . . .

Best practices for JAVA Programmers

Best practices for JAVA Programmers

There are many standards and best practices for Java Developers out there. This article outlines ten most basic rules that every developer must adhere to and the disastrous outcomes that can follow if these rules are not followed.

1. Add comments to your code. –Everybody knows this, but somehow forgets to follow it. How many times have you “forgotten” to add comments? It is true that the comments do not literally contribute to the functionality of a program. But time and time again you return to the code that you wrote two weeks ago and, for the life of you, you cannot remember what it does! You are lucky if this uncommented code is actually yours. In those cases something may spark your memory. Unfortunately most of the time it is somebody else’s, and many times the person is no longer with the company! There is a saying that goes “one hand washes the other.” So let’s be considerate to one another (and ourselves) and add comments to your code. More . . .

Pagination using JSP

Pagination using JSP

Pagination in JSP

Custom JSP taglib for paging. This taglib takes some data and dynamically splits up this information into several pieces (pages)
as well as generates automatically an index for available pages. You have seen some like this many times in any search engine for example: a list of data plus some index
with links to next pages.

So body tag paging is a common wrapper. Body tag item describes a repeatable element (piece of data). Body tag index is a
wrapper for the generated index. For example, suppose you have to split file search.jsp :

<%@ taglib uri=”taglib.tld” prefix=”pg” %>

<pg:paging>

<%

for (int i=1; i<=100; i++) {

%>

<pg:item>

your data …

</pg:item>

<%

}

%>

<pg:index>

<pg:page><%=thisPage%></pg:page>

</pg:index>

</pg:paging> More . . .

SCJP 1.5 syllabus

SCJP 1.5 syllabus

How is the SCJP 1.5 exam different from the SCJP 1.4?
· Exam objectives: Several important new language features have been added, including enums, generics, static imports, and autoboxing/unboxing. API features added to the exam include java.lang.StringBuilder, java.util.Locale, java.util.Formater, java.util.Scanner. java.util.regex.Pattern, and java.util.regex.Matcher. Java IO features have been added, including File, BufferedReader, BufferedWriter, FileReader, FileWriter and PrintWriter. Concepts such as loose coupling and high cohesion have been added, as well as greater emphasis on encapsulation as it relates to JavaBean conventions. Bit manipulation (e.g., shifting) has been dropped.
· Number of questions: 72 (increased from 61)
· Time: 175 minutes (increased from 120 minutes)
· Passing score: 59% (increased from 52%)
· Level of difficulty: The concensus is that it is more difficult.
· Format of questions: As before, you will always be told how many options to choose. No credit is given for partial answers. Drag-and-drop questions were also introduced for this version of the exam.

Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 (CX-310-055)
Exam Objectives More . . .

Glossary of Software Testing/QA Terms

Glossary of Software Testing/QA Terms

Source: The following definitions are taken from GLOSSARY OF COMPUTERIZED SYSTEM AND SOFTWARE

DEVELOPMENT TERMINOLOGY

audit. (1) (IEEE) An independent examination of a work product or set of work products to assess compliance

with specifications, standards, contractual agreements, or other criteria. See: functional configuration audit,

physical configuration audit. (2) (ANSI) To conduct an independent review and examination of system records

and activities in order to test the adequacy and effectiveness of data security and data integrity procedures, to

ensure compliance with established policy and operational procedures, and to recommend any necessary

changes. See: computer system audit, software audit. More . . .

Software Testing Life Cycle Explained

Software Testing Life Cycle Explained

Software Testing Life Cycle consists of six (generic) phases:

  • Test Planning,
  • Test Analysis,
  • Test Design,
  • Construction and verification,
  • Testing Cycles,
  • Final Testing and Implementation and
  • Post Implementation. More . . .

Software Testing Interview Questions

Software Testing Interview Questions

Test Automation job interview questions:

1. What automating testing tools are you familiar with?

2. How did you use automating testing tools in your job?

3. Describe some problem that you had with automating testing tool.

4. How do you plan test automation?

5. Can test automation improve test effectiveness?

6. What is data – driven automation?

7. What are the main attributes of test automation?

8. Does automation replace manual testing?

9. How will you choose a tool for test automation? More . . .

Software Testing in Detail

Software Testing in Detail

Software testing is probably the most complex task in the software development cycle. It

often takes longer to test the software than it does to write the code. The problems

discovered during the software testing phase add more time onto the coding phase,

resulting in further delays in the product’s release, and so this vicious cycle goes.

It’s nearly impossible to attribute the problems that arise during the software testing

cycle to any single factor. Before going any further, it’s important to clarify one More . . .

Software testing Outline

Software testing Outline

1. The Software Life Cycle

An introduction to the fundamental elements of the software life cycle, and several life cycle

models that are commonly in use. Also, how testing is integrated into the life cycle.

a. Life cycle models

b. Types of testing and where they fit in

i. Unit Testing

ii. Regression Testing

iii. Integration Testing

iv. System Testing More . . .