Software Engineering-1
Software Engineering-1
Software Engineering
1. OOP
2. Design patterns
3. Agile (methodology)
4. Unit testing
Man-Month issue
man-month What a person finishes in a month is not necessarily done by two in half month !
(difficulty of adding more people to cut time)
Tar pit Development teams can get stuck at a point and cannot proceed similar to animals in tar
حفرة القطران pit (project fails)
(projects can easily reach a freezing point and fail)
Social loafing The phenomenon of a person exerting less effort to achieve a goal when they work in a
ر
التاخيياالجتماعي group than when working alone.
this is mostly applicable when their individual contribution to the goal isn’t apparent.
Ringlemann The tendency for individual members of a team to become increasingly less productive as
effect the size of the team increasesيعالقةيعكسيةيبيييعد يديالفريقيوالمجهو يديالمبذولي
Two pizzas rule Bigger teams may not help
Software is abstract
1. Dividing code to modules reduces the complexity but make software more abstract
2. Accurate software behavior can only be seen at individual instruction level.
3. At higher levels, many details are hidden, with hidden things developers can easily assume things
that are not accurate and the result is a program not doing what we expect
4. Difficult for development team to follow the plan
Clean code
What makes a good programmer?
Good programmers who write code that humans can understand
Clean code: is code that is easy to understand and easy to change
Clean code secret: NAMES
easily pronounceable names names show intention
Lecture #3
Why software is different ?
Characteristics based on Software nature
1. Software is complex
2. Software is abstract
Agile misconceptions
1. Agile not excuse to stop documentation
2. Not an opportunity to eliminating planning
3. Many people are into agile without knowing it
Pair programming
1. Better for refactoring and less errors
2. Avoiding isolated experience
3. productivity is comparable to individual programming
Lecture #5
Some Agile methods
Crystal (very descriptive) كبتيللخطواتيومرونة
فيهيايوصفي ي
Scrum (most widely used and successful method)
XP (Extreme Programming) (prescriptive طريقةيشغليمحددةيا يوياجباريهيفييبعضيالخطوات )إلزامي
معايتيالقبول
ي
Scrum
1. The most widely used and successful agile methodology.
2. Focus on providing a framework for agile project organization.
3. Does not mandate الييفرض يuse of specific development practices such as pair programming,
more easily integrated with company practices.
4. An increment (cycle) in scrum is called a sprint (1 to 4 weeks)يlast a fixed length of time and can
never be extended.
5. A sprint cycle starting point is a product backlog (list of things to be done by the team; product
features, requirements, improvements, bugs).
6. Initial product backlog can be derived from a requirements document or a list of user stories.
Scrum Methodology
ر
الحاجاتيالتيتتميمناقشتها
Distributed scrum
4. Easy access to expert users: we must find real users to avoid mistakes when we design the features
and take feedback early
5. Personal safety: when you feel save you can take “critique” نقد
6. Focus: there is a time for loud and quite
7. Agile technical environment: configuration management
XP Practices
1. Incremental planning: how we write stories and develop it to tasks and choose the priority.
2. Small releases: the special thing in XP it’s make a lot of releases
3. Simple design: make the current requirement and no more
4. Test-first development: make unit test first before write the code
5. Refactoring: from all developers are expected to refactor the code every time possible to keeps the
code simple and maintainable.
6. Pair programming: developers work in pairs.
7. Collective ownership: the pair of developers work on all area of code and it’s made responsibility for
all team and can change any thing
8. Continuous integration: every one shares the code and after complete the task it is integrated into
the whole system.
9. Sustainable pace وتتةيمستدامة: there is no overtime work.
10. on-site customer: one of xp team represent the customer and should be available full time.
XP release cycle
select taskي choose partner write unit test get latest code refactor integrate and run unit test
run customer tests release software obtain user feedback end project
Refactoring
Refactoring: Restructuring existing code without changing its functionality in any way
Refactoring improves software structure, readability and Code quality, makes code easier to
maintain, and can lead to better performance, and avoids natural deterioration in structure when
software is changed
You can refactor code with confidence if automated testing is used
Lecture #7
Unit testing
Unit Testing: is a software testing technique in which individual units or components of a software
application are tested in isolation from the rest of the system.
The purpose of unit testing is to verify that each unit of the software performs as we want and meets
the specified requirements.
Project Without tests: has a head start but quickly slows down to point
hard to make any progress
Project With tests: take some time at first because you will write test codes
for your functions or classes then write your functions but with that way
your progress will be much better because testing code will fix a lot of
problems as long as you are writing code and testing it always.
Project with bad tests: exhibits the properties of a project with good tests
at the beginning, but it eventually falls into the stagnation phase مرحلةيالركود
معتيانيالنسبةيمنخفضةيانيفيسطوريفيالكوديلمييتمياختبارها
Low percentage code coverage means that maybe we need more test cases
but high percentage isn't good indication that we have tested everything
Branch coverage
Ratio of number of code branches exercised by the test suite and the total number of
branches in the production code base
In code coverage we said that coverage is 100% because it is one line but actually this line
has two branches true and false so branch coverage is 50%