Hello !


Now's It's Time to ShineHello Everyone My name is eslam mahgoub I’m in faculty in computer and information in egypt in minia

It’s my first Time to Type blogs I ‘ll spend the time talk about  Codes , Projects , algorithms, experience I’ve or own or learn it

I’m beginner in this so

I hope U enjoyed in it ……..

any bugs U found in my blogs types plz cotact to me by my email or leave comment to tell my Ok

Have fun ^_^

Try switch UI Design to reality


notify

Design is not about visual it’s about build great product

So When You hear a User Interface word You think about visual and how staff look like but the truth is it’s about build great product Can User use it and understand how to use it even without look to manuals, by put interface into reality a lot of experts are advised the designers to learn programming to make it reality
but what about us (developers) , we must know how designers thinking to but a powerful product , user Can Use it.

Software Is A Tool.

So in thinking in that I’m try to make some reality interfaces with qml and QtQuick 2.0, I’m not professional or something like that but I’m try to change the way I’m thinking in UI(User Interface) and build my Own interface I’m start before Notify UI in doing that, I made photojouranl I still work in it you can watch the video in Youtube , but I’m finish the Notify UI and here we are !!.

Some pictures inspired me to do UI and the transitons animation I created ; I use sequential animation in it and some simple property such as X , Y or Opacity and Rotation and also I use parallel animation too to make fluid UI it’s pretty easy by qml, So I have to do a lot of work to reach The Top 😉 again thank you and I hope You like it.

التخرج :)


Image

ساعاتُ فرحٍ 🙂 ، وأخرى حزُن 😦   كانت تُزاحمها ~
و همةٌ عالية [تمحو ] لحظات ضعفٍ كانتْ تعتريها !
حُلمٌ و هدف .. و طموحٌ ما زالَ يُعانق سابع سماء !
اجتمعا .. لـ نسجْ أجملُ الأيام والشهور ،،
و اربع [سنين ] من حياةِ أمل ^^
دقائقٌ تمشي بعجل ~
أصبحتْ [ الآن ] طيفٌ من ذكرياتٍ ماضية ~

بفضلِ الله ، أنهيتُ مرحلة من حياتي ،،
و بالطبعِ فإنَّ رحلةُ العلم لم تنتهي بعد 😉
فـ العلم ، كالبحرِ لا ساحل له .. !

متفاءل جداً بالقادمُ !
و لحظاتٌ سعيدة ،، ما زالتْ تحفُ قلب [ أمَـل ] 🙂
فـ شُكر كبير يا الله ،،
و ثناءً وحمداً لا ينتهيان أبداً ! 🙂

تخرجي من مراحله كنت اعتقد اني مقيد بهاا اعتقد اني مازل لدي هذا الشعور اني كنت مقيدا لاسباب كتيره لاننا في مصر طبعا فكل تفكير اهلنا اننا لازم ناخد شهاده مش مهم المهم فعلاا اني خرجت بحاجات كتيرره قوووي خبره حياه ومواقف , علي اصحاب كتيرره ,علي مواقف عمري ما هنساهاا طووووووووول حياتي وعلي ما اعتقد قابلت اجمل شخص في حياتي 🙂

