Posts

Showing posts from March 11, 2019

Gessopalena

Image
Gessopalena Staat Italien Region Abruzzen Provinz Chieti (CH) Koordinaten 42° 3′  N , 14° 16′  O 42.05 14.266666666667 654 Koordinaten: 42° 3′ 0″  N , 14° 16′ 0″  O Höhe 654  m s.l.m. Fläche 31,42 km² Einwohner 1.360 (31. Dez. 2017) [1] Bevölkerungsdichte 43 Einw./km² Postleitzahl 66010 Vorwahl 0872 ISTAT-Nummer 069040 Volksbezeichnung Gessani Website Gessopalena Gessopalena Gessopalena ist eine italienische Gemeinde ( comune ) mit 1360 Einwohnern (Stand 31. Dezember 2017) in der Provinz Chieti in den Abruzzen. Die Gemeinde liegt etwa 33,5 Kilometer südsüdöstlich von Chieti und gehört zur Comunità Montana Aventino-Medio Sangro . Gemeindepartnerschaften | Gessopalena unterhält zwei inneritalienische Partnerschaften mit den Gemeinden Porto San Giorgio in der Provinz Fermo und Cupramontana in der Provinz Ancona sowie eine weitere mit der belgischen Gemeinde Sambrev

Does “variables should live in the smallest scope as possible” include the case “variables should not...

Image
1 According to https://softwareengineering.stackexchange.com/a/388055/248528, variables should live in the smallest scope as possible, simplify the problem into my interpretation, it means we should refactor this kind of code: public class Main{ private A a; private B b; public ABResult getResult(){ getA(); getB(); return ABFactory.mix(a,b); } private getA(){ a=SomeFactory.getA(); } private getB(){ b=SomeFactory.getB(); } } into something like this: public class Main{ public ABResult getResult(){ A a=getA(); B b=getB(); return ABFactory.mix(a,b); } private getA(){ a=SomeFactory.getA(); } private getB(){ b=SomeFactory.getB(); } } but according to the