abughali.com IT and Business Blog by Mahmoud Abu-Ghali

20Feb/102

Bloom’s Taxonomy

Benjamin Bloom created this taxonomy for categorizing level of abstraction of questions that commonly occur in educational settings. The taxonomy provides a useful structure in which to categorize test questions, since professors will characteristically ask questions within particular levels, and if you can determine the levels of questions that will appear on your exams, you will be able to study using appropriate strategies.

Competence

Skills Demonstrated

Knowledge
  • Observation and recall of information
  • Question keywords:
    list, define, tell, describe, identify, show, label, collect, examine, tabulate, quote, name, who, when, where
Comprehension
  •  Understanding information or making sense of ideas
  • Question keywords:
    summarize, describe, interpret, contrast, predict, associate, distinguish, estimate, differentiate, discuss, extend
Application
  •  Applying knowledge or understanding in unfamiliar contexts
  • Question keywords:
    apply, demonstrate, calculate, complete, illustrate, show, solve, examine, modify, relate, change, classify, experiment, discover
Analysis
  •  Using methods or theories in unfamiliar situations to identify structures and patterns and to solve problems.
  • Question keywords:
    analyze, separate, order, explain, connect, classify, arrange, divide, compare, select, explain, infer
Synthesis
  •  Combining ideas to make something new
  • Question keywords:
    combine, integrate, modify, rearrange, substitute, plan, create, design, invent, what if?, compose, formulate, prepare, generalize, rewrite
Evaluation
  •  Discriminating between ideas and making judgments about value based on reasoned argument
  • Question keywords:
    assess, decide, rank, grade, test, measure, recommend, convince, select, judge, explain, discriminate, support, conclude, compare, summarize

* From Benjamin S. Bloom Taxonomy of educational objectives.

Filed under: Business, General 2 Comments
20Feb/100

Javamail: Sending to multiple recipients

The following code snippet demonstrates how you can send to multiple recipients from java :

 String toList = "email1@emailserver.com,email2@emailserver.com" ;
 String to [] = to.split(",");        
 
 InternetAddress[] addresses = new InternetAddress[to.length];
 
 for (int i = 0; i < to.length; i++)
    addresses[i] = new InternetAddress(to[i]);
 
 msg.setRecipients(Message.RecipientType.TO, addresses);
Filed under: Java No Comments
20Feb/100

No need for sql loader!

Scriptella is an open source ETL (Extract-Transform-Load) and script execution tool written in Java. I used it to load data from csv file to Oracle. Of course it can be used to load from any data source to any data source. It has been used as a migration tool for data for many tasks.

Sample etl.xml file :

<etl>
  <connection id="in" driver="csv" url="data.csv">
  headers=false
  </connection>
  <connection id="out" driver="oracle" url="jdbc:oracle:thin:@127.0.0.1:1521:orcl"
      classpath="ojdbc14.jar" user="test" password="test"/>
  <!-- Empty the destination table -->
  <script connection-id="out">
    truncate table TEMP1 ;
  </script>
 
  <query connection-id="in">
      <!-- Empty query means select all columns -->
   <script connection-id="out">
          INSERT INTO TEMP1 VALUES ('$1', $2)
      </script>
  </query>
</etl>

in data.csv :

text1,1
text2,2
text3,3

Sample Java class (ojdbc14.jar and scriptella.jar should be in your class path) :

import scriptella.execution.EtlExecutor;
import scriptella.execution.EtlExecutorException;
 
public class MainRunner {
    public static void main(String[] args) {
 
    try {
         EtlExecutor.newExecutor(new File("etl.xml")).execute();
         } catch (EtlExecutorException e) {
          e.printStackTrace();
           } 
    }
}
Filed under: Java, Oracle No Comments
14Nov/091

Postpaid to Prepaid Credit Transfer

Zain Kuwait launches new Credit Transfer Service through SMS from/to any subscription type (prepaid/postpaid). You simply need to send 'sub' to 99998 through an SMS and you will be subscribed free of charge, and there is no extra fees or commission for the transaction itself. If you are a postpaid subscriber, your monthly bill will be debited directly. Here you can read about the rules and how to enjoy this service. It's really a Wonderful World!

Filed under: General 1 Comment
13Nov/091

Visual Illusion : Impossible Figures

YouTube Preview Image

Our eyes sometimes seem to play tricks on us in the form of visual illusions. One type of illusion involves impossible figures, such as the one in the video above. Impossible figures fool the brain into creating the impression of a whole figure when the figure is viewed from certain perspectives. In particular, our brains work in two general modes of visual processing:

