• Nenhum resultado encontrado

w01a01 - Introducao a Engenharia de Software (notes)

N/A
N/A
Protected

Academic year: 2021

Share "w01a01 - Introducao a Engenharia de Software (notes)"

Copied!
76
0
0

Texto

(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)

So.ware  Engineer  ranks  No.  1,  followed  by  Actuary,  Human  Resources  Manager,   Dental  Hygienist  and  Financial  Planner.  

(16)
(17)

SWE  clichés    

Decollage  =  takeoff;  350M  of  sa:elites;  save  memory  16  bit    

June  4,  1996  -­‐-­‐  Ariane  5  Flight  501.  Working  code  for  the  Ariane  4  rocket  is  reused  in   the  Ariane  5,  but  the  Ariane  5's  faster  engines  trigger  a  bug  in  an  arithmeOc  rouOne   inside  the  rocket's  flight  computer.  The  error  is  in  the  code  that  converts  a  64-­‐bit   floaOng-­‐point  number  to  a  16-­‐bit  signed  integer.  The  faster  engines  cause  the  64-­‐bit   numbers  to  be  larger  in  the  Ariane  5  than  in  the  Ariane  4,  triggering  an  overflow   condiOon  that  results  in  the  flight  computer  crashing.  

First  Flight  501's  backup  computer  crashes,  followed  0.05  seconds  later  by  a  crash  of   the  primary  computer.  As  a  result  of  these  crashed  computers,  the  rocket's  primary   processor  overpowers  the  rocket's  engines  and  causes  the  rocket  to  disintegrate  40   seconds  a.er  launch.  

From  wired  Magazine,  History's  Worst  SoNware  Bugs,  2005,  h:p://

www.wired.com/soNware/coolapps/news/2005/11/69355?currentPage=2    

French  for  “take  off” decollage,  applause    

That  is  what  a  SW  bug  looks  like    

(18)
(19)
(20)

Very  popular  topics    

Rent  like  using  doing  your  laundry  in  a  service    

(21)

May  change  SW  industry  by  end  of  decade,  switch  of  leaders  and  followers    

(22)

Is  laptop  backed  up?  Lose  my  cellphone?    

6  means  SW  changes  all  the  Ome  with  more  features    

ConOnuosly  being  asked  to  upgrade  my  so.ware  on  my  laptop    

(23)
(24)
(25)

VertLe.WhiteCheck1    

No  field  upgrade  when  improve  –  really  it’s  the  data    

Almost  one  Exabyte;  1M  TB    

(26)

VertLe.WhiteCheck1    

No  field  upgrade  when  improve  –  really  it’s  the  data    

Almost  one  Exabyte;  1M  TB    

(27)
(28)
(29)

Simply,  every  component  can  be  a  service.  We’ll  do  examples  of  what  is  and  what   isn’t.  

 

Combine  services  into  new  apps  –  tailored  service  is  easy   Easier  to  repair,  so  easy  to  replace  components  

 

In  constrast    

(30)

Blogger  at  Google  used  to  be  at  Amazon    

Internal  blog,  for  Google  rant   External  blog  

 

Mixed  them  up,  and  we  put  it  into  the  book  before  he  deleted  entry    

Amazon  for  all  its  weaknesses,  does  SOA   Google,  for  all  its  strengths,  doesn’t  get  SOA    

Started  as  silo’d  sw  in  1995,  then  7  years  later  switched  to  SOA  via  direcOve  from   Bezos,  CEO  and  founder  of  Amazon  

BS  in  CS  Princeton    

Blogger  claims  one  of  7  points  is  false;  we’ll  figure  out  which  at  end  

(31)

Why  should  Iisten  to  CEO?  What  does  he  know?  Don’t  you  read  Dilbert?  I’m  smarter   than  the  CEO.  What  should  I  follow  this  email?  

 

False  was  7.  Bezos  doesn’t  care  about  your  day.  He  got  them  with  “fired”    

5  points  is  one  of  best  dscripOons  of  SOA;  everything  must  use  API    

Facebook  too;  Facebook  placorm  3  years  later    

(Google  doesn’t  get  it)  

(32)

the  reviews  subsystem  can  get  user  profile  info  out  of  the  users  subsystem    

3  indabilidadedent  services  inside  the  silo    

(33)

Creates  another  app  –  group’s  favorite  books  app  from  standard  bookstore  just   another  combinaOon  

Even  though  all  inside  same  datacenter,  SW  wrigen  as  if  in  different  ones    

No  service  can  access  another  services  data  –  must  go  through  API  of  service    

