Tuesday, September 18, 2018

Healthy Style

These are hand drafts during a session about healthy style, may be I find some time to male it more neat.

Sports:
- 1.5 hrs intensive or 2.5 hrs moderate weekly

Food:
- vareity ( when we say ea
t fruits  do not stick to single fruit )
- neutrient to calory density ( try to increase it )

Fats:
- sat fat: n2alelha( solid fats: zebda - samna )
- unsat fat: good (vegetables oils)
- avoid ziot mohadraga w zat el na5ek, used to zawed expire date, trans fats

10% of your calories: ( added sugar + sat fats +  sodium intake)

Each meal:
fruits + vegetables + grains + protein + diary(laban)

grains: ( 50% whole grain)
بيشبع اكتر + مفيد
عيش بلدي + رز بني
مش مصنع

android: myfittnesspal

nescafe: shift to bon

energy sequence:
1. burn carbs in blood
2. body fats

zet zatoon: سخنه بس من غير قلي ولا درجة التبخر

---------------------
Ramadan:
nescafe: in ramadan use pain killers ( panadol extra abl el sohoor )

soda3: 2elet maya aw kafayeen

ramadan: complex carbs ( 3esh balady + beans + outs )
fibers
nuts
maya met2asema

البطن بتشبع وبعدها ب ٢٠ دقيقة العقل بيعرف 》》 كل بالراحة، ابدأ بالشوربة وبعدين بالخضار

sohoor: banana putasium bymn3 el 3atash

Choose your programming language

C++, Java, C#, Objective C. First we see the differences, hence we can make decisions.

For each language we will try to answer two questions:

  • Performance?
  • Binaries are portable or not.
C++:
  • It is compiled to be executed directly on the machine. That means each machine shall run binaries compiled specifically for it.
  • Hence, the binaries are not portable. And for the same reason, the performance is better.
  • Performance:  😌
  • Portability:     😞
Java, C# and Objective C:
  • Java is compiled to be run on JVM, not to be run directly on the target machine. Hence, the binaries can run on any target, as long as the JVM is installed. For the same reason the performance is less than C++ programs.
  • JVM is available for Windows, Linux and Apple.
  • C# is the same to say like in Java. With the following analogy
    • JVM :: .NET CLR (Common Language Runtime)
    • .NET framework including CLR is primarily supported for windows
      • People may have ported .NET framework to other OSes. But mainly .NET framework is for windows
  • Objective C:
    • Same concept as C#, with the following analogy:
      • .NET CLR :: Othe VM
      • Windows :: Apple OS X
  • Performance:  😞
  • Portability:
    • Java             😌
    • C#                😌 for windows
    • Objective C 😌 for Apple OS X
Also, Java, C# and Objective C giving errors like outofbound and so on, they prevent and diagnose such hard debugging problems. C++ does not do this. Of course this will add overhead to the execution and will degrade performance.

Now we can make decisions:
  • C: use it for small, low level, low sized target codes (Ex: device driver of embedded system).
  • C++, Java, C# Objective C: use it for larger code, for better modularity than C, with reasonable performance degradation.
    • C++: to get the maximum performance of a machine, ex: games, graphics apps that requires high performance.
    • Java: Do not need that high performance? Want to be platform independent and reach all users without installers? Go Java (For all OSes), C#(For windows apps) or Objective C(for Apple OS X apps).