اكيد اتعلمت ده اكيد حتي لو كان العلم ده مجرد كلمه زي الالجورزمات  (معلش هكتبها بالعربي) ديه مش مجرد كلمه ده عاالم بس اقولكم علي سر احنا اخدنها كده مجرد كلمه 🙂 اهااا شئ يحزن متقلقوش انا اتعلمت عنهاا اكترر مع نفسي تعرفوا كان نفسي اتكلم اكتر عن كل لحظه انا عشتهاا في المراحله ديه من ساعه اول يوم اما روحت مع اختي الكبيره وقابلت ناس انا اول مره اشوفهم في حياتي لغاااااايه يوم الحفله وهما بيرقصوا معايااا وكماان ايام مشروع التخرج ده بقي حكايه لوحده بس انا فرحان اني عملت حاجه من الحاجات الي كنت بحلم بيها في مشروع التخرج مكنش مجرد نجاح عادي وبشكرر قووي الجروب بتاعي وكل الي ساعدني في اني احقق ده قوي من جماال المراحله ديه وتعبهاا انا فرحااان انهاا عدت بسلام بشكرر ربنا شكرر كبيرر قوووي والحمدلله حمدا كثيرا انا متفأئل قوووي بالي جاي خططي ايه هتعرفوهاا بعد كده لكن خليني اقولكم علي سررر انا هعمل حاجه شريره في المستقبل القرررررريب قوووي هتكلم عن الدكتره العمالقه الي عندناا ههههههههههه بطريقه شريره شويه استنوني قرريب اتمني ليكم ولياا مستقبل باهر سلااام ^^

اتقن حرفتك بمعرفه شخصيتك


طبعاا في استغراب اني بكتب بالعربي بس ديه لغتي الام بحب افتخر بيها وحاجه كماان انا بحب ان العربي ينتشر علي الانترنت بس بطريقه صحيحه هنتكلم عن الموضوع ده في مقاله تانيه بس دلوقتي هتكلم عن رائ الشخص في ازاي اتقن حرفتي في البدايه اتبعتلي اميل من:-

Subscribe from “Greg Sidelnikov” the own of  jQuery tutorials Site and the E-mail address is  “Master your Craft by Knowing yourself”.

الاميل ده الهمني اني اكتب المقال ده في الاول انا قلت حرفتي علشان الحرفه هي الي بتقدر تكون بارع فيهاا علشان ديه الحاجه الي انت بتحبها اما المهنه ديه ممكن تكون بتحبها او تكون مفروضه عليك ولو كانت الحاجه التانيه يبقي لازم تبدا بسؤال نفسك انت فعلاا بتحب الي انت بتعمله ؟ انت فعلاا بتتقن الي انت بتعمله وبتبدع فيه؟ (مش مهم رائ الناس المهم رائك انت) الناس هيشوفوك غلط مش الكل ومش دايما بس فكر بشخصيتك انت انت ايه وفين ؟ كل الاسئله ديه لو وصلت ل لا يبقي انت مش بتحب الي انت بتعمله ولازم تدور علي الي بتحبه افضل دور ودور لغايه ماتوصل للي انت انت بتحبه وصلت خلاص هقولك كلمه دلوقتي

“No matter how Talented you are, your talent will fail you, if you’re not skilled. skill is achieved through practice. work hard and Dedicate yourself to being better every single day.              -will smith

بالمعرفه والتعلم تقدر تكتسب المهاره التعلم شئ جميل والتعلم بالفعل شئ رائع بس خلي بالك مش تعلم لمجرد التعلم خليك بالك قوووي من الفخ ده انك تتعلم لمجرد انها معلومه هتفيدك ده اكتر الاخطاء الكبيره قووي الي ممكن تقع فيهاا في حياتك علشان التعلم الصحيح تعلم لاخراج قيمه مش تخزينها في العقل من غير انك تستخدمها

“Reading, after a certain age, diverts the mind too much from its creative pursuits. Any man who reads too much and uses his own brain too little falls into lazy habits of thinking”
-Albert Einstein.

