Archive for the ‘Science’ Category

Tell me, What I really want?

Friday, February 6th, 2009

أيها الحكيم أجبنى

أيها العاقل عقلنى

أيها الخبير أخبرنى

————-

حدثت لى الكثير من الأشياء المتعاقبة

التى آلمت عقلى قليلا

و أبكت قلبى

تعالوا أخبركم بعضا من نتائجها

—————–

1)  الأم

ناظرة إلى ولدها المبتعد

تحيك له قميص روضته

و تنظر إليه

و يبتعد

تعد له وجبة طعامه الساخنة

و يبتعد

ترى الأخرى و هى تأخذ بقلب و لدها

و تتسائل

أطعامها أفضل من طعامى

أحنانها أكبر من حنانى

و يبتعد

تسكن الأم فى مقعدها

و كالومضة فى الظلام تدرك أنه ذهب مع الأخرى

و تركها

لأنها لم تعد له ذلك الأمان الذى كانته

ثم تفكر قليلا

و تتسائل

بل و ربما أصبحت عبئا عليه

.

أيها البعيد أفق

و أقبل

و قبل يد والديك

——————–

2)

يحدثك الناس دوما حديث العقل

فيخبرونك عن ما لم تحصل عليه

و أنك متأخر كالعادة

(يا خيبتك)

و أستمع إليهم

و أهز رأسى موافقا

بل و ربما أطأطئ رأسى

كى أشعرهم كم من الندم أحسست به

ثم أدير إليهم ظهرى و أمضى

و أبتسم

و أتسائل

عن ماذا حقيقة تأخرت ؟؟؟

————-

3)

دفاع عن الإنسانية لعبد الوهاب المسيرى (رحمه الله)

يقول فيه ان تلقينا الموضوعى للأشياء المادية

جعلنا أغبياء فى أنفسنا

لأننا لم نقم لذلك الشئ بالتفكيك ثم التركيب

ثم بالتحليل إن كان مناسبا لنا أم لا

ثم يكرر ثانية

أن الموضوعية المادية

مثلها مثلما أن تكون منحازا

أن تكون موضوعيا ماديا

هو أن تكون متلقيا من دون فهم

أن تكون منحازا

هو أن تكون متعصبا من دون فهم

و لذلك

قدم مفهوما جديدا و هو التفسيرية

و هو على حد قوله

الوسط ما بين الموضوعية و الإنحيازية

و التفسيرية هى أن تتسائل

هل قدم لك هذا النموذج المعرفى

تفسيرا كافيا

لما يمثله من أحداث؟

———————-

4)

مقولة جديدة لى

و لأنى أتأخر فى المواصلات عموما

فقد استنبطت حكما جديدا

“وقت المواصلات من وقت العمل”

لماذا؟

لأن الأعمال بالنيات

و مادمت نزلت من بيتى لأذهب إلى عملى

و مكثت ساعة و نصف فى الطريق لأصل إليه

فهذا أيضا عمل

و عندما أرجع إلى بيتى فى ساعتين

فهذا أيضا عمل

على أى حال ربما أسقط مشوار الرجوع

و ردى على المتشدقين

لماذا تدور حياتى حول العمل

و إن كان العمل ثمانى ساعات

و يومى أربع وعشرون

إذا فباقى يومى ستة عشر ساعة

24-8=16

و أنا أريد ستة عشرة ساعة من يومى لا علاقة لها بعملى

أيها المتشدق

قل لى أيهما حراما

أستعبادك لى فى ثمانى ساعات

أم حريتى فى ستة عشرة ساعة

———————————–

5)

مقولة

قرأتها فى موقع الأدب

فى الإعلان الذى فى أعلاه

“كم على أن أخسر فى هذا العالم, كى أربحك؟؟”

متى أصبح ذكيا؟؟

أنا

ذلك النموذج المعرفى للدهولة

—–

و الشكر لمن قرأ و ولم يعلق

The value that should be

Monday, September 15th, 2008

This post is on the Code Plex  web site and related to my Quantity System Framework

The value that should be

I am writing it here to keep the dates of posting synchronized 😀  codeplex is the site and this is my site  {ooooooops   I hate sharepoint by the way }

————————————————————-

Peace upon you The one who is lookin 🙂

If you didn’t find the CTP version of F#  that contain the measuring supported in the compiler then find it here F# September 2008 CTP Release .

I tried it and found it interesting 🙂 congratulation to the F# team.

however,

today I was willing to talk about  the value of the quantity, suddenly I had an argument with Patrick about what the value should be?
he tried to convince me that value should be some sort of matrix {like matlab variables} and then if I want to have a scalar then I can use {1×1} matrix

well I admit that he has a point, but again I wasn’t satisfied 🙁

dealing with matrix in this early stage will be a headache for me also in any case I can’t compete with matlab either 🙂

I was playing with F# while reading Andrew blog about its implementation of units. when I read this statement

“Next time,
we’ll write types that are generic in units-of-measure. This makes the feature extensible: if floats with units aren’t what you want, just define your own types!”

I figured out that I can make the value of the quantity to be generic.

as you may know I was from the beginning insisting about making the Dimension of the quantity is my main concern, and not the units. so I am speaking Quantities not Units of measure. [its a huge difference] 🙂

review my latest discussion about the length problem.  { again making Angle Quantity was like a charm it is dimensionless and its detectable }