Note  not  a  layered  model  of  so.ware,  but  a  network  connecOon  

(34)

each  invocaOon  of  a  service  involves  the  higher  cost  of  wading  through  the  deeper   so.ware  stack  of  a  network  interface,  so  there  is  a  performance  hit  to  SOA.  

 

Not:  SOA  does  not  affect  performance  (it  does)  

(35)

each  invocaOon  of  a  service  involves  the  higher  cost  of  wading  through  the  deeper   so.ware  stack  of  a  network  interface,  so  there  is  a  performance  hit  to  SOA.  

 

Not:  SOA  does  not  affect  performance  (it  does)  

(36)
(37)
(38)

 

Scalability  for  holidays  

Has  to  work  all  the  Ome  –  since  only  in  one  place    

(39)

Originally  mainframe  computers,  but  switched  to  clusters  at  Berkeley  (NOW)   Expensive,  how  to  scale,  sOll  failed  someOme  

 

Gold  plated  mainframe  sOll  fails,  so  more  copies  to  overcome  when  failures,  but  20X   cheaper  

 

VM  help  with  kill  program    

20x  cheaper  so  2  or  3  Omes  as  many  copies,  SW  handles  failure  

(40)

Services  got  popular,  so  had  to  keep  scaling  (100X)   House  –  build  own  customer  warehouse,  so  cheaper   Network  Bandwidth  

 

Consolidate  100  companies  into  one  datacenter,    

2006  Bezos  said  should  be  able  to  sell  –  AWS  ElasOc  CompuOng  2  (EC2)    

Original  argument  was  underuOlized  11  months  of  the  year  –  spare  cycles,  became  so   popular  

 

Today  its  reversed  –  Amazon  now  runs  on  Amazon  Web  Services    

(41)

No  premium  for  scale  is  striking  –  usually  much  more  expensive  to  scale    

(42)

17  opOons  –  vary  in  cost  75:1,  vary  in  performance  90:1,  vary  in  memory  size  150:1,   vary  in  storage  300:1  

 

Pay  per  hour    

2006  for  $0.10,  now  just  $0.06  

(43)

CC2  =  Cluster  Compute  Eight  Extra  Large    

Zygna  make  Farmville  using  AWS   Biggest  in  world;  too  big,  too  much  $    

Calling  dell,  take  6  months,     AWS  scale  with  demand    

(44)

Same  rate  as  lawyers  and  accountants    

$200  as  much  as  IBM  payed  for  Jeopardy  champion    

What  is  this  going  to  mean  down  the  road?    

Might  want  to  talk  this  over  wine  with  your  friends  majoring  in  law  or  accounOng    

Great  jobs  for  us;  what  about  future  of  rest  of  society;  ML  is  delivering  

(45)

Private  datacenters  cannot  match  cost  of  Warehouse  Scale  Computers  even    if  they   just  purchased  the  same  type  of  hardware,  since  they  don’t  get  the  economies  of   scale  at  1000  vs  100,000  in  purchasing,  housing,  operators

   

(46)

Private  datacenters  cannot  match  cost  of  Warehouse  Scale  Computers  even    if  they   just  purchased  the  same  type  of  hardware,  since  they  don’t  get  the  economies  of   scale  at  1000  vs  100,000  in  purchasing,  housing,  operators

   

(47)
(48)
(49)

60%  SW  maintenance     17%  fixing  bugs    

Failure:  Unexpectedly  short-­‐lived  code    

Example  in  book  of  program  used  for  50  years    

Yet  Legacy  SW  is  successful  SW    

If  connotaOon  of  anOquaited,  old-­‐fashioned    

What  is  contrast  to  legacy  code    

Easy  to  evolve;  evoluOon  to  

(50)

60%  SW  maintenance     17%  fixing  bugs    

Failure:  Unexpectedly  short-­‐lived  code    

Example  in  book  of  program  used  for  50  years    

Yet  Legacy  SW  is  successful  SW    

If  connotaOon  of  anOquaited,  old-­‐fashioned    

What  is  contrast  to  legacy  code    

Easy  to  evolve;  evoluOon  to  

(51)

Telebears  in  Cobol  /  legacy    

Amazon,  Google,  Microso.,  all  companies  –  chapter  and  programming  code  

(52)

 VertLe.WhiteCheck1    

Failure:  Unexpectedly  short-­‐lived  code    

Legacy  SW  is  successful  SW   People  make  a  lot  of  money      

Long  lasOng  but  beauOful    

(53)

 VertLe.WhiteCheck1    

Failure:  Unexpectedly  short-­‐lived  code    

