Sunday, January 31, 2010

What are unit testing and integration testing, and what other types of testing should I know about?

  • unit testing in the sense of "testing the smallest isolatable unit of an application"; this is typically a method or a class, depending on scale
  • integration testing
  • feature testing - this may cut across units, and is the focus of TDD
  • black-box testing: testing only the public interface with no knowledge of how the thing works
  • glass-box testing: testing all parts of a thing with full knowledge of how it works
  • regression testing: test-cases constructed to reproduce bugs, to ensure that they do not reappear later
  • pointless testing: testing the same basic case more than one way, or testing things so trivial that they really do not need to be tested (like auto-generated getters and setters)
http://stackoverflow.com/questions/437897/what-are-unit-testing-and-integration-testing-and-what-other-types-of-testing-s

What is Unit test, Integration Test, Smoke test, Regression Test?

  • Unit test: Specify and test one point of the contract of single method of a class. This should have a very narrow and well defined scope. Complex dependencies and interactions to the outside world are stubbed or mocked.
  • Integration test: Test the correct inter-operation of multiple subsystems. There is whole spectrum there, from testing integration between two classes, to testing integration with the production environment.
  • Smoke test: A simple integration test where we just check that when the system under test is invoked it returns normally and does not blow up. It is an analogy with electronics, where the first test occurs when powering up a circuit: if it smokes, it's bad.
  • Regression test: A test that was written when a bug was fixed. It ensure that this specific bug will not occur again. The full name is "non-regression test".
To this, I will add:
  • Acceptance test: Test that a feature or use case is correctly implemented. It is similar to an integration test, but with a focus on the use case to provide rather than on the components involved.
http://stackoverflow.com/questions/4055736/what-is-a-smoke-test

Thursday, January 28, 2010

Are there automatic disqualifications for getting US security clearance?

I'll give you information about the process for obtaining a clearance.

SECRET:
NAC - National Agency Check - they'll take your fingerprints and name and run them through national crime databases (FBI database, NICS, etc) to check for any warrants.
LAC - Local Agency Check - they'll contact the police departments of any place in which you've lived, worked, or gone to school, and ask for a report of all contact they've ever had with you.
Credit check - they'll run your credit report to make sure you can't be easily bought out (ie, a hostile state offers to pay off your credit card in exchange for just a tiny bit of information).

TOP SECRET
The above, plus:
Field investigation - they'll contact the references you list and your neighbors for the past 7 years, and ask them a series of questions about you and your habits. They'll ask for recommendations to other people who have known you. They are trying to obtain a negative and positive view of your personality and habits to present to the Adjudicator.
Subject interview - speaks for itself.
Education - independent verification of all educational background claims.
Employment - independent verification of all past employment, including personal interviews of 2 colleagues where possible, and where employment exceeded 6 months.

For both, the Adjudicator will determine whether you are suitable for access to confidential information based on the guidelines listed here: http://fas.org/sgp/spb/class.htm If, based off those guidelines and the information they will collect, you feel that you will get rejected, then yes, you are wasting your time. If not, though, or if it's a "gray area," there should be a liaison you can talk to.

For Secret clearances, expect a wait time of 1-3 months (depending on how many previous addresses you have), and for TS clearances, expect to be waiting 6 months to 18 months (depending on the number of previous residences AND on whether something nasty pops up - ie, a past illicit drug use).
Source(s):
AD NCO serving in the USAF; I have a TS clearance

http://answers.yahoo.com/question/index?qid=20080927182741AAVhDab

Saturday, January 9, 2010

Factory Design Pattern

Idea is you extract the volatile core code and put it into external factory object. Instead of configuring factory at the time of construction (usual in Java), GoF factory design pattern says you should be able to create a general factory and then set the type of connection at the time of connection creation.

Saturday, January 2, 2010

Spring Tutorial 01 - Understanding Dependency Injection


Dependency Injection
A way to decouple dependencies between two objects so that they are not tied to each other.

Spring Tutorial 02 - Setting Up