[Title will be auto-generated]

Page 1

No. 14 • August 2013 • www.todaysoftmag.ro • www.todaysoftmag.com

TSM

T O D A Y S O F T WA R E MAG A Z I NE ce i t c a te pr

ra e b i l : de

a How

rns a e l an m s t f cra e r a ? softw ance

what – F P

W

ion duct

tro

in Brief

rform

t pe abou into

world P A the S

Haskell (IV) IEEE Congress on Evolutionary Computation, 2013, Cancun Migrating MVC 3 website DB to Azure(III The Cluj IT History (VII): Ford and Șincai Startup Transilvania

Project Manager and Business Analyst – a duo that can make the difference in Romanian outsourcing ITC Spring 2013 (II) Load Test using Windows Azure Team building (II) Romanian Testing Community 2013 conference



6 ICT SPRING EUROPE 2013 (II) Ovidiu Mățan

9 The Cluj IT History (VII): Ford and Șincai Marius Mornea

10 Romanian Testing Community 2013 conference Marius Mornea

27 Team building (II) Andreea Pârvu

29 Project Manager and Business Analyst Adrian Cighi

31 Book review: Android Apps with Eclipse by Onur Cinar Silviu Dumitrescu

11 Startup Transilvania

33 Load Test using Windows Azure

Cristian Dascălu

Radu Vunvulea

12 The Romanian Startup Awards Finalists Bogdan Iordache

15 Applications for financial forecasting at the IEEE Congress on Evolutionary Computation, 2013, Cancun Silvia Răușanu

18 How a software craftsman learns: deliberate practice

36 Functional Programming in Haskell Mihai Maruseac

38 Migrating MVC 3 website DB to Azure(III) Dragoș Andronic

41 MVVM design pattern

Alexandru Bolboaca and Adrian Bolboacă

Andrei Moldovan

21 Brief introduction into the SAP world

43 Complicated or complex

Victor Ionescu

Simona Bonghez

24 WPF – what about performance? Daniel Lăcătuș


editorial

H

Ovidiu Măţan, PMP

ovidiu.matan@todaysoftmag.com Editor-in-chief @ Today Software Magazine

oliday time has begun. Some of us have been lucky and already had our vacation, so we can enthusiastically restart our work at the office. We come back to our projects and most certainly you’ve got an idea about a new product that could make our lives easier, such as a small solar pump to blow up children’s life belts or little boats. I recommend you not to abandon these ideas and seriously think about how they could materialize. It sometimes happens that we have a very good idea of a product that we see successfully implemented in a few years, unfortunately, by someone else. There’s a paradox in the fact that in Romania we have a high degree of ingenuity, we are good in projects execution, thing demonstrated by the entire outsourcing oriented IT industry, but at the same time we have a relatively small number of startups, their success being long in coming. I suppose in time all these will change and the new comers’ chance of success is much bigger now compared to the conditions of the beginning of 2000. Trip Hawkins said, during the ICT Spring Europe 2013, that innovation goes before branding. Nowadays, the highest impact industry is that of mobiles and within it, the games together with the social media occupy the largest area on the users’ devices. Moreover, if we take a look at the percentage of indie games versus those produced by the big companies, they dominated in the first part of 2012 by 68% for the ios and android platforms. If I were to begin a startup today, I would also consider creating a game. There are examples of autochthonous success on the local market and their support for the new comers should not be a problem. We remain in the indie area and the biggest crowdsourcing financing platform, available also from Romania, is IndieGoGo.com. It is the best way to validate the fact that your product will have a global impact and to obtain financing. Bigger and bigger projects find financing this way and a recent example is Ubuntu Edge, a project that has as an objective the creation of the first high-end telephone by those of Ubuntu. Their target of obtaining 32,000,000$ in a month will represent a real success regarding the crowdsourcing financing. We cannot talk about crowdsourcing without also mentioning two local platforms: multifinantare.ro and crestemidei.ro, which represent a good alternative when we talk about national impact projects. In the present TSM issue, you can read a series of technical articles, among which I mention a few titles: WPF- what about performance? , Design pattern MVVM. Also, the series begun in the former issues continue with Functional Programming in Haskell, Migrating MVC3 website DB in Azure. A novelty is the presence of two articles, The Challenges of a Business Analyst in Agile and Project Manager and Business Analyst which focus on the business analyst’s role within the team and their interaction. Load Test using Windows Azure proposes an easy manner to carry out a load test or stress test. SAP represents a domain of interest and we are pleased to publish a first article of introduction to SAP. Finally, Gogu teaches us the difference between complicated and complex. Enjoy your reading !

Ovidiu Măţan

4

Editor-in-chief @Today Software Magazine no.14/August,2013 www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE Editorial Staf Editor-in-chief: Ovidiu Mățan ovidiu.matan@todaysoftmag.com Editor (startups & interviews): Marius Mornea marius.mornea@todaysoftmag.com

Authors list Alexandru Bolboaca

Adrian Cighi

Agile Coach and Trainer, with a focus on technical practices @Mozaic Works

Project Manager @ Yonder

alex.bolboaca@mozaicworks.com

adrian.cighi@tss-yonder.com

Daniel Lăcătuș

Graphic designer: Dan Hădărău dan.hadarau@todaysoftmag.com Copyright/Proofreader: Emilia Toma emilia.toma@todaysoftmag.com Translator: Roxana Micu roxana.elena@todaysoftmag.com Reviewer: Tavi Bolog tavi.bolog@todaysoftmag.com Reviewer: Adrian Lupei adrian.lupei@todaysoftmag.com Made by

Today Software Solutions SRL str. Plopilor, nr. 75/77 Cluj-Napoca, Cluj, Romania contact@todaysoftmag.com www.todaysoftmag.com www.facebook.com/todaysoftmag twitter.com/todaysoftmag ISSN 2285 – 3502 ISSN-L 2284 – 8207

Daniel.Lacatus@accesa.eu Senior Software Developer @ Accesa

Silviu Dumitrescu silviu.dumitrescu@msg-systems. com Java consultant @ msg systems Romania

Mihai Maruseac

mihai.maruseac@gmail.com IxNovation @ IXIA member of ROSEdu, ARIA

Radu Vunvulea

Radu.Vunvulea@iquestgroup.com Senior Software Engineer @iQuest

Silvia Răuanu

Adrian Bolboaca

Software Developer @ ISDC

Programmer. Organizational and Technical Trainer and Coach @Mozaic Works

Bogdan Iordache bogdan.iordache@howtoweb.co

Victor Ionescu

Cofounder @ How to Web

SAP IT Consultant @ msg systems Romania

Silvia.Rausanu@isdc.eu

adrian.bolboaca@mozaicworks.com

victor.ionescu@msg-systems.com

Monica Petraru

Andrei Moldovan

Senior Business Analyst @ UNIQA Raiffeisen Software Service

Software Developer @ Business Logic Systems Ltd.

Simona Bonghez, Ph.D.

Andreea Pârvu

Speaker, trainer and consultant in oroject management,

Recruiter at cadrul Endava

monica.petraru@urss.ro

simona.bonghez@confucius.ro

andrei.moldovan@businesslogic.co.uk

andreea.parvu@endava.com

Owner of Confucius Consulting

Dragoș Andronic Cristian Dascălu

cristian@clujhub.ro Cofounder @ Cluj Hub

Copyright Today Software Magazine

CTO @ TXTFeedback

Marius Mornea Ovidiu Măţan, PMP

Any reproduction or total or partial reproduction of these trademarks or logos, alone or integrated with other elements without the express permission of the publisher is prohibited and engage the responsibility of the user as defined by Intellectual Property Code

dragos@txtfeedback.net

ovidiu.matan@todaysoftmag.com Editor-in-chief @ Today Software Magazine

marius.mornea@todaysoftmag.com Engineer intrested and involved in different IT activities, from development to, management, education to journalism as part of Epistemio, UTCN and TSM

www.todaysoftmag.ro www.todaysoftmag.com

www.todaysoftmag.com | no. 14/August, 2013

5


events

ICT SPRING EUROPE 2013 (II)

I

n this article we continue to give the account of ICT Spring Europe, which I had the pleasure to take part in, together with my colleague Marius Mornea. It was the first TSM delegation abroad and we had the opportunity to connect to the pulse of the European IT world. The future looks good and it wouldn’t surprise me to assist to a redefinition of the old continent’s importance in the development of tomorrow’s applications.

The second day of the event started with the presentation of Jimmy Wales, the founder of Wikipedia, whose theme was Democracy and Internet. What sticks to our mind is the invitation to an imagination exercise which synthesizes Wikipedia’s philosophy: “Imagine a world where everyone has free access to all the knowledge of humankind”. A funny thing told by Wikipedia’s founder refers to China, where names of meal courses containing the word Wikipedia began to appear. Initially, no one knew how they appeared, but it turned out that, when searching certain words on Google, the result often started with Wikipedia. This happened before the Beijing Olympics, when all restaurants translated their menus in English. So, if one searched the name of a mushroom in English, the result of the search would start with: Wikipedia. An interesting aspect mentioned by the founder of Wikipedia is related to the differences noticed between countries of communities in relation to the type or amount of accessed information.

Thus, we generally notice the same kinds of articles and statistics related to the access to them. However, there are differences in their popularity, such as pop culture in Japan or the fact that the Germans are the most curious in relation to geography!!! Coming back to statistics, Wikipedia has until now 490.000.000 unique visitors and according to their estimations, they will reach 500.000.000 before the end of the year. Who writes in Wikipedia? 87% are men, since Wikipedia is rather technique. They are trying to improve the interface for editing articles so that it would be much easier to write an article. There are many PhD candidates/ post-graduates among those who write articles. The funds for Wikipedia come from the Wikimedia foundation, the majority of the received amount coming from the wide public. How does Wikipedia work? • Wikipedia is an encyclopedia. • NPDV – Wikipedia does not judge decisions. • Free licensing – observing copyright. All content has been generated by Wikipedia’s collaborators. • IAR – no firm rules. Things are not done just because there is a rule. Jimmy Wales went on to present a few real cases regarding the usage of internet in countries having a lower living standard. For example in Nigeria, even though it is an African country where internet access was low and the allotted broadband was very small in 2002, this drawback was eliminated and now the top of the most used sites is similar to that from other continents: Google, Facebook, Twitter, Wikipedia, local papers. This entire process is much faster than a lot of people would have imagined.

6

no. 14/August, 2013 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE If we think about what the world would be like 20 years from now, we notice the high connectivity to the Internet for thousands of millions of people who will not speak English, nor French. The next subject discussed was the Wikia project. The aim of this project is to help everybody create a personal library. Users can create their own libraries, not necessarily academic ones. Some examples were given, among which the series Lost or Lostpedia, another series which producers used to open a communication channel with their fans. Basically, anyone can create their own wiki. I suggest you access this site, which is not very well known. I found many interesting projects such as Logopedia, an encyclopedia which contains 24.434 company logos.

whales and those who play social games: dolphins. According to Trip Hawkins, we witness a transformation of the whales into dolphins. The performance of the games has been replaced by the convenience of running them on tablets or phones. Furthermore, the dexterity necessary to the games came in second when competing with buying some virtual goods. These can be exchanged between the players and their evolution can turn them into real benefits. What do we actually buy? We buy time, as the items received in exchange help us move on faster to the next level. An interesting point made in this presentation focuses on education. Changes of the manner in which children learn in classroom are anticipated. Tomorrow’s children will be dependent on the mobile devices and the teaching manner will have to change by using games more extensively in classrooms. Coming back to the disruptive part, an illuminating comparison was made regarding the distribution of the games. If 10 years ago, the manner in which a game could reach its final user, in as many geographic areas as possible, was extremely important, nowadays all these have disappeared, being replaced by virtual shops such as Apple Store. Discovering the games will prevail over distribution and originality will prevail over brand. According to Trip Hawkins’ presentation, few people anticipate these aspects. The advantages against the competition can be created in time, by taking into consideration: • IP (Intellectual Property) originality, • Innovation culture, • Using the advantage offered by frameworks such as: NativeX, Trip Hawkins , another speaker who attracted attention, is a Unity, Extreme Reality 3D. leader in the game industry Hall of Fame. Founder of Electronic Arts, he played an important role in defining PC industry at a An attempt to summarize the entire “Digital Disruption du global level. He is also co-founder of You Can company, which Jour” presentation can be represented by the following ideas: produces educational games and offers assistance for games to IT 1. We are living in an era of convenience. companies such as Kixeye, NativeX or Extreme Reality 3D. He has 2. The target must be the dolphins – players of the games intespent his entire career as a pioneer of the PC industry, initially grated in the social media. next to the founders of Apple, when his company had no more 3. Today’s applications will run in browsers tomorrow. than 25 employees. 4. Very good learning of managing virtual goods. The presentation within ICT Spring was called “Digital Disruption du Jour” and it looked into the cannibalization of the The next panel was Gamification now: how Games are impacPC games market by the social networking and the mobile devices, ting the global Social and Business landscapes, which had the anticipating its possible evolution. Employing an original termi- following guests: nology, the irreclaimable gamers who play on consoles were called Trip Hawkins - Founder of Electronic Arts - CEO, Our core competencies include:

Product Strategy

Product Development

Product Support

3Pillar Global, a product development partner creating software that accelerates speed to market in a content rich world, increasingly connected world. Our offerings are business focused, they drive real, tangible value.

www.3pillarglobal.com

www.todaysoftmag.com | no. 14/August, 2013

7


events ICT SPRING EUROPE 2013 (II) Digital Chocolate David Gardner - Co-founder & General Partner, London Venture Partners Raphael Goumot - Founder, CREAgile (moderator) Boris Pfeiffer - Managing Director, Kabam Europe Volker Hirsch - Global Head of Business Development – Games, BlackBerry Here are the main ideas posted on our Twitter account (@ todaysoftmag) during the panel: • Angry Birds has had a bigger success than Mickey Mouse; • Japan is the place to learn, since they are pioneers in many domains; • Games mean stimulation and we are not vegetables; the improvement of brain activity can be done through games; • The concept of gamification is natural and it has always been part of our life; • The future of games are those which last for 30 seconds, maybe 1 minute, even in the case of the complex ones; • In conclusion, games must be fun, if they are not, they will miss the gamification aspect. Positive characters always win.

Here we put an end to the account of the event. Soon we will also publish a short film made during this. We thank the organizers once again, Celine TARRAUBE and Kamel AMROUNE, for inviting us to the event and giving us the opportunity to distribute the TSM magazine within it.

Ovidiu Măţan, PMP

ovidiu.matan@todaysoftmag.com Editor-in-chief Today Software Magazine

8

no. 14/August, 2013 | www.todaysoftmag.com


history

TODAY SOFTWARE MAGAZINE

The Cluj IT History (VII): Ford and Șincai

I

have chosen two historical figures, in an attempt to offer a solution to one of the current challenges with Cluj IT: the big gap between the high demand and low offering of human resources.

Starting with Henry Ford, the man responsible for the invention of the assembly line, but also a few revolutionary HR policies for their time. Like any business owner, he first tried to boost productivity by improving the manufacturing process. In a relatively new industry (Ford started his company in 1906, 17 years after Karl Benz patented his engine), through the invention of the mobile assembly line and the concept of mass production, Ford optimized the manufacturing time of one automobile from 12 and a half hour to just one hour and 33 minutes. Even though these innovations resulted in an increased yearly production capacity from 18.000 to over one million in just ten years, they came with a huge penalty on employee job satisfaction leading to record turnover rates. The relationship with his employees was strained further by the increasing automation that decreased the demand for workers. The constant increase in turnover, raised the hiring and training costs, introduced delays and soon depleted the workforce market. The solution was simple, in 1914, Ford doubled the wages from 2.5$ to 5$ a day, reduced the working day to 8 hours, from 9, and introduced the concept of profit-sharing, that allowed employees to buy their own car in 4 months of work. Meanwhile he radically changed the hiring policies, focusing on talent acquisition, which he had no trouble attracting with the newly increased salaries. In a short time he had the best mechanics working for him. Even though the international public opinion, ranging from unions to European aristocracy, were shocked by this new approach, coining the term “Fordism” to describe the mass production strategy fueled by consumerism and wages way above industry average, the strategy paid off, turnover decreased, productivity reached record highs, and the manufacturing costs reached

such low levels that it turned the car into a commodity that rendered own employees into an important market segment. Soon Ford was responsible for 50% of the USA automobile production, 40% in UK and out of the initial 200 competitors, only 17 survived Fords aggressive HR strategy. This success model, based on optimizing efficiency and increasing loyalty through a generous compensation package, was held responsible for the emergence of a new American social class and for turning the auto industry from niche to commodity. However, the long term effects was the mass bankruptcy off all that failed to adopt the model and an ever increasing wealth gap between social layers, proving that the infusion of capital in the workforce works very well in the short term, but has limited efficiency in the long term. This is something we’ve also noticed in our local IT environment. Gheorghe Șincai has chosen a different approach. One of the main figures of the Transylvanian School (Scolii Ardelene), was confronted with the recognition of Romanian people rights in Transylvania in the last decades of the 18th century. He was responsible for the cultural national emancipation and the establishment of the Romanian education system in Transylvania. In 1791 the Romanian bourgeoisie from Transylvania tried to capitalize on the last decade, in which they gained access to education, both high (Rome and Vienna), but also the establishment of local schools, mainly due to politics (see Ioan Bob and Inocentiu Micu-Klein’s efforts of trading their religious affiliation to Rome for people’s rights) or rebellions (see Horea, Cloșca and Crișan), and to obtain equal political rights with the other three ethnicities of Transylvania through the Supplex Libellus Valachorum petition. Quoting Wikipedia: „ isolated through the denial of their petition, to weak

economically and politically to initiate a rebellion, the Romanian bourgeoisie concentrated on a cultural national emancipation movement. Many schools are being established (over 300 by Gheorghe Șincai), calendars, manuals, science books, and books intended to spread information to the masses are being printed.” Thus, Șincai has chosen emancipation through mass education. He took something only afforded by the higher classes and formalized it into a mass accessible commodity through the creation of fundamental textbooks as: The Book of ABCs (Abecedarul), Grammar (Gramatica), Arithmetic (Aritmetica) and The Catechism (Catehismul). This Enlightenment influenced move will have a crucial effect in the building of a critical mass of Romanian intellectuals required for the National awakening of Romania through the 1848 Wallachian Revolution and the road ahead towards the independence of the Romanian people of Transylvania. I prefer this approach, due to its long term positive effects over a large part of the population and I can’t stop admiring a handful of people who succeeded, despite the harshest conditions, in establishing over 300 schools and educating an entire nation. Cluj IT has both the resources and infinitely better conditions to involve itself in a change of quality in the public education sector, which could solve its HR problem in the long run.

Marius Mornea

marius.mornea@todaysoftmag.com Engineer intrested and involved in different IT activities, from development to, management, education to journalism as part of Epistemio, UTCN and TSM

www.todaysoftmag.com | no. 14/August, 2013

9


events

Romanian Testing Community 2013 conference

T

he annual conference organized by RTC (Romanian Testing Community) has grown, since the previous edition, in what matters most: content. From three to ten speakers, from one day with three sessions to two days, the first with two parallel four session tracks, and the second dedicated to two workshops held by Paul Gerrard and Andy Harding. This year the same number of participants have received five times more content. But the exchange on information was not limited to the scheduled talks. The strong point of the conference was the warm atmosphere and the speakers’ interactivity. Each break was filled with open discussions, most of them evolving in long private sessions that stretched to the next break. The most eloquent example is Scott Barber, who joined the conference by sheer coincidence (he was in the area, with a 2-3 days break between contracts and reached out to local communities volunteering to help out), but would constantly offer feedback, both during the talks, but also after, and not just to the attendees, more often to the speakers themselves. He confessed to being actually happy about the choice to join in since the general feeling and the active interest of the attendees, places Cluj IT community and conferences in his top personal favorites, outclassing the big international conferences overcrowded with marketing and vendors. We took advantage of this open attitude and asked a few questions for our readers: 1. Name top three must attend international conferences. 2. Name your top three sources of information for QA. 3. Name top three tools in your daily routine and one severely underrated hidden gem. 4. What is the top upcoming paradigm in software testing?

Scott Barber

based access and tight topics, and a clear 3. Jira, Confluence, TestRail, Twitter. goal of dealing with one of the current Most important and underrated tool is software testing challenges. I strongly the brain. I use mine daily! recommend this type of conferences. 4. TDD + information sharing across For example: WOPR (Workshop on roles. Performance and Reliability) or DEWT (Dutch Exploratory Workshop on Brîndușa Axon 1. ALE – Agile Lean Europe, Agile Testing). Testing Days, Let’s Test, Agile Testing 2. AST (Association for Software Meetup, Zappers – Meetup. Testing) blog is a very good aggregated 2. Software Testing Club (ministryofsource of information. testing.com), Gojko.net, 3. MindMap, Lucidchart, Jing and Michael Bolton, Seth Skype. An underrated tool would be Godin. SmartDraw. 3. Mindmap, 4. Most conferences are filled with LeanCanvas, JMeter. ongoing rants about aligning testing with Indirectly connected business goals (ex. Profitability). I call it to testing Competing the Business Side of Testing and it’s the Values Framework. main high level concern of the testing 4. The evolution from process driven community. to relationship driven process and cross functional teams. Gabor Torok 1. G o o g l e We hope that next year we will be spoiTesting Conference, Selenium Conference, led with the same large amount of high quality content, maybe even more, in the DevOps Day Europe. 2. Gojko – Acceptance TDD – weekly same relaxed family like atmosphere. newsletter; Google Testing blog. 3. Emacs (code), Twist (tests), Jenkins, HipChat (Atlassian). 4. NoQa team – moving the roles into automated processes and tools.

1. T h e r e a r e two types of conferences: Stephen Blower a. The big ones, 1. TestBash – Brighton (friendly dominated by atmosphere and useful prior events); product demos, EuroSTAR; STARWest mainly oriented on networking and & STAREast. sales. For example: CAST (Conference 2. Pe opl e are of the Association for Software Testing) an essential source of – scheduled for August in U.S.A.; or information: Michael Let’s Test – a yearly conference in B olton , Mi ag i - D o Sweden (May) and Australia (August blog. Books and direct and September). interaction: meetups, b. The small ones, with invitation gatherings (SheffieldTestGathering).

10

no. 14/August, 2013 | www.todaysoftmag.com

Marius Mornea

marius.mornea@todaysoftmag.com Engineer intrested and involved in different IT activities, from development to, management, education to journalism as part of Epistemio, UTCN and TSM


startups

TODAY SOFTWARE MAGAZINE

Startup Transilvania

T

here is more and more talk about the need for Romanian software companies to pass from outsourcing to developing their own products. No one knows for how long the services of local soft companies will be chosen to the detriment of other companies. For the moment, what gives us an advantage is the low price and high quality of soft services.

Probably most soft companies have established a development strategy on 5-10 years in advance. If the creation of one’s own products is also included in this strategy, then, I think this article will be useful. On Friday, July 19th 2013, the STEP UP programme for startups was started in Cluj-Napoca. The aim of this programme is to help startups go quickly and smoothly from idea to prototype, to transform a set of resources (input): idea, people and time (3 months) into a result (output): MVP – prototype of their own product. The MVP or the minimum viable product is aimed and most likely will be achieved within 3 months.

in building and positioning on regional and global markets. The STEP-UP Programme includes 3 months of sustained and relevant assisted work, weekly studying sessions with mentors and partners of the programme, series of workshops with successful entrepreneurs, monthly social events with business leaders from the local community, frequent interactions with company founders and The complete list of mentors is avaimanagement teams, but also challenges to lable on the site of the programme: learn from each other. startuptransilvania.ro

We have selected the best local and international mentors, the most advantageous marginal benefits and we have STEP-UP wishes to: created connections with the best networks • provide support and continuity to of professionals from the industry. entrepreneurs after their taking part in Among the mentors within the STEP start-up competitions and events. UP programme we mention: • bring mentors and resources to support teams growing up Philipp Kandal - CTO & founder • develop financial connections Skobbler; between Transylvanian startups and Dragoș Roua - Romanian investor and other centers and communities from entrepreneur; Europe and America. Kate Lowes - CEO at UK Innovation • bring the international “know-how” Group.

The programme starts at the end of August and it will end in November, with a presentation day, when startups will present the result of their work within a demo-day. We encourage the local companies to participate with startups and take a significant step towards their own businesses.

Cristian Dascălu

cristian@clujhub.ro Cofounder @ Cluj Hub

www.todaysoftmag.com | no. 14/August, 2013

11


startups

The Romanian Startup Awards Finalists

A

s you probably know, TheNextWeb rewards the most important startups, entrepreneurs and local investors. On the list of 12 there is also Romania, the event in Bucharest being co-organized by Geekcelerator. Here is a short analysis of the nominees.

The nominated startups and co-founders

123ContactForm – set up 5 years ago, 123ContactForm turned from Cinderella into the princess in the last two years. Once the original team (Tudor Bastea and Florin Cornianu) was completed by Adrian Gheara as an investor, 123ContactForm has changed its interface, has improved its monetization and has continuously augmented its team up to 10 “kangaroos”. 5minutes.to – set up by Catalin Zorzini and Iulia David, 5minutes.to was part of the spring batch of Springboard 2012. Its interface, which is easy to use, has brought two nominations, for the best web application and the best utilization experience. Appscend – the 2011 finalists in How to Web/ Startup Challenge. Sebastian Vaduva and the team have enhanced their business linearly, every year. 2012 seemed to be a year in which their goal was to scale their sales, as the blog and PR were hyper-active. Towards the end of the year, the startup was accepted in the Chile Startup program and they extended their sales towards Latin America. CleverTaxi – – launched in the second half of the year with the partnership of Orange, CleverTaxi facilitates taxi ordering using the mobile phone. Despite some little turbulences right after being launched, Clever Taxi succeeded in growing (on a relatively crowded market), extending also in Cluj. The startup has Andrei Pitis as angel investor (and sometimes chief programmer).

12

Erepublik – 2012 was a year with no great news from Erepublik, except the cofounder George Lemnaru’s leaving, who is now working hard on his new project GreenHorseGames. We are waiting for the launching of the new Erepublik version in 2013. GoodMomming – Started by two Moldavian highly active entrepreneurs, GoodMomming was launched in 2012. It visited TechCrunch Disrupt, then, it was finalist and Runner-up in How to Web 2012/ Startup Spotlight and, towards the end of the year, it was accepted in the GrowLab accelerator. A year full of positive events; we hope 2013 will be beyond expectations.

Bogdan Manoiu, makes it one of the most interesting startups to monitor in 2013. KeenSkim – Another one-man-show, KeenSkim is developed by Tudor Vlad and it graduated (Magna cum Laude, I should add) from the summer edition of Eleven, one of the two accelerators of our neighbor and friend country, Bulgaria. The project has made a lot of progress in terms of technology and product; the business part can improve in time. Congratulations to Tudor Vlad, who reached the How to Web 2012/ Startup Spotlight final, then, he won Best Pitch at Venture Connect in autumn, an entrepreneur who is visibly improving his business abilities.

M av e n h u t / S o l i t a i r e A r e n a – Mavenhut had a year full of events: they graduated from Startupbootcamp Doublin (we also helped a little), won Best Pitch in How to Web 2012/ Startup Spotlight and got a financing of € 550k from SOS Ventures, the biggest first round of financing received since Braininent. It is hard to believe, but a year ago the team led by Bobby Voicu was hardly being formed. Certainly, Mavenhut is one of the main i-Re w ind – s et up by B ogd an candidates to the startup of the year title. Manoiu after How to Web 2011 (you know the famous mail with the subject RealColors – the Makan Studios team “Congratulations – you are a grandfather!”) launched in spring a first application calwith Andrei Pitis (again) as business angel/ led RealColors, which was later presented co-founder, it was launched in 2012 on the by Friday App Review (a show by Android ski slide in Predeal, with Orange partners- Developers) as Staff Pick of the Week. For hip. The innovator concept (i-Rewind films the moment, the team is preparing its next you while you go down the slide and makes application and great come-back in 2013. an ad-hoc personalized movie of you) and the experienced team, led by enthusiastic Sl i c k F l i c k – s e t up by Ma r i a DocTrackr – though not a 100% Romanian startup, DocTrackr, co-founded by Alex Negrea, drew attention due to the investment received after the graduation from the TechStars Boston accelerator – $ 2M USD from some of the most important capital funds in the technical domain. We wish Alex to spend the money wisely in 2013.

no. 14/August, 2013 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE Constantinescu, SlickFlick established its headquarters in Timisoara, after a first round of investments from several business angels from UK. The team includes the co-founders of NextRoot, company which developed Instamap, therefore, a very experienced and interesting team. Tjobs – the company from Mures had in 2012 a peaceful year, having participated in several startup competitions where they honorably got a place in the final (Doublin Web Summit, Pioneers festival, Europas). Tjobs seems very interested in building an image outside Romania, as they probably wish to extend internationally. The effort is owed to Andreas Cser, the business angel who is to blame for the growing ambitions of Tjobs. Zonga – the beginning of the year brought the launching of Zonga, a Romanian music service. As a Zonga user, I am very pleased with the application experience (there are a few small exceptions) and I admire the tenacity of Sergiu Biris, better known from Trilulilu.ro, who succeeded in bringing together a series of important companies from the music industry. Later edit: Zonga entered an interesting distribution partnership with Vodafone. Zyway – Zyway is the only project I know nothing about. Owned by a company from Iasi, ThinSlices, Zyway is still in its launching phase.

The investors

Of the list of 5 nominated investors, only one was active in 2012, namely Andrei Pitis. The latest investments of Vlad Stan and Victor Anastasiu (through Seedmoney) took place in November 2010 (Squeeqly) and in the summer of 2011 (SkinScan); Andreas Cser’s latest investment is Tjobs (2010) and Adrian Gheara’s latest investment is 123ContactForm (2011).

On those who were not selected

Summify – Mircea Pasoi and Cristian Strat had a spectacular beginning of the year with selling Summify to Twitter. The figures of the transaction were not made public, but even an acqui-hire sounds extraordinary in a landscape where news of Romanian startups acquisitions is lacking. To conclude Romanian Startup Awards have generated an extraordinary uberVU – Hiring an American CEO, two offices for sales interest and it seems to be a very good meeting opportunity for opened in the USA and Latin America, a new enterprise oriented the local community, although it is a Eurovision type competition, version, these were the most important landmarks of the Ubervu where the public votes for their favorites for reasons that are not team, which has now reached a total of over 50 employees. necessarily related to the results registered during the last year. I noticed Facebook groups which asked their members to vote Brainient – in 2012, Brainient reached a $ 1.8M round of for the founders / startups/ investors from a certain geographic financing to scale its sales operations and it opened offices in the area (the eternal battle against Bucharest), a true media campaign USA. led by Mavenhut and even some misinforming posts which were analyzing the startups and indicating the author’s favorites, plus Peter Barta – Discreet about his investments, Peter added some fraud suspicions. Traderion (in 2012) besides Appscend (where he invests since All in all, Romanian Startup Awards remains an interesting 2011) and, theoretically, there are other 1-2 investments which we and useful exercise in promoting Romanian startups, which we do not know. hope to be as relevant as possible as well. Bogdan Iordache bogdan.iordache@howtoweb.co Cofounder @ How to Web

Disclaimer: I am a friend of most of the people mentioned in this article, but I have no financial connection to either of them. www.todaysoftmag.com | no. 14/August, 2013

13


communities

IT Communities

I

had thought there wouldn’t be enough events for the calendar column for the month of August, but I was pleasantly surprised. We begin this month’s series of events by releasing no. 14 TSM, which will take place at msg systems headquarters in Cluj-Napoca, where we will also enjoy a mini-summer party at the end of presentations. An important event which will take place in Bucharest at the end of August is Agile Learning Europe (ALE) 2013, and this also represents TSM’s recommendation for this month. Transylvania Java User Group Java technologies community. Website: http://www.transylvania-jug.org/ Started on: 15.05.2008 / Members: 546 / Events: 43

Calendar August 5 Launch of issue 14th of TSM (Cluj) www.todaysoftmag.ro

TSM community Today Software Magazine community. Website: www.facebook.com/todaysoftmag Started on: 06.02.2012 / Members: 745 / Events: 11

August 7 Summer evening on a terrace (Cluj) w w w . m e e t u p . c o m / Ta b a r a - d e - Te s t a r e - C l u j / events/127909542/

Romanian Testing Community Testing dedicated community. Website: http://www.romaniatesting.ro Started on: 10.05.2011 / Members: 626 / Events: 2

August 7 Building Startup Communities it-events.ro/events/buildingstartup-communities-with-brad-feld-and-anca-albu/

GeekMeet România Community dedicated to web technologies. Website: http://geekmeet.ro/ Started on: 10.06.2006 / Members: 278 / Events: 17 Cluj.rb Ruby community. Website: http://www.meetup.com/cluj-rb/ Started on: 25.08.2010 / Members: 139 / Events: 34 The Cluj Napoca Agile Software Meetup Group Community dedicated to Agile development. Website: http://www.agileworks.ro Started on: 04.10.2010 / Members: 326 / Events: 33 Cluj Semantic WEB Meetup Community dedicated to semantic technologies. Website: http://www.meetup.com/Cluj-Semantic-WEB/ Started on: 08.05.2010 / Members: 144/ Events: 22 Romanian Association for Better Software Community dedicated to IT professionals with extensive experience in any technology. Website: http://www.rabs.ro Started on: 10.02.2011 / Members: 226/ Events: 12 Testing camp A project that wants to bring together testers. Website: http://tabaradetestare.ro Started on: 15.01.2012 / Members: 227/ Events: 19

August 9 International Coworking Day (Cluj) it-events.ro/events/international-coworking-day/ August 17 Open Space on Technology in Startups (București) it-events.ro/events/open-space-on-technology-in-startups/ August 18-19 Summer school – IT at Castle (Macea, Arad) it-events.ro/events/scoala-de-vara-informatica-la-castel/ August 19-24 Moodle Moot România 2013 (Brașov) it-events.ro/events/oracle-summer-school-2nd-edition/ August 23-25 SummerHacks (Timișoara) it-events.ro/events/summerhacks/ August 28-30 ALE 2013 (București) - TSM recommandation ale2013.alenetwork.eu August 29 Linked Data Technology Stack (Cluj) www.meetup.com/Cluj-Semantic-WEB/events/115920132/ Thursday/weekly OpenConnect (Cluj) www.facebook.com/groups/355893314491424/ Wednesday/bi-weekly OpenCoffee (Cluj) www.facebook.com/opencoffeecluj

14

no. 14/August, 2013 | www.todaysoftmag.com


events

TODAY SOFTWARE MAGAZINE

Applications for financial forecasting at the IEEE Congress on Evolutionary Computation, 2013, Cancun

T

he 2013 edition of the IEEE Congress on Evolutionary Computation (CEC) took place in Mexico, Cancun – a rather exotic setting for us Europeans. Along with the pleasant location it is also worth mentioning that CEC is one of the biggest and most important conferences, its main topic being evolutionary computation – which gives the enthusiasts in the field of evolutionary computation, such as myself, at least two reasons to participate in this event.

Silvia Răusanu

Silvia.Rausanu@isdc.eu Software Developer @ ISDC

Over 200 researchers, professors, PhD students, mainly from America and Asia, took part in the event in order to present their results but also to take advantage of the unique opportunity of exchanging ideas and starting new collaborations with famous people in the field. The world of IT companies was represented almost imperceptibly, as I was probably the only representative of this industry – the academic environment is clearly ahead of others in the field of discoveries using IT specific techniques and methods, unfortunately without the support of the companies specialised in this sector. The functional topics approached during the conference cover a very wide range of fields: biochemistry, biology, medicine, economics, game theory, meteorology, etc. The applications of evolutionary algorithms manage to cover the hybridization and optimisation experiments of some known methods while waiting for major discoveries or simply for a high-performance software, which would decrease the number of human errors as a result of interpretations – for instance, finding out the tumour type by analysing a radiography. By possessing general knowledge of evolutionary computation, the participation in the presentations from CEC brings new perspectives regarding the field

but it also triggers the research appetite oriented towards applicability.

Financial applications using evolutionary computation

The financial applications from CEC were exclusively oriented towards the field of stock market forecasts. From the very beginning of the presentations, the authors have admitted the danger in approaching such a topic, due to the scepticism of many in respect of the existence of a pattern in financial fluctuations or of a fine line between legality and illegality. The Efficient Market Hypothesis – EMT encourages sceptics claiming that the information is available right away to all the participants and stock prices immediately reflect the current state of the market. EMH implies that all participants in the stock market can obtain the same winnings regardless of their experience in the field, as prices are completely random. Makiel explains in „The Efficient Market Hypothesis and Its Critics” how EMH rejects the utility of technical and fundamental analysis - basic methods incorporated in such applications with a success ration which manages to raise doubt over the validity of EMH. Lately, investors have been using fundamental analysis independently by using macroeconomic indices, the exchange

www.todaysoftmag.com | no. 14/August, 2013

15


events Applications for financial forecasting at the IEEE Congress on Evolutionary Computation

rate or technical analysis using the stock prices and the transaction volume. The technical analysis of the historical data of stock exchange is used in the applications presented at CEC 2013, which differ in respect of the used optimization algorithms – genetic programming, taboo search. The optimisation methods from the works forming the topic of this article function on different internal structures but they all aim at an answer offered to the user, whether the pack of shares is worth buying or sold and the profit resulting from this operation.

Financial forecasting using genetic programming

Kamp ou r i d i s e t a l. su g ge st i n „Metaheuristics Application on a Financial Forecasting Problem” hybridizations over the main line of the algorithm of an application already at the 8th version, EDDIE (ED), which was the object of his research for many years. ED is based on a version of the genetic programming trying to generate optimum transaction strategies. The algorithm uses as entry data the values of the technical analysis applied to historical data (daily closing price and transactional

16

indices), the actual values of the prices for a limited period of time and the result of historical classification (1 – decision to buy, 0 – decision not to buy). The used technical analysis indices are: “movement average” (MA), „trade break out” (TBR), „filter” (FLR), „volatility” (Vol), „momentum” (Mom) and „momentum movement average” (MomMA). The values of the indices involved in the algorithm are calculated for a certain number of days, for short and long term. In ED7 the calculation values of technical indicators were constant, 12 namely 50 days – these periods of time being directly taken from the daily mode of action of economic analysts. The algorithm structure to be optimised is a genetic decision tree connected to the following formula: <tree> ::= if-then-else <condition> <tree> <tree> | <decision> <condition> ::= <condition> “AND” <condition> | <condition> “OR” <condition> | “NOT” <condition> |<variable> <relational operator> <threshold> <variable> ::= MA12 | MA50 | TBR12 | TBR50 | FLR12 | FLR50 | Vol12 | Vol50 | Mom12 | Mom12 | MomMA12 | MomMA12 <relational operator> ::= < | > | = < threshold > ::= rational number <decision> ::= 0 | 1

A tree described by the previous formula represents a solution for a transactional decision concerning a specific pack of shares. A set of such decisions is evaluated by calculating the ratio between the correct and wrong decisions, with different weights – the error in a decision to buy having the

no. 14/August, 2013 | www.todaysoftmag.com

highest weight. The genetic algorithm in ED7 generates trees from a search space limited by the fixed application period of technical indices; but with ED8 the periods become variable thus opening the search space and avoiding a too rapid convergence. The results of ED8 were reported as promising but the search efficiency has dropped and therefore in order to maintain the diversity of solutions, but in the same time to recover the efficiency of the search, search metaheuristics were involved in the algorithm to optimise the punctual characteristics of the trees: variables describing the new periods for the calculation of technical indices. Simulated annealing (SA) is an algorithm which allows the selection of a not so good solution with a certain probability (to avoid finding a local optimum); in ED8, SA applies to limitrophe nodes of random trees from the population, changing the period with a value from the interval [-10,+10]. The taboo search (TS) is a metaheuristic that forces the search for a better solution not to return to the marked solutions creating a taboo list out of these with limited existence; in ED8, TS is applied in the same manner as SA. This application was tested on 10 sets of data obtained from finance.yahoo.com. If ED8 is able to provide an average precision ratio of 0.5735 for these 10 sets of data and 0.75 for the best solutions, ED8-SA returns 0.5773 for the same data and 0.81 for the best solution; ED8-TS returns 0.5591 and for the best solution 0.81. According to the above stated results, the improvement is not remarkable in respect of the average value but the investors using this application will


TODAY SOFTWARE MAGAZINE

certainly look for the best solution and thus The dynamism of the application is given the new hybrids become efficient by applying the sliding window concept – the training data sets change from one Financial forecasting using taboo search iteration to the other, in the same time as Kuo et al. present in „Dynamic Stock the test sets. Technical analysis indices are Trading System based on Quantum- selected again from the economic theory, Inspired Tabu Search Algorithm” a new with set application periods per index. The dynamic system able to generate, in a rea- selection of certain indices represents a listic context, complex strategies – sale and purchase/sell strategy, a solution. A solupurchase. The basic algorithm for the appli- tion is appreciated by estimating the profit cation, a new form for the taboo search, in currency and the number of stocks. The with concepts borrowed from quantum system was assessed according to historical physics was developed by the same team. data compared to other solutions suggesThe idea of the algorithm is to assign to ted in the past. The simulations presented each possible solution a quantum matrix, in the paper report for certain sets of data each characteristic of the solution having a a maximum profit of 69.94%, compared to value from the [0, 1] interval – quantum approximately 14% for other implementaprobability. Taboo search is translated in tions on the same data. this context by updating the matrix of all the solutions, by extracting the weight from Conclusions and other impressions the matrix for the characteristics of the weaThe two applications described above kest solution, namely by adding the weights are only comparable in respect of the for the characteristics of the best solution. application field, as the first one offers only

a support mechanism for the decision of investors, while the second one provides a complex and independent software. In respect of the implementation, the two are alike due to the use of technical analysis indices as the decisional support. From an algorithmic point of view, the two suggestions have gaps in respect of the dimensions of the search space – Kampouridis extends it very much and Kuo keeps it very well controlled (even though the authors do not provide details), I might say. These comparisons are made only to indicate the diversity of approaches, which may result in high end solutions and not as a review of these papers, which were very appreciated by the audience at CEC. As a final note, with lyric inspiration, the participation in the CEC 2013 was a unique experience due to the high number of ideas and methods presented by numerous participants open to discussions and debates at an algorithmic level, good organisation and the exotic ambiance of the location in which the conference was held. Such conferences are organised annually – the next CEC 2014 edition will be held in Beijing, China. So, keep on researching!

www.todaysoftmag.com | no. 14/August, 2013

17


programming

How a software craftsman learns: deliberate practice

T

he software craftsmanship movement promotes the idea that the only way a developer can be fast is by behaving rationally during crisis periods. This way of thinking is a reaction to the behaviour of writing code that is hard to change and to understand, basically producing technical debt, in the moment when you need to deliver software during a short period of time.

Alexandru Bolboaca

alex.bolboaca@mozaicworks.com Agile Coach and Trainer, with a focus on technical practices @Mozaic Works

The way the software craftsmanship movement believes that a developer can become that fast is by practicing as often as possible, in most diverse environments, on platforms and languages as different as possible. Thus deliberate practice is very tightly related with any developer that calls themselves “aspiring software craftsman” or “software craftsman”.

What is practice?

Adrian Bolboaca

adrian.bolboaca@mozaicworks.com Programmer. Organizational and Technical Trainer and Coach @Mozaic Works

Practice is the act of rehearsing a behavior over and over, or engaging in an activity again and again, for the purpose of improving or mastering it, as in the phrase „practice makes perfect”. Sports teams practice to prepare for actual games. Playing a musical instrument well takes a lot of practice. It is a method of learning and of acquiring experience. The word derives from the Greek „πρακτική” (praktike), feminine of „πρακτικός” (praktikos), „fit for or concerned with action, practical”[1] and that from the verb „πράσσω” (prasso),”to achieve, bring about, effect, accomplish”1. There are numerous parallels between s p or t s , mu s i c an d pro g r am m i n g . Performance on field, on stage or in production is an essential success factor in these domains. But as a sportsman or a musician needs practice to become expert while being active, the same way a developer needs practice to master better and better their area of knowledge. The essential problem in the software industry is that, unlike sports or music, a developer spends too much time “on the stage”, and not enough time in a learning environment. And this happens in a 1 h t t p : / / e n . w i k i p e d i a . o r g / w i k i / Practice_%28learning_method%29

18

no.14/August,2013 www.todaysoftmag.com

very dynamic domain, where change and novelty is the question of the hour. This means that an aspiring software craftsman needs to allocate time to become better. He or she can make an investment, and instead of effectively working 40 hours per week, works just 30 and the rest of the time is used for practice. Another option is to allocate time during each evening and/or morning as well as Saturdays and Sundays to learn new things. But how to practice? Well, there are a number of established formats of deliberate practice, but in the following we will focus on: Coding Kata, Performing Coding Kata, Coding Dojo, Cyber Dojo, Testing Dojo, Coderetreat, Test Automation Retreat, Pair-programming, Pet projects, Coaching.

Coding Kata

The concept of this type of practice is very simple: I find out what I want to become better in and I want to practice this during a short 10 – 60 minutes interval by performing an activity which will make me better. This idea comes from the martial arts, where a trainee must repeat some movements until they are happy with the progress and can show to the sensei the progress. For developers the same model applies: the developer repeats the solution of the same problem, in the same way, during the same timebox until he considers that the solution and its steps are correct and done in a short enough time period. A software craftsman wants to practice for minimum 10 hours per week, because this is the only way they can become faster and more efficient.


TODAY SOFTWARE MAGAZINE How much do you practice per week?

Performing Coding Kata

A speaker writes code in front of an audience on an established topic and during an established timebox. The speaker needs to explain what their actions are while writing code. The audience is asked to not cut in, excepting the case they do not understand at all what is going on. This type of exercise is very intense for the speaker and can be very instructional for the audience, because the people from the audience can learn new things just by seeing how a fellow solves a problem. I know you would like to do a coding kata. When will you?

Coding Dojo

This is a format that comes from the martial arts and it is adapted for developers. Coding dojo is a group exercise that has the purpose of spreading knowledge amongst the members of the audience. A topic is suggested and a period of time during which the group will try to solve a problem, by exercising some specific practices. An essential characteristic of this format is that it needs to have an established timebox and a very specific topic. An experienced developer needs to facilitate this meeting, focusing on imposing the rules, the timebox and the topic. Coding dojo randori is the most known form, during which two programmers write code by using a projector so that anyone can see. They use pair-programming, and the first that started the session is replaced at a time interval (of around 5-7 minutes), by the next programmer from the audience. The pair of the programmer who leaves starts writing code, and the new one just observes. After the same time interval the programmer who is writing code goes back to the audience and is replaced with someone from the audience. A list can be made in advance, so that everyone knows whose turn it is at any moment. Thus, by rotation, everyone will write code and will see how others write code. A variation exists, when someone from the audience has something to say they need to go to the keyboard and only then talk. Nobody is allowed to talk, unless they write code on the projector. Coding dojo has another variation: a very experienced person makes a coding kata with a very well defined purpose and with a clear timebox (20-30 minutes).

Then the audience is asked to repeat the steps made by the speaker. During the second phase, when the audience repeats the initial steps, the speaker becomes a facilitator, making sure that the purpose of the exercise is kept and that the rules are observed. This format is much closer to the moment when a sensei wants to show the class how to make some movements and then asks them to repeat the moves, while giving them suggestions and feedback for improvement. Did you find out when and where will the next coding dojo take place in your city?

Cyber Dojo

Cyber dojo is an online application created by Jon Jagger on the coding dojo principles. It lets parallel connection of more persons or groups or single connection to a server. In the online application code can be written in most usual programming languages. It contains quite a big number of problems that can be solved. The advantage of cyber dojo is the easiness and the short time until starting using it. There is no need of any setup for a development environment. After you finish reading this article, you will start using it, right?? Here is the link: http:// www.cyber-dojo.com.

Testing Dojo

After coding cojo became very popular amongst the programmers, the same principles were applied for testers to be able to learn from one another. For more details go

to http://www.testingdojo.org. What are you waiting for to attend a testing dojo?

Coderetreat

In the year 2009 a group of programmers met at the Code Mash Conference in USA and thought they would like to have a oneday format to exercise, different from the usual coding dojo format that lasts just a couple of hours. The idea of a code retreat is to combine more elements from a coding dojo or coding kata into one day of practice. Code retreats take place usually on Saturdays and last the whole day. The event is structured in 6 sessions of 45 minutes, divided by short retrospectives. The rules are simple: during each session the programmers work in pairs with the purpose to write code within certain constraints required by the facilitator, chosen so that the learning process is fast. The code is deleted completely after each session, the pairs and the constraints change and the code writing starts again. Romania was from the beginning very active in this area, Alexandru Bolboacă and Maria Diaconu being two of the ones that helped crystallizing the current format. Also the coderetreats are organized usually in the AgileWorks communities from Romania. Ever y year the “Global D ay of Coderetreat� is organized, when cities from the whole world are invited to attend an event with the same format. During 32 hours the programmers from all the continents learn to become better by practice. Many of the cities communicate by video

www.todaysoftmag.com | no. 14/August, 2013

19


programming How a software craftsman learns: deliberate practice call to meet and to share their learning Pet projects from that day. A very good way of practice is a pet project. Any technology and any topic is When is the next coderetreat? The answer is welcome with one condition: be passionate here: http://coderetreat.org! about what you are doing. A pet project helps because it is a real development enviTest Automation Retreat ronment, but the decisions are not taken by Following the format of a coderetreat, a customer or by a boss, but by you. In this Makus G채rtner created this variation way you can learn and take architectural where the testers are invited to attend 6 ses- decisions, design decisions, see how imporsions of 45 minutes to automate tests for a tant it is to have clean code and other usual web application. The format is yet new and practices from the software craftsmanship fresh, but very valuable2. world. Starting a pet project is very simple. When will you attend the next test automa- Anyone of us has at least one idea we want tion retreat? to explore by writing a program. So we just need to allocate some time to make it hapPair-programming pen. It often happens that pet projects turn This is a very simple form of practice. into a marketable product. You want to do something and you call someone else to help you because another How much time do you work per month for point of view is welcome. your pet project? From the experience we can say that pair-programming is the fastest way of Coaching learning. You need just another professioAny form of deliberate practice can be nal that has the same interests as you have. put into place by yourself, or backed by a Then, working together you will both learn technical coach. When a technical coach a lot from each other. This is as well tiring, is involved, the learning process is fast so try not to over do it, but it becomes accelerated, because continuous feedback easier to accept while the experience with and concrete suggestions, even working this practice grows. in pair-programming sessions, are key Pair-programming can be even done factors for an efficient learning process. remote. This relationship resembles with the relationship between a trainee and a sensei When did you do pair-programming last in martial arts. Anyone can learn martial time? arts from books or from less experienced

practitioners, but a sensei helps out with advice for having a fast and coherent learning process. When did you work last time with a technical coach?

Community

Being part of a community of professionals from the area of activity is another factor that helps continuous improvement. Here you can meet people with the same passions, with different levels of knowledge, but who have a common purpose: learn from each other. There are communities of programmers, testers, architects, etc in all the big cities from Romania and Europe. Also there are communities that deal with a specific language or a specific technology, in the case when the purpose of learning is a technology itself. Most events from the local communities are free of charge, this being one more benefit for attracting as many passionate people from the IT world, and not only. The Software Craftsmanship Communities (AgileWorks in Romania) focus rather on the fundamentals from the software professionals should master. The specializations of members, their ages or experience are very different. If you do now know already what the communities in your city are, search on the internet or on meetup.com!

Conclusion

An expert breaks down the skills that are required to be expert and focuses on improving those skill chunks during practice or day-to-day activities, often paired with immediate coaching feedback. Another important feature of deliberate practice lies in continually practicing a skill at more challenging levels with the intention of mastering it.3 One thing is very clear, without practice we cannot become experts in a domain that is so vast and dynamical as the software industry. So we invite you to start practicing home or at work. And then we invite you to get involved in the local communities by attending group practice activities. What are you waiting for?

2 h t t p : / / w w w . s h i n o . d e / 2 0 1 2 / 0 4 / 2 8 / coderetreat-goes-testautomation

20

no. 14/August, 2013 | www.todaysoftmag.com

3 Mayer, R. E. (2008). Learning and Instruction. Upper Saddle River, New Jersey: Pearson Education, Inc


programming

TODAY SOFTWARE MAGAZINE

Brief introduction into the SAP world

S

ince after the publication of our previous articles on SAP-related technologies, readers have suggested that a short introduction into the SAP environment would be very welcome, we have decided to take the advice and start a series of articles that will provide some insights into the SAP world.

Victor Ionescu

victor.ionescu@msg-systems.com SAP IT Consultant @ msg systems Romania

Consequently, in this article we start off by analyzing several aspects of the SAP products and technologies, answering questions such as: Who or what is SAP? What solutions does SAP provide? What is different about SAP technologies and what does software development in the SAP environment imply?

SAP Solutions and Customers

SAP is the leading provider for enterprise business software, with more than 230000 clients and a portfolio that covers a wide range of products, from typical ERP solutions such as Financial/Accounting, HR , and Customer Relationship Management to very specific ones, often referred to as ‘Focused Business Solutions’. An interesting matter is to identify the reasons for which such a large number of enterprise clients choose SAP. The reasons may vary, but what is often stated is that the best promoter of any business solution is represented in fact by the portfolio of clients and their success stories. In other words, implementing a software solution that manages to streamline the business processes of a company represents an indication of that software’s quality, and it is most often a criterion that determines the

competition to go for the same solution. This statement is also valid when talking about SAP solutions, especially since SAP’s portfolio is composed of solutions developed not for one particular customer, but for an entire branch. In SAP terminology (but not only) such products are called „standard” solutions. Furthermore, implementing a wellknown business solution within an enterprise, as opposed to developing a new one ‘from scratch’, can also have a positive impact on that company’s image, and can influence in certain cases even the rating received by the company through an audit.

The challenge of developing a standard solution

Given SAP’s approach of developing solutions not for individual customers but rather for an entire industry, in what follows we will analyze the challenges encountered while implementing such standard solutions, and illustrate how the SAP technical platform contributes to solving these issues. With regard to the functionalities it provides, any standard software solution must be designed to support all typical business processes of a specific branch,

www.todaysoftmag.com | no. 14/August, 2013

21


programming Brief introduction into the SAP world while simultaneously leaving aside any details that are only specific to certain customers. Thus the functional specification phase of standard software involves collecting information from multiple clients of the industry, with the aim of defining the product at a sufficiently high level of abstraction, such that the product will be usable for any customer within that particular branch. As a consequence the functional specification phase of the product is more than ever an activity of critical importance during the development of a standard software solution, which requires in-depth domain knowledge, and which can ultimately be the decisive factor in determining the subsequent success or failure of the product

environment have been created with these instruction set for making use of BadIs goals in mind, to begin with. in ABAP applications, and the SAP deveIn what follows we will briefly present lopment environment provides tools that a few of the SAP-specific mechanisms, illustrating how they aid the developer in dealing with flexibility and extensibility requirements of the standard SAP solutions.

Enhancements

As already mentioned, when a standard solution is being developed, often situations will arise when a specific business process cannot be fully specified within the standard solution, either because certain aspects are unknown at that moment, or because they differ from one client to the other and there is no standard solution for that particular situation. Thus the need arises for a mechanism through which the client has the possibility to extend the stanSAP Solution Development Lifecycle dard system behavior with his own specific Given the fact that a standard solution business functionality. cannot be specified up to the last detail so that it can be delivered in a fully functioAn example for such a mechanism pronal state to the client, the lifecycle of any vided by the SAP technical platform is the SAP product will always consist of two dis- so called „Business Add-In”. A Business tinct phases: (1) developing the standard Add-In (or BadI) basically represents a user software and (2) adjusting the standard exit with a predefined interface that is intesolution according to the customer’s exact grated in the flow of the standard solution. requirements (the latter is usually referred By using BadIs the client has the possibito as „implementing” the standard solution lity to define his own implementation in at the client ). order to extend the standard behavior of the system. Even more so he can specify From a software development point of the conditions (usually called filters) for an view, the two phases represent independent implementation to be executed. software projects (standard and customer development projects), with the skill-set Thus a client has the opportunity to required from an ABAP developer also extend a standard product with his own varying rather significantly depending on business logic, logic that will be integrathe type of project that he is involved in. ted and executed at a predefined moment within the standard process.

Some Technical Aspects

From a technical point of view, any standard software must be designed with enhanceability in mind, providing customers with the technical means to extend the standard processes where needed and to specify those details that where too specific to be included in the standard solution. In order to meet the requirements for flexibility and extensibility, the technical platform which the new product is being built upon must come to the developer’s aid, providing mechanisms that will enable the development of a product for an entire industry rather than for a single client. This fact is particularly true in the case of SAP solutions, for which the underlying technical platform and the development

22

Figure 1 - Business Add-In: Defining the interface and calling the user exit within the standard software flow, and adding new logic in the customer implementation

ease the task of managing Business AddIns: defining the BadI interface and filters, adding new implementations, a.s.o GET BADI lr_badi FILTERS iv_entity = lv_filter_value. CALL BADI lr_badi->do_checks EXPORTING is_key = ls_key iv_lob_cd = lv_lob_cd CHANGING ct_msgtab = lt_msgtab Example of a Business Add-In call. The BadI implementation will be dynamically determined at runtime, depending on the filter value lv_filter_value

Beside Business Add-Ins, the SAP platform also offers a series of other mechanisms (Program Exits, Screen Exits, Menu Exits, Business Transaction Events), which The utilization of the Business Add-in are all aimed at enabling the development concept implies two distinct steps: of flexible SAP solutions that can be easily • the developer of the standard solu- adapted depending on the specific requiretion defines the Business Add-in (its ments of each individual customer. interface and filter) and integrates the “user exit”-call in the flow of the stan- Customizing dard solution. In SAP terminology „Customizing” • each client then has the possibility to refers to the activity of tailoring the standefine his own implementations of the dard product for a specific customer by BadI and to specify in which situations adjusting the system parameters delivered they will be executed with the product. Customizing is a mandatory step in the implementation phase of While the concept itself can be any standard SAP solution. implemented effortlessly using other technologies as well, what is special about The customizing task includes a wide Business-Add-ins is that the ABAP pro- variety of activities of varying degrees of gramming language comes with a specific complexity:

no. 14/August, 2013 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE • starting from a trivial currency and VAT configuration

Clients

The SAP client concept permits the splitting of a SAP system into a series of logical subunits, each of these subunits being called a “client”. When multiple subunits of an organization need to use the same SAP solution, the existence of this concept allows the reuse of the same hardware infrastructure, thus reducing costs for installing, configuring and maintaining the SAP solution. Figure 2 -VAT configuration for the SAP SD module Among clients, a separation is possible both at the level of information stored in the system, as well as with regard to the cus• starting from a trivial currency and VAT configuration tomization of the SAP solution. What this means is that multiple subunits of an enterprise can use the same SAP solution, installed on a single physical system, but functioning differently for each client, since the customization is specific for each one of them. Coming back to our VAT configuration example, a multinational company with branches in several countries can use a single SAP system, assigning the branches in different countries to different clients of the system. The VAT value can then be configured for Figure 3 - Configuring business rules using SAP each particular country differently on each client. BRF+ (Business Rule Framework plus) All these aspects together with other SAP specific mechanisms and tools greatly ease the developer’s job when emphasis • and to customizations of a more technical nature, through in software development is placed especially on flexibility and the which it is possible to adjust the runtime behavior of the system possibility to extend the software solution that is being developed. In our next articles we will elaborate on this topic by addressing other aspects of the SAP software development process, with emphasis especially on the difference with regard to other programming languages and technologies.

Figure 4 - Typical example of controlling runtime behavior of the system through dependency injection - implementation classes for a certain functionality are specified within an SAP customizing

www.todaysoftmag.com | no. 14/August, 2013

23


programming

WPF – what about performance?

W

hen it comes to .Net family of client applications, Windows Presentation Foundation is a name that is frequently found. WPF is no longer a novelty, being introduced from. Net Framework 3.0 but brings out graphical interface advantages that still make it competitive.

Daniel Lăcătuș

Daniel.Lacatus@accesa.eu Senior Software Developer @ Accesa

The temptation whenever there’s something new, is to make it the ideal solution for everything. There is an ongoing discussion when it comes to choosing a Microsoft client technology, but if you don’t use the advantages brought by WPF (databinding, dynamic styling, media services, animations) for performance reasons a lot of developers still choose WinForms.

XAML world and Binding

Declarative module was successful in the web development and it has inspired a new language based on XML, called eXtensible Application Markup Language (XAML). XAML has many advantages, but what is worth mentioning is that it gets rid of the procedural code and allows the developer or site designer to describe how the controls look and interact. The View in WPF contains a XAML and a code behind file. If we follow the MVVM pattern and there were no compromises in the design, the code-behind should be nothing more than what is generated automatically and the connection between data from View and ViewModel should be done trough Binding . Binding is a powerful mechanism, it triggers necessary notifications to the UI when data representation in ViewModel

24

no.14/August,2013 www.todaysoftmag.com

changes.

To Blend, or not to Blend

Clearly one of the advantages that WPF brings is the extensibility when it comes to customization. If we are referring to design, as a step forward from WinForms, WPF provides developers the many possibilities and techniques to change the look and feel of the controls, and this underpins modern rich client applications centered on user interaction. Microsoft comes forward with a design-oriented tool, which has its own build engine and is able to create WPF applications, independent of Visual Studio. Expression Blend separates roles and offers designers the opportunity to focus on the design and programmers on the code (presentation logic and back-end), providing the convenience on not blocking one another. In Blend, the application is developed visually, simply drawing shapes, path-ups and controls directly on the board, and later describes the appearance and behavior. In conclusion, if the application has been chosen to be developed in WPF, there is clearly a need for a complex interface and Blend brings a big help on this part.


TODAY SOFTWARE MAGAZINE MVVM

Model View ViewModel is a UI pattern, created by Microsoft as a specialization of the Presentation Model pattern (introduced by Martin Fowler). Based largely on MVC, MVVM is suitable to development environments where UI platform supports event-driven programming such as HTML, WPF, Silverlight. The purpose of this pattern is to separate the graphical user interface (either markup or code) - View from business logic (backend) - Model. ViewModel is responsible for the connection between the two, giving details of the model in such a way as to be consumed by the view, for describing the same logic. MVVM was designed to use data binding in WPF to better facilitate separation of UI, reducing most of the code behind of the View. The advantages are clearly visible, and it’s a good design pattern to follow in WPF applications. In time, the critics did not fail to appear, and one comes from John Gossman, inventor MVVM, showing that it brings significant overhead if we have large operations at UI level, and in large applications with complex UI, fine tuning on the View becomes increasingly difficult to implement.

3rd party controls

In WPF, controls are the base of the UI structure, they are designed to achieve the desired graphical interface and could be reused. Over time there were providers who became famous, and perhaps imposed themselves by the set of WPF controls they

offer. 3rd party controls on the one hand can be a challenge / opportunity for those who want to implement them, on the other hand bring great help to a team that wants to implement a quick solution to a problem. When we do not want or have time to reinvent the wheel it seems a viable option to acquire an existing set of controls, which has proven over time to bring the solution you need. The major developers that deliver WPF controls are Telerik, Infragistics, DevExpress, which offer a very diverse suite of controls. The experience reached in the development of these controls is often difficult to match, and probably more expensive, and thus they persist in the market since WPF emerged. One of the side advantages that a set of control brings is the benefit of technical support, with a fee of course. Besides abundant documentation available on the Internet, each provider has a technical department and this is a way to get clarifications to questions, concerns and possible bugs related controls. Speaking of industrial applications, the performance of these controls is also important, as they are mostly black-box for consumers. There is a certain overhead if we speak of a consistent UI, and this can become a problem. Perhaps the most „problematic” in terms of control is DataGrid’s performance. This is also because it takes more data to be displayed. Most controls offer ways for developers to make their product performant. What should be considered in this regard:

Virtualization: Many of the grid controls are virtualized, and if they aren’t already, you have a flag to set in this sense (can be made on Row / Column). Hint: do not put a DataGrid in a ScrollViewer, it basically loses virtualization. • Pagination: pagination can be done at UI level, with all the data already loaded, but you can try and load a dynamic data page to the View • Asynchronous loading: the binding can be used IsAsync = True, because in this case the data loading may take longer and the UI shouldn’t be blocked Performance is one of the key issues to be considered when choosing a set of controls, because a mature application with a rich UI, but slow is not something that one would work with.

Performance

WPF is known for UI benefits they bring, but what about performance? I had the opportunity to work on several projects WPF, two stand out for long implementation time and magnitude of the product itself, where performance was vital. WPF was not created to be efficient „by design”. Binding is the mechanism that underlines WPF but for each binding to be made, it requires memory. When it comes to complex screens with multiple controls, each subpart is linked to a data object, it is observed that there is a cost for all its advantages. Another problem occurs in hierarchical data when the data context changes. Propagation is descending on all levels, and

www.todaysoftmag.com | no. 14/August, 2013

25


programming WPF – what about performance? binding recovery takes time. This can become visible to the user, and an alternative is not always at hand. Unfortunately, you cannot see an advance of Microsoft to improve controls, and as evidence of this is that the best improvement it brought in this direction in .Net Framework 4.5 is virtualization of TreeView. Roadmap for WPF can be confirmed only briefly, so it is unclear what the future in this direction is, given that Silverlight, although promising at one point, was suddenly interrupted. A parallel is often encountered between WPF and WinRT, and not for unfounded reasons. Both are based on XAML and similar API, but WinRT has been designed in a manner of performance. A WPF accumulated baggage left behind and has a native C + + API. From C# (or JavaScript) native components are called and this is felt in the reaction time. In Windows 7 SDK there is a series of profiling application, which allow us to analyze at run-time how WPF applications behave and what optimizations can be made to enhance performance. In this series there are two components that are worth mentioning. Perforator – analyzes how your application is rendering. It displays a set of graphs which allow to analyze in a very specific manner how each subpart of a screen is rendered and find potential problems. Charts provided by Perforator are: refresh rate analysis, software and hardware intermediate rendering changes, and video memory consumption. Visual Profiler – presents performance issues in the context of how the layout was built over the application. Visual hierarchy is drilled down from high-level objects (such as buttons and TextBlock s) to the low-level (such as lines and ellipses). Rather than describing graphs showing performance problems, Visual Profiler describes problems using Visual representation of objects (in a similar way to how UISpy works). As the software developer community is growing there is

26

no. 14/August, 2013 | www.todaysoftmag.com

fierce competition between software solutions. I think it will eventually reduce to performance. This criteria will make the difference between a performant software and one used because it’s widely distributed, used solely because there is no alternative. Responsiveness of a program will be the satisfaction factor required, and the user begins to be educated and demand more and more in this direction.

References http://en.wikipedia.org/wiki/Windows_Presentation_Foundation http://en.wikipedia.org/wiki/Model_View_ViewModel http://msdn.microsoft.com/en-us/library/cc296376.aspx http://msdn.microsoft.com/en-us/library/188ht7d8(v=vs.80).aspx http://en.wikipedia.org/wiki/Pareto_principle http://msdn.microsoft.com/en-us/library/system.windows.data.binding. isasync.aspx


HR

TODAY SOFTWARE MAGAZINE

Team building (II)

I

f the first part of the article was focused on defining the 7 steps that need to be followed when a team-building is organized, the second part will be oriented on creating a clear understanding of the importance and benefits of a team building program, but also the types of team building activities. As you are already used to, in this number there will also be practical exercises that can be used in creating a team. From my previous experience, most of the team-buildings are organized when the conflict has already arisen. The team-building is seen as a solution in over-passing all the problems, but, the reasons that could conduct to organizing a team-building should be more various: • Encourage team work before the conflict appears between team members; • Encourage positive competition between team members and support the multiple points of view that are expressed, because it can generate constructive ideas for the projects; • Acquire knowledge and develop abilities about the rest of the team members, for a better splitting of responsibilities and tasks and for a better understanding of each role in the team; • Understand the process of task delegation for an efficient work within the team.

activities and solving tasks by playing, the participants derive conclusions that will lead to learning and understanding the application of effective communication Time Activity name Teams Localization

Materials

Objectives Descriere

15 minutes/ group Total: The shield The group is slit in small teams of 2 persons Indoor / outdoor A4 paper with instructions Pens Get to know each other Participants split in groups of 2 persons and discuss the 4 questions. The outcome should be a drawing that highlights the most representative things for the other person. The drawings will be presented to the rest of the team.

Team building activities could also be very diverse: 1. Learning through play - carrying out

Description

Each participant receives an A4 paper with all the questions

within the team and creating team cohesion by winning the confidence of the other team members; 2. Organizing events with different topics - Organization of thematic events that encourage teamwork. A good example is sports competitions in which team members learn how to compete with each other for a better understanding of positive competition. Other events may

www.todaysoftmag.com | no. 14/August, 2013

27


HR Team building (II) Time

15 minutes planning time 30 minute building the bridge 15 minute debriefing Total: 60 minutes

Activity name The bridge Teams Localization Materials

Objectives

Description

4 teams (10 members/ team – maximum) Indoor / outdoor

be the ones that involve all company employees, and the best known example is the Christmas parties. 3. Social events are another way to create team cohesion. Informal environments are beneficial for the team members to get to know each other. As mentioned in the previous article, the better people are acquainted on a personal level, the conflict resolution process can be more efficient.

After reading this article, the benefits of team-building programs are more than intuitive: • Increased efficiency of teamwork; • Knowledge of team members on personal and professional level by putting them in different situations; • Increased confidence in team members; Team collaboration; • Develop a sense of membership; Planning activities; • Acquisition or improvement of skills and Transmitting information. knowledge; • Create a pleasant environment within the Instructions: team; This is a team game • Motivate team members and increased Purpose: each team has to build with the necessary materials self-esteem; Flipchart/ Cardboard A4 papers Scotch, scissors, string Plastic

half of the bridge who needs to fit with the other part of the bridge. Rules: 1. Appoint a representative who will communicate with the other team. The representatives will establish meetings with the help of the trainers. The purpose of the meeting is to define the strategy of building the bridge so that there is compatibility between the bridges. 2. Each representative will take an A4 paper and will transmit the information that he/she receives from the trainer. 3. The representatives will transmit the information to the teams using words, not the A4 paper. 4. At the end of the construction, unite the bridges. 5. The bridge has to be so strong as to support a mug with water.

I believe that you are convinced of the positive impact of team-building activities on the efficiency of teamwork, therefore I encourage you to invest human and financial resources to organize such team building activities more often. Success !

Conclusions: This is a game that encourages team collaboration. The success of a good collaboration is to transmit the information received as clearly as possible through the team representatives. Besides this, there is the need of involvement of each team member for accomplishing this task. In order to achieve the final objective, there are some stages: - Planning the activities: how the materials are used, the bridge design, the splitting of tasks, who is responsible of what, communication, collaboration; - The actual construction, the implementation of the plan and the execution;

Necessary

28

Each stage is dependent of the success of the communication between the representatives and between the representatives and the teams. Each team representative will receive the instruction on an A4 paper.

no. 14/August, 2013 | www.todaysoftmag.com

Andreea Pârvu

andreea.parvu@endava.com Recruiter @ Endava


management

TODAY SOFTWARE MAGAZINE

Project Manager and Business Analyst – a duo that can make the difference in Romanian outsourcing

I

Adrian Cighi

adrian.cighi@tss-yonder.com Project Manager @ Yonder

have been working in IT, in software outsourcing, for more than 10 years and I have followed the development of this industry from inside it. The financial crisis and the focus on making costs more efficient has lead an increasing number of companies to resort to outsourcing, a trend that favoured the development of this sector. With what consequences? To begin with, it has created a protecting crystal ball around this sector which has continued to grow organically despite the financial crisis and bloomed exactly at a time when other industries were restricting their activity or were vanishing completely. Secondly, it has been accompanied by a larger employment offer, good wages and a Western-level work environment. However, increasing costs has led to the profit margin in the case of outsourcing becoming smaller than what it was 7 to 10 years ago and thus to making room for a stronger cost-based competition coming from India or China.

So, what can we do, here, in Romania?

In order to be able to answer this question, we should have a look at the main factors influencing the choice of a software services supplier: • Quality of supplied products • Price • References (trust) • Flexibility • Resources • Collaborations • Cultural similarities • Localisation I wonder, which of the factors above would allow us to make a difference? Surely we can’t or won’t make the difference in what concerns some of them, such as price. We cannot compete on price all the time because that would influence resources and sustainability in the long term. In the same way, in what concerns the resources (the professionals we need) it would be extremely hard to compete at a quantitative level with India or China, if only because of the difference in population. Nevertheless, there is a series of key areas where we could not only make a difference, but we could even excel. Quality commitment: it is more than delivering quality products, with a wellwritten code. It presupposes a guarantee

offered to clients even before starting the projects. “Quality commitment” ties in to the degree of maturity of a company and means assuming quality, deadlines and all the agreed conditions. Predictability: means a company’s capacity to understand the client, to be able to draw a viable and sustainable roadmap and which would ensure success - and doing that in a convincing manner. Customer intimacy: refers to understanding the clients’ needs and businesses, the market and the clients and to trying, through innovative ideas, to deliver the best solutions. How can you tell you’ve done a good job? When the client sees you as a trustworthy consultant and not just as a service provider, the aim has been reached to a great extent.

The roles that make the difference

It is undeniable that one needs a valuable project team in order to fulfil the above-mentioned ambitions, but two key roles stand apart from this team, roles which can make the difference, especially through added value. These are the roles of Project Manager and Business Analyst. If a professional Project Manager (PM) ensures predictability, a Business Analyst (BA) makes the connection between the client’s

www.todaysoftmag.com | no. 14/August, 2013

29


management problems and the development team and contributes decisively to maintaining the position of “trusted consultant” that I mentioned above. If a few years ago the companies were looking for Project Managers with in-depth knowledge in the field of the project, thus being able to also act as a BA, the changes of the last years and the professionalization of the sector have led to the specialisation of roles and the necessity of an independent position in the field of business analysis. Moreover, the fact that agile methodologies focus on the role of the BA (or on the product specialist), the role of Project Manager has evolved towards being a team integrator, a role that works with distributed teams in order to reach the goal of the project and to keep costs under control. Surely, there are voices that claim that there is a strong conflict between the two roles, i.e. the PM one and the BA one. At first sight this conflict is real, because the PM manages the budget/ goal and the resources and the BA is concerned more with the essential details for solving and optimising the business processes, which put pressure on the budget and on the goal. Nevertheless, if there is no close cooperation between the two roles or if one of them is weaker, there is a greater probability for the project to not be successful. Moreover, because the two roles have certain joint responsibilities, there is the need for a cooperation framework.

30

There are two major players when it comes to establishing the two roles: Project Management Institute (PMI) and International Institute of Business Analysis (IIBA) which drafted such a cooperation model. If we are to look at the major phases of a project, as defined by the two institutes, we have the following implication of the two roles: • Starting the project (“Inception”): here the BA plays an essential role, because, in this phase, the business case is being built, it is the stage when the “Go – No go” decision is made. The business needs are also identified here. • Planning: the role of the PM is essential, because the project plan is being constructed, the required resources are allocated, and the project manager defines the three important areas that s/he will be monitoring: goal, budget and time. • Execution, monitoring and control: both roles must work jointly in order to achieve the success of the project. If the PM is focused more on monitoring the budget, the costs, the time the resources and the risks (being the main responsible for the goal of the project), the BA stresses functionality, quality, the risks coming from the functional part, from the product area. At the same time, by making decisions, s/he influences the goal of the project through changes or

no. 14/August, 2013 | www.todaysoftmag.com

faults found in the product. • Closing: in this phase there is a joint effort of the PM and BA in order to convince the client to accept the project

Conclusions

One way in which Romania can make a difference on the IT market is by not focusing on low cost criteria, but rather by creating added value for clients, a process during which the two roles described above have a significant contribution. The Project Managers and Business Analysts must cooperate for a joint purpose, i.e. for obtaining innovative solutions which solve their clients’ business problems.


programming

TODAY SOFTWARE MAGAZINE

Book review: Android Apps with Eclipse by Onur Cinar

T

his review is about a very popular topic nowadays, Android Applications. There are many clients, like mobile devices, which use this platform. The mobile device client is much more as a rich client.

Silviu Dumitrescu silviu.dumitrescu@msg-systems.com Java consultant @ msg systems Romania

We can use mobile devices as thin clients, in a browser, but the purpose of this review is to introduce those programming elements which transform the mobile device in a platform where we can develop and run standalone applications. The next step forward, working with Android, is to develop real rich clients, for enterprise applications: working offline or online, with a backend module running on a middleware. This part is not included in this review. The book Android Apps with Eclipse by Onur Cinar, presents an introductive survey about how to install, configure, write and run Android applications. It is not about Android API or programming techniques, it is just a detailed overview about how to use Eclipse Android Development Toolkit (ADT). In my opinion the audience of this book is general. Of course, some skills about Java language in general are welcome, but not mandatory. It is a book easy to read. After all the installations are done, the part of installation covers 40% of this book, all you have to do is to paste the code into Eclipse IDE and run it. I recommend you to study the code thoroughly because you can find further examples of coding or some extension points for your future work. The book is organized in

10 chapters and presents some applications. One of this is „Movie Player�. In this book all the examples are developed using Android 2.3.3, probably the most popular version of Android, beside the fact that it was released in 2011. Further versions are discussed in the book, the latest being Android 4.0.4, released in February 2012. As it is well known, the Android platform is the property of Google and represents an open standard for mobile devices. As the statistics presented in this

www.todaysoftmag.com | no. 14/August, 2013

31


programming Book review: Android Apps with Eclipse book show, Android has a 48% share of the mobile phone market. Android is more a complete software stack for mobile devices than an operating system. Android relies on Linux as operating system and on Java Virtual Machine for user applications. An Android application is formed by a set of components, and these components can be accessed by both the platform and by other applications. This allows interoperability between applications. The most important component of an Android application is the activity, which corresponds to a display screen. Users can interact with applications only through activities. An operation on an activity is called intent, and can provide new activities. The background work of an application is done by the services. There are so many components inside of the Android architecture, but I allow the reader the pleasure of getting this information from Chapter 2. On the other hand, Android platform provides multiple ways of data storage, including SQLite databases. The next two chapters, 3 and 4, are about Eclipse IDE and further installing methods depend on the operating systems. In my opinion, those of my readers which are familiar with Eclipse IDE can skip these two chapters. For the others, it is a very good way to master Eclipse. Chapter 5 is about installing ADT developer tools and exploring it, including Android Emulator. Starting with Chapter 6 we start to

32

use the Android Developer Tool. The first As always, I am interested in discussiapplication is the movie player. We are also ons with my readers and that’s why I invite introduced in manifest editor, layout editor, each of you to initiate and take part in and resource editor. After that we will find them. the implementation of classes involved in this project. Pleasant reading! Chapter 7 is about Android Native Development Kit (NDK) which is designed to allow developers to implement portions of application in native machine code. NDK provides: C library, minimal C++ library, Math library, Open GL graphic library and more. This chapter includes a guide for installing NDK and Sequoyah (a plug-in that provides a complete mobile development environment). Chapter 8 extends the project of movie player to play AVI movies. Android NDK is being used there, because AVI libraries come with open source solutions implemented in C/C++. The last two chapters are about Android scripting. The first one presents the theoretical part and the second one some extension points for the „Movie Player”. Android scripting is a handy tool for simple tasks. Scripting does not require compilation and in consequence packing and deploying. This book presents Scripting Layer for Android (SL4A). There are various interpreters for Android like Perl, Python, Rhino, etc. As I mentioned before, behind its simplicity, this book is a perfect guide for beginners, but not only for them. With a lot of screen shots and valuable code, it offers good publicity to using Android.

no. 14/August, 2013 | www.todaysoftmag.com


programming

TODAY SOFTWARE MAGAZINE

Load Test using Windows Azure

I

n a perfect world I would except to be able to run a load test or a stress test using a cloud provider without being forced to change any line code from my tests. In this article we will find out how to do this thing using the new cloud service. How will a person without knowledge of cloud be able to run a load test with 50.000 users for 24 hours with minim costs, without being obliged to purchase and configure 10, 20 nodes Radu Vunvulea

Radu.Vunvulea@iquestgroup.com Senior Software Engineer @iQuest

What is a load test?

What is a load test in fact? An expression that I think fits when we need to answer this question would be: ”Are you ready to be so popular?”. The main scope of this kind of test is to define and validate the maximum load that a system can have without affecting the performance. Even though the developer says that the system can handle 1000 users in the same time without any problem, the load test can prove the contrary even on simple scenarios. There is a tiny difference between the load test and stress test. Many times the load test finishes with a stress test that has the purpose to observe the behavior of the

system the moment when the load increases above the maximum supported capacity.

What is the market offering us now?

At the moment, it is full of different solutions for automated testing and for running load tests. Products like Selenium, LoadStorm or Neoload dominate the market. Besides them, there are many others and I don’t think 10 pages will be enough to enumerate them. If we use an on-premise solution, then we need to be prepared to resolve things like the acquisition and reservation of the resources for the load-test. In a small company it will be very hard to buy 10 servers just to run the load-test. In a big company, even if it has the financial resources, it will take a while until these resources will be available and sometimes it might be too late. Besides all this factors, the configuration of each machine and deploy can be the labyrinth from which we won’t be able to find a way out.

www.todaysoftmag.com | no. 14/August, 2013

33


programming Load Test using Windows Azure must be accessible via internet. Visual Studio 2013 brings a project template- Web Performance and Load Test Project. This type of project will allow us to define and run load tests on cloud.

How to create a new load test?

What is the Microsoft proposal?

On this extremely mature market, Microsoft appeared with an ingenious solution. If they already have a powerful and robust infrastructure for cloud why don’t use it to run load tests using Azure. Even though they are not the first ones that are offering this kind of solution, Microsoft has an advantage. They allow you to run load tests using Azure without using a new configuration. All you have to do is to have an account on Visual Studio Team Foundation Service (http://tfs.visualstudio.com/) which will be used for the receipt. Before, a load test using Microsoft could have been done only through Load Test Ring. This if formed from a controller that controls the tests- Load Test Controller and one or more agents on which our tests run. An architecture that is based on master-slave. The new version of Visual Studio 2013 provides us a new option- instead of running our test in our own Load Test Ring, we can run them on Azure, without a new configuration. We don’t have to deploy any virtual machine or to configure

34

different services.

Load Test Web Service

Load Test Web Service is the new Azure service that helps us. Through this service, Visual Studio 2013 loads our tests on the cloud. Behind this service there is a pool of test agents that is used to run our tests. This thing happens behind the scene and we don’t have to do anything for this to run. All the results from our test, together with other performance counters are available for us.

Which are the main characteristics?

Before looking over different functionalities that are supported, I propose to first take a look at the most important options that are supported now. We have the possibility to define UI tests and more. Beside the fact that we can record our UI tests, we can also write our custom tests and hit different endpoints. The tested endpoint doesn’t have to be only HTTP or HTTPS. We can also test a WCF or REST endpoint and also a web service. The only condition is that the endpoint

no. 14/August, 2013 | www.todaysoftmag.com

The easiest way to create a load test for a web application is to create one or more Web Performance Tests. This type of test can be UI tests which are very easy to create and to automate. Using the UI recorder that comes with Visual Studio 2013, we can create a Web Performance Test in just a few seconds. This type of test can be modified at any time and, if we want, we can generate code for the test. Through this method, the ones that wish to write code to modify the code can do this very easily. Of course, functionality like automatic detection of the dynamic elements that the page has or the extraction of different constants as parameters is supported out of the box. For each test of this type we can generate different sources like database, CSV or XML file. You can also use the tests written in Selenium for example. Each test can call other test and, this way, we can reuse the logic that we already have for testing. Until now we saw how we can create a test that can be used for the load test. It is time for us to see what a load test allows us to do.

Which are the main functionalities?

The first thing we need to do in order to create a load test is to THINK. We can define different profiles and time intervals through which we should be able to simulate a real user. For example we can simulate a delay of X seconds after each test. There are different profiles available for us to use. The way we simulate a load test can be made through different methods. We have the possibility to run a test with a specific number of users or we can define the number of users to increase at every step. Of course, most of the times, we will have to run different scenarios at the same time. That why, we can select the tests that we want to run and in what proportion, but also the way that this test has to run. For example we can specify how many times a test should run in a time interval or which is the number of users that have to run a specific test every moment the load test is running. We can simulate different browsers that the clients might have and different types of connections. The most interesting thing is that we have the possibility to add and


TODAY SOFTWARE MAGAZINE access not just performance counters from the clients but also the What is the price? ones from the servers on which our application is running. This For now, the service is on preview. Each user has 2000 virtual way we can monitor and see the counters from both the client and minutes per month that can be used for the load tests. There aren’t the servers. fixed prices for this. If you need more minutes for load tests all you have to do is to enter in the early adoption program without How to run a load test in cloud? additional costs. You will have 200.000 virtual minutes per month Until now we saw the main options that we have available in that you can use. Accepting the request takes very little time (in order to run a load test, but we didn’t see how to run this type of my case, about 6 hours). test. All we have to do to run the load test on cloud is to open the The first time I heard about virtual minutes I wondered what Local.testsettings and on General tab to select “Run tests using these are. A virtual minute is the duration of the load test multiVisual Studio Team Foundation Service”. This is the only thing we plied with the number of users. have to do to run the test on cloud. Of course, we have to be logged Once we run the tests, we will have access to all the results uni in Visual Studio with an account that is connected to Visual including performance counters, failed tests, error messages and Studio Team Foundation Service. different diagrams. All the results can be exported into an Excel that will automatically contain the diagrams that you can show to the clients. I invite you to try the new cloud service for load tests. I was pleasantly surprised by this service and I think it will make our life easier.

www.todaysoftmag.com | no. 14/August, 2013

35


programming

programming

Functional Programming in Haskell (IV)

A

t the end of the latest issue we managed to write a basic application allowing information retrieval from 3 tables containing data about individuals (data being presented as a list of pairs). Starting from that code (which will be presented here as well) we’ll build the application of this article.

Mihai Maruseac

mihai.maruseac@gmail.com IxNovation @ IXIA member of ROSEdu, ARIA

We start with some compiler extensions to allow more expressivity: {-# {-# {-# {-#

LANGUAGE LANGUAGE LANGUAGE LANGUAGE

MultiParamTypeClasses #-} FunctionalDependencies #-} TypeSynonymInstances #-} FlexibleInstances #-}

Then, we define the data types involved: type type type type

Name = String Age = Int Address = String PhoneNumber = Integer

newtype NameAgeTable = NAgT [(Name, Age)] deriving Show newtype NameAddressTable = NAdT [(Name, Address)] deriving Show newtype NamePhoneTable = NPT [(Name, PhoneNumber)] deriving Show

Remember that deriving Show clause hints the compiler to define a show method to convert each type to String. Here are some test values for the 3 tables: nameAge = NAgT [(„Ana”, 24), („Gabriela”, 21), („Mihai”, 25), („Radu”, 24)] nameAddress = NAdT [(„Mihai”, „a random address”), („Ion”, „another address”)] namePhone = NPT [(„Ana”, 2472788), („Mihai”, 24828542)]

Number where search name (NPT l) = lookup name l

And now we can search the tables using a common API: *Main> search „Ion” nameAge Nothing *Main> search „Mihai” nameAge Just 25 *Main> search „Mihai” nameAddress Just „a random address” *Main> search „Gabriela” nameAddress Nothing *Main> search „Ionela” namePhone Nothing *Main> search „Mihai” namePhone Just 24828542

This is where we stopped last time. Today we will simulate a join operation by writing a function getInfo which will return the age, the address and the phone number for a person as long as all three pieces of information are present. The naive approach is getInfo1 name = case search name nameAge of Just age -> case search name nameAddress of Just address -> case search name namePhone of Just phone -> Just (age, address, phone) Nothing -> Nothing Nothing -> Nothing Nothing -> Nothing

We define a class for searching based on name and we enroll the three types into this class. Because we don’t use deriving, we need to define the method ourselves. We’ll use the predefined lookup function Observe the cascading effect of the for that. test. This doesn’t look nice at all but we can rewrite the above code as: class SearchableByName t a | t -> a where search :: Name -> t -> Maybe a

instance SearchableByName NameAgeTable Age where search name (NAgT l) = lookup name l instance SearchableByName NameAddressTable Address where search name (NAdT l) = lookup name l instance SearchableByName NamePhoneTable Phone

36

no.14/August,2013 www.todaysoftmag.com

getInfo2 name = do age <- search name nameAge address <- search name nameAddress phone <- search name namePhone return (age, address, phone)

It looks like an imperative code and no Nothing tests seem to have survived the


Programare Funcțională în Haskell (IV)

TODAY SOFTWARE MAGAZINE

*Main Control.Applicative> :t fmap show fst

transformation. However, the code is still (2,3) fmap show fst (2,3) :: String Control.Applicative> fmap show fst (2,3) functional but with a higher focus on the *Main „2” declarative aspect: we only show what the function does and the boilerplate is hidden We must regard f from the type signavia syntactic sugar. The above code is in fact: ture of Functor typeclass as a computational context which will be modified by fmap. Or, getInfo3 name = search name nameAge >>= \age -> if looking from the point of view of curry search name nameAddress >>= \address -> search name namePhone >>= \phone -> functions, we get that fmap lifts a function Just (age, address, phone) from the normal case to the computational It looks like function composition but context/container level. using >>= to implement a pipelining of The interesting typeclass is Monad. function results. This is why this operator class Monad m where gets the name of programmable semicolon; (>>=) :: m a -> (a -> m b) -> m b (>>) :: m a -> m b -> m b it works like ; from imperative programs but return :: a -> m a it has an associated semantics. In our case the handling of Nothing values. First observation is that return is only We test the code: a function, not a language keyword. Its purpose is to lift a value to the needed com*Main> getInfo1 „Mihai” Just (25,”a random address”,24828542) putational context. For Maybe, return is the *Main> getInfo2 „Mihai” Just (25,”a random address”,24828542) constructor named Just. *Main> getInfo3 „Mihai” Just (25,”a random address”,24828542) The other function is more important. *Main> getInfo3 „Ioana” Nothing The operator >>= pronounced bind is able to do something which fmap cannot: imagine At the end of the article we’ll present the we have a function receiving a normal value magic behind which allows >>= to be the and returning some results into a context programmable semicolon. In fact, all can (let’s say a list of values). Doing a fmap with be explained by a single typeclass capturing this function on these results will result into another pattern of functional programming. a context of contexts (list of lists of values) so We’ll start with the Functor typeclass first: we need another operation (concat) to strip down one layer. The bind operator does this class Functor f where fmap :: (a -> b) -> f a -> f b work for us. Instance Functor [a] where Knowing the definitions for Functor and fmap = map Monad and the essential types of Haskell It’s self evident that we can use fmap on we can write enough code without requitrees, stacks, graphs, etc. This gives rise to the ring more advanced notions. However, if container analogy: fmap applies a function you feel intrigued, I recommend reading for all elements of a container and returns the Typeclassopedia 1 of Brent Yorgey to the results packed into a similar container. see other interesting patterns of functional The analogy breaks when we consider programming which are captured by typeother valid cases: classes and are useful in some programming activities. *Main Control.Applicative> fmap (+1) (const 3) $ 5 4 *Main Control.Applicative> :t fmap (+1) fst fmap (+1) fst :: Num b => (b, b1) -> b *Main Control.Applicative> fmap (+1) fst $ (2, 5) 3 *Main Control.Applicative> :t fmap show fst fmap show fst :: Show a => (a, b) -> String

1 http://www.haskell.org/haskellwiki/Typeclassopedia

www.todaysoftmag.com | no. 14/August, 2013

37


programming

programming

Migrating MVC 3 website DB to Azure (III)

I

n the previous articles we discussed about why we chose Windows Azure over other alternatives as a scaling platform and about the database migration progress to SQL Azure. In this article we will close the series by presenting how we migrated the web portal from a local IIS to the Azure cloud.

Context Dragoș Andronic

dragos@txtfeedback.net CTO @ TXTFeedback

We are dealing with a classic web architecture, a web portal developed in ASP. net MVC (3 & 4) backed up by a database running on MS SQL, abstracted by Entity Framework.

development (e.g. service bus, caching, mobile services etc.) but accessing these services would imply changes to our architecture. But in our case we did not want to change our architecture but only migrate 1-to-1 the existing architecture (as much as possible) with as little changes as possible to our design, even if this would mean that we would not take full advantage of what Azure has to offer. We had to migrate a web portal made up of 2 front end websites and a whole “family” of virtual directories containing services.

How do you translate this in Azure terminology? This architecture had to be prepared for “scaling” – moved to a configuration that allowed a high number of customers (requests) to be serviced at once. After analyzing more scaling options (the reasoning backing up this choice can be read in the first article of the series) we chose SQL Azure and Windows Azure as migration platforms.

We needed at least 1 WebRole – a web role is a virtual machine, or an array of virtual machines (when scaling) that host one or more websites. In one word a web role is a web server. The traffic directed to the web role will be load balanced between all the virtual machines that make up the web role – this way the scaling is achieved: do you need better performance? Add more virtual Web portal migration machines to the web role. Windows Azure gives us multiple optiThe restriction for scaling is that all ons/services when it comes to architecture the virtual machines have to be identic in

38

no.14/August,2013 www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE configuration – if we started the WebRole with a machine with a modest hardware configuration (say configuration A) we will Defining the website structure and the virtual directories structure only be able to scale by adding more machines of configuration A. After adding the first project to the WebRole, we will add the As the Azure machines configuration directly affects our next ones by manually editing the ServiceDefinitions file. costs (better machines = more money) it is important to find the This configuration file will describe how the web sites and web required and sufficient configuration for running our website/ directories will be structured and accessible so inside we will add: application without problems, and then we can scale the system • For each website we will add Site entry – we will need a by adding more machines with the same configuration (as a guiunique name for each website and a specific endpoint – if we deline – we find the minimum configuration capable of running don’t want a custom endpoint the default endpoint will do (port our website/application and then we scale horizontally – thus we 80 and http protocol), have more flexibility and we optimize the costs). • For each virtual directory we will create a VirtualApplication Our analysis will take into account: the MSDN documentaentry. Since we can only have a virtual directory inside a webtion, our project’s characteristics (if we optimized for multiple site we can either define the virtual directories inside one of the processors, if we are running a RAM intensive application, if we existing web sites (and make sure that the routing is configured require dedicated processors or if we are ok with using a shared is such a way that the virtual directories are accessible) or we processor, etc.), and, most importantly, the performance tests that create an empty website which we will use as a container for all we will run with various configurations – this way we will take the virtual directories. We went for the empty website approach. most “informed” decision. Finally we will end up with a configuration like this: After we have decided on a configuration for our web role, we are ready to create and configure the Azure project and WebRole.

Azure project creation Microsoft made our lives considerably easier by integrating (almost) all Azure related operations directly inside Visual Studio. Assuming that we are using Visual Studio 2012 we will need the Azure SDK (available from here ) and we are ready to go. We open the solution that contained our project/projects and we add a Windows Azure Cloud service project.

The last step – publishing the WebRole on Azure – only at this step the virtual machines will be created and our code will be transferred to each of these machines. Again, Microsoft made We will be adding manually the existing projects to the things easy for us: from Visual Studio we chose the Publish option WebRole so we will leave the Cloud Service project empty. on the Cloud Service project. The publishing wizard will help us chose and create the required Azure infrastructure (cloud service and storage account) and chose the desired target environment: staging (recommended) or production.

Validation and verification If all went ok and the WebRole was successfully created we will be able to access the website/websites on the address visible on the administration portal (http://manage.windowsazure.com/) – a GUID type address, guid.cloudapp.com, if we published the product on the staging environment or an address like mywebportal.cloudapp.com if we published on production.

Final notes – web portal migration

The tooling Microsoft provides for us is excellent – they did a great job in making a clean, easy to understand and easy to use, After the project is created we add all other projects to the management interface. WebRole from Solution Explorer: With this being said, once you start the migration process you will be running into all sorts of issues (particular to your project/ context). And there are a lot of aspects/questions to which I did not answer (nor tried to) – like how to choose between a single WebRole vs multiple WebRoles – so if you would like to ask specific questions you can reach out to me at dragos(at)txtfeedback.net. www.todaysoftmag.com | no. 14/August, 2013

39


programming Migrating MVC 3 website DB to Azure (III)

Final notes – website migration and database migration to Azure

Migrating to Azure was not without problems, but now, 3 months after the migration was done we can say that we are completely satisfied with the results (and our return on investment). Most of the challenges we faced were connected to the know-how – how you translate your local architecture to a cloud architecture, what do you need to change to your database, what is a WebRole, what is your minimum required configuration, etc. .MSDN, Pluralsight trainings, stackoverflow, they all helped but the most useful were the discussions we had with people that underwent a similar process. I would like to nominate here Radu Vunvulea and Zoli Herczeg (from Microsoft) that found the time to sit with us, answer our questions and point us to the right direction.

40

no. 14/August, 2013 | www.todaysoftmag.com


architecture

TODAY SOFTWARE MAGAZINE

MVVM design pattern

E

Andrei Moldovan andrei.moldovan@businesslogic.co.uk Software Developer @ Business Logic Systems Ltd.

ach programmer tries to be as organized as possible when it comes to writing code. Each team organizes the project so that it will be easy to maintain and understand by the new members in the team. This can be the result of the use of design patterns. We know that there are a lot of code organizing rules like these and that once we choose one of them it is very difficult and costly to change. However, it is important for the programmers to be up to date when it comes to these design patterns in order to have a maximum benefit from using them. Model-View-Viewmodel (MVVM) is a design pattern used in the software industry which was first introduced by Microsoft as a way to customize the model introduced by Martin Fowler. It seems that Microsoft was using MVVM for the projects that they were developing, like Expression Blend, even when the core of the WPF platform was under development. Based mostly on the Model-View-Controller (MVC) model, the pattern is addressed in particular to the user interface developers of the modern platforms ((HTML5, Windows Presentation Foundation, - WPF and Silverlight), in the projects where there is a developer that is specialized on this thing, having tasks that are different from the ones of a regular developer (which handles mostly the business logic and the interactions with the server). Architecturally, the pattern is composed of 3 essential parts, which can be deduced from its name: a Model, a View and a ViewModel. This structure resembles the one of the MVC, but offers the advantage of the ease of use of XAML and Windows Presentation Foundation, through data binding as close to the model using XAML, ViewModel and any check of the data at the Business level used to validate the data before it is displayed on the GUI. The Model refers to the actual data which the application works with, but also to the access layer to these data. For example, in the model, the objects that read from the database information about a person are declared.

The Views, as in the classic case, refer to the visual part that will be displayed on the graphic interface, like buttons, windows and other controls. These do not contain the business logic part. The big advantage here is that a designer can handle the graphic part of the application working just on the views, while the logic from behind remains unchanged. The ViewModels can be compared to models for the views, more precisely they refer to an abstraction of the view but they also have the function of binding data between the view and the model. They can be compared to the controls from the MVC design pattern but with more specialized aspects, such that they change the information from the model format to the view format and pass the commands from the view to the model. The viewmodels expose the properties and the commands, working with a form of data that is rather conceptual. The model on the other hand works with the real state of the data. There are debates related to the class behind the view. Most specialists suggest that it should contain just the InitializeComponent() method in the case of WPF and Silverlight, but in some cases it’s not worth moving the methods in the viewmodel. The View communicates only with the ViewModel, whereas the ViewModel is seen as an intermediary point between the View and the Model. Also the Model is the only one that interacts with the database. This model makes sense in practice only if

www.todaysoftmag.com | no. 14/August, 2013

41


architecture MVVM design pattern it is used in combination with a database, otherwise the data objects like the entities from EDMX or Linq do not make sense in this context. A diagram of this design pattern can be seen in the figure below. Other functionalities that make this pattern be used so frequently are the data templates and the system resources. The templates apply Views over the objects of a ViewModel. Programmers can declare them in XAML and let the system resources locate them automatically and then apply these templates at runtime. Because this pattern can sometimes be hard to implement from scratch, some platforms were developed to help programmers implement it, like MVVMLight or Caliburn. I personally recommend the last one because it offers the advantage of automatic recognition of the View by the ViewModel, without the need of an auxiliary class to do this thing. Let’s consider a simple example with an application that displays information about products from the database (name, price, id). In the Model we need to have the data access part. The way in which these will be accessed remains to the latitude of the programmer. This class will implement INotifyPropertyChanged and will contain the 3 properties, each having on the setter OnPropertyChanged(„Property”) to signal the change in value of the property. Special attention needs to be given to the name of the property because this will be passed on as string. The ViewModel will contain all the part that the user needs to interact with the application. All the operations on the data, like list sort, delete of items from the list and others must be written here. In this case, 2 commands are declared: GetProduct and SaveProduct which will be used to bring an object from the model in

42

the view and to save a product. These are Besides the disadvantages mentioof ICommand type and have a syntax like ned above, there is also the fact that in the following: some cases it can be difficult to design the ViewModel in order to obtain the degree of public ICommand SaveProductCommand{ get{ generality needed. Also debugging the data if (_saveProductCommand == null) { _saveProductCommand = new RelayCommand( binding is more difficult compared to the param => SaveProduct(), param => (CurrentProduct != classic methods where the code is written null)); } in the class behind. return _saveProductCommand; } In conclusion, MVVM offers certain } advantages like the separation of the view The RelayCommand class is also loca- from the business logic and the easiness in ted here, which is essential for the MVVM writing unit tests, but programmers must to function. It contains a command that will be careful if this design pattern is suitable be executed by other classes to run code in or not for their project. the base class by invoking of delegates. The View is the part that defines how the application will look. Also 2 DataTemplates must be declared, one for the Model and one for the ViewModel: MainWindow app = new MainWindow(); ProductViewModel viewModel = new ProductViewModel(); app.DataContext = viewModel; app.Show();

So when should we use this model? Although its structure is a logical one and it offers good organizing of the code, it is not suitable for any type of project. If we have a project that has a graphic interface which is not very complex, it is not justified to use MVVM because the code can be written in the class behind. Also, some programmers do not recommend using this pattern if unit testing will not be done. Due to the fact that the easiness of writing unit tests is one of its advantages, it is preferred that the pattern is used only with unit tests. It is unproductive, and thus not recommended the use of this pattern in a simple “Hello world!” application. Any software developer can understand a few lines of code, even if they are not very organized. However, as the number of code lines increases, so does the functionality.

no. 14/August, 2013 | www.todaysoftmag.com


management

TODAY SOFTWARE MAGAZINE

Complicated or complex

Simona Bonghez, Ph.D.

simona.bonghez@confucius.ro Speaker, trainer and consultant in oroject management, Owner of Confucius Consulting

“It’s complex.” “No, it’s not complex.” “Oh, yes, it is, ‘cause we have 12 systems to interconnect, all developed on different platforms. Plus, we are using a technology that’s new to us…” “So, it’s a complicated project, not a complex one.” Misu looked at Gogu completely puzzled. He took a second to consider whether he was making fun of him, but seeing the serious look on his face, he simply said in his remiss way: “Come on, Gogu… you’re picking on words… complicated, complex, it’s the same…” Gogu threw up his hands in despair: How can it be the same?! He looked around, searching for help, but Chief was not around. “Oh, dear Lord, what wrong have I done, to be the one who has to clarify everything?! I’ll have to put down in my job description: agony aunt offers explanations to every gawk, on daily basis, during and after working hours, like a fool, for free and getting no appreciation.” He heaved o deep sigh and launched himself into explaining: “It’s not the same, Misu, and it is good to clarify things. That’s why we do project management, so that we know this kind of things, to be able to act accordingly and prevent the emergence of problems. As far as projects are concerned, there are

two different terms: complicated and complex. The “complicated” attribute is given to projects where we have a great number of interconnected, interdependent parts or technical components. The connections are sophisticated, we need to pay a lot of attention to determine the implications, we need considerable technical expertise to be able to identify all necessary activities and to correctly plan such a project. Right?” “Exactly. So, this doesn’t also mean complex?” “No. I’ve just told you that this means complicated. Sit down and listen!” Misu sat down immediately and looked at Gogu; he was all ears. “The “complex” attribute is given by the unpredictable nature and it is determined by human behavior. A complex project has – by definition – parts and components that can interact unpredictably. Do you get it?” He noticed Misu’s not at all intelligent look, so he immediately added: “Here are some examples: launching a rocket towards the moon is a complicated project, producing a robot arm which can perform brain surgery, that’s another example of complicated project. Bringing up and educating a child is – however – a complex endeavour. Did you get it now?” Misu’s eyes were beginning to glitter. But he still doesn’t get it, Gogu thought. How can I explain it for him to understand?

www.todaysoftmag.com | no. 14/August, 2013

43


management Complicated or complex Misu voiced his perplexity: “Wait a minute. The complicated thing is clear. We don’t send people to the moon, but the 12 systems to connect, plus the technology, the interfaces…, we say this is a complicated project. But it’s the complex I don’t get. How is the child’s education our business? It has neither rhyme nor reason”, he stated and leant on his back. An utterly unfortunate move since the chair broke unexpectedly under Misu’s weight and he found himself lying on the floor, his feet up in the air. Gogu’s bursting into laughter was triggered not so much by the hilarious position, but by the grimace of total surprise on Misu’s face. He offered his hand and helped him up in a friendly way. “See what happens if you argue against me? I gave you the extreme example of education so that you unblock your mind, but as I see, I completely blew your mind… And your chair! Ha, ha… I wanted to stress that, unlike a complicated project, where borders can be clearly delimited, where you can define what is within the aims of the project and what falls outside them, in a complex project, borders can become permeable, it is possible that – along the project – you redefine them several times, according to the implications of the environment in which the project is being developed. Here’s a more practical example: a project of organizational change, where things are not complicated at all, but where people react differently, each one of them according to his expectations and fears. There can be unbelievable obstacles in the achievement of the project, determined only by the company staff ’s resistance to change. I saw a very interesting comparison in a work on this subject: the plane was given as an example of a complicated system because of the multitude of its components, mechanical and electronic, and a company facing a possible reorganization was given as an example of complex system. And pay attention to this: they said that people begin to react even to the rumor of a possible reorganization, they begin to talk about it, they form opinion groups, the first points of view start to appear, the system is already changing. Whereas the plane, if the mechanic shows up with his tool kit, with the clear intention of fixing the plane’s gear, it will have no reaction. Nice, isn’t it?” He immediately noticed that he had let himself carried away by the explanations; around them there were several other colleagues, probably drawn by Misu’s spectacular fall, who were now listening attentively to Gogu’s examples. The fusillade of questions began to hail, as each of them was trying to label the project he/she was working on: was it complicated or complex, or maybe both? “Give us some more examples, Gogu, ‘cause it’s not clear for everyone. And then, would you rather have a complicated project or a complex one? What if it’s both complicated and complex…” “Agony aunt, Gogu grumbled to himself, somehow embarrassed by the fact that he had no other examples to give. The complexity part, was it really complex, or complicated? But there came his rescue: probably drawn by the unusual to-and-fro in the office, the Chief also showed up. “What’s going on here, fellows? Are they giving something away?” Gogu wanted to reply, but he refrained; his concern was other now, so he launched the challenge to Chief: “We are talking about complicated projects versus complex

44

no. 14/August, 2013 | www.todaysoftmag.com

projects. Could you help us by some smart example?” “Oh, that’s a nice subject”, said Chief, enthusiastically. There, roll your eyes – thought Gogu, but he wouldn’t dare interrupt him. Chief shook his head. That’s a sign of intense cogitation –Gogu continued his inner monologue, but he was very curious about the follow-up. “Ok, I’m gonna tell you a joke. Complicated versus complex, right? A project manager was walking on the beach, after lunch. As he was walking, absorbed in his own thoughts – he was planning in mind the next meeting with the project team – he stumbled against something and, giving it a closer look, he realized it was an old lamp. Well, I’m not the PM in the joke, to find the genie from the lamp, said the project manager to himself, but he still picked the object up. And to his great surprise, after cleaning the sand off the lamp, a genie actually appeared before him, suddenly, in a thud. Well, it was a weird sight, like a human shaped cloud, just as in cartoons. It began to talk: Man, I am the lamp genie, bla-blabla, you know the story, tell me your wish. The project manager was used to taking advantage of every opportunity, so he didn’t take long to think and said: You know, Genie, I’ve got a project which requires me to travel permanently between Romania and Kuwait. And the flights are mostly night flights, they are tiring me out, not to mention the security check, waiting in the airports, reentering in the possession of your luggage… In a word, I would like to have at hand a suspended highway from here all the way to Kuwait. The genie considered it for a while – he was probably visualizing the map – then, he said: What you are asking me is extremely complicated, the distance is enormous, we have to cross over continents, over sees, no one could ever build a suspended highway on such a distance. Isn’t there anything else you would like? Slightly displeased with the quality of the encountered genie, our project manager tried his luck on a second wish: Ok, Genie, how about this one: I wish that for the project I’m working on, the six involved organizations collaborated, established all requirements together, agreed on them and didn’t change them until the end of the project. The Genie thought for a while, then, he asked: Listen, how many roadways is that highway supposed to have?”



sponsors

powered by


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.