Talent without working hard is nothing.


This application working on Java RMI, to Query CSV file through the network.
the client will send the query to the server, the code will be executed on the server.
the server will use Apache Commons CSV  to read the CSV file.

the result of the query will be streamed to the client through the network.
the client will read the result and display it to the end user.


Snapshot of the result(Client).

I will record youtube video, how to run the server and the client.
this example just to show you the concepts of Java RMI.


Code gitHub

Read more..

Hi, the example for today is how to use JSOUP library with Web Crawler.

the next java code use thread pool to generate thread to search for keywords you have been provided on the selected website.

JSOUP will do the connection to the website, download the page content (HTML), search for keywords and at the same time will save copy form all the links have been found in the current page.

ThreadPool will generate thread to make the search faster.

Snapshot Form Final Result :



Source code:



Read more..

Today, I going to explain about Twitter4J.

Twitter4J is an unofficial Java library for the Twitter API.
With Twitter4J, you can easily integrate your Java application with the Twitter service. Twitter4J is an unofficial library.

Twitter4J is featuring: 
✔ 100% Pure Java - works on any Java Platform version 5 or later
✔ Android platform and Google App Engine ready
✔ Zero dependencies: No additional jars required
✔ Built-in OAuth support
✔ Out-of-the-box gzip support
✔ 100% Twitter API 1.1 compatible

I will explain using the following code:

Java Application uses Twitter4J to work with Twitter API.

the Result of the application: just after you enter the Twitter @UseName, you want to know about it. The following...

1-Number Followed. 2-Number Of Tweets Received. 3-Number Of Retweets. 4-Most Active Followed.

