Joining ITWorx

I got a phone from ITWorx HR, to make exams and interviews there next day. I was very happy and exited. First thing I did, was back to prepare for the exams at home. I remember that I slept less than four hours that day.

In the morning I went to ITWorx, I arrived about 9:00am. I found arround 16 person waiting for the exams. They told us that all of the exams and interviews will be today because they want to hire people urgently. There were 4 exams: Java, ASP.NET, Database and Object-Oriented Concepts. After finishing the exams the took the papers and correct them. They called my name, I went to HR person she told me you passed the exams and asked me to choose from working with Java or .Net. I choose (.Net) then they guided me to the waiting area. We were around 8.

Then they called my name for the first interview: Ahmed was waiting for me. He is a Team Leader. He has excellent technical knowledge. He asked me about every thing I think. One of the questions was How many lines of code you need to write a DB form? I wondered!!! Then I asked step by step question to get more information about the question. After I joined I asked him what is that question measured? He told me I want to know if you can ask questions to get the information you need or not!!! I am lucky to have that interview. I am the only one survived from the 3 persons Ahmed made interviews with.

After this interview I was waiting for the result in the waiting area when Osama called my name to make interview with him. Osama is also a Team Leader. He asked a technical questions about my past experiences. We also had a general IT chat.

Again I was in the waiting area when a HR person came and took me to SHREIF AAMER. Yes, Shreif Aamer. I made an interview with Shreif Aamer the vice president of ITWorx. It was a very friendly interview. But finally I have the honor of that Shreif Aamer approved my application form with “Accepted”.

It was 5:30pm. But I am ITWorxian now after 3years of dreaming to join this respectable company!!! I signed the contract to start the next Sunday 20-6-2006.

Add comment May 6, 2008

Errors in Right-to-Left SharePoint

In the languages worked left-to-right (like Arabic) its not working well. (see the photos) You will notice that the words will not have the right order.

 

Also there are some bugs in the graphics in case of right-to-left:

 

Add comment May 4, 2008

Localized Custom Properties in SharePoint Web Parts

  1. First you need to have your resource files. Place them directly under the project node. For Example add:
    1. MyResource.resx

      Add a new resource entry in the file:
          Key: category - Value: MyNewCategory
          Key: property - Value: MyNewProperty
          Key: description - Value: MyNewDescription

    2. MyResource.ar-sa.resx

      Add a new resource entry in the file:
          Key: category - Value: MyNewCategory
          Key: property - Value: MyNewProperty
          Key: description - Value: MyNewDescription
       Take care that these resources files must be embedded resources.

    Place the following attribute before the class:

    [XmlRoot(Namespace = "projectname")]

  1. Now you have to override the LoadResource function to get the data from your resource files:
  2. public
    override
    string LoadResource(string id)

    {
    ResourceManager rm = new
    ResourceManager(“projectname.MyResource”, this.GetType().Assembly);

    return rm.GetString(id);
    }
  3. Before the property you place the “ResourcesAttribute” attribute like the following
[ResourcesAttribute(
"property",
"category",
"description")]
[WebPartStorage(Storage.Shared)]
[Browsable(true)]
public string MyProp_Localized
{
   get
   {
     return _ MyProp_Localized;
   }
   set
   {
      _MyProp_Localized = value;
   }
}

To deploy this web part, use the regular procedure of deploying web part. But you must take care that you will need to deploy the every resources dlls in “..\bin\debug” subdirectory to the Global Assembly Cash (in” windows\assembly” directory). You will find a subdirectory for each culture you have in the project under this directory you will find a projectname.resources.dll file you have to deploy this file to the GAC.

Add comment May 4, 2008

Using Resources Files in SharePoint Web Parts

  1. First you need to have your resource files. Place them directly under the project node. For Example add:
    1. MyResource.resx

      Add a new resource entry in the file:

          Key: hello

          Value: Hello

    2. MyResource.ar-sa.resx

      Add a new resource entry in the file:

          Key: hello

          Value:أهلا

    Take care that these resources files must be embedded resources.

  1. In the render function add the following code:

    ResourceManager rm = new
    ResourceManager(“projectname.MyResources”,this.GetType().Assembly);

    writer.Write(rm.GetString(“hello”));

