About Me

- Ahmed Abd-ElHaffiez Hussein
- PhD Candidate at Purdue University, Computer Science.
Thursday, May 03, 2007
The BlackWater's Danger
The USA uses these kinds of gangs to fight for them instead of get involved in IRAQ, Afghanistan.
These gangs cannot be punished for war crimes, because they are not nothing actually. they are not a military, nothing except...........
They achieved numerous massacres in IRAQ and Afghanistan, wearing Navy Uniform.
Privatization in Egypt is totally different than privatization all over the world :)...This is about the privatization of war and how that subverts even basic notions of democracy. The blackWater is used as a mirror for "Radical Christian Right".
If we are still not aware of wt does this really mean...then here we are..
Blackwater is also the name of private company, formed by an ex-Navy Seal, which owns the training facility and sells "security" to countries or organization doing business in high-risk areas of the globe.
Blackwater's security services included making available - for a price - a small army of heavily armed, experienced mercenaries with access to their own helicopter gun ships, armored vehicles and war planes.
Some says that in 2006, Blackwater had 2300 soldiers deployed in nine countries with a database of 21,000 additional on-call mercenaries.
Where these soldiers come from?????
There are EX-Special Forces from US and UK. they simply can't find inner peace in thir civilian life, so they looked for wars in other countries (Islamic ones). We don't need to say that they r very cruel, experienced, commandos, seal...etc everythg we may think about.
the BlackWater can defeat a significant number of countries.
Some others confirmed that Blackwater has won - on a sole-source basis - more than $500 million of US government contracts, not including unlisted "black" contracts. In addition to Iraq, Blackwater has contracts for work in the Louisiana flood area and on the Mexican boarder. The total global value of private military security contracts is estimated to be $100 billion and rising.
Aren't these terrorist gangs?
they make me sick, that's enough for now :S
Saturday, April 28, 2007
Communication Barriers