ديه الحاجه الي هتوصلك انك تنمي مهارتك بطريقه عاليه جدااا وفي حاجه تانيه احيانا ناس كتيره ممكن تعمل الحاجه ديه من قبل ما تخلص تعليمها كويس جدااا وده بردو غلط علشان بيخليك مش قادر تعلي مهارتك فعلاا علشان انت اتعلمت جزء من المعلومه مش كلهاا بس خد بالك في فرق بين انك تفكر وتوصل للمعلومه الكامله وتكون صح وفي فرق باينك تتعلم المعلومه باهماال الجزء الي فات ده ده كان اهمال في تعلم المعلومه اخر حاجه عايز اقولها هي الالهااام حاااجات كتيرررره قوووووووي ولو ناس كتيره اتفقت علي حاجه واحده هيفضل الالهام ده مميز عن كل شخص فيناا علشان كده لازم تدور وتبص حوليك وتسجل كل حاجه بتحصل انت شايفها انها ملهمه ليك ولحرفتك ممكن تعمل كتاب تحط فيه صور ترسم فيه مجرد رسومات خياليه حتي لو انت بس الي هتفهماا تحط فيهاا قصص حصلتلك قصص انت شوفتها قدامك الالهم جزء مهم جدااا ولازم تهتم بالجزئيه ديه اكتر علشان ديه هي الي بتخلي افكارك اكتر وابداعك في انك توصل مهارتك وطرقتك لدرجه عاليه جدااا

“شكراا لكل الالهمني والي ساعدني ده مجرد رائ من ارائ  وشكراا لقرائته”

“وللكلام بقيه في وقت اخر”

اسلام محمد-

Levels of Developer Expertise


This is a light-hearted attempt to classify developers. Enjoy…

 1. Newbie

  • Knows the syntax of one language and thinks he’s a master.
  • He might also think the language is the best one in the whole wide world.
  • Full of passion and excitement about programming.
  • Writes code that ‘seems’ to work – it compiles after all – doesn’t necessarily knows why it works though.
  • Uses bad variable names.
  • Programs are likely to be be a single file.
  • Doesn’t know anything about testing.
  • Likely languages: PHP or Java.
  • Likely Reads: Learn Java in 21 days or something similar.

 2. Amateur

  • Learns another programming paradigm/language.
  • Uses better variable names – must have been hurt by evil names.
  • Has developed one or two relatively decent working systems.
  • Writes spaghetti code.
  • Re-invents the wheel.
  • Probably has a huge ego.
  • Only knows how to use IDEs.
  • Tests? They are just a waste of time and delay the release of his ‘one-of-a-kind’ software.
  • Still dives into code without proper planning.
  • Likely Reads: Advanced Java.

 3. Intermediate

  • Becomes language agnostic.
  • Knows multiple languages, tools and paradigms – their strengths, flaws and best uses.
  • Has worked on bigger projects – understands the importance of design and flexible code.
  • A bit of spaghetti code here and there but he tries to avoid this.
  • Understands algorithms and data structures.
  • Can use text editors.
  • Uses version control.
  • Designs code before starting and tries to avoid code duplication.
  • Probably has his own blog or contributes to open source projects.
  • Likely Reads: Pragmatic Programmer.

 4. Advanced Intermediate

  • Codes defensively – using asserts, unit tests and checks.
  • Really cares about his code; refactors aggressively until it is clean.
  • Toying with building his own language or at least understands how languages work.
  • Can ‘smell’ bad code.
  • Interested in reuse and sees patterns in software engineering.
  • Understands design patterns.
  • Knows about methodologies like Agile, Scrum, Kanban.
  • Likely Reads : The Mythical man-month, Clean Code, Code Complete, the Java language specifications.

I don’t know much about master programmers – am not one yet though I pray I do get there.

I am curious about what you think, let me know in the comments.

qml prototype awesome tutorial


qml is great tools in qt in my tutorial qt Qt Style sheets Tutorial I’m using Css to create prototype for application to windows “form login” and i follow some steps to do that and finally I did it now I’ll do different thing in qml I will make special specs to make slider follow my steps and we will make with us amazing component let’s start :
in the beginning

Step 1: open Qt Creator and in file new project, in “Qt Quick Project” choose “Qt Quick UI” and name it slide.

Step 2: open slide.qml and make it empty because we want make it with own.

Step 3: now we will make this.

before it type the parent window and we will back to it later this the code



import QtQuick 1.0

Rectangle {
id: parentrect
width: 400
height: 350
}