To deploy this web part, use the regular procedure of deploying web part. But you must take care that you will need to deploy the every resources dlls in “..\bin\debug” subdirectory to the Global Assembly Cash (in” windows\assembly” directory). You will find a subdirectory for each culture you have in the project under this directory you will find a projectname.resources.dll file you have to deploy this file to the GAC.

Add comment May 4, 2008

QuickTel Experience 2005

QuickTel what an Experience!!!

The people are very collaborative. The system is well controlled and flexible. I am very happy for this experience.

I got internship there while I was working for SUS. For two months, I learned the importance of software process, process automation and model driven development. I met a very experience guy “The Omar” he gave me a lot in session and in side talks. Thank you Omar.

In QuickTel I was responsible of building a diagramming tool that converts a project logic stored in a DB repository into diagrams. By the end of two months I finished a tool generates the needed diagrams using rational rose file structure.

In QuickTel, I have the first chance to see a demonstration of TeleLogic Tools and I am very grateful for that. In addition I saw new types of hardware for the first time and I saw how the hardware is designed and implemented. In addition to seeing a switch implementation which I consider it very useful experience.

I have to thank the collaborative QuickTel team (I still have a strong relations with them)

***THANK YOU GUYS***

Add comment May 3, 2008

Converting C# Code to Flowchart

Introduction:

Expressing the program logic in a diagram give it the advantage of making it more understandable. This comes from the fact that the human brain is thinking in graphical way. Most of developers document their code with a flowchart. It will be better it we create a tool doing this job. We use a recursive decent parser parses a C# code and draw the corresponding flowchart.

C# flow control:

In C# language there are a lot of flow-control statements:

  1. IF-Else.
  2. While.
  3. Do-while.
  4. For.
  5. Foreach.
  6. Switch.

Each of these statements affects the flow of events in C# code. Some of these statements are considered decision statement (If-Else and switch). The others are considered loop statements (while, do-while, for and foreach).

Decision statements put a condition to go through a block of code. If the condition occurred the block of code will be executed. Otherwise, the block of code will be skipped. If-else statement exactly does this job CFG:

If-statement := if
(condition)
{ statements1 } [else { statements2 }]

The if part is necessary put the else part is optional. So the flowchart of the if-else statement takes two forms:



The switch statement guides the program to a path from multiple paths. The CFG of switch statement is:

Switch_statement := switch
(expression) { { case value: statements break; } }

As the switch statement has multi-paths the flowchart will be in the form:


Loop statements repeat a block of statements according to a condition. Only the expression and the expression place changes from a statement to another. The do-while loop which have the following CFG:

Do-while := do
{ statements } while
(condition );

Takes the form:

The other statements have the same form in flowchart. There CFG’s are:

While-statement:= while
(condition )
{statements}

For-statement:= for
(for-Exp)
{ statements }

Foreach := foreach(foreach-exp)
{statements }

The flowchart form of these statements is:

Process

The process starts when a new code entered. This code enters a scanner that output tokens. The tokens enter a recursive decent parser gives a parse tree represents the entered code. The parse tree then enters the drawing module to be displayed as a model.

Scanner

The scanner takes the code and tries to split the code into a set of tokens each token belongs to one of these types:

  1. Flow-control keyword: keywords represent one of the six flow-control statements discussed in C# flow control section.
  2. Block start: like “{” symbol.
  3. Block end: like “}” symbol.
  4. While spaces.
  5. Separators: set of symbols separate two tokens.

According to these types tokens will take there places in parse tree discussed in next section.

Parse Tree

The parse tree structure used in this tool must have two criteria. First it can represent the sequential statements. Second, it must represent the nested statements. So we use a tree structure represented by these classes:

Stake current=new TreeNode(”main block”);

Class TreeNode

{

Block current

Public Relation[] relation;

}

Class Relation

{

String Name;

treeNode from;

treeNode to;

}

TreeNode is a class represents a node in the parse tree. Each node have object from Block class represents a specified block in flowchart may be decision, loop start, loop end, process start state or end state.
In TreeNode
there is array of relations represents the relations from this TreeNode to its child nodes.

Parser

The function of parser is to take the tokens and place them in their places in a parse tree. The parser specifies the token place in parse tree according to token types. If the token is new flow control token it will be added as a new node in the node existing in the top of stack and this new node will be pushed in the current stack. If token is not a flow control token, the token will be added in the “current” block in the current node. Finally if the token is block termination token (like: } ) pop the first node in current stack.

Drawer