There are too many methods you can call to analysis Twitter Account.


  • Do not forget the add your twitter app key.
  • Import Twitter4J API to your project (Included in Lib Folder).



  import java.util.ArrayList;
  import java.util.Date;
  import java.util.HashMap;
  import java.util.LinkedList;
  import java.util.List;
  import java.util.Map;
  import java.util.Map.Entry;
  import java.util.Scanner;
  import twitter4j.PagableResponseList;
  import twitter4j.Paging;
  import twitter4j.Status;
  import twitter4j.TwitterException;
  import twitter4j.TwitterFactory;
  import twitter4j.User;
  import twitter4j.conf.ConfigurationBuilder;
  public class Main {
  static ConfigurationBuilder _ConfigurationBuilder;// Config builder to build the connection for twitter api
  static TwitterFactory _TwitterFactory;//Building the factory
  static twitter4j.Twitter twitter;// Twitter4j lib to get the data from twitter
  static long coursor = -1;//used to read multi page
  static PagableResponseList<User> _User;// number of follower of the number of friends of account
  static HashMap<String, Integer> ListofFollower;//List of follower to save all the follower to using them in comparing
  static HashMap<String, Integer> userstweets;
  static List<Long> datestatus;// to save number of retweets during date
  static String UserName;// the username, we got it from the soa servies link
  static int NumberOfReTweets;
  static int TotalNumberOfRetweet;
  static int TotalNumberOfFollwed;
  static String MostActiveFollowed;
  static int TotalNumberOfTweetsReceived;
  public static void main(String[] args) {
  // TODO Auto-generated method stub
  // Initional Twitter API
  Init();// Use Your Key
  public static void GetUserName() {
  Scanner scanner = new Scanner(System.in);
  System.out.print("Enter a Twitter UserName:");
  UserName= scanner.nextLine();
  public static void print(String arg1,String arg2,String arg3) {
  System.out.println(arg1+ " "+arg2+" "+arg3);
  //Main method will be called many time to execute all the following methods
  public static void TweetAnalysis() {
  // To Get the UserName from Restful Link and save it on name.
  // If UserName gives twitter name/@aladinhamod.....etc../.
  if (!UserName.isEmpty()) {
  // This Method Will give Number Of Followed And Most Active Followed And NumOfTweetsReceived
  //Number Of Retweets During Jan 2018
  // NumberFollowed
  print("NumberFollowed", UserName, String.valueOf(TotalNumberOfFollwed));
  // MostActiveFollowed
  print("MostActiveFollowed", UserName, MostActiveFollowed);
  // NumberOfRetweets
  print("NumberOfRetweets", UserName, String.valueOf(NumberOfReTweets));
  // NumberOfTweetsReceived
  print("NumberOfTweetsReceived", UserName, String.valueOf(TotalNumberOfTweetsReceived));
  } else {
  System.out.println("Please Check Your Internet Connection");
  // Twitter API Will Return Number of NumOfFollowedMostActiveFollowedAndNumOfTweetsReceived
  public static void GetNumOfFollowedMostActiveFollowedAndNumOfTweetsReceived(String _UserName) {
  //HashMap to Save Number of Users
  ListofFollower = new HashMap<String, Integer>();
  do {
  try {
  //To get the number of followed
  _User = twitter.getFriendsList(_UserName, coursor);
  } catch (TwitterException e) {
  // TODO Auto-generated catch block
  //Loop to Read the data from followed list
  //to get Name of Best user
  for (User floower : _User) {
  String username = floower.getScreenName();// Friend Name ,, follower name
  int flooercout = floower.getStatusesCount(); /// Follower status count
  //Save the date to Hashmap
  ListofFollower.put(username, flooercout);
  //Get the TotalNumberOfTweetsReceived is total of user status
  TotalNumberOfTweetsReceived += flooercout;
  //Contionus to finish data (maybe save in more that page)
  } while ((coursor = _User.getNextCursor()) != 0);
  //To get the active user from the followed list
  Map.Entry<String, Integer> maxEntry = null;
  TotalNumberOfFollwed = ListofFollower.size();
  System.out.println("Tolal Number of Followed : " + TotalNumberOfFollwed);// Question 1
  //Comparing the tweets for the users to get the active follwer.
  for (Entry<String, Integer> entry : ListofFollower.entrySet()) {
  if (maxEntry == null || entry.getValue().compareTo(maxEntry.getValue()) > 0) {
  maxEntry = entry;
  //Getting the date from the comparing
  MostActiveFollowed = maxEntry.getKey();
  int NumberofTweet = maxEntry.getValue();
  System.out.println("Most Active Followed : " + MostActiveFollowed + " By Tweets number : " + NumberofTweet); // Question 4
  System.out.println("Total Number Of Tweets Received : " + TotalNumberOfTweetsReceived);//Qestion 2
  //Get the number of retweet by jan 2018
  public static void GetNumberOfReTweet(String _UserName) {
  //the first page
  int pageno = 1;
  String user = _UserName;
  //Save the list of tweets by date
  datestatus = new LinkedList<>();
  //Date format to get he month MM and the Year YYYY
  SimpleDateFormat sdf = new SimpleDateFormat("MM/YYYY");
  //TO save the status of user
  List<Status> statuses = new ArrayList<Status>();
  //Loop to read maybe more than 1 page
  while (true) {
  try {
  int size = statuses.size();
  Paging page = new Paging(pageno++, 200);
  //get all the user time line and save it ti statues
  statuses.addAll(twitter.getUserTimeline(user, page));
  //read the status one by one and get the retweets filterd by date
  for (Status s : statuses) {
  Date date = s.getCreatedAt();
  String dt = sdf.format(date);
  boolean is = s.isRetweet();
  Long id = s.getId();
  String str = "01/2018";
  if (!datestatus.contains(id)) {
  if ((dt.equals(str)) && (is)) {
  if (statuses.size() == size)
  } catch (TwitterException e) {
  //Numebr of retweets by date
  NumberOfReTweets = datestatus.size();// Question .3
  System.out.println("Total Tweets Number Of ReTweets during Jan 2018 : " + NumberOfReTweets);
  //This method to preper my twitter api and build the connection with twitter using twitter4j
  public static void Init() {
  _ConfigurationBuilder = new ConfigurationBuilder();
  _ConfigurationBuilder.setDebugEnabled(true).setOAuthConsumerKey("Use Your Key")
  .setOAuthConsumerSecret("Use Your Key")
  .setOAuthAccessToken("Use Your Key")
  .setOAuthAccessTokenSecret("Use Your Key");
  _TwitterFactory = new TwitterFactory(_ConfigurationBuilder.build());
  twitter = _TwitterFactory.getInstance();



Source: Twitter4J



Read more..

“Overseas students’ opinions on their interaction with native students”


The percentage of international students is increasing every day. Arkoudis(2013) claims that there are several benefits for interaction between overseas students and domestic students to improve their learning and develop students' cognitive skills. Both the international students and native students can learn about each other’s culture. It seems that interaction among international students and native students is one the most important problem face both of them. The aim of this report is to investigate the international students using the survey to identify their opinion about interaction with native students.


The main reason for this report was to study the overseas student's opinion about their interaction with domestic students. The data collected from the study depended on 13 international students survey from four different countries. The student age was range between 20s-50s.

   The survey was divided into five questions:

  • The first question consisted of a range of ages.
  • The second question was to know the country of the participants.
  • The third question was to know the number of international students who have native friends.
  • The fourth question was to know the student’s opinion if they prefer to spend time with people from the same country.
  • The fifth question consisted the group of agree/disagree questions.


According to the data collected from the international student’s questionnaire. It was found that, the total number of international students who have participated in the survey 13 students from the following countries as shown in Table (1):






Number of student





Table (1)

  • Table (2) shows the range of ages of the participants:







Table (2)

  • The percentage of international students who has native friends approximately 35%. Meanwhile, the percentage of the international students who do not have any native friend was 65%.
  • International students who prefer to spend all his time with people from his own country, or most of the time, or sometimes was 2,6 and 4 respectively.
  • The figure (1) shows the Agree/disagree answers presented in the next bar chart:
    1. There are many benefits to having English friends.
    2. It is easy to meet English people at the university.
    3. I am only here to study. I have no time to make friends.
    4. The University should provide social activities to help me meet native speakers.
    5. I am aware of what groups are organized by the student union.



The data analysis from the international students’ survey has found that most of the overseas students aware of the benefits of interaction with native students. Furthermore, many of the students commented on making friends with native students. At the same time, about half of the international students prefer to spend time with people from the same culture. Therefore, some of the international students care more about their culture and religion rather than socializing with native students. However, there are many opportunities to socialize separately from alcoholic activities, same as sport, films and too many other activities. In addition, some of the native students are fanatical about their cultures, that can stop international students from interacting with them.  Hence, a numerous number of the international students requested to interact with native students the main reason was to improve their language and to gain more knowledge about the culture of the host country. Arkoudis(2013) suggests that university staff can enhance the interaction between international students and domestic students by engaging them to work for group project such as Reading circle, same as these activities can break the wall between the students.





  • Arkoudis, S., Watty K., Baik, C., Yu, X., Borland, H., Chang, I., Lang J., Pearce, A., 2013, Finding common ground: enhancing interaction between domestic and international students in higher education, Teaching in Higher Education, 18(3), pp.222-235.
Read more..

Software Bugs

1. Introduction

Software bugs mean those mistakes made by a developer during the life cycle of developing software, as a result, to fix those bugs will be an effect on the developers’ time and on the cost of software. By reducing software bugs would give the developers to spend more time to add new features and enhance the software.

     The primary requirement for an end-user and software developer is software quality to be error-free. It seems that it is impossible to have software free bugs. However, this essay will examine the possibility of software free bugs and will compare the techniques methods used to help software be free bugs.


2. Bug life cycles

This section will demonstrate the benefit of studying the life cycle of bugs, and methods to help in decrease the cost of bugs.

2.1 History of software bugs

According to Davies (2014), software bugs as defined by The Institute of Electrical and Electronics Engineer (IEEE) is an issue in software are not fixed can cause in the incorrect outcome or fail in an application. Furthermore, the meaning of software bugs is still vague, there are many questions about the origin of a bug, how an end-user tread if he faces bugs in a software. However, the most important question is how to prevent or deal with them. There are many tools such as Bugzilla to help the developers to track the bugs in released software have been detected by end-user (Davies, 2014).


2.2 Bug tracking systems

The most effective role in bug life cycle is Bug Tracking Systems (BTSs), they are used to provide feedback on the system by developers and end-user, the feedback may be informed as an incorrect case or as a requirement to improve the system (Pinzger, M. et al.,2009).

     The feedback/bugs are recorded in a BTSs such as Bugzilla allow bug reporters (developers and end users) to report details of errors/bugs encountered while using an application (Davies, 2014). A real example of a bug shown in figure 1 from Mozilla the most common internet browser, the report includes a full explanation of a bug, specific information such as a piece of code and screenshots to guide the developer, all previous information is collected together in a bug report.

Figure 1

The benefit of the bug report is to guide the developer to fix the bugs using a useful information form the report. However, the information provided by bug report is not enough to fix the bug or determined the reason for the bug (Davies, 2014). As a result, the bug report is to help the developer to fix the bug and at the same time, can be stored as records to provide last update and the status of the bug to the reporter.

     According to Davies (2014) the bug report life cycle has a number of steps it depends on the BTS, figure 2 demonstrates the default stages of Bugzilla. The first step is an Unconfirmed status that created by a user during reporting about a bug, the decision back to the developer to decide to be Confirmed and send it to the next phase or the bug does exist, after the bug has been confirmed will be assigned to a specific developer to investigate and fix the bug and change the status to In Progress, if the developer has finished fixing the bug the status will be Resolved, the final stages is to check and test the bug by a quality engineer and confirm that the bug has been ixed correctly then the status will be changed to Verified.

Figure 2


The steps of the bug report life cycle provide more information about the bug and which techniques should be used to fix the bug by the developer.

There are two popular techniques in Software Development life cycle used to test the software by tester and developer. 

Sawant, el at. (2013, p.981) indicate that static testing or manual testing is a type of test which can be done by a set of tools or manually without executing the code to check the design and requirement documents to review it on the working document by the analyst and the testing team. When the system is inactive, the statics test executes security test to analyze the system without running the code. The static testing technique provides the developer the bug places in the application code on the early step of the life cycle. Static testing work with documents such as design, source code, and test plans documents. The static testing technique content many steps. First, inspection is one type of reviewing the code to find the defects using the checklist, code walkthroughs are managed by the moderator. Second, a walkthrough is meeting with the software users to describe the product, at the same time participants can ask questions as notes. Another step, technical reviews to check the code if is identical to the technical specifications and standards. The final step, informal reviews to review the documents and comments on it using informal methods.

Sawant, el at. (2013) indicate that dynamic testing or automated testing is executed while the software in active status or runtime. For example, the code executed same time of input the value, the output will be compared with the final result. The example shows the functional behavior of the application, during the runtime of the application it is possible to check the system performance and the quality of the application. There are two types of dynamic testing, functional testing, and nonfunctional testing. The dynamics techniques types are as the following. First, unit testing is the tool to test the code for individual modules. Second, integration testing is to test the join between the interfaces and the modules. Also, system testing is to test the whole application performance. The last one, acceptance testing is testing was done by the end-user.


 Nevertheless, both of the testing techniques dynamics and static are important for the Software Development life cycle. Sawant, et at., (2013) claims that both techniques have strong and weak points, which should be considered while executing these techniques on the application

Sawant, et at., (2013) demonstrate that the difference between both techniques that static technique is white box testing which is the first step on the software life cycle and it is effectively more than dynamic techniques, while the dynamic technique is the last step on the software life cycle. On the other hand, the static technique performs before execute the application whereas, the dynamic technique performed at the same time of the runtime. For example, online e-learning website with the static technique should go with the following steps: Review the documents, check the interfaces of the software and check the database tables.


This article has examined the history of software bugs and the methods of tracking bugs. At the same time, discuss the static and the dynamic techniques with comparing between both of the techniques. Also, discuss the possibility of having free bugs software. Unfortunately, it seems that impossible to have free bugs software. However, the strategies and techniques of testing software is a significant requirement to enhance the development life cycle (Thakare, S. el at.,2012, p.686).  Meanwhile, there are several methods to reduce software bugs, and many ways to solve it.



  • Davies, S., 2014, STUDYING THE LIVES OF SOFTWARE BUGS [Online] Glasgow, University of Strathclyde Glasgow. Available from: http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.632701 [Accessed 15/11/2017].
  • Sawant, A. A. et at.,2012, Software Testing Techniques and Strategies [Online] Mumbai, University of Mumbai, INDIA. Available from: http://www.ijera.com/papers/Vol2_issue3/FQ23980986.pdf [Accessed 22/11/2017].
  • Pinzger, M. et al.,2009, "A Bug's Life" Visualizing a Bug Database [Online] Glasgow, University of Lugano, Switzerland and University of Zurich, Switzerland. Available from: https://serg.aau.at/pub/MartinPinzger/Publications/Dambros2007-bugslife.pdf [Accessed 15/11/2017].
  • Thakare, S. el at., 2012, International Journal of Emerging Technology and Advanced Engineering [Online] Mumbai, Computer Technology Department, India. Available from: http://citeseerx.ist.psu.edu/viewdoc/download?doi= [Accessed 15/11/2017].


Note: you may face some mistakes with sentence structures.


Read more..