Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Licena do material
Este Trabalho foi licenciado com uma Licena
Creative Commons - Atribuio-NoComercial-CompartilhaIgual 3.0
No Adaptada.
Mais informaes visite:
http://creativecommons.org/licenses/by-nc-sa/3.0/deed.pt
2
Download
Apresentao com anotaes
http://bit.ly/ess-enacomp-2015
3
ASSERT [Advanced System and Software Engineering Research Technologies] Lab :: http://assertlab.com
Netweaver
Chief Scientist Officer (CSO)
http://amzn.to/ILF8kY
Sobre o CIn-UFPE
2011
1 IES
FINEP
DE INOVAO
A GANHAR O PRMIO
PS-GRADUAO
Nvel 6 na CAPES
Defesa da centsima tese de Doutorado em 2006
Defesa da milsima dissertao de mestrado em 2011
Profissional em 2012
Warm up!
60% of SW total cost over lifecycle is maintenance. We'll have more to say about this later. but ironic that students/courses focus more on "greenfield" SW despite the
fact your first project probably won't be, and that more $$ is spent on keeping software useful!
Software Engineer ranks No. 1, followed by Actuary, Human Resources Manager, Dental Hygienist and Financial Planner.
Engenharia de Software
Sistemas no-triviais
10
- top sites aim for "four nines" availability. healthcare.gov started as "one four" and is now up to "one nine"
11
Alvos do software
Novas verses precisam passar por um ciclo de release extensivo para garantir a
compatibilidade
Uma alternativa onde o desenvolva-se o SW que necessita rodar em apenas uma
plataforma de HW&SO?
Ciclo de releases rpido, sem atualizaes dos usurios?
13
14
16
Arquitetura de Software
Voc pode/consegue projetar um
software de forma que seja possvel
recombinar mdulos independentes
para ofertar diferentes apps sem
muito esforo de programao?
18
19
Simply, every component can be a service. Well do examples of what is and what isnt.
In constrast
External blog
Mixed them up, and we put it into the book before he deleted entry
Started as silod sw in 1995, then 7 years later switched to SOA via directive from Bezos, CEO and founder of Amazon
BS in CS Princeton
Blogger claims one of 7 points is false; well figure out which at end
Why should Iisten to CEO? What does he know? Dont you read Dilbert? Im smarter than the CEO. What should I follow this
email?
False was 7. Bezos doesnt care about your day. He got them with fired
Bookstore: Silo
22
the reviews subsystem can get user profile info out of the users subsystem
Bookstore: SOA
23
Creates another app groups favorite books app from standard bookstore just another combination
No service can access another services data must go through API of service
Computao em Nuvem
Cloud Computing
24
25
Infraestrutura SaaS?
26
Servios em Clusters
27
Gold plated mainframe still fails, so more copies to overcome when failures, but 20X cheaper
28
Network Bandwidth
2006 Bezos said should be able to sell AWS Elastic Computing 2 (EC2)
Original argument was underutilized 11 months of the year spare cycles, became so popular
29
m1.small
m1.medium
m1.large
m1.xlarge
m3.xlarge
m3.2xlarge
c1.medium
c1.xlarge
cc2.8xlarge
m2.xlarge
m2.2xlarge
m2.4xlarge
cr1.8xlarge
hi1.4xlarge
hs1.8xlarge
t1.micro
cg1.4xlarge
$0.06
$0.12
$0.24
$0.48
$0.50
$1.00
$0.15
$0.58
$2.40
$0.41
$0.82
$1.64
$3.50
$3.10
$4.60
$0.02
$2.10
1.0
2.0
4.0
8.0
8.3
16.7
2.5
9.7
40.0
6.8
13.7
27.3
58.3
51.7
76.7
0.3
35.0
Virtual
Cores
1
1
2
4
4
8
2
8
32
2
4
8
32
16
16
1
16
Compute
Units
1.0
2.0
4.0
8.0
13.0
26.0
5.0
20.0
88.0
6.5
13.0
26.0
88.0
35.0
35.0
varies
33.5
Memory
(GiB)
Storage (GB)
1.7
1 x 160
3.8
1 x 410
7.5
2 x 420
15.0
4 x 420
15.0
EBS
30.0
EBS
1.7
1 x 350
7.0
4 x 420
60.5
4 x 840
17.1
1 x 420
34.2
1 x 850
68.4
2 x 840
244.0 2 x 120 SSD
60.5 2 x 1024 SSD
117.0
24 x 2048
0.6
EBS
22.5
2 x 840
30
17 options vary in cost 75:1, vary in performance 90:1, vary in memory size 150:1, vary in storage 300:1
Computao Utilitria
31
Campeo do Jeopardy
Hardware: 90 IBM Power 750 servers
3.5 GHz 8 cores/server
90 @~$2.40/hour = ~$200/hour
Custo de um advogado ou contador...
Para quais tarefas uma mquina com IA seria to boa quanto uma pessoa
muito bem treinada @ $200/hora?
O que isso pode significar para a sociedade?
32
Might want to talk this over wine with your friends majoring in law or accounting
Great jobs for us; what about future of rest of society; ML is delivering
34
Engenharia de Software
35
36
Lots of planning,
37
(Figure 1.5, Engineering Long Lasting Software by Armando Fox and David Patterson, 2nd Beta edition, 2013.)
38
39
Tamanho do Time de DP
Adding manpower to a late software project makes it later.
Fred Brooks, Jr., The Mythical Man-Month
40
Agile
Development processes
41
Processo Alternativo?
42
!"#$%&'()&"*'+,-(./"0'-(12234((
!"#$
'($)*+,$-($
./01+2$
%"#$
342+,$-5+6$./01+2$
%&#$
7+6*8(42+0$-6$
4.4(0-(+0$
&"#$
'($)*+,$-($
./01+2$
34#$562+,$-7+8$
./01+2$
96:-8$0+;6<=$-8$
2+8*>(62+0$
!"#$%&'()&"*'+,-(./%01"&(23334((
!"#$
'($)*+,$-($
./01+2$
%&#$
342+,$-5+6$./01+2,$
-6$2+6*7(42+0$
Figure 1.6: The first study of software projects found that 53% of projects exceeding their budgets by a factor of 2.9 and
overshot their schedule by a factor of 3.2 and another 31% of software projects were cancelled before completion (Johnson
1995). The an estimated annual cost in the United States for such software projects was $100B. The second survey of 250
large projects, each with the equivalent of more than a million lines of C code, found similarly disappointing results (Jones
2004). The final survey of members of the British Computer Society found that only 130 of 1027 projects met their schedule
and budget. Half of all projects were maintenance or data conversion projects and half new development project, but the
successful projects divided into 127 of the former and just 3 of the latter (Taylor 2000).
Peress Law
If a problem has no solution, it may not be a problem, but a fact, not to
be solved, but to be coped with over time.
Shimon Peres
45
46
Agile lifecycle
47
Aceito em 2003
Estudo de 2012 com 66 projetos confirmaram que a maioria
usava Metodologias geis, mesmo com times distribudos
48
It Takes a Team
Size & Scrum
49
50
Early in my career knew superhero programmers go away for weekend and build amazing breakthrough
Ken Thompson, co-inventor of UNIX, won Turing Award, was a Berkeley student
Bill Joy, led BSD UNIX, which was first open source project, hero programmer wrote vi over long weekend
No longer individuals building amazing things Linus Torvald leads open source around Linux, but not done by himself
What does team need to win (do you need to do more than your part)
51
52
53
Scrum penalty
Standup Meeting
54
Go around in a circle
By understanding what each team member was doing, the team can identify work that would help others make more rapid
progress
Papis do Scrum
55
Papis do Scrum
56
Team member, not the scrum master, represents customer at daily scrums
Resolvendo conflitos
57
Cada lado articula argumentos do outro, mesmo que no concorde com eles
Evita confuses sobre termos ou suposies, que pode ser a verdadeira
causa do conflito
Resolvendo conflitos
58
Programao em Pares
Pair Programming
59
60
Programao em Pares
61
Programao em Pares
62
We know that MultiTasking is distracting, so these are real workstations with no facebook, email, twitter,
Productivity improves
Programao em Pares
63
Have to Alternatve
64
promiscuous pairing
65
(ESaaS 9.5)
Alm da Corretude
67
CUPA (do ingls SOFA) captura sintomas que muitas vezes indicam o
"cheiro" cdigo:
Curto (Short)?
68
Code spend several lectures on them, but just give an idea now
Methods that dont follow this advice will often give o several of the smells
Short depends on language (More than 1 screenful for old monitors) try to do one thing, and quickly grasp
69
Concentrate on Abstraction since correlated and Most rapidly makes your code start to make ugly, correleates well with
other smells
Divide and Conquer: Dont have one method that does everything. Divide into understandable pieces, and have methods
call others
Symptom 1 line of code says what to do, many lines of code around it saying how to do it
70
time_setterTimeSetter#self.convert calls
(y + 1) twice (Duplication)
.rb -- 5 warnings:
1. TimeSetter#self.convert calls
(y + 1) twice (Duplication)
2. TimeSetter#self.convert has approx 6
statements (LongMethod)
3. TimeSetter#self.convert has the parameter
name 'd' (UncommunicativeName)
4. TimeSetter#self.convert has the variable
name 'd' (UncommunicativeName)
5. TimeSetter#self.convert has the variable
name 'y' (UncommunicativeName)
71
A little Ruby goes a long way; if stare at a long time and cant figure it out, its too long
Uncommunicative variables
72
Branching terms are :and, :case, :else, :if, :or, :rescue, :until, :when, :while.
def mymeth
while(...)
....
end
if (...)
do_something
end
end
73
a graphical measurement of the number of possible paths through the normal flow of a program
Connected components
Quantitativo: Mtricas
Metric
Tool
Target score
Code-to-test ratio
rake stats
1:2
C0 (statement) coverage
SimpleCov
90%+
Assignment-BranchCondition score
flog
Cyclomatic complexity
saikuro
rake
metrics:all
Considere as mtricas com um gro de sal
Como cobertura, melhor para identificar onde h oportunidade de melhoria
74
ABC contou 23
(>20 ento um
problema))
Complexidade do cdigo
4 ( 10 ento no um
problema)
private
def self.leap_year?(year)
year % 400 == 0 ||
(year % 4 == 0 && year % 100 != 0)
end
end
Reek: No Warnings
Flog (ABC):
TimeSetter.convert = 11
TimeSetter.leap_year? = 9
* Do think about what's not obvious (low level and high level):
* Design issues that went through your mind while you were
* Abstractions:
Bad Comments
// Add one to i.
i++;
// Lock to protect against concurrent access.
SpinLock mutex;
// This function swaps the panels.
void swap_panels(Panel* p1, Panel* p2) {...}
78
* Not useful
* Out of date
Comments (cont)
79
* The biggest problem is that most people don't know how to write comments.
There are many other facets of writing good documentation, but this one rule will get you most of the way.
Next Chapter
81
82
83
User Stories
84
Ideia: histrias de usurio podem ser formuladas como testes de aceitao antes que o cdigo seja escrito
85
86
Product Backlog
87
88
Spike
Investigao corriqueira em uma tcnica ou problema
e.g. spike on recommendation algorithms
Aps a spike concluda, o cdigo deve ser descartado
"Agora que sei o que utilizar, vou fazer certo!"
Produtividade e Ferramentas
90
Medindo Produtividade
91
See what you actually accomplish in points per week vs. what you guess as optimistic programmers
Teams learns to get estimate diculty of user story (gave a story 1 point but took 2 weeks; why was it hard? Learn from
mistakes)
92
How decide points rock, paper, scissors everyone says how many points a story is, and see if agree
Group says average and record so can see how well you did - rather
93
Every time there is a SW concept, some builds a tool to implement idea to make it easy to do
Pivotal Tracker
94
Bookkeeping for user stories, as long as doing that, might as well calculate velocity
Upper right corner is team velocity (10)
Current
Done
Pivotal will move things from backlog to current automatically and assign people to the tasks
Pivotal Tracker
95
Epic: give software engineers the big picture of where the application is in the development process with regard to big
feature
Rastreie papis
96
97
Features
Histrias de usurios que fornecem valor de negcio verificvel para o cliente
"Adicionar checkbox de concordo pgina"
Pontos valiosos e, portanto, deve ser estimado
Chores
HU que so necessrias, mas no fornecem nenhum valor bvio diretamente ao
cliente
"Descubra porque a sute de testes to lenta"
No h pontos
98
100
SMART HU
101
Specific
Measurable
102
Achievable
103
Completar em 1 iterao
Se no puder entregar recurso na 1 iterao, entregar
subconjunto de histrias
Sempre apontar para o cdigo de trabalho @ final de iterao
Se <1 histria por iterao, precisamos melhorar estimativa
pontual por histria
104
1.
2.
3.
4.
5.
105
Why add the Facebook feature? As box oce manager, I think more people will go with friends and enjoy the show more.
Why does it matter if they enjoy the show more? I think we will sell more tickets.
Why do you want to sell more tickets? Because then the theater makes more money.
Why does theater want to make more money? We want to make more money so that we dont go out of business.
Why does it matter that theater is in business next year? If not, I have no job.
Timeboxed
107
109
Projeto de UI em SaaS
110
Exemplo de Lo-Fi UI
111
Storyboards
112
113
114
116
Modelo da Ustore
117
119
Obrigado
Prof. Vinicius Cardoso Garcia
vcg@cin.ufpe.br :: @vinicius3w :: assertlab.com
120