After the parser produced the parse tree, the Drawer takes the parse tree and draws a flowchart representing it. The Algorithm used in the Drawer as follow:

An algorithm is needed to determine the place where the drawer should place the shapes it draws. The y-position is the same for nodes have the same parent. While the x-position should be incremented for a child than the previous one.

Conclusion

To Convert a C# code to flowchart you need to parse the code searching for the flow control statements and code blocks then its very simple to draw the flowchart if you have a well structured parse tree.

Add comment May 3, 2008

A Simple Algorithm for High Curvature Point Detection in 2D Graph

Introduction:

A new algorithm is proposed to detect corners and high curvature points in a 2D graph. A corner is defined as a location where a triangle with specified opening angle and size can be inscribed in the curve. Detecting a corner in a 2D graph is related to detecting corners in a gray scale image.

Applications:

This algorithm is developed to be used in shape analysis problems. It cans measure important features in a graph like: number of corners, number of lines and the slope of lines. All of these features can be measured from the output of this algorithm. These features can be used in a pattern recognition technique to classify a given graph.

Technique:

We have a set of points belongs to a curve some internal points and two end points. We will follow a path from one end point to the second end point. We will start from one of the end points of the curve (figure 1).

In each step we will add a point to a list Q. PF: is the first point in the set Q. PL: is the last point of the set Q.PM is the middle point of the set Q. Also two lines will be defined L1 and L2. L1: is the line connecting the PF and PM. L2: is the line connecting the PM and PL. The angle between the two lines L1 and L2 called N. (figure 2)


We continue adding points to L and calculate the angle N until the angle is more than the threshold value T. If N is higher than T, then there is a corner in the set Q initially the corner is PM. (figure 3)

To make our choice more accurate, define two angles NL and NR. The angle NL is the angle between the left neighbor of PM, PF and PL. the angle NR is the angle between the right neighbor of PM, PF and PM. If the value of NL greater than the value of NR and the value of N we will continue moving to the left direction. If the value of NR is greater than N and greater than or equal NL then move to right direction. Keep move to the next point in the specified direction until the angle between the new point, PF and PL is less than the previous angle or the current point is PL. So the corner will be the previous point. (figure 4)


Algorithm:

PF= start_point

Q={PF};

FOREAH (point p in Points)

{

PL=p;

Add p to q;

PM= mid point of Q;

N=angle(PF,PM,PL);

If(N>threshold)

{

corner=PM;

NL=angle(PF,Q[PM_index-1],PL);

NR=angle(PF,Q[PM_index+1],PL);

IF(NL>N&&NL>NR)

Step=-1;

ELSE if(NR>N&&NR>=NL)

Step=1;

Else

Return corner;

Index=PM_index+step;

Max=0;

While(index within Q range)

{

A=angle(PF,Q[index],PL);

If(A>Max)

{

Max=A;

Courner=Q[index];

}

Else

Return max

}

Return max

}

}

Results:

The set of shapes used to test the algorithm listed in (figure 5).

Add comment May 3, 2008

Experience in SUS (from 2004)

I consider SUS as my first real life experience. Its the first but it was very important in my life.

I attended SUS in 2004. When I was in my second summer vacation in “Faculty of Computer and Information Science”, I was searching for a vacancy to apply my skills and knowledge and gain a real life experience. After a long search I found SUS. I meet Mr. Mohamad Samir the man in charge in SUS. After a nice interview (my first work interview), he said you will work with us in the summer and if you did fine you can continue working with us after the school begin. I remember how much I was happy when I heard this.

Next day, I started working with SUS. They was working in ERP systems for Okaz and El-Reda (big companies in KSA) mainly and other customers also. Mr.Samir was a very experience man. He has a great experience in the business domain. In the first day he gave me a system overview and a general information about the business needs of the main customers. The first impression was “WOW its huge”. From that day I have gained a GREAT experience in the business domain and in the business analysis.

Technical wise, Mr.Samir was a professional analyst and designer. Especially in DB design. I learned a lot from him. The technical experience in this system adds to me a lot. It was the first time I heard about “Localization” the good point was that the system has multilingual UI and content. We was using C# 2003, SQL Server 2000 and Crystal Reports. One of the good points in this experience is the team I was working with has a very professional developers I learned a lot from them.

By 2006, the work have been finished in SUS after I got a very worth experience. Thank you Mr.Samir.

Add comment May 3, 2008

Next Posts


Categories

Links

Feeds