It’s Efficiency Not Speed!
I know that this topic might look weird, that’s because it is.
While exploring new programming languages and frameworks I discovered a really important rule, that efficiency is the main thing that really matters, not speed. Let me tell you the complete story.
For the last year I spent too much time studying my programming performance and how can I finish tasks as fast as possible with maximum output performance possible. I thought that I’m slow and my programming speed is getting slower and slower while I see people finish complete applications in half the time I spent writing something. so I quickly started to search for new technologies for agile development and I found really great things, things like “Ruby On Rails”, “Django”, “GWT”, “ExtJS” and many many web development frameworks for agile development.
I quickly read about Ruby On Rails and I became a fan of it, also I wrote a project using GWT-Ext “Java” and wrote some samples using Django. They were/are great.
I’ve always had a philosophy regarding programming performance, that it is speed is very important, because time is money and when you spend more time writing code you are spending more time. That’s why using such frameworks is very nice.
But after sometime I discovered that I write code efficiently not fast!, how is that?
Efficiency is the output compared to the input, and for constant input increasing output increases efficiency proportionally, but if we are decreasing input that would enhance the efficiency more.
Writing code fast is a very nice thing and would greatly help, but writing a well-thought code slowly is more efficient because you generally write less code and you decrease the potentials design-errors you might see later on. so the best thing is to control both, try to increase the output as you can and decrease the input as you can without sacrificing output quality.
In programming this can happen if you have learned the programming basics correctly, things like Algorithms and data structures can really help you write more efficient and error-calculated code. you would write great code in much less time that can perform better. Thus increasing your programming efficiency.
So the result is the efficiency is what matters most. Not speed, it’s OK if you are slow programmer but make sure that you write code efficiently because that will make your final performance better.
Increase your efficiency by reading more about academic programming basics and performance-tuning books so you can think more efficient and use inputs more efficiently and generating high output.
حاجة مالهاش علاقة بالموضوع خالص بس متغاظ منها قوي، كوكاكولا عاملة سلسلة اعلانات عن كوكاكولا زيرو و بتقول كوكاكولا عملت المستحيل و انت كمان ممكن تعمل المستحيل
انا عايز اقول ان لو حد عمل المستحيل يبقي هو مش جامد او اي حاجة، كل ما في الأمر ان الموضوع ما طلعش مستحيل و لا حاجة، لأن المستحيل هو الشئ اللي محدش يقدر يعملو و لو حد عملو يبقى مش مستحيل من اساسة، صح؟