this will be the parent window lets back to our slide first we will make two rectangle inside each other first own it the outer one I’ll make it round by type radius : 13 and the insider make it the radius : 16 so it will same like in the image second the secret in the slider to appear like it has edges and the ball in side it it’s the color and gradient the inner rectangle will be color and i put it’s color : “#ffffff” with opacity: 0.740 and border.color: “#807d76” the outer will make by color or gradient as you like here i use color but my self when i used gradient it’s appear amazing so i let color: “#ecdddd” and or what you like and to the both I’ll make the smooth : true and clip : true so it appear like in the image the code for outer and inner rectangle is :



Rectangle {
id:outerrect
x: 120
y: 142
width: 173
height: 51
color: "#ecdddd"
radius: 13
opacity: 1
smooth: true
clip: true
}

Rectangle {
id: innerrect
x: 125
y: 148
width: 163
height: 40
radius: 16
opacity: 0.740
scale: 1
border.width: 1
clip: true
smooth: true
border.color: "#807d76"
}

Step 4: we will make the ball in the slider.

we make make the ball with gradient to same like a ball first the radius to the ball is radius : 40 and the opacity : 0.260 and I’ll make the smooth : true , I’ll use two position in gradient position :0 the color will be color: “#f5eaea” and position : 1 the color will be color: “#dd0b0b” finally I’ll put border.color: “#8b7c7c” so it will be like what you see now and the code for ball will be:



Rectangle {
id:ballrect
x: 187
y: 148
width:40
height:40
radius: 40
smooth: true
gradient: Gradient {
GradientStop {
position: 0
color: "#f5eaea"
}

GradientStop {
position: 1
color: "#dd0b0b"
}
}
opacity: 0.260
border.color: "#8b7c7c"
}

Step 5: back to the parent window I’ll make it appear beautiful just for fun I’ll put gradient in it , I will let you try it this is the code for the parent window .