1- Bottom-up processing: The process by which the brain forms perceptions by piecing together bits and pieces of sensory data to form meaningful patterns.

2- Top-down processing: The process by which the brain forms perceptions by recognizing whole patterns without first piecing together their component parts.

Source : Psychology, Concepts and Applications By Jeffrey S. Nevid

Filed under: General 1 Comment
10Nov/096

Protecting Your Ideas

Copyright is an exclusive right that protects the creators of original works of authorship such as literary, dramatic, musical, and artistic works. Copyrighted material is denoted by the symbol ©. 

Type of Protection
What It Covers
Time Required
Cost
Copyright
Works of original authorship About 2 weeks About $30
Trademark
Logos, names, phrases 6 – 12 months $900 - $1,500
Design patent
Look of an original product Up to 2 years $5,000 - $20,000
Utility patent
How an original product works 2 – 5 years $5,000 - $20,000
Business method patent
A business process 2 – 5 years $5,000 - $20,000

Source: “How to Knock Out Knock Offs,” Business Week, March 14, 2005.

Filed under: Business, General 6 Comments
9Nov/090

Who else is on your server?

Many system administrators use scripts to help them in the process of managing a server. A common problem is finding out exactly what users are on the system and what they are doing.
Several tools are available on the system to see who is online, what processes are running, and pipeing them together can resolve many problems. Here are 2 small scripts that will show, first if a user is online, and then what he is running:

who | grep $1
ps -aux | grep $1

The variable $1 here means the first command line argument, from a shell script. The who command first checks if the user is online, then ps will show all the processes currently running under that user's UID.

Filed under: Unix/Linux No Comments
9Nov/090

Who owns this port

An interesting UNIX command is the fuser program. This program can tell you which user and process owns a port. For example, the following command will tell you who owns port 6000:

fuser -v -n tcp 6000
Filed under: Unix/Linux No Comments
9Nov/091

Oracle’s Temporary Tables

Temporary tables are used to hold intermediate resultsets, either for the duration of a transaction or a session. The data held in a temporary table is only ever visible to the current session – no other session will ever see any other session's data, even if the current session COMMITs the data. Multi-user concurrency is not an issue with regards to temporary tables either, one session can never block another session by using a temporary table. Even if we 'lock' the temporary table, it will not prevent other sessions using their temporary table, temporary tables generate significantly less REDO then regular tables would.

Oracle's temporary tables are similar to temporary tables in other relational databases with the main exception being that they are 'statically' defined. You create them once per database, not once per stored procedure in the database. They always exist – they will be in the data dictionary as objects, but will always appear empty until your session puts data into them. The fact that they are statically defined allows us to create views that reference temporary tables, to create stored procedures that use static SQL to reference them, and so on.

Temporary tables may be session-based (data survives in the table across commits but not a disconnect/reconnect). They may also be transaction-based (data disappears after a commit).

Here is an example showing the behavior of both.

create global temporary table temp_table_session
 on commit preserve rows
 as
 select * from scott.emp;

The ON COMMIT PRESERVE ROWS clause makes this a session-based temporary table. Rows will stay in this table until my session disconnects or I physically remove them via a DELETE or TRUNCATE. Only my session can see these rows; no other session will ever see 'my' rows even after I COMMIT:

create global temporary table temp_table_transaction
 on commit delete rows
 as
 select * from scott.emp;

The ON COMMIT DELETE ROWS makes this a transaction-based temporary table. When your session commits, the rows disappear. The rows will disappear by simply giving back the temporary extents allocated to our table – there is no overhead involved in the automatic clearing of temporary tables.

Filed under: Oracle 1 Comment
9Nov/090

Oracle Autonomous Transactions

Autonomous transactions allow you to create a new transaction within a transaction that may commit or roll back changes, independently of its parent transaction. They allow you to suspend the currently executing transaction, start a new one, do some work and commit or roll back, all without affecting the currently executing transaction state.

The directive PRAGMA AUTONOMOUS_TRANSACTION tells the database that this procedure, when executed, is to be executed as a new autonomous transaction, independently of its parent transaction.

To ilustrate this by an example, let's create one logging table that will be used to log some actions within your package.

create table actions_log
( username varchar2(30),
timestamp date,
notes varchar2(1000)
);

Then your package will have an autonomous transaction procedure ..

create or replace package body my_pkg
as
procedure log( p_notes in varchar2)
as
pragma autonomous_transaction;
begin
insert into actions_log values
( user, sysdate, p_notes );
commit;
end;
...
...
log ('Action 1');
...
...
end;
Filed under: Oracle No Comments