neo said,
May 5, 2008 @ 1:54 pm
Nice topic. And I agree with you about the efficiency thing. Specially that I’ve been practicing my programming skills lately, and I need to increase my speed . But, thinking about what you said, it’s my efficiency that needs to be increased first, then speed. I totally agree.
kamasheto said,
May 6, 2008 @ 11:24 am
The first CS course we took was called introduction to computer science, basically, algorithms. LOTS of algorithms. Needless to say, I never really studied the basics of programming previously, but for some reason, I excelled in that course - I’m assuming it’s because I coded more applications than I could remember.
My point is, in addition to what you said, practice makes perfect. If you’ve never studied the basic programming concepts and you’ve been coding for a very long period of time, your applications will probably be better because you, by then, should have encountered all sorts of manoeuvres, situations, bottle necks, errors, security vulnerabilities, etc.
I always thought programming should be a compromise between theory and practical implementations. Having had enough practical implementations in my past few years, learning the theory now will only do me good =D
MoMaDoW said,
May 7, 2008 @ 10:28 am
ThanQ… Always making me optimistic…
All developers should stick this idiom right on front of them:
If there is a will, there is a way.
حاجة مالهاش علاقة بالموضوع خالص:
miss you neo.. lkin’ forward to see you both soon inshallah 
miss you man
Hiz Kama!!
MoMaDoW said,
May 12, 2008 @ 11:17 am
Sorry.. bas ana ghert.. fa 3amalt sign up
ThanQ… Always making me optimistic…
All developers should stick this idiom right on front of them:
If there is a will, there is a way.
حاجة مالهاش علاقة بالموضوع خالص:
miss you neo.. lkin’ forward to see you both soon inshallah 
miss you man
Hiz Kama!!
El sayed Gamal said,
May 12, 2008 @ 5:54 pm
Third time to pass here ..
and finally I’ll comment, ..
I was searching frameworks thing for another reason ..
actually for creating my MVC framework ..
and BTW when I googled it back when we came back from the trip I found it to be a design pattern too .. and sometimes as a design model as you said ..
And I reached somehow a nice one .. while searching the frameworks i found rails to be the most interesting one and agle development based but I didn’t like the “convention over configuration” MASS ..
And I don’t like the sub views so much it can be better than that ..
I actually enjoyed it specially scaffolding but -in overall- I found that I’m in a deep deep need to study rails conventions ..which is sooo many and i out put code i barely understand!
I’m telling this story to show how easy & time saving could it be “I mean using others and famous frameworks”..
but it’ll be nasty when you decide to customize .. “add your touch” if you understand me ..
specially rails .. .I really like it specially scaffolding and I’m going to add it to my poor php framework.
I think I’ll add the option to choose if the db function will be added as subroutines to db once you scaffold table or to do the CRUD tasks or to normally manipulate it from the tool side ..
anyway .. I’ve a confession MVC design model can be satisfied without being fully object oriented .. but it -specially in php- just sucks .. and I’m migrating to Java
and I’ll try GWT soon after eGzams
Bs ll 2mana bardo my poor php framework tremendously increased my speed and my efficiency … i think soo
Thanks for the nice topic .. wrbna m3ak
kamasheto said,
May 15, 2008 @ 1:48 am
Psycho, howa 3eb eni ab2a msh mela7ez 3alaka ben eli enta 2olto wyl topic? *hides*
Hey Zalabane, LTNS.
bingorabbit said,
May 15, 2008 @ 5:43 am
I agree with kamasheto in the “Practice” point really, because it for some reason increase your speed later, you got used of coding that idea before, and reimplementing it might not take the same time you spent coding it before, to that comes from practice.
So when Ahmed said
You can solve the “slow” problem, if we may consider it a problem using practicing, because it enhance your mind with ideas more and more every day, and this is the idea I’m talking about. got me?!
Adding “basics” and “Algorithms”, you become a hero!..because then you will practice on a solid basis and at the end, your code become efficient and your programming skills will be great, as at the end you will have speed writing your well-thought code as you may have done it before.
eh kol el kalam dah?
Missing you guys, Soliman, Neo, Zalabany, w kaman kamasheto..w psycho kaman yalla
Ah, btw I agree with kamasheto about what psycho has said..do you suggest an idea for the speed thing y3ny?!
El sayed Gamal said,
May 15, 2008 @ 11:34 am
Frameworks = more speed .. and may be less efficient
Your own Code = efficiency ..and may be slow !
and I had an experiment to show ..
.. that was the summery of my post
details of my experiment .. and the scaffolding example -belzat- is very clear one ..
it takes you about minute to “saffold” a table and get all CRUDs functionality but when it comes to efficiency …
you will prefer to code it yourself ..aw 3ala el a2al ana; I prefer to code some of my system core functions myself .. to know what’s exactly is going on ..
here is a video for scaffolding .. to see what I’m seeing
http://www.youtube.com/watch?v=_ipS90JuGPE&feature=related
NOTE that view files are created automatic and ready to be customized to whatever look you need :)..
it means that you can enhance the look in another one minute and you’ll have a Basic select, insert, update and delete functions in a minute in a neat look !!
Plus if you used more of RAILS conventions in naming fields and data types of fields rails can decide if it’s going to make a textarea . textbox, or even a radio button in the view file
PLUS .rhtml file aslan VERY EASY TO CUSTOMIZE ..7ata law msh faker el conventions !!
Do you still can’t find relationship between what I said and the main topic??