Rectangle {
id: parentrect
width: 400
height: 350
gradient: Gradient {
GradientStop {
position: 0
color: "#ad8e8e"
}

GradientStop {
position: 0.430
color: "#8d5050"
}

GradientStop {
position: 1
color: "#250404"
}
}
border.color: "#000000"
opacity: 0.850

Final step : I will use drag in qt system to enable to drag the ball in the slider horizontal in the the rectangle inner rectangle so I’ll use MouseArea in qml and in it put the anchors.fill to parent the windows parent and in the drag.target to the ball and drag.axis will be the X axis and maxdrag and mindrag to put it in the range between the inner rectangle; this is the code for mouse area.



MouseArea {
//hoverEnabled: false
anchors.fill: parent
drag.target: ball
drag.axis: Drag.XAxis
drag.maximumX: innerrect.x + innerrect.width - 40
drag.minimumX: innerrect.x
}

So the final result :

The complete code :



// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.0
import QtQuick 1.1

Rectangle {
id: parentrect
width: 400
height: 350
gradient: Gradient {
GradientStop {
position: 0
color: "#ad8e8e"
}

GradientStop {
position: 0.430
color: "#8d5050"
}

GradientStop {
position: 1
color: "#250404"
}
}
border.color: "#000000"
opacity: 0.850

Rectangle {
id:outerrect
x: 120
y: 142
width: 173
height: 51
color: "#ecdddd"
radius: 13
opacity: 1
smooth: true
clip: true
}

Rectangle {
id: innerrect
x: 125
y: 148
width: 163
height: 40
radius: 16
opacity: 0.740
scale: 1
border.width: 1
clip: true
smooth: true
border.color: "#807d76"
}

Rectangle {
id:ball
x: 187
y: 148
width:40
height:40
radius: 40
smooth: true
gradient: Gradient {
GradientStop {
position: 0
color: "#f5eaea"
}

GradientStop {
position: 1
color: "#dd0b0b"
}
}
opacity: 0.260
border.color: "#8b7c7c"
}

MouseArea {
anchors.fill: parent
drag.target: ball
drag.axis: Drag.XAxis
drag.maximumX: innerrect.x + innerrect.width - 40
drag.minimumX: innerrect.x
}
}

Now you can drag the slider and make beautiful element and prototype to your application thanks again to your time any mistake i did please tell me or send to me and accept my apologies to didn’t type anything for long time thank you again.

eslam mahgoub

Just Play With it !!


AI(Artificial intelligence)Artificial intelligence that is What I type before but when I type it I don’t Know anything about AI and What we Can do With it so I Try to be more professional tonight and break it with XO game or like they say tic-tac-toe in the beginning thinking in games it’s efficient way to learn some thing and to be more comfortable with it to be creative in this thing so let’s start with XO I’ll make 1 to 9
square to make user select between it to the player 1 or player 2

That is the code for that:-


void main() {
char cSquare1('1');
char cSquare2('2');
char cSquare3('3');
char cSquare4('4');
char cSquare5('5');
char cSquare6('6');
char cSquare7('7');
char cSquare8('8');
char cSquare9('9');
int iPlayerTurn(1);
bool bGameOver(true);

and thinking in XO 3 Condition to Win the first When square1 not equal 1 equal X or O in that if his row or his column is equal and the second one When square5 not equal 5 equal X or O in that 4 paths path to 5 well make the end of the game with win someone the last Condition in Wining the game When square9 not equal 9 equal X or O in that if his row or his column is equal the player is win in the 3 condition

Fail Condition thinking When all the square is not equal to it’s number and the game is still running so that is fail condition when no one is when

that is it in the all of the game you must of course initializing the game board and do the loop for all condition Until the game is still running and to the code the all code is here take a look :-


#include "iostream"

void main() {
char cSquare1('1');
char cSquare2('2');
char cSquare3('3');
char cSquare4('4');
char cSquare5('5');
char cSquare6('6');
char cSquare7('7');
char cSquare8('8');
char cSquare9('9');
int iPlayerTurn(1);
bool bGameOver(true);

// Main game loop
do {
// Print board
std::cout << cSquare1 << "|" << cSquare2 << "|" << cSquare3 << std::endl;
std::cout << "-+-+-"<< std::endl;
std::cout << cSquare4 << "|" << cSquare5 << "|" << cSquare6 << std::endl;
std::cout << "-+-+-"<< std::endl;
std::cout << cSquare7 << "|" << cSquare8 << "|" << cSquare9 << std::endl;

// Set player marker: Player 1 uses X and Player 2 uses O
char cPlayerMark;
if (iPlayerTurn == 1) {
cPlayerMark = 'X';
} else {
cPlayerMark = 'O';
}

// Prompt the player for a move
std::cout << "Player" << iPlayerTurn << "'s move:" <> cNextMove;
bValidMove = true;

// Check for a valid move
if (cNextMove == '1' && cSquare1 == '1') {
cSquare1 = cPlayerMark;
} else if (cNextMove == '2' && cSquare2 == '2') {
cSquare2 = cPlayerMark;
} else if (cNextMove == '3' && cSquare3 == '3') {
cSquare3 = cPlayerMark;
} else if (cNextMove == '4' && cSquare4 == '4') {
cSquare4 = cPlayerMark;
} else if (cNextMove == '5' && cSquare5 == '5') {
cSquare5 = cPlayerMark;
} else if (cNextMove == '6' && cSquare6 == '6') {
cSquare6 = cPlayerMark;
} else if (cNextMove == '7' && cSquare7 == '7') {
cSquare7 = cPlayerMark;
} else if (cNextMove == '8' && cSquare8 == '8') {
cSquare8 = cPlayerMark;
} else if (cNextMove == '9' && cSquare9 == '9') {
cSquare9 = cPlayerMark;
} else {
std::cout << "Invalid Move. Try again." << std::endl;
bValidMove = false;
}
} while (!bValidMove);

bGameOver = false;
bool bWinGame = true;
// Check for end of game conditions
if (cSquare1 != '1') {
if (cSquare2 == cSquare1 && cSquare3 == cSquare1) {
bGameOver = true;
}
if (cSquare4 == cSquare1 && cSquare7 == cSquare1) {
bGameOver = true;
}
}
if (cSquare5 != '5') {
if (cSquare1 == cSquare5 && cSquare9 == cSquare5) {
bGameOver = true;
}
if (cSquare2 == cSquare5 && cSquare8 == cSquare5) {
bGameOver = true;
}
if (cSquare4 == cSquare5 && cSquare6 == cSquare5) {
bGameOver = true;
}
if (cSquare3 == cSquare5 && cSquare7 == cSquare5) {
bGameOver = true;
}
}
if (cSquare9 != '9') {
if (cSquare3 == cSquare9 && cSquare6 == cSquare9) {
bGameOver = true;
}
if (cSquare7 == cSquare9 && cSquare8 == cSquare9) {
bGameOver = true;
}
}
// Need to check the board full (no-win condition)
if (cSquare1 != '1' && cSquare2 != '2' && cSquare3 != '3' &&
cSquare4 != '4' && cSquare5 != '5' && cSquare6 != '6' &&
cSquare7 != '7' && cSquare8 != '8' && cSquare9 != '9' && !bGameOver)
{
bGameOver = true;
bWinGame = false;
}

if (bGameOver) {
if (bWinGame) {
std::cout << "Player" << iPlayerTurn << " wins!" << std::endl;
}
// Print ending board
std::cout << cSquare1 << "|" << cSquare2 << "|" << cSquare3 << std::endl;
std::cout << "-+-+-"<< std::endl;
std::cout << cSquare4 << "|" << cSquare5 << "|" << cSquare6 << std::endl;
std::cout << "-+-+-"<< std::endl;
std::cout << cSquare7 << "|" << cSquare8 << "|" << cSquare9 << std::endl;

std::cout << "Game Over!" << std::endl;
std::cout << "Play again (y/n)?" <> cPlayAgain;

if (cPlayAgain == 'y') {
bGameOver = false;
// Clear the board
cSquare1 = '1';
cSquare2 = '2';
cSquare3 = '3';
cSquare4 = '4';
cSquare5 = '5';
cSquare6 = '6';
cSquare7 = '7';
cSquare8 = '8';
cSquare9 = '9';
}
iPlayerTurn = 1;
} else {
// Alternate player turns
if (iPlayerTurn == 1) {
iPlayerTurn = 2;
} else {
iPlayerTurn = 1;
}
}
} while (!bGameOver);
}

Any question I’m ready to answer it in any time.

SOLVING PROBLEMS


In the Previous TOpic become a better programmer by not programming Jeff Atwood is type about programming by not programming ; I search about solving problems his right the problem here is about ideas and problems not tools or IDES or computer language it easy to learn any language it’s will take few weeks to learn it But

let’s talk about serious problems it’s

SOLVING PROBLEMS

it’s a lot and a lot of algorithms out there you can found what is comfortable and very effective with your problem actually i think every problem it’s like puzzle let’s take n-queens puzzle if we solve it by EXHAUSTIVE SEARCH it will take long long time to solve it I think two algorithms can solve it it’s BACKTRACKING with some exceptions or base case and number two is TRANSFORM-AND-CONQUER backtracking technique we will found all solution and graph it reach to the solution with some exception like the stranded one like never put the queens in the way of each other it will eat each other , we will lose and will take along and along to solved if we didn’t put that exceptions

If we take the second one the transform and conquer it will solved by two stages first transform the input to representation we will take the role of the queen move and link the position together it’s the second stage it will solve really may be with some exceptions but it will solved faster than any other algorithms so we have to find our algorithm to solve by it our problems we can graph it or divide and than conquer or decrease and conquer greedy , dynamic programming all of these stuffs it’s help us to get effective solution of many and many problems
by eslam mahgoub