Legacy  SW  is  successful  SW   People  make  a  lot  of  money      

Long  lasOng  but  beauOful  

(54)
(55)
(56)
(57)
(58)

2^64  combinaOon,  2^-­‐30  ns/sec  =  2^34  sec   32M  second  2^25  /  year  

2^9  years  =  500  years  

1  ns,/test  on  1  variable  =  500  years    

System  or  acceptance  test:  integrated  program  meets  its  specificaOons    

IntegraOon  test:  interfaces  between  units  have  consistent  assumpOons,   communicate  correctly  

 

Module  or  funcOonal  test:  across  individual  units    

Unit  test:  single  method  does  what  was  expected;  one  method  at  a  Ome    

Ariane  5  didn’t    

(59)

e.g.,  unit  tesOng  works  within  a  single  class  and  funcOonal  tesOng  works  across   classes  

 

System  or  acceptance  test:  integrated  program  meets  its  specificaOons    

IntegraOon  test:  interfaces  between  units  have  consistent  assumpOons,   communicate  correctly  

 

Module  or  funcOonal  test:  across  individual  units    

Unit  test:  single  method  does  what  was  expected    

(60)

e.g.,  unit  tesOng  works  within  a  single  class  and  funcOonal  tesOng  works  across   classes  

 

System  or  acceptance  test:  integrated  program  meets  its  specificaOons    

IntegraOon  test:  interfaces  between  units  have  consistent  assumpOons,   communicate  correctly  

 

Module  or  funcOonal  test:  across  individual  units    

Unit  test:  single  method  does  what  was  expected    

(61)

CondiOonal  variables    

Evolve  over  Ome;  run  every  night      

Modern  service  conOnuous  tests  as  evolve  it    

TDD  seems  unnatural  

(62)
(63)
(64)

Answer  of  what  is  wrong:  While  difficult  to  achieve,  100%  test  coverage  insures   design  reliability       64  

(65)

Answer  of  what  is  wrong:  While  difficult  to  achieve,  100%  test  coverage  insures   design  reliability       65  

(66)
(67)
(68)

a.should be ≥ 7

Bad syntax is hard to read! Legal Ruby code!  

(69)

a.should be ≥ 7

Bad syntax is hard to read! Legal Ruby code!  

   

(70)
(71)
(72)
(73)

HLL  –  raise  the  level  abstracOon,it  does  synthesis    

TRUE:  Metaprogramming  helps  producOvity  via  program  synthesis  

Χονχισε – 50 λινεσ οφ ϑαϖα; ηοω µανψ δοινγ σοµετηινγ, ϖσ. γιϖινγ ιντεντ οφ

ωηατ γοινγ το δο

(νοτ Περλ – τοο χονχισε το βε υνδερστανδαβλε)

(74)

HLL  –  raise  the  level  abstracOon,it  does  synthesis    

TRUE:  Metaprogramming  helps  producOvity  via  program  synthesis  

Χονχισε – 50 λινεσ οφ ϑαϖα; ηοω µανψ δοινγ σοµετηινγ, ϖσ. γιϖινγ ιντεντ οφ

ωηατ γοινγ το δο

(νοτ Περλ – τοο χονχισε το βε υνδερστανδαβλε)

(75)
(76)

Referências

Documentos relacionados

Na fase de implantação foram encontrados 61 impactos ambientais, causando alterações no meio físico (16 impactos), socioeconômico (33 impactos) e biótico (12

Já o Ministério do Turismo (2010), divulga não apenas as atribuições gerais que o guia deve cumprir, mas também as atribuições específicas de acordo com a

Considerando que as diretrizes ora fixadas são de seguimento obrigatório para todos que lidam com a gestão dos ativos da FUNSSEST, a Entidade encaminhará este documento a todos os

RESUMO: O presente trabalho visa analisar a expansão do solo urbano no município de São Sebastião de Lagoa de Roça, bem como refletir sobre a importância das ações que o

Inicialmente, nos Gráficos 40 e 41, são apresentados os valores de duração relativa para a média de produção da vogal /e/ e /o/, tanto para os contextos

subdoses de fomesafen no solo promoveram interferências na estatura das plantas, no acúmulo de matéria seca na parte aérea e das raízes, assim como elevados

6º - Os Diretores Esportivos serão 02 (dois) alunos por equipe, que atuarão como representantes legais junto à Comissão Geral e Técnica dos Jogos Estudantis UP..

Realizei ainda uma comparação entre os jogadores mais utilizados da equipa em relação ao número de passes certos e errados, recuperações e perdas de bola e remates à baliza e fora,