anyway when we meet …. , Just zaker ya kama
Thanks guys and I miss you all INCLUDING [The Zalabanian]
Ed3ole 3ashan 3ande exams kaman 3 days
Salam
Ahmed S. Farghal said,
May 15, 2008 @ 5:00 pm
@psycho: I don’t agree completely for what you said
please let me explain my POV for something. scaffolding is a very very nice thing about ROR and actually many people claim that ROR is all about scaffolding, I used scaffolding several times and I can say that it’s pretty efficient.
the efficiency here comes from the ROR compiler/interpretor not your code, and I can say that it’s pretty efficient and most of time you don’t need to complain about performance or output efficiency.
so the efficiency of the output/generated code is the responsibility of the ROR compiler/interpretor and believe me, it does the job in a very good way. you probably won’t be able to write the same efficient code yourself.
But writing your own libraries and development framework is FUN but might not be as efficient as what ROR generates. And it will allow you to explore new stuff and touch the low deep interactions of the internal components, the thing that would take too much time writing. Although it’s a write-once use-many, it’s still a very slow and [might] be inefficient process.
maybe it’s not the best for you because you feel that ruby is hard to learn or remember, but I played with it several times and it has a pretty easy syntax like VB
Have Fun.
El sayed Gamal said,
May 15, 2008 @ 7:00 pm
I used “scaffolding” too and I Like scaffolding; I really like it ..
and Ruby is soooo easy to learn and soo efficient I know ..and pure object oriented and was coded for programmers fun .. I really don’t agree that ROR is gr8 framework.
I was just exclaiming if I can understand what I do everything I do .. I just can’t know how they -I mean rails-generate the model files and view files for me ,that Easy and Fast .. so I can’t grantee efficiency !!
>I didn’t dig up to know but it sounds easy to write your own framework.
It’s Time consuming YES, but really Amazing, enjoying and the most important thing .. ..”Code once Use many” .. And every time you use it, you will enhance it.
[CASE STUDY]
eftkasa keda no3 mn anwa3 el tarwesh msh aktar 

My view files are .GAM files => Gam for Gamal
and I’m working with Ahmed sameh and Ahmed Ali who -both- have almost no web programming experience .. MY GAM Files helped them -EASILY- do the slicing and integrate it with my system .. without dealing with mee and TOTALLY separate
and I really was happy on my last project thanks to the template engine !
they just rename the file to file.GAM after finishing how amazing :))
And sameh LOVED the . GAM files .. specially when he needed to change few things while delivering the system to customer .. he needn’t to open any php file ..
he just customized the gam file which is HTML + meaningful {KEYS} > I like this page
http://media.rubyonrails.org/video/rubyonrails.mov =>> session daivid .. whowa 3ala tabe3to
Thanks Ahmed
El sayed Gamal said,
May 15, 2008 @ 7:03 pm
Incomplete post ..!!
ta2reban de 7aga 3′lt fe el wordpress
I’ll mail it to you .. you are free to delete this post and post the new one or edit it when it’s fixed
Butterfly said,
May 17, 2008 @ 8:45 pm
Hmmmmmmm , koloko code code code


ana a7eb a2ol 7aga felmagal elly ana sha3′ala feeh
ana kont badaye2 awy 3ashan bate2a gedan fe 7arakty 3ala el tools fel MAX
w 7′ososan en fe nas la2etha asra3 mny bekteer.
bs ektashaft ent lama bady lekol 7aga 7a2aha fel wa2t ba7′arag output kowayes
3′ier lama bab2a 3awza atala3 7aga besor3a w fela7′er mesh beteb2a gamda
and thanQ for the great post
bingorabbit said,
May 21, 2008 @ 3:19 am
@Butterfly especially, beside all what were mentioned above, I would like to add when I was at CairoIT last year, Eng.Hazem Salem had an advice for the designers there and I think it can apply for all but it’s really handy for designer, simply, learn to use the keyboard shortcuts, it saves time and it makes your work efficient cause you will be also using ALL available resources..
Butterfly said,
May 21, 2008 @ 12:46 pm
ThanQ Bingo for the advice
from Eng.Hazem Salem 
besause of some circumstances , But not for long isA (I wish) 
isA I’ll try to develop myself in the coming period . I appreciate the development work needed .
my be I can’t
And The existence of the Internet have now make me use some of available resourses and this help me very to develop myself ..
ThanQ again