however as I am thinking about the syntax all the time I found my self writing this form of code

Velocity<float> vf1 = 20.8f;
Velocity<float> vf2 = 2.09f;

Velocity <float> v = vf1 + vf2;

and in that way I am emulating the Nullable<T> class

however the imagination didn’t stop here

as I am concerned about the Quantity not the value that it hold

then why I can’t do this ??

Velocity<int>          vi1 = 55;
Velocity<string>    vi2 = “Too Fast”;

var v = vi1 + vi2;              // <= Can I really achieve it

as you may notice the addition is valid for the same quantity even if the storage type is not the same

try to imagine that you have a storage type called  ‘Tank’

and another one called  ‘Bottle’

struct Tank;
struct Bottle;

if you make Volume<Bottle> + Volume<Tank> :    [ To be read like this Volume of Bottle Added to Volume of Tank ]

this meaning is really inspiring me again. And you will have the right to define your plus operator to sum what you want {I’ll just call your operator}

Another example

Visocity<Honey> + Viscosity<Oil>

Clear example like

Mass<Moon> + Mass<Earth> + Mass<Proton>

I hope it make sense

Again I am dealing with Quantities not units.

Quantities are smarter than units

Quantity can tell you about realizable meaning but units don’t tell much

And reviewing the length problem you know that Work is having the same units of Torque which again is not permitted in any case.

Again my assumption about Length to be Arc Length and Normal Length may be wrong but until now I managed to solve the problem of Work and Torque and this what’s keeping me up.

In the next discussions I want to clarify the meaning of Quantity-Value-Unit and how can they be ordered formed together.

Are they tightly coupled or loosely coupled?

Can I imagine them as a unit of three or a 2-1 or 1-2 or 1-1-1?  😀 a bit like soccer game

Thanks for you all.

—————————————————————

however I wanted to comment about something

we know as  a programmer that object is having properties

so one could say farewell you can  make

Earth.Mass = 50

Spoon.Mass = 30

and then he will go to the conclusion that we can inherit from the Class MassObject

or even Implementing interface  class Earth:IMass

why I am writing this ??

because I smell something wrong here

keeping thinking about inheritance then we should say that PhysicalEntity class should have all Quantities like Mass, Weight, Volume, and Viscosity

then we can inherit from this class obtaining Earth, Spoon, and Proton

but let us revise Proton and Electron which they have Electrical Quantities

do I have to  make another class for the electrical Quantities

lets take a Fish class

can Fish have  Fish.Volt    ???  (yes it can be but it is meaning less)

what I want to say that Object Oriented was describing the Shape of the object but not the content of the object

back to Fish

Fish.Swim() will result in movement from  x1, y1, z1, t1 to x2, y2, z2, t2

in fluid dynamics we can say safely that fish density may be changed by location, and time

however Density<Fish>  (Density of Fish  is by all means reasonable and realizable)

so in thermodynamic system there was differentiation between internal properties and external properties

external properties are depend on internal properies

does this mean that describing object in class shouldn’t include its external properties ??

however as you alawys my reader know about me I am just thinking but not sure and don’t know what to conclude after this

chao 😀  😉

Managed RefProp Project

Saturday, July 12th, 2008

My Second Open Source Project

this project is C++/CLI wrapper for the REFPROP database found at http://www.nist.gov/srd/nist23.htm

the project is in CodePlex   ManagedRefProp

and it is used to obtain the thermodynamics properties of many fluids included in the refprop

however I made this wrapper to use it in my applications with C#

Enjoy the project if you like the thermodynamics like me.

chao 😉

Joingin ASHRAE

Friday, March 14th, 2008

At last I payed the dues to be an ASHRAE affiliate member

Now I am an ASHRAE member 🙂

Quantity System Framework revised

Friday, March 14th, 2008

http://www.codeplex.com/QuantitySystem

although I am not considering a brilliant person

but this is my blog

so I am a smart brilliant guy who can make impossible things done.

and to my next victory about Quantities

Remember when I told you about the Quantity Frame work

the quantity frame work main idea is to help programmer to define the quantity in its context

so

no more  double f = 60;

it is

var f  = SIUnitSystem.Default<Newton>(60);

and to predict the quantity from the various arithmatic operations

so if

var l = SIUnitSystem.Default<Metre>(10);

var work =  f * l;   will return an object of work quantity

so far

the situation was good

but the real problem appeared when I was considering the Quantity of Torque

Torque which have the same Dimensions of Work  prevented me to include it in the library

and you know that Torque is  a very important Quantity

by returning to Wikipedia in the definition of Angle

I discovered that I can define length in terms of two dimensions

Normal Length  NL

Radius Length RL

and in MLT System

L will be NL + RL

so Angle is dimensionless value   L = NL1 RL-1 =0  and thats correct

but this way I could save it in the library and also can obtain a unique key for it

Torque is F * RL

and when multiply Torque * Angle = F1 RL1 RL-1 NL1 = F1 NL1    which is the dimension of Work correctly

I am very amused to solve this problem

if you had a look before on jscience measure library of treating this problem

you will find that they ignored the Quantity and began with the units approach  { that’s what I understand about it }

units approach is not what I want

I wanted to be able to do arithmetic operations and  to be able to know the result quantity.

however

please follow the link to my library in .NET framework 3.5

may be I am mad or it may turn to a real something