I think that we are the most skillful people to achieve a team work. I thought that the majority of us have been working in teams since their first academic year, and for me, this was good reason to justify my theory.
Team chit chat
- I have a problem in transferring my knowledge to them.
- I am "expression-less", so that someone asked me to put a sign indicating my mood whether "I am sad" or "I am happy".
Again, there should be something wrong...This time I thought about it in more abstract way.
Evaluation Barrier
My partner's comment made me notice a small problem...
Listening with Understanding
You should achieve real communication by avoiding evaluative tendency. This means seeing the attitude from the other person's point of view, touch his/her frame of reference about the subject.
I see that I should answer question, in the contest I can do it. Some efforts should be done by the questioner to get and understand the whole picture. In practical life we are not open books, my head is not indexed like the book, I have no appendices pointing to keywords which the questioner look for.
What will happen when you listen to my answer and analyze it to get your satisfactory answer? Does this sound absurdly simple??
Actually "listening" is not widely used. There are a lot of reasons in my opinion to avoid the "listening" thing.
- Most of us have a defensive attitude when it comes to opinions' discussions. We are afraid to get affected and changed by what we hear. Weird, isn't it?
- Emotions, in some discussions emotions become strongest, so they forbid us from achieving the frame of reference of the others. (let's not focus on this right now, as we are more involved with technical discussions)
Thursday, March 29, 2007
Practical RESTful rails Example
Note: Web-Browsers neither support PUT nor DELETE
Create a Rails project and the Resource Scaffolding
$ rails warehouseWe can now have a look to the generated controller.
warehouse> ruby script/generate scaffold_resource product name:string desc:text
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/products
exists test/functional/
exists test/unit/
create app/views/products/index.rhtml
create app/views/products/show.rhtml
create app/views/products/new.rhtml
create app/views/products/edit.rhtml
create app/views/layouts/products.rhtml
create public/stylesheets/scaffold.css
create app/models/product.rb
create app/controllers/products_controller.rb
create test/functional/products_controller_test.rb
create app/helpers/products_helper.rb
create test/unit/product_test.rb
create test/fixtures/products.yml
create db/migrate
create db/migrate/001_create_products.rb
route map.resources :products
warehouse> rake db:migrate
== CreateProducts: migrating ==================================================
-- create_table(:products, {:options=>"default charset=UTF8"})
-> 0.0160s
== CreateProducts: migrated (0.0160s) =========================================
URLs.
An example of URL in REST is (/product/1) instead of (/products/show/1). We notice that the action is dropped from the URL, we can't know what is the action that should happen to the addressed resource.
The REST actions are activated through a combination of resource-url and HTTP verb. Another feature in the REST action, is that it can react with different response-formats . REST uses the respond_to. We can see this in the generated controller we got from the above steps.
The format specification can be simply done by appending it to the request.(http://localhost:3000/products/1.xml)
Views
Remember the old days when we used to find the following line in the generated views:
link_to :controller => "products",:action=>"show", :id => productLooking to our generated views, we see the following code instead:
>>>< href="/products/show/1">Show
<%= link_to 'Show', product_path(product) %>The 'link_to' call is the same, but the hash is replaced by the path_methods.
>>>< href="/products/1">Show
Same thing for the following methods:
<%= link_to 'New product', new_product_path %>It is not surprising to expect that the REST will affect our forms too. Now, we have to use Path-Methods in our Create/Edit forms.
>>>< href="/products/new">New product
<%= link_to 'Edit', edit_product_path(product) %>
>>>< href="/products/1;edit">Edit
The :url-hash is replaced with the calling of a Path-Method
- product-path for the new-form.
- product_path(:id) for the edit form.
<%= form_for(:product, :url => products_path) do |f| %>
>>>< action="/products" method="post">
<%= form_for(:product, :url => product_path(@product),
:html => { :method => :put }) do |f| %>
>>>< action="/products/1" method="post">
< style="margin: 0pt; padding: 0pt;">
< name="_method" value="put" type="hidden">
< / div>
Finally, the Destroy. The method used for both showing and deleting is 'project-path'. The only difference is that the destroy link additionally uses the parameter :method to name the HTTP method to use (:delete) because the browser doesn't support DELETE.
<%= link_to 'Show', product_path(product) %>In the same manner controllers have to take special care in using the new technique during redirect operation. Rails uses the URL methods generating a method for each path methos:
%= link_to 'Destroy', product_path(product),:method => :delete %>
project_url for project_path
projects_url for projects_path
redirect_to :controller =>"products", :action=>"show", :id=>@project.id
>>>>
redirect_to project_url(@project)
Monday, March 26, 2007
RJS
This is a quick start to work with RJS.
$ rails RJS_Example
Create your controller:
RJS_Example> ruby script/generate controller Examples
exists app/controllers/
exists app/helpers/
create app/views/examples
create test/functional/
create app/controllers/examples_controller.rb
create test/functional/examples_controller_test.rb
create app/helpers/examples_helper.rb
Let's modify the default controllers now:
class ExamplesController < ApplicationController
def index
end
def display
@statement = params[:statement]
end
end
Now, we should go to create our views.
Create in the $RJS_Example/app/views/examples create your index.rhtml
In the header include this tag
<%= javascript_include_tag :defaults %>
The :defaults helps to add all the Scriptaculous visual effects and controls.
In the body, add this code.
<%= form_remote_tag :url => { :action => 'display' },
:html => { :id => 'display-form' } %>
<%= text_field_tag 'statement', nil, :size => 40 %>
<%= submit_tag 'submit statement' %>
<%= end_form_tag %>
We use the form_remote_tag() helper instead of the form_tag().
:html option helps to reset the form after completion.
:url option specifies the controller action that receives the form data.
Finally the empty "div id=statement",The id provides a way to reference the element from the RJS template.
Create partial template app/views/examples/_example.rhtml
[<%= Time.now.to_s(:db) %>]<%=h example %>
Create the RJS template: app/views/examples/display.rjs
page.insert_html :bottom, 'statements', :partial => 'example'
page.visual_effect :highlight, 'statements'
page.form.reset 'display-form'
The page object is an instance of the Rails JavaScriptGenerator.
the partial template app/views/examples/_example.rhtml is rendered, and the resulting content is inserted into the bottom of the statements div.
Sunday, March 25, 2007
Globalize on Ruby-On-Rails
- Translates both db content and view text.
- Supports automatic selection of an alternate, localized template for each view.
- Built-in localization and translation of strftime, numbers, and currency formats.
- Supports pluralization.
- All based on three automatically migrated database tables.
The globalization wiki is not yet complete. But I think the "Get Started" part is fair enough to help you out making your globalized application, it provides very helpful external links.
- Sven’s Globalize Writeup – has many times been refered to as “the best documentation available for Globalize” .
- Example Application – takes you step by step through the process of creating a Globalized example application.
- Unit-tested Example – a walkthrough using a test-driven approach by Josh Harvey.
Saturday, March 24, 2007
Leadership User Guide
Who is a leader?
A leader is someone who makes things happen by:
* Knowing the objectives and having a plan to achieve them.
* Building a team committed to achieving the objectives.
* Helping each member to give his best effort.
A leader must demonstrate two active traits: expertise and empathy. Also he takes active roles in remaking the environment in productive ways.
What is Leadership?
Leadership involves cooperation and collaboration activities that can occur only in a conductive context. It is the art of influencing a body of people to follow a certain course of action; the art of controlling them, directing them and getting the best out of them. A major part of leadership is man-management.
Leadership is the capacity to translate vision into reality.
There is a different between Management and Leadership.
Leadership | Management |
People | Things |
Empower | Control |
Effectiveness | Efficiency |
Principles | Techniques |
Purpose | Method |
Doing the right things | Do things right |
Is the ladder against the right wall?? | Climbing the ladder fast. |
Leadership styles.
Creation of resonance can be done in six ways, leading to Six Leadership Styles. Typically, the most effective leaders can act according to and they can even skillfully switch between the various styles, depending on the situation.(According to Daniel Goleman).
| Visionary Leadership (Transformational Leadership) | Coaching Style | Affiliative Leadership (People-Oriented) | Democratic Leadership | Pacesetting Leadership (task oriented) | Commanding Leadership |
How style builds resonance | He moves people towards shared dreams. | Connects what a person wants; with the organization's goals. | Creates harmony by connecting people to each other. | Appreciates people's input and gets commitment through participation. | Realizes challenging and exciting goals. | He decreases fear by giving clear direction in an emergency. |
The impact of the style on the (business) climate | + + + | + + | + | + | Often ― ― when used too exclusively or poorly | Often ― ― |
When style is appropriate | When changes require a new vision. Or when a clear direction is needed. Radical change. | To help competent, motivated employees to improve performance by building long-term capabilities. | To heal rifts in a team. To motivate during stressful times. Or to strengthen connections. | To build support or consensus. Or to get valuable input from employees. | To get high-quality results from a motivated and competent team. Sales. | In a grave crisis. Or with problem employees. To start an urgent organizational turnaround. Traditional military. |
Saturday, March 17, 2007
Erlang Review

This means that your Erlang program should run X times faster on a X core processor than on a single core processor, without changing a single line in your code. I really appreciate this flexibility. You can use this feature in a very effective way in your application.
I didn't test the Erlang by myself and test its performance, but actually I am very optimistic towards the results, given that the Erlang is heavily used on embedded systems. so, I expect that it has a good performance comparing with other technologies such as Java, Ruby..etc
frankly speaking, I didn't test the Ruby on my PDA. But I expected that the performance won't be pleasant at all. so I decided to save my time for something else. About Java, yes well, I tested it and I am not ready to do it again.
I wondered if anybody used Erlang in web applications!!! The good news I found is that there is a plan to produce a web platform for Erlang. well, there is already a web platform for Erlang but it is not open source and information about it is very limited because it was developed outside of Ericsson
I think the Erlang consulting and Training Ltd has used an Erlang web platform. which I think a quite impressive start for the Erlang. When I think about Erlang Platform, I think of powerful concurrency handling of heavy loads (It is the Erlang nature, nothing to do with it), and I certainly remember the fault-tolerance embedded with Erlang (built-in ability to upgrade software during runtime without restarting or failure time) which is something missed in most of frameworks dominating the marketplace nowadays. This paper talks in some more details about the status of the Erlang Platform.
I hope you enjoy your Erlang programming.
Tuesday, March 13, 2007
Corporate Blogging
Behind the scenes, you can expect the intelligent competition, and recruiting processes ;)
Saturday, March 10, 2007
From Consultance to Danger
Among the classes, I prefer the "Advanced Web Programming" the most. Sometimes I contribute as an audit!!! It may look strange, specially that I am a new born in the web technologies world.
The course is under supervision of two professors. One of them was going to chase me out, he thought that I represent a danger to the students. "Students knowing me well can rely on me as a friendly consultant and as a knowledge resource, they are going to be lazy" he thought so.
On the contrary, the other Professor thinks that I am a good guy, giving help to my colleagues, through my business oriented experience.
the third party is the students, they want me to come every Saturday to attend the lectures with them! some of them felt guilty while I was accused by the Professor.
I really like to help as much as I can, I can't stop this. in the same time I don't like lazy people.
but I have a theory about this...The students I deal with are not lazy, all wt I do is providing them the help through our conversations. When I figure out that who I am dealing with is not doing his best I start to to minimize my contribution with him.
I believe that we need to focus more on the keeping connection between different generations. Undergraduates should benefit from graduates experiences. but currently what happens is totally different; Only TAs are the ones involved with undergraduates.
Maybe I am wrong, maybe I am right. but I am convinced in what I am doing.