Issue 35 - May - Today Software Magazine

Page 1

No. 35 • May 2015 • www.todaysoftmag.ro • www.todaysoftmag.com

TSM

T O D A Y S O F T WA R E MAG A Z I NE

Download from

Windows Store

Keep Calm and Start playing Dart re!? How does Microsoft ignite the futu

Logs and metrics in Java

What Is Really TDD?

Introduction to Couchbase NoSQL Document Database

Accepting Change. The Path to One Bug Per Month

Touched by NFC The portrait of a good tester

SeedForTech

Growing Constructive Cultures Fizbo, Simply rent

Looking back at Startup Weekend Cluj 2015 BattleLab Robotica All about the taxation of PFAs in 2015



6 Seed For Tech Mircea Vădan

8 Looking back at Startup Weekend Cluj 2015 Cristina Juc

10 MVP Academy Demo Day Irina Scarlat

12 BattleLab Robotica Ioana Bucur

13 SprintPoint Horia Mircea Botoș

15 How does Microsoft ignite the future!? Paul Hrimiuc

19 Touched by NFC Larisa Hogaș

21 Keep Calm and Start playing Dart Kuki Edina

24 Introduction to Couchbase Alexandru Objelean

30 The portrait of a good tester Daniela Crișan

32 What Is Really TDD? Alexandru Bolboacă

34 Logs and metrics in Java Vasile Mihali

37 Growing Constructive Cultures Cristian Philipp

39 Fizbo, Simply rent – Real Estate rental mobile application Lucian Pop

41 All about the taxation of PFAs in 2015 Ioana Varga and Ioana Costea

44 Accepting Change. The Path to One Bug Per Month Patkós Csaba


editorial

T

Ovidiu Măţan

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

he events of the IT domain also brought their contribution to the roaring of cultural and educational events that have enveloped Cluj in the month of May. One of them, the Romanian Testing Camp, reunited a great part of the testers from Cluj in a surprising location, four cinema rooms in a local mall, distinguishing itself especially through the prestige of its guests and the interesting approaches. Another event, IT Camp, invited us to travel inside the fascinating Microsoft world, maintaining in the organization, the unfolding of the event and the selection of guests, the same high standards we were accustomed to during the previous years. For the beginning of the month of June, the TSM recommendation is Techsylania, a conference dedicated to entrepreneurs. Another thing I would like to mention in the category of positive events of the month of May is the collaboration of TSM magazine with three students in an internship regime. On the initiative of Cluj IT Cluster, we accepted two months ago to collaborate under the form of an internship program for students. The students collaborating with TSM work on the completion of the website of the magazine, as well as on the implementation of some projects. Their domains of specialization are informatics, economic informatics, journalism and marketing. I shall not insist upon the details of selection of the candidates, since Cluj IT Cluster has promised us an article dedicated to this subject. But I would like to emphasize the passion and dedication of these students who, even if they do not have the knowledge of senior programmers, surely outrun most of them in terms of new ideas, enthusiasm, the desire to learn and the willingness to get involved in the projects. We are still planning the summer practice. If you do not have students within your organization, I suggest you get some, as they will certainly bring a considerable input in the development of new products or the improvement of the existing ones. In this issue, you can find articles on different programming topics such as: Introduction in Couchbase, Data transfer through NFC and Logos and metrics in Java. Testing is represented in the article entitled: The portrait of a good tester. The area of Scum/Agile contains titles such as: Accepting change; The path towards a bug per month and What is TDD? We let you discover the rest of the articles and we hope you will enjoy the reading!

Ovidiu Măţan

Founder of Today Software Magazine

4

no. 35/2015, www.todaysoftmag.com


Editorial Staf

Autors list Alexandru Bolboacă

Larisa Hogaș

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

Android Developer @ Yardi România

Alexandru Objelean

Vasile Mihali

alex.bolboaca@mozaicworks.com

Editor-in-chief: Ovidiu Mățan ovidiu.matan@todaysoftmag.com Graphic designer: Dan Hădărău dan.hadarau@todaysoftmag.com Copyright/Proofreader: Emilia Toma emilia.toma@todaysoftmag.com Translator: Roxana Elena roxana.elena@todaysoftmag.com Reviewer: Tavi Bolog tavi.bolog@todaysoftmag.com Accountant : Delia Coman delia.coman@todaysoftmag.com

alexandru.objelean@betfair.com Senior Developer @ Betfair

Patkós Csaba

patkoscsaba@syneto.eu Agile Software Developer @ Syneto

Lucian Pop

lucian.pop@fizbo.ro

larisa.hogas@yardi.com

vasile.mihali@arobs.com Senior Software Engineer @ Arobs

Daniela Crișan

daniela.crisan@isdc.eu Senior Tester @ ISDC Romania

Kuki Edina Tester Senior Analyst

Cofounder @ Fizbo

Printed by Daisler Print House Cristian Philipp

Mircea Vădan

Senior Consultant & Managing Director @ Essential Training and Consulting

www.clujstartups.com

Ioana Bucur

Irina Scarlat

Public Relations Responsable @ BattleLab Robotica

PR Manager @ How to Web & TechHub Bucharest

cristian.philipp@essentialtm.ro

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

ioanabucur1812@gmail.com

irina.scarlat@howtoweb.co

Paul Hrimiuc

Horia Mircea Botoș

Business Development Manager @ Accesa

Program coordinator @ SprintPoint

paul.hrimiuc@accesa.eu

incubator@clujhub.ro

Ioana Varga

Ioana Costea

Expert bookkeeping Managing Partner @ A&I Consulting

Expert bookkeeping Managing Partner @ A&I Consulting

ioana.varga@aiconsulting.ro

Copyright Today Software Magazine

mircea.vadan@gmail.com

ioana.costea@aiconsulting.ro

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 www.todaysoftmag.ro www.todaysoftmag.com

www.todaysoftmag.com | no. 35/may, 2015

5


business

Seed For Tech

A

new initiative was launched in Cluj this spring: Seed For Tech is a product development fund, with go-to-market support and seed investment. Through Seed For Tech, we want to help good ideas and talented people reach the next level while contributing to the development of the regional ecosystem of startups and tech products. Mircea Vădan

mircea.vadan@gmail.com www.clujstartups.com

We’re looking for business people or domain experts who have a business idea, a good market knowledge, are willing to build and lead a tech business and are in search for a solid partner to develop the idea and the software product. The founders who partner with Seed For Tech will get a software development team, financial investment and support in market research and idea validation. Consultancy in marketing strategy, logistics support and connections with other potential investors, clients and mentors are included, if needed. The model is structured in three phases, each phase addressing a specific stage in the development of a startup.

Phase 1 - Customer discovery and validation

Together with the founders, we will go through a period of customer discovery and validation, market research, business planning, with the goal to determine the business feasibility, get to problem-solution fit. The timeframe for this phase is up to 8 weeks. It is a period of understanding

6

no. 35/2015, www.todaysoftmag.com

the business and getting to know to see how we can work together. Seed For Tech will help the founders in achieving the goal mentioned by working together (on a daily basis) and by committing up to 3 000 euro to spend on the various needs regarding this phase. In this phase we don’t require a full-time focus. If a founder has already all these done, we can advance faster towards phase 2.

Phase 2 - Product development and launch In this phase, the tech team will work on the product, under founder’s lead and vision, getting the support needed to launch and acquire first customers. The goal for this phase is to build the core product, launch it and get to productmarket fit, after a few iterations. Besides the product team, Seed For Tech can also commit seed funding for activities in marketing, sales and business development areas. The founders will lead the team and the work in the new venture and this should be a top priority for them.


TODAY SOFTWARE MAGAZINE

Phase 3 - Growth and scaling In this phase, under founders’ lead, the business should be expanding. The focus is on marketing, sales, business partnerships, product improvement. The goal is to scale the business regionally or globally, become profitable, so it can take a few years. Seed For Tech will take care of the product side, will support the business development and will facilitate connections with funds for growth or partners from our business network. Overall, for us, what is important is the domain expertise and drive of the founders. We can step into the role of a tech co-founder, with equity varying on the effort involved and milestones set. Besides this, initially or later on, we can provide seed funding for additional equity. The founders remain the decision makers, as they are the experts in the domain and they lead the business. So far, in just one month from the launch, we had more than 20 applicants and in June we will start working with 4 of these entrepreneurs/teams for phase 1. We aim to reach 10 startups in phase 1 and up to 5 partnerships for phase 2 until the end of the year. Our focus is on B2B field, but we definitely want to hear B2C ideas as well.  Besides our usual process, we can also support entrepreneurs who already have a team and a

product and they need funding for further business and tech development. More details about Seed For Tech are available on www.seedfortech.ro or can be requested by email: contact@seedfortech.ro.

Young spirit Mature organization A shared vision Join our journey! www.fortech.ro

www.todaysoftmag.com | no. 35/may, 2015

7


events

Looking back at Startup Weekend Cluj: 30 startup ideas, 12 projects

A

fter a few meetings, a lot of written mails, and even more phone calls - it finally happened and it was over in just 3 days, but it was definitely worth it. In the last weekend of last month, the 24-26 of April, Exclusiv Catering has hosted our 2015 Startup Weekend Cluj event.

Cristina Juc

cristinajuc@gmail.com Organizatoare @ Startup Weekend Cluj

8

no. 35/2015, www.todaysoftmag.com

The three working days have started with the presentations of two speakers, Philipp Kandal and Salim Virani, after that, our host Adrian Pica has shared some of his experience at these kind of events. In the same evening, there was the pitching session. 30 ideas were pitched, 12 of them were selected by participants through maximum votes as being the most interesting. Afterwards, twelve teams were organized around them. The supreme battle was for the designers, because they were only six, out of 85 participants that came to this year’s edition. Friday evening was lighter, so that everybody had the chance to get to know one another, to find out each and everyone’s strengths, so that they would know what the field they would be the most productive at was. Every team has received a business canvas in order to help them structure their ideas for the project. The most intense day of all three was Saturday. The mentoring sessions were very useful, and every team got to benefit from the knowledge that our mentors had to share with them; they also received some great feedback. Sunday morning most of the teams had already a clear proposition,

and some of them had also their final presentation draft. After midday, things got more tensed, because we were all eager to find out who the winners were going to be. Until then, you can have a look at the twelve ideas that were developed during 54 hours of intense work. Here are the twelve projects, as they were presented in front of the jury: • Tutora (3rd place) - People teaching people - an online platform to teach/ learn something new. An app that wants to change the tutoring, the way we know it. • Travique (1st place) - Matching UK travelers with unique festivals from Eastern Europe, especially Romania. • Clear Future - A clear vision on higher education. A new way of learning, both for students and pupils. • Timber.ro (special prize) - “The platform that helps contractors meet clients, and where clients meet professionals. Get the quality services easy with the help of it. Just a click away.” • Awesome 1st Date - Helping shy people have that awesome 1st date. With profiling and coaches that will help ease the stress and the awkward silent


programare

moments from the 1st date. • Mountain Report (special prize) - Prepare for the unknown of the outdoor sports activity with the app. Get all the info: from renting equipment to weather and take your trip to the next level. • Flowcal - A productivity app.. • CPoints - The way to find solutions for charging your devices, easy and simple, when not at home. Research validates the market place. Never give up, research, pivot and takedown your competition with viable solutions. It helps you find networking and co-working spaces, where you can also charge your devices. • TapSit (2nd place) - Get the table at your favorite restaurant just a tap away. Always get a place wherever you are - wherever you want to. An app that allows you to see in real time how many free tables there are at your favourite restaurant or coffee shop, and that allows you to make a reservation with just one click of a button. • SnapIt (special prize) - A small camera device that can be attached to any type of glasses on the left/right side of the frame. The camera is connected to a mobile app and with a single touch on a capacitive button you capture the view, without risking missing the experience. • Foveo - Helps you turn all the resolutions into reality. You can create teams and work for a common goal together. Set, work and achieve what you want. You can also get encouragements from your friends that can help you move forward. • City 365 - A way to have the coolest experiences from the city, at the best price

TODAY SOFTWARE MAGAZINE

TapSit: won an Apple Watch from Telenav, 3 months of free coworking space at Cluj Hub, tickets for all the team at Techsylvania and Led Lamps from PITECH+PLUS. The 3rd place, Tutora, will get to work for free for three months at Cluj Hub, plus, every team member got a ticket to Techsylvania and Led Lamps from Pitech+Plus. This year, three of our teams won special prizes, as follows: Mountain Report - two tickets at Pioneers Festival - the biggest Europeean event for startups, a month of free co-working space at Cluj Cowork and tickets to Techsylvania; SnapIt - an invitation to Seed For Tech Investment Program, from Fortech, and Timber. ro - have passed directly into the second phase of the SprintPoint program. We are very curious to see how these projects are going to evolve, especially since they were crafted with so much love and dedication. We will try to follow up on them and to keep you posted, on our Startup Weekend Cluj blog. To find out more details about the project, or to see more pictures from the event, you can visit our facebook page. And if you like us, or you just have some questions, you can ask them on our mail: cluj@ startupweekend.org We are very proud of the people that were a part of this event, and it was a great honour to meet everyone one of them. Thank you all, Startup Weekend Cluj 2015 team: Adela Chende, Adrian Pica, Anca Suciu, Cătălina Mironescu, Cristina Juc, Cristina Tare, Fele Eniko, Irina Rotaru, Mădălina Grecu, Mircea Vadan, Philipp Kandal, Roxana Oroian, Roxana Rugină, Vlad Ciurca.

We had some pretty awesome techie prizes for our Startup Weekend Cluj 2015 edition’s winners. Travique, the 1st place winners, got a MacBook Air from Telenav, 3 months of coworking space at Cluj Hub, one hour of mentoring session from The HYVE and a Solar Charger for each team member from PITECH+PLUS.

www.todaysoftmag.com | no. 35/may, 2015

9


startups

12 promising startups pitched their products during MVP Academy Demo Day

B

ucharest, May 19th, 2015 – The MVP Academy Class of 2015 officially graduated the pre-acceleration program on Friday, May 15, during Demo Day. 12 startups took the stage to pitch their products and showcase the results of 2 months of work, while also getting the chance to start discussions with potential investors and strategic partners.

Organized in partnership with Telekom Romania and Bitdefender, with the support of CyberGhost, Raiffeisen Bank, hub:raum, Microsoft, and SendGrid, the second edition of the pre-accelerator took place in between March 23rd – May 14th at TechHub Bucharest and helped the finalists better define their products and businesses, and preparing them for the next steps: scaling, raising money and closing deals. Free educational program customized to meet the specific needs of the participating teams, MVP Academy offered the startups access to educational resources to match their development needs and facilitated their interaction with experienced mentors, angel investors, as well as representatives of early stage investment funds and accelerators in the region. Throughout the program, the finalists learnt more about building a successful startup from its grounds up, networking, pro du c t d e ve l opm e nt & m e t r i c s , storytelling & pitching, customer development, financing or legal aspects by attending the practical workshops delivered by experienced professionals in the industry. Among them there were Bobby Voicu (Co-Founder, MavenHut), Paul Renaud (Executive Coach & author of “A networking book”), Bogdan Rîpa (exMaster Product Owner, Adobe Romania), Alex Barrera (Co-Founder Tech.eu & Press42), Salim Virani (Partner, Founder Centric), or Ana Maria Andronic (Partner, Biriș-Goran). Besides these, the startups were mentored by 50+ professionals and industry leaders and received valuable recommendations and strategic insights. The teams thus had the chance to refine their products by talking with representatives of well-known accelerators such as Techstars

10

London, Startupbootcamp or Ignite 100 and with experienced professionals among which there are Florin Talpeș, Founder & CEO, Bitdefender, Olaf Lausen, Chief of Staff (of the CEO) and Business Development Director, Telekom Romania,

to present the audience the results of 2 months of hard work and their pitch represented the opening line for starting discussions with potential investors and strategic partners. The event was opened by George Dita,

or Cristi Badea, Co-Founder, MavenHut. All these add up to the 1 on 1 coaching sessions, the group meetings and the on-demand meetings approaching specific subjects of interest to the teams. The pitching practice sessions played an important role in the program, helping the startups refine their pitches to the finest detail by working with both the MVP Academy team, and exceptional professionals such as Jon Bradford, Managing Director Techstars London, or Mike Butcher, Senior Editor, TechCrunch. The program officially ended on Friday, May 15th, with Demo Day, event that brought together more than 200 remarkable representatives of the regional tech ecosystem: investors, accelerators, entrepreneurs, media and experienced professionals. 12 startups took the stage

Program Manager MVP Academy, and continued with a keynote speech delivered by George Lemnaru, Founder, Green Horse Games, who shared with the audience the lessons learnt while building 2 VC-backed companies. George discussed about the myths associated with being an entrepreneur and concluded by stating that: “If you’re smart and determined you’ll make it from any country”. The evening continued with the pitching session offering the startups in the MVP Academy Class of 2015 the chance to pitch the audience and showcase their progress. The teams that took the stage during Demo Day are: 1. Accelerole: Pay-as-you-go management tool that helps companies manage independent professionals with ease; 2. Catwalk15: Mobile app that helps

no. 35/may, 2015 | www.todaysoftmag.com


users get instant fashion advice & find style inspiration, anytime, anywhere; 3. Clepsisoft CyberFog: Proactive cyber-security solution which can deflect cyber-attacks targeting your company; 4. CloudHero: PaaS that automates the management and scaling of an application across any public; 5. Conversion Network: Integrated marketing software that enables affiliate marketers to build and scale their business with less effort and better results; 6. Inner Trends: Analytics tool that allows users to directly ask business questions and receive immediate, precise and to-the-point answers. It is a common language between business people and data; 7. myDog: Platform that helps dog owners easily interconnect in order to make their dogs happier and healthier by giving them more opportunities to play with other compatible dogs; 8. SafeDrive: Drive. Earn. Play. Mobile app that rewards drivers for not texting while driving; 9. Seeds: Platform that enables users to create, distribute, and analyze advanced surveys for any industry; 10. Swapr: Mobile app that allows women to exchange clothes with eachother based on geo-location and fashion sense; 11. SwipeTapSell: Mobile web app that offers a seamless shopping experience helping online stores increase smartphone and tablet conversions; 12. Unloq: We make security as it should be: simple & free.

“MVP Academy was an excellent time investment that helped us identify the key areas of focus in improving our product, and also maximize our pitching capabilities to express the most valuable aspects of our product and startup. This is primordial when you always face a distributed attention of your audience”, declared Tudor Cobalas, Co-Founder of SafeDrive, startup that has recently won a Gold Edison Award in the Lifestyle & Social Impact category.

each product. Over the last 2 months, the finalists were committed to growing their products and businesses, they’ve worked a ton and sacrificed a lot to deliver fast and well. We are incredibly proud of each and every one of them and we are happy to see that we managed to turn what would have otherwise been 5-6 months of work into 2 intensive months of progress. And this is just the beginning, since we are confident that we’ll keep hearing great results from the startups that were part of our Class of Demo Day ended up with a networking 2015”, concluded George Dita, Program cocktail where the startups got the chance Manager MVP Academy. to network with the persons in the audience directly interested in their products, and thus make the first steps towards potential investments and strategic partnerships. Irina Scarlat irina.scarlat@howtoweb.co

“We saw the huge potential of our finalists as early as the selection period when we understood the strong teams that are behind

PR Manager @ How to Web & TechHub Bucharest

www.todaysoftmag.com | no. 35/may, 2015

11


events

BattleLab Robotica – the biggest robotic megasumo competition in Transylvania

T

he faculty of Electric Engineering within the Technical University in Cluj-Napoca, in collaboration with the students’ organization BEST Cluj-Napoca, organized on the 9th of May 2015 the fifth edition of the BattleLab Robotica competition.

The competition consisted in the implementation of autonomous sumo robots, capable to identify and eliminate from the playground the opponent robot in “1 to 1” type competitions. 27 teams made of students from the technical profile universities in Romania took part in this edition. They had been working for months to build the robot. The building of robots represents a complex project which involves knowledge of electrical, mechanical engineering as well as knowledge of automatics and computers. The teams were formed of four students, the competition observing the international rules of robotic sumo in regard to the size of the playground and the rules of game. Over 200 spectators of all ages came to see the contest, to support their favourite one with placards and loud applause. The powerful robots, the tight fighting, the multiple ties made the show to continue until about 8 o’clock in the evening. S.I. Dr. Engineer Septimiu Crisan, the organizer of the event stated in relation to this contest: “Throughout the entire year, I can hardly wait for the event to take place. On the contest day, I don’t even want to hear about it. And when it’s over, I tell myself that I want it again!”

12

The 1st place was awarded to the WOLF robot, a team that came for the second year in a row right from Bucharest to take part in the competition. The prize awarded by the public for the best design was received by those from ROBOTROLL. The bravest robot was THORQUE, and the Bosch award for the most innovative robot was gained by NYAN. The BattleLab Robotica 2015 event was supported by the partner companies: Emerson, Yardi, Bosch, Garmin, Telenav, TME Poland, Stratec Biomedical and the following sponsors: MSG, Fortech, Accenture, Wenglor, Robofun and

no. 35/may, 2015 | www.todaysoftmag.com

Frequentis. The prizes offered had a value of over 7000 lei and they consisted in electronic components and gift vouchers. Next year’s edition will open its gates for international participants and hopes to secure a well-known place on the robot fighting world scene.

Ioana Bucur

ioanabucur1812@gmail.com Public Relations Responsable @ BattleLab Robotica


TODAY SOFTWARE MAGAZINE

T

startups

SprintPoint: a pre-acceleration program in Cluj that wants to help you succeed!

he seed accelerator phenomenon is growing worldwide, with an ever-increasing number of active programs primarily in the United States but also in other parts of the world. Prominent seed accelerators such as Y Combinator have received significant attention in the entrepreneurial community and are continuously exploring potential startup ventures.” This trend was observed by L. Barrehag in 2012 in a study about accelerators and three years later the seed programs have been developing further than ever before. This made me think... when you want teams of professionals and entrepreneurs you must be able to think outside the box, to enter a seed program, first you have that wish to have their own businesses, to commit to this and be able to collaboto understand the difference between and offers them the opportunity to ask rate, work hard and learn from others. an accelerator and an incubator. Paul questions and to learn from professionals, These qualities are in our opinion the best Bricault, the cofounder of a Los Angeles ambassadors and facilitators in the tech recipe for success in the program. based accelerator, explains that the acce- field. During SprintPoint, in order to help lerator takes some equity of externally In order to apply, the interested team your development, you will undertake developed ideas in return for some capital must submit their value proposition, core training, coaching and mentoring sesand mentorship. At the end of the 3 or 4 element based on which the mentors and sions. All of this will take place at Cluj months the startup „graduates”. The incu- investors will evaluate the application. Hub, a modern co-working space in Clujbator brings an external team to work on Having a good value proposition will show Napoca’s city center. You will also have the a idea of the investor. The more an idea how much thought the team gave about opportunity of networking with mentors needs to achieve maturity, the more the the product or service and how well they and investors participating in the program required equity grows. understands the business that they are and to attend various tech events, such as: Basicly the incubator takes longer getting into. FiWare Workshops, Transilvania Demo and requires more equity for the assisThe program will stretch over the Days, Techsylvania and others. At the end tance, while the accelerating programs are summer and the participants will be ini- of the program all the teams will have the shorter, more specialised and ask for less tiated in the frameworks presented in two chance to pitch their work during a Demo equity. very important books for any technical Day. This is why we at Startup Transilvania startup. The first is Lean Canvas, by Eric This 8 week program will prepare you decided to conceive a pre-acceleration Ries (2011), and second one is Disciplined and your idea to face the challenges that program that would help tech orien- Entrepreneurship: 24 Steps to a Successful will follow. In order to register, please ted startup from Cluj-Napoca grow and Startup, by Bill Aulet (2013). More details complete this form: http://sprintpoint.ro/ achieve their potential. The program is cal- about the books during the program. apply/ led SprintPoint. During the 8 weeks of the In our program, we are looking for program, the teams will go through some those startups driven to succeed. In order Horia Mircea Botoș incubator@clujhub.ro interesting and useful experiences, such as to be eligible, you must be part of a team team guidance and mentoring, pitch trai- (you can’t apply as an individual), your Program coordinator @ SprintPoint ning, workshops and networking . project is more than a mere idea, and this This program is oriented towards project has scaling potential. As for you, 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. 35/may, 2015

13


communities

IT Communities

T

he end of May and the beginning of June are full of events in the Romanian IT area. We invite you to take part in I T.A.K.E, on May 28th-29th, which will take place in Bucharest. In Cluj, a new edition of JS Camp is going to take place on the 2nd of June, and on the 6th -9th of June, Techsylvania is scheduled to take place. See you at the events !!!

Transylvania Java User Group Community dedicated to Java technology Website: www.transylvania-jug.org Since: 15.05.2008 / Members: 598 / Events: 47 TSM Community Community built around Today Software Magazine Websites: www.facebook.com/todaysoftmag www.meetup.com/todaysoftmag www.youtube.com/todaysoftmag Since: 06.02.2012 /Members: 2270/ Events: 31 Cluj Business Analysts Comunity dedicated to business analysts Website: www.meetup.com/Business-Analysts-Cluj Since: 10.07.2013 / Members: 91 / Events: 8 Cluj Mobile Developers Community dedicated to mobile developers Website: www.meetup.com/Cluj-Mobile-Developers Since: 05.08.2011 / Members: 264 / Events: 17 The Cluj Napoca Agile Software Meetup Group Community dedicated to Agile methodology Website: www.agileworks.ro Since: 04.10.2010 / Members: 437 / Events: 93 Cluj Semantic WEB Meetup Community dedicated to semantic technology. Website: www.meetup.com/Cluj-Semantic-WEB Since: 08.05.2010 / Members: 192/ Events: 29 Romanian Association for Better Software Community dedicated to experienced developers Website: www.rabs.ro Since: 10.02.2011 / Members: 251/ Events: 14 Tabăra de testare Testers community from IT industry with monthly meetings Website: www.tabaradetestare.ro Since: 15.01.2012/Members: 1243/ Events: 107

Calendar May 27 (Cluj) Launch of issue 32 of Today Software Magazine www.todaysoftmag.ro May 27-28 (Cluj) 2 Fast & Curious: Angular JS Basic eventbrite.com/e/2-fast-curious-2x2-angular-js-workshops-tickets-16988047708 May 28-29 (București) I T.A.K.E - recommended by TSM 2015.itakeunconf.com May 28 (Cluj) OpenStack Kilo Release Overview meetup.com/OpenStack-Cluj/events/221754372/ June 3 (Cluj) Meetup #40 - Enhance your web testing with Fiddler meetup.com/Tabara-de-Testare-Cluj/events/221508203/ June 3 (București) Hands-on Code: Programming by Wishful Thinking meetup.com/The-Bucharest-Agile-Software-MeetupGroup/ events/222502856/ May 28 (București) #2 AngularJS Meetup meetup.com/Bucharest-Angular-JS-Meetup/ events/221929288/ June 2 (București) JS Camp www.jscamp.ro June 3-4 (Cluj) 2 Fast & Curious: Angular JS Advanced eventbrite.com/e/2-fast-curious-2x2-angular-js-workshops-tickets-16988047708 June 6-9 (Cluj) Techsylvania - recommended by TSM www.techsylvania.co

14

no. 35/may, 2015 | www.todaysoftmag.com


events

How does Microsoft ignite the future!?

A

t the first edition, Ignite managed to bring together over 23.000 IT pros and business people for a full week during which Microsoft gave details related to what they did lately and what they planned for the future, for most of its range of product and services. But if you expected some big announcement to be made, then you missed out the place as not even the HoloLens were exposed. Paul Hrimiuc

paul.hrimiuc@accesa.eu Business Development Manager @ Accesa

Satya’s opening keynote was not as fresh and vibrant as I expected compared to what I heard happened last year at the Partner Conference in DC, but maybe the speech was diluted also due to the fragmentation of audience and multitude of topics. Besides repeating his vision of a Cloud First, Mobile First world which we all know, he emphasized on the increased role that IT pros have to play in order to lead transformation within their organizations. Speaking of this, I think the transformation MSFT is experiencing is kind of amazing and even people who don’t love them can see that the number of products, releases and innovations MSFT is delivering is on a growing trend. This is incredible for an organization of this size, complexity and legacy. More interesting than the opening

keynote was to hear Gurdeep Singh Pall talking about how Windows 10 wants to address personal computing. I believe Microsoft did a really good job here: instead of focusing on the device, they targeted the user experience (we live in an experiencebased economy, don’t we?) and offered a consistent and familiar user interface across all kinds of devices. To quote Gurdeep “the device is not mobile but the user is” and they need to be able to work at anytime from anywhere. If you add Continuum to this, a feature designed to make it easier for users to switch between touch interfaces and nontouch environments and the Windows 10 Universal App as one application platforms for developers, than you get something difficult to beat. Besides, we should not forget about

www.todaysoftmag.com | no. 35/may, 2015

15


events How does Microsoft ignite the future!? Cortana - the personal assistant (a new experience again) will be everywhere and you can add it even when you build games or line of business applications. The new browser Edge (previous code name - Spartan) will be shipped together with IE11, which according to Microsoft will be supported as long as Windows 10 will be supported. Considered to be more of a marketing move to cut off from the past, Edge tries to come with new functionalities that focus on action and interaction, such as taking notes, and considers speed benchmarks as old fashioned. Information can also be consumed easier in the Reading View mode (even in offline mode) but websites relying heavily on advertisement can opt-out for the obvious reasons. On top of those areas, I touched deeper some other topics:

The modern Digital Workplace Millennials are coming into workforce: IT and other industries (e.g. television, fast-food, etc.) need to acknowledge this and act upon it accordingly, as there is no way to deal with this huge wave other than surf on it. Millennials are experiencing a different way of consuming information, communicate and collaborate in their personal lives, so they expect the same at work too. Wise leaders know that engaged, motivated and well

(bought in 2011), Office 365 (2011), Yammer (bought 2012) and Delve (2014). The latest seems to fit in the 4th generation of technologies as identified by Gartner (pictured below). And that is what creates confusion in the first phase because they released many collaboration tools with similar and even overlapping functionalities that users became frustrated1 with and are asking for clarification. But the confusion doesn’t stop here as it seems MSFT just lost another trademark dispute with Sky in EU, which will be a big issue later. I attended a couple of sessions on digital workplace and two made the difference: 2toLead2 and how Cargill on-boarded 3 years ago onto Yammer (in contrast, today they are using SharePoint 2007). In short, the discussion shall not be about a technology/ tool vs. another but rather identify your organizational context, communication levels (individual, group, organizational) and decide when to use what depending on the audience and urgency. But, take it easily with a step-by-step approach and build your own matrix (see photo).

13 possible usage scenarios

equipped employees can boost revenues growth up to two and a half times and nowadays is better to surface people’s knowledge by empowering an interactive collaboration instead of surfacing the data silos. [Surfing seems to become a burden word]. So, ever wondered how Microsoft approaches that trend? The short and confusing answer will be: in infinite ways J They started with: Outlook (1992), SharePoint (2001), One Note (2003) Live Communications Server (2003) - named Lync later and recently Skype for Business, OneDrive (2008), Skype

16

no. 35/may, 2015 | www.todaysoftmag.com

As SharePoint on-premise is not going away especially due to more and more hybrid scenarios, I got us enrolled in the TAP programme for this, being keen to get the 2016 version on our environment and see what our options are with that. How does the future look like? Make use of self-organizing “groups” as the main concept across all those tools, which you can integrate and topped up with Delve to aggregate the content. How will this happen in reality? That will be seen in the coming years but in the meantime don’t forget to finalize your own work and disconnect from too much collaboration once in 1 http://www.windowscentral.com/eu-court-rules-skypes-name-too-similar-skynetwork-claim-trademark

2 http://www.2tolead.com/whitepaper-when-to-use-what-in-office-365


TODAY SOFTWARE MAGAZINE a while ;) Tip #1: If you plan to adopt Yammer internally, than you should know that adoption can be boosted if you create a group of group creators (power users/ambassadors) to share the best practices with them, drive adoption and manage the community.

about or even developed for it (as we have) as it’s becoming more and more tangible and Microsoft is taking even bigger steps in that direction. For instance, you will be able to run Windows 10 on any device that has a minimal computing power, as Microsoft has 3 different versions of its OS, to cover industry devices,

Also, communication from the top management on this channel is a must. Tip #2: Tired of PowerPoint or even Prezi and want to try something new? Then it’s worth trying Sway as a great exploring tool. Tip #3: Consider that tools such as Delve can be interpreted as a threat at internal level because consumer surveillance fears can become employee surveillance fears. Here, you need to ensure a strong communication with stakeholders to prevent that fear from escalating.

mobile devices and even smaller ones which can run Windows IoT core for free (photo). Of course, with Windows 10 Universal platform you have powerful APIs for easy access and sensors integration. Microsoft is targeting the consumption of the Azure IoT suite, which doesn’t just host the data collected: you can use Machine Learning for predictive analytics, you can manage your entire sensor network and so on. While consumers are more interested mainly in home applications (automation, security, energy management, entertainment) there are endless businesses verticals to be explored and defined. For example, implementations are coming from places you would never imagine, such as the Connected Cow from Fujitsu or monitoring drivers’ behavior from insurance companies, of course with their acceptance. Surely there are issues related to standardization, an area where there are two new organizations that are working on defining interoperability: AllSeen and AllJoin Security is another challenge related to IoT, but this is a WIP too. #Tip: Checkout www.windowsondevices.com if you want to read more stories and learn an updated approach of DYI.

Enterprise Mobility As users are the ones which are mobile and need access to information not only from their desks (could you imagine a shop assistant sitting only at his desk!?), mobility is becoming a big challenge, especially for enterprises. Microsoft’s approach seems to focus particularly on securing the data regardless of its location and keep corporate data contained. With Intune you can now manage all sort of devices, while you can use Windows 10 Universal app to build once and deploy on any Windows device. But here there is an area not covered yet as companies need to build and consistently manage the same application for any mobile OS. This is where other providers like Kony have an important edge. Later on, by end of this year, additional to t h e Wi n d ow s Store, companies will be able to create their own Business Store or C ompany Portal where they can download application from the Public store for internal use and/ or publish and manage their LOB applications (photo).

IoT That’s something most people have already heard www.todaysoftmag.com | no. 35/may, 2015

17


events How does Microsoft ignite the future!?

Personal evaluation of Microsoft Ignite, on a 1 to 5 scale, where 1 is the lowest: • Personnel: 5 (very helpful) • Event location: 4 (no train stations nearby made it more difficult to reach if your hotel was not located in proximity) • Sessions availability: 4 (many had to repeat due to insufficient space to get all people in) • Sessions quality: 4 (I reffer to the business ones, some introduction into the concepts will help people to better understand the tools, especially the latest ones) • Expo hall: 3 (no grouping among exhibitors made it difficult to easily find what’s right for you) • Meals: 2 (too sweet for my taste and not much variation) • Party: 5

18

no. 35/may, 2015 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE

programming

Touched by NFC

L

ike many other things that we use, develop or innovate, I started the NFC journey by searching a solution for a simple problem: remembering to do things before I leave the house, more specifically, remembering to turn off the central heating system or even finding something that could do it for me. Of course then I realised that I had multiple other ideas that would ease my life or make it cool and fun. For example I wanted a way to unlock my phone without any interactions or open my car just by getting closer to the driver’s seat and many other wishes. And then NFC appeared, just like Santa, and made some of them happen.

What is NFC? Near Field Communication (NFC) is a set of short-range wireless technologies, typically requiring a distance of 10cm or less to initiate a connection. It makes life easier and more convenient for consumers around the world by making it simpler to make transactions, exchange digital content, and connect electronic devices with a touch. NFC is compatible with hundreds of millions of contactless cards and readers already deployed worldwide. The NFC technology has many forms and shapes but the most commonly encountered are NFC Tag(passive device) and smartphones(active device). Tags can range in complexity. Simple tags have a bit of storage memory, along with a radio chip attached to an antenna and offer just read and write semantics, sometimes with one-time-programmable areas to make the card read-only. More complex tags offer math operations, and have cryptographic hardware to authenticate access to a sector. The most sophisticated tags contain operating environments, allowing complex interactions with code executing on the tag. The data stored in the tag can also be written in a variety of formats, but many of the framework APIs are based around a NFC Forum standard called NDEF (NFC Data Exchange Format). Even if the technology has a few years on the market already, I feel like its maximum potential has not been reached yet. Android released its first NFC supported phone in 2010 (Samsung Nexus S), followed by Windows in 2012 (Nokia Lumia 610) and finally Apple in 2014 with iPhone 6 (just for Apple Pay).

Why is it not on the Walk of Fame yet? Just by looking at the above information, I would definitely say that NFC should conquer a large percentage of users and businesses. But it doesn’t. Let’s see why! Early business models such as advertising and industrial applications were not successful, having been overtaken by alternative technologies such as QR code,

barcodes or UHF tags, but what distinguishes NFC is that devices are often cloud connected. All NFC-enabled smartphones have access to dedicated apps including ‘ticket’ readers as opposed to the traditional dedicated infrastructure that specifies a particular (often proprietary) standard for stock ticket, access control and payment readers. By contrast all NFC peers can connect to a third party NFC device that acts as a server for any action (or reconfiguration). Next, I’ll try to make a small study by analyzing its usability, advantages and potential from different perspectives.

A business’s perspective NFC isn’t a fundamentally groundbreaking technology. Like Bluetooth and WiFi, it’s a wireless radio communications standard. In the wireless world, NFC’s closest relative is actually RFID (radio frequency identification). Because of its lower costs, needs and customizations, NFC can come in handy in multiple problems. NFC tags have different forms from simple stickers, self-destructing ones to industrial waterproof tags resistant in extreme environments. Its reading and writing capabilities also differ from just a write-once, read-only, unlimited read-write operations or password protected memory space. All companies that keep track of things should love this technology. Retailers, shipping companies, dry cleaners use NFC tags incorporated in packages, clothes, different selling objects can use NFC to keep inventory on supplies or shipments. A smart tag could be embedded into any flyer. Tap the tag, and you’re directed to a Web site, receive a contact’s details, even get a candidate’s CV or a snappy biography in the form of a text file or image. Some malls (even in Romania) use it for advertising purposes or even as a treasure hunt discount/gift card game. But since we are in the era of the Internet of Things, smarter solutions and ideas came in focus. Companies use tags for time tracking their employees, as well as solutions for project time task tracking or leave management. Combined with NFC, employees can easily start and stop their tasks from any location with their smartphones, or conveniently when entering and exiting the building. Healthcare, marketing, payments – the sky is the limit. But my favorite thing must be a wearable (ring, wristband) that unlocks www.todaysoftmag.com | no. 35/may, 2015

19


programming Touched by NFC with a touch a smartphone, a door or even your car. NFC module Source used in combination with a GPS system can locate things, pets or • http://nfc-forum.org/ persons easily. • https://developer.android.com/guide/topics/connectivity/nfc/index.

What are the users’ opinions? Unless you’re a geek user or working in IT environment, you probably never heard about this technology before even if it has almost 5 years on the market. Users still need to be educated about this technology. In my opinion, and it hurts to say this being an Android developer, probably the main reason why it’s not on Walk of Fame is the missing support from iOS. Apple only supports Apple Pay through NFC and there is no API support, not even in the latest iOS 8. The main justification for this blank space is, in their words, the “security reason”. I’ll investigate this issue later.

html http://www.nearfieldcommunication.org/

What about a developer? Unless you’re an Android or a Windows developer, you’re missing a lot of fun. Android was the first OS that gave API support for interacting with NFC Tags and introduced the notion of Beaming - a feature to allow data to be transferred via NFC with other Android phones. It allows exchange of web bookmarks, contact info, directions, YouTube videos, and other data. When I finally reached the interesting part, I find that I have too little space left and too much to say, so I’ll wrap this up and find you in a following article when we’ll dig deeper in Android’s NFC features.

Conclusion NFC is starting to conquer more users day by day and we could definitely make it useful in lots of areas of interests. Development is easy, secure protocols(NFC Signature RTD 2.0) of signing and checking data integrity are now used, password protected access memory tags are available, so I see no reason why this technology shouldn’t be more lively on the market. Too bad Apple doesn’t want to join this party.

20

no. 35/may, 2015 | www.todaysoftmag.com

Larisa Hogaș

larisa.hogas@yardi.com Android Developer @ Yardi România


programming

Keep Calm and Start playing Dart

S

Kuki Edina Tester Senior Analyst

is not missing! Nevertheless s, I’m not here to give out ideas to managers on how to reduce recreational office time by cutting down the number of missiles; neither am I here to introduce a single-chance Russian-style version of the well-known game. This is something from our other big brother, namely Don’t-be-evil Google. Thanks to his prominent expertise around web technologies, in October 2011, Aarhus, the city of Bjarne Stroustrup and Lars Bak could witness the birth of another potential revolutionary of the IT industry, as being the place where Dart was first officially unveiled. And like any responsible brother would do when presenting, even better, inviting us to try out his new gadget, we could hear the initial set of hows, whys and wherefores and since then, let’s not say he would be showing off, yet keeps us up to date about its very latest upgrades. Still here? Still calm? Then, let’s come to the Dart’s side! This time no cookies, but energizing syntactic sugar - we do need some sweets, right - and a huge set of new approaches are offered to improve web-programmer’s experience. As a beginning, Dart does not simply refer to a programming language. Better, imagine an entire solution and toolchain that aims to enable the development and deployment of

high-performance, structured, scalable web applications, and if someone has experience with such apps, we must admit that our big brother has - just for the record, you might remember Google’s Chrome or V8 JavaScript engine, which did have something to do with the immense speed-up of our browsers. The bright plan behind Dart would be to outbalance the far cry from how the browsers have been improved yet the startup, evolvement and maintenance of complex web apps were not. Dart is fresh, quick to catch up with, coming with an all-inclusive toolchain, fully featured tutorials, and extended API with complete documentation and also strong support for the growing community around

www.todaysoftmag.com | no. 35/may, 2015

21


programming

Keep Calm and Start playing Dart

it – many of the programmers hoping that JavaScript could be stopped in its lonely reign of the web. And this would also fit in the dark plan. All the above facts, separately or combined at the end would imply more and faster websites, and such even more surface for advertisements and faster DoubleClick – isn’t it?

So, what’s included in all-inclusive? We do get the Dart language, that is: • open-source under BSD-style license • fully Object Oriented, supporting Single Inheritance, Mixins and Default-Implementation for Interfaces • single-threaded and supports concurrency with Isolates, known for communicating exclusively via messages and without sharing memory • preferring Futures in asynchronous event-handling to prevent the program getting blocked by time-consuming operations • lexically scoped and optional-typed, supporting Generic(or parameterized) types and Iterables • offering a whole set of stable core libraries and open access to third-party packages • designed for mass adoption, the reason why it comes with a familiar syntax to both scripting and structured language users, yet skipping some of the repetitive coding ceremonies • intended to be a highly recommended alternative for projects where transparency, structure or fast development pace were only some nice-to-haves; let’s say, a change from quickand-dirty to quick-and-darty style. We can opt for its own Dart Editor or decide to integrate a plugin in one of the IDEs we are already familiar with, like WebStorm, IntelliJ or Eclipse. Either way, we still get handy command-line tools from the SDK, like: • pub – the Dart package manager – to easily operate with third-party packages • dart2js – the Dart-to-JavaScript compiler with treeshaking, optional minification, type inference – to enable applications being easily deployed on all other browsers than Dartium, meanwhile source mapping permits to get back the Dart source codes when it comes to debugging • observatory – the fully featured profiling tool – to check out our application’s performance and memory management statistics in action • dartfmt – Dart code formatter – to format our code according to the “Dart Style Guide” conventions • docgen – the API documentation generator – generating legacy documentation for Dart packages. We are free to use the Dart Virtual Machine standalone to run command-line apps, server-side scripts, servers or other Dart apps not intended to be launched from browsers. The Dart VM has been as well extended with SIMD (Single-Instruction Multiple-Data) operations. Considering that in the latest processors around 30% of the die’s size is dedicated for SIMD processes, like NEON and vector operations, Dart VM opens and benefits from a lot more space on the CPU. During development we are recommended to use the special version of Chromium, Dartium, with integrated Dart VM, as its performance and handy features – like simply reloading the web

22

no. 35/may, 2015 | www.todaysoftmag.com

page instead recompile – can save us a lot of time. The list does not end here and the only small-lettered section we should be indeed aware of is referring to the continuous improvements on the language, tools, stability and benchmarking-results. Would this sound utopic for you? Don’t be evil, read further. So much talk, give us some code! At minimum, a Dart application has: • one Dart source file — a file with the .dart suffix containing Dart code • one top-level main() function. This is the entry point for the application. There are two kinds of Dart applications: command-line applications and web applications. A command-line application is a standalone program that we run in the Dart VM from the command-line in a terminal window. A web application is hosted on a web page and runs in a browser (either directly in Dartium or by compiling it first to JavaScript). See below the basic architectural layouts.

Fig.1 Command line app run in Dart VM

Fig.2 Run a Dart web app from Dartium

Fig. 3 Run Dart in any modern browser compiled to JS

Finally, let’s have a deeper insight on a basic Dart program: import ‘dart:async’; import ‘dart:io’; class Counter { class defaults to Object.

// In Dart every

var _toCount; defaults to private. num counted;

// If begins with ‘_’

// Getters and setters (if appropriate) are coming by default. // Syntactic sugar for setting _toCount


TODAY SOFTWARE MAGAZINE // before the constructor body runs. Counter (this._toCount); // An example of a Named Constructor. Counter.stave (String text, String s) { for (var char in text.split(‘’)) { if (char.toLowerCase() == s.toLowerCase()) counted++; } } // Define another function. void printCounted() => print(“$_toCount occurred $counted times.”);

In less than three years, Ecma International has standardized the first edition of Dart, and despite the slow start of its adoption, last autumn Dart already took a place on the Tiobe Index language popularity top 20 list ahead of Microsoft’s F# and Apple’s Swift, with the comment “But now that the Dart-to-JavaScript compiler is mature and claims to generate even faster code than handwritten JavaScript, the Dart language seems to have a bright future.”

}; // Top-level function; the application execution starts here main() { // Declare and initialize some variables. var stave = “S”; File file = new File (“Keep_Calm.txt”); // Lengthy computations handled asynchronously with Future. Future future = file.readAsString(); future.then((String content) { var sCounter = new Counter.stave(content, ‘S’); sCounter.printCounted(); }) .catchError((e) { print (‘Counter encountered $e error!’) }); }

Seeking for even more?

In a few days, the first Dart Summit will take place in San Francisco, where we can hear further calming news about the long-term strategy and commitment to Dart and further exciting innovative ideas and use cases about Dart in production. Till then, stop reading and start playing! There are plenty online resources and an actively contributing community on google+, github and stackoverflow to help us aiming and scoring with one single Dart. Check out: dartlang.org, dartosphere.org, g.co/dartisans

As promised, Dart does come with familiar syntax but already these few lines reflect some ideas on how the propagated Dart-future would look like in practice. We’ve met two core libraries, io and async; the named constructor, the fat-arrow syntax for thinner one-line functions, string interpolation usage and some more interesting part happening around then. Remember Dart’s asynchronous event handling mentioned earlier? It looks like this. Fire an event, be right there when it gets finished and get your job done with it within a close lexical scope. Besides the io and async libraries used earlier, other base SDK libraries are: core, html, math, mirrors, isolate, indexed_db, collection, web_gl or web_sql. We also get unit-testing and mock packages, a HeadlessChrome for command-line testing and lately, native Dart support within drone.io for continuous integration.

www.todaysoftmag.com | no. 35/may, 2015

23


programming

Introduction to Couchbase NoSQL Document Database

N

Alexandru Objelean

alexandru.objelean@betfair.com Senior Developer @ Betfair

owadays the market is full of terms like NoSQL, Big Data or NewSQL. Often, IT decision makers can get very confused with all the noise. Why should anybody consider a newer, alternative database when RDBMSs have been around for more than 2 decades? However, many leading enterprises are already using alternative databases and are saving money, innovating faster, and completing projects they could not pursue before as a result. The purpose of this article is to provide an overview of one particular NoSQL technology - Couchbase Document Database. You’ll find the reasons for choosing this technology and what kind of projects it is being used in.

Why NoSQL? Choosing the most appropriate technology based on requirements is an important decision from the architectural point of view. When making a decision about the type of the storage to use, there are several aspects to consider.

Nature of data If the data has a simple tabular structure, like an accounting spreadsheet, then the relational model could be adequate. On the other hand, complex data with multiple nested levels is not very easy to fit into a two-dimensional row-column structure. In such cases, we should consider using NoSQL databases, where this kind of data structures can be represented using JSON format used by some NoSQL products. Another aspect to consider is the volatility of the data model. An important question to answer is how often will the data model change and evolve? Most of the time, during design phase, the data model is not known and flexibility is required. The schema-rigidity is one of possible issues with RDBMS.

24

no. 35/2015, www.todaysoftmag.com

Application development Nowadays, developers require high coding velocity and great agility in the application building process. In that regard, NoSQL technologies have proven to be a better choice. Using JSON format for modeling data allows developers to build prototypes in very short time.

Operational issues As a database grows and the number of users increases, many RDBMS-based sites suffer from performance issues. Most of the time, the solution is to scale vertically (at high cost). On the other hand, NoSQL technologies were designed specifically to address scalability (horizontal) and performance issues.

Data warehousing and analytics RDBMS are well suited for complex querying, reporting and analysis. It is still a good choice when query and reporting needs are critical. Real-time analytics for operational data is better suited for the


TODAY SOFTWARE MAGAZINE NoSQL setting.

What is Couchbase Couchbase Server is a NoSQL document database for interactive web applications. It has a flexible data model, is easily scalable, provides consistent high performance and is capable of serving application data with 100% uptime. Couchbase is the merge of two popular NOSQL technologies: • Membase, which provides persistence, replication, sharding to the high performance memcached technology • CouchDB, which pioneers the document oriented model based on JSON

Main Features Flexible data model With Couchbase Server, JSON documents are used to represent application objects and the relationships between objects. This document model is flexible enough so that you can change application objects without having to migrate the database schema, or plan for significant application downtime. The other advantage of the flexible, document-based data model is that it is well suited to representing real-world items. JSON documents support nested structures, as well as fields representing relationships between items which enable you to realistically represent objects in your application.

Easy scalability It is easy to scale with Couchbase Server, both within a cluster of servers and between clusters at different data centers. You can add additional instances of Couchbase Server to address additional users and growth in application data without any interruptions or changes in application code. With one click of a button, you can rapidly grow your cluster of Couchbase Servers to handle additional workload and keep data evenly distributed. Couchbase Server provides automatic sharding of data and rebalancing at run time; this lets you resize your server cluster on demand.

Easy developer integration Couchbase provides client libraries for different programming languages such as Java / .NET / PHP / Ruby / C / Python / Node.js For read, Couchbase provides a keybased lookup mechanism where the client is expected to provide the key, and only the server hosting the data (with that key) will be contacted. Couchbase also provides a query mechanism to retrieve data where the client provides a query (for example, a range based on some secondary key) as well as the view (basically the index). The query will be broadcast to all servers in the cluster and the result will be merged and sent back to the client. For write, Couchbase provides a keybased update mechanism where the client sends an updated document with the key (as doc id). When handling write request,

the server will respond to client’s write request as soon as the data is stored in RAM on the active server, which offers the lowest latency for write requests.

Consistent high performance Couchbase Server is designed for massively concurrent data use and consistently high throughput. It provides consistent sub-millisecond response times which help ensure an enjoyable experience for application users. By providing consistent, high data throughput, Couchbase Server enables you to support more users with fewer servers. Couchbase also automatically spreads the workload across all servers to maintain consistent performance and reduce bottlenecks at any given server in a cluster.

Reliable and secure Couchbase support access control using username and passwords. The credentials are transmitted securely over the network. The sensitive data can be protected while it is transmitted to/from the client application. There is no single point of failure, since the data can be replicated across multiple nodes. Features such as cross-data center replication, failover, and backup and restore help ensure availability of data during server or datacenter failure.

Core Concepts Couchbase as Document Store The primary unit of data storage in Couchbase Server is a JSON document, which makes your application free ofrigidlydefined relational database tables. Because application objects are modeled as documents, schema migrations do not need to be performed. The binary data can be stored in documents as well, but using JSON structure allows the data to be indexed and queried using views. Couchbase Server provides a JavaScript-based query engine to find records based on field values.

Data Buckets The data is stored in a Couchbase cluster using buckets. Buckets are isolated, virtual containers which logically group

www.todaysoftmag.com | no. 35/may, 2015

25


programming Introduction to Couchbase - NoSQL Document Database records within a cluster. A bucket is the equivalent of a database. They provide a secure mechanism for organizing, managing and analyzing data storage. Documents are distributed uniformly across the cluster and stored in the buckets. Buckets provide a logical grouping of physical resources within a cluster. More specifically, it is possible to configure the memory for caching data or number of replicas per each bucket.

provides language-specific interfaces required to perform database operations. All Couchbase SDKs automatically read and write data to the right node in a cluster. If database topology changes, the SDK responds automatically and correctly distributes read/write requests to the right cluster nodes. Similarly, if your cluster experiences server failure, SDKs will automatically direct requests to stillfunctioning nodes.

vBuckets

Architectural Overview

A vBucket is defined as the owner of a subset of the key space of a Couchbase cluster. The vBucket system is used both for distributing data across the cluster and for supporting replicas on more than one node. Every document ID belongs to a vBucket. A mapping function is used to calculate the vBucket to which a given document belongs. In Couchbase Server, that mapping function is a hashing function that takes a document ID as input and outputs a vBucket identifier. Once the vBucket identifier has been computed, a table is consulted to lookup the server that “hosts” that vBucket. The table contains one row per vBucket, pairing the vBucket to its hosting server. A server can be responsible for multiple vBuckets.

Like other NOSQL technologies, Couchbase is built from the ground up on a highly distributed architecture, with data sharded across machines in a cluster. In a typical setting, a Couchbase DB resides in a server clusters involving multiple machines. Client library will connect to the appropriate servers to access the data. To facilitate horizontal scaling, Couchbase uses hash sharding, which ensures that data is distributed uniformly across all nodes. The system defines 1,024 partitions (a fixed number), and once a document’s key is hashed into a specific partition, that’s where the document lives. In Couchbase Server, the key used for sharding is the document ID, a unique identifier automatically generated and attached to each document. Each partition Keys and metadata is assigned to a specific node in the cluster. If nodes are added All information stored in Couchbase Server are documents or removed, the system rebalances itself by migrating partitions with keys. Keys are unique identifiers of documents, and values from one node to another. can be either JSON documents or byte streams, data types, or other forms of serialized objects. Keys are also known as document IDs and serve the same function as a SQL primary keys. A key in Couchbase Server can be any string. A key is unique. By default, all documents contain three types of metadata. This information is stored with the document and is used to change how the document is handled: • CAS Value - a form of basic optimistic concurrency. • Time to Live (ttl) — expiration for a document (seconds) • Flags - A variety of options during storage, retrieval, update, and removal of documents.

Couchbase SDK Couchbase SDKs (aka client libraries) are the languageThere is no single point of failure in a Couchbase system. All specific SDKs provided by Couchbase. A Couchbase SDK is partition servers in a Couchbase cluster are equal, with each resresponsible for communicating with the Couchbase Server and ponsible for only that portion of the data that was assigned to it. Each server in a cluster runs two primary processes: a data manager and a cluster manager. The data manager handles the actual data in the partition, while the cluster manager deals primarily with intranode operations. System resilience is enhanced by document replication. The cluster manager process coordinates the communication of replication data with remote nodes, and the data manager process supervise the replica data being assigned by cluster to the local node. Naturally, replica partitions are distributed throughout the cluster so that the replica copy of a partition is never on the same physical server as the active partition. Documents are placed into buckets, and documents in one bucket are isolated from documents in other buckets from the perspective of indexing and querying operations. When a new bucket is created, it is possible to configure the number of replicas (up to three) for that bucket. If a server crashes, the system will detect the crash, locate the replicas of the documents that lived on the crashed system, and promote them to active status. The

26

no. 35/may, 2015 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE calls is reduced. Another pattern of querying a Couchbase Server is performed via “views,” Couchbase terminology for indexes. Views are the mechanism used to query Couchbase data. To define a view, you build a specific kind of document called a design document which holds the JavaScript code that implements the map reduce operations that create the view’s index. Design documents are bound to specific buckets, which means that queries cannot execute across multiple buckets. Couchbase’s “eventual consistency” plays a role in views as well. If you add a new document to a bucket or update an existing document, the change may not be immediately visible. Query parameters offer further filtering of an index. For example, you can use query parameters to define a query that returns a single entry or a specified range of entries from within an index. Couchbase indexes are updated incrementally. That is, when an index is updated, it’s not reconstructed. Updates only involve those documents that have been changed or added or removed since the last time the index was updated. You can configure an index to be updated when specific circumstances occur. For example is possible to have the view updated based on a time interval or when a number of documents have updated.

system maintains a cluster map, which defines the topology of the cluster, and this is updated in response to the crash. Note that this scheme relies on thick clients embodied in the API libraries that applications use to communicate with Couchbase. Thick clients are in constant communication with server nodes. They fetch the updated cluster map, then reroute requests in response to the changed topology. In addition, they participate in load-balancing requests to the database. The work Performance done to provide load balancing is actually distributed among the Performance should be measured for meaningful workloads. clients. Changes in topology are coordinated by an orchestrator, which is a server node elected to be the single arbiter of cluster configuration changes. All topology changes are sent to all nodes in the cluster; even if the orchestrator node goes down, a new node can be elected to that position and system operation can continue uninterrupted.

Querying data There are two patterns for querying data from Couchbase. The most efficient one is via key pattern. If the key of the document is known, the complexity of retrieval of the documents is O(1). It is also possible to retrieve multiple documents using multi-get. Using batch retrieval is very efficient when the client need to deal with a list of documents, because the number of client round-trip

www.todaysoftmag.com | no. 35/may, 2015

27


programming

Introduction to Couchbase - NoSQL Document Database Compared to the fist approach, Couchbase Server ensures data consistency, too. It also performs read/write operations on the primary nodes only to keep the data consistent. The only difference is that it leverage all the nodes, because every node is a primary node (for a subset of partitioned data). All the read/write operations are performed on the primary nodes.

Monitoring Couchbase Server incorporates a complete set of statistical and monitoring information. The statistics are provided through all of the administration interfaces. Within the Web Administration Console, a complete suite of statistics are provided, including This can help to understand performance characteristics for built-in real-time graphing and performance data. certain situations and choose the right NoSQL technology. One of the benchmarks conducted to compare NoSQL technologies is called: YCSB (Yahoo Cloud Serving Benchmark). Its purpose is to focus on databases and on performance. It is open-source, extensible, has rich selection of connectors for various database technologies, it is reproducible and compares latency vs throughput. The results showed that Couchbase has the lowest latencies and the highest throughput.

Performance and consistency

The statistics are divided into a number of groups, allowing you to identify different states and performance information within your cluster: • By Node - Node statistics show CPU, RAM and I/O numbers on each of the servers and across your cluster as a whole. • By vBucket - The vBucket statistics show the usage and performance numbers for the vBuckets used to store information in the cluster. • By View - View statistics display information about individual views, including the CPU usage and disk space used so that you can monitor the effects and loading of a view on Couchbase nodes. • By Disk Queues - monitor the queues used to read and write information to disk and between replicas. Can be helpful in determining whether the cluster should expand to reduce disk load.

To ensure consistency, it is important to execute the read/write operations on the primary nodes only. The NoSQL solutions which have only one primary node are limited from the performance point of view, because clients cannot leverage secondary nodes. The first alternative is to execute read operations on all nodes (primary and secondary). In that case, read performance is better, but no longer consistent because replication is asynchronous by default. The second alternative is synchronous replication. Which leads to consistent data, but performance degradation. Real World Use Cases

Real-time user activity Consume a user activity feed from a messaging system (Kafka) and store activity metrics in Couchbase. The service is capable of answering, in real time, questions like: when the user was active last time? Has the user ever played a game? All queries can be executed very fast. Based on this kind of real-time answers, the application is capable of targeting various type of users for business-related flows.

Keep user preferences Store various user preferences across all the web products in Couchbase. This is an alternative to keeping user data in HTTP

28

no. 35/may, 2015 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE sessions, cookies or relational databases.

Promotions Management and tracking Management of promotions which attract customers to try various products based on predefined qualifying criteria. The customer promotion progress is tracked as well. The system is capable to identify in real-time if a customer has succesfully fulfilled a promotion and awards the configured reward.

Conclusion

Resources • • • • • • • •

RDBMS vs NoSQL Couchbase Server Architecture Review Betfair plus Couchbase Couchbase blows competition Couchbase performance benchmarking No SQL performance series 10 enterprise usecases for Couchbase MongoDB vs Coucbase showdown

Explosive growth in Internet usage, the increasing amount of data handled by modern applications, the changing nature of data required to be incorporated require a detailed analysis when deciding the technology to use for data storage. Choosing a NoSQL can be a good decision when applications require a flexible data model, support a large number of concurrent users, scalability and performance are important to cope with business requirements. Couchbase is an important player in NoSQL world. It works very well for high load reads and writes, with great built in caching and solid scale up and scale down model. The Couchbase architecture makes it possible to provide consistency and outstanding performance at the same time. It performs very well compared to other similar technologies based on real-world benchmarks. Though it is not a silver bullet, and does not excel in every possible area, it can be a perfect match for several types of applications.

www.todaysoftmag.com | no. 35/may, 2015

29


testing

The portrait of a good tester

I

t all starts with the passion to succeed… Becoming a good tester does not mean reaching a destination, but rather being on a constant journey into new territories.

Daniela Crișan

daniela.crisan@isdc.eu Senior Tester @ ISDC Romania

It is important to build the right skills that will provide us with the understanding of how to approach software testing. These skills help us build credibility and gain the respect of other professionals involved in software development. WHAT does a tester do? With a strong foundation of skills we have a better chance of succeeding in what “Testing is questioning a product in we do: we will be able to provide better order to evaluate it.” James Bach quality which leads to better products and This definition of the activity of in the end, to happier customers and users. software testing includes one of the most important aspects of testing: information WHAT is a tester? discovery and delivery. Software testing is “A tester is somebody who knows that about revealing the unknown. If quality things can be different.” Jerry Weinberg means value to some person who matters (as Weinberg has defined it) then testing is the “A person who is able to rapidly disco- service of discovering anything that threaver highly relevant information about the tens this value. To discover these threats, product, who makes the most use of any a tester needs to be able to do a variety resource that is available to him/her, and of things, such as review requirements, who has the respect of people involved in a asking good questions and interacting with project. It is a person who can be trusted.” a product in such a way that it yields useful Ilari Henrik Aegerter information and possible risks. The above definitions of a tester remind us that testing is about critical thinking and creativity. It is about not believing anything at face value, but always keeping an investigative mindset. Therefore, our passion to succeed and become good testers translates into gaining the respect and trust of our team. We are not there to chase errors, but we are there to build the confidence that we are the guardians of the product quality and client satisfaction.

30

no. 35/2015, www.todaysoftmag.com

Given these definitions, let’s see WHICH are the most desired skills and WHAT makes us good testers? After reading about the opinions of some experts in the field (James McCaffrey, Tony Bruce, Jennifer Lent, Lorinda Brandon, Ilari Henrik Aegerter), I have also interviewed some key members of a project (project manager, architects, developers and requirements engineer),


the below exhaustive list of skills came out of my research:

would be difficult to design tests which exercise the code in a way that makes sense to the project goals. Good critical thinkers can also identify their own gaps in understanding: they know exactly when and how to ask for clarification. They can gain more respect from a colleague by admitting what they do not know than bluffing their way through it.

Ask good questions “There is a difference between having a question and asking a question.” James Bach Only good questions generate good answers. It is important to ask questions in order to obtain as much Based on the above results, I would like to further highlight information as possible and clarify uncertainty so we do not do the top 5 most desired skills of a good tester. assumptions while testing. The better we know what is important for the business, the better our judgement is. Communication It is not enough to ask, but it is also very important to ask the “If you can’t write your message in a sentence, you can’t say it in right person the right question at the right time with the right an hour”Dianna Booher. tone and in the right place. As good testers, we should have strong written and verbal communication skills. We should be able to read and analyze product documentation, gather information, write test plans, write clear bug reports, coherent status reports to management (both formal reports and ad hoc e-mail reports). We have the ability to listen critically and speak rationally in meetings. We need to be leaders, technicians, and politicians all in one. It is one of the hardest skills to master (for anyone) – how to convey an issue clearly and concisely, in a constructive tone but to also denote the severity of the problem. It becomes even more complicated when you realize how different the audience is for these communications – on one hand, an issue needs to be welldefined technically for a developer to address it and, on the other hand, described clearly enough for a non-technical stakeholder to make an appropriate decision about its impact on the project. At times, testers need to tap into their powers of persuasion when they are advocating for a particular action. It is a problem many testers wrestle with and, if done wrong, can create lasting problems with the project team.

Willingness to learn Bach said: You need the ability to love the confusion that comes with learning complicated things. It’s about hanging in there instead of giving up when something makes you feel stupid for a few minutes. Knowledge is not static, especially not in the technical field. Continuous learning is essential in order to become better at what we do.

Flexibility

Why flexibility? We need this skill in order to know when to switch between: attention to details (zoom in) and exploration (zoom out). To be able to see the details, we should: slow down, look closer and observe. Being able to notice that some little thing is off is crucial in order to find issues - not to mention about validating complex business logic. If we do not want to get lost in too much details than we should continue the exploration that offers us the opportunity to be Critical thinking more creative. The list of skills can go on as we are in a continuous A skilled tester can dissect a product or a requirement journey. My secret of becoming a good tester is the passion and through analysis and reflection. A really skilled tester is able to courage to continue the journey into new territories. New territosee the larger context of a feature and at the same time he sees the ries came along with my curiosity to discover them. pieces that comprise it. This is essential when it comes to building a deep-enough understanding of the product and assigning Happy testing! appropriate priorities to defects. Without truly critical thinking, it

www.todaysoftmag.com | no. 35/may, 2015

31


programming

What Is Really TDD?

E

very once in a while, I have conversations with people about what really is TDD. Since I built a certain knowledge on the topic in time not only by using it but also by explaining it to others, I decided to write this article that details my definite view on what TDD is. I hope you’ll find it useful. As this may be a long article, I will write for Today Software Magazine a series of shorter articles on this matter. Here’s the first one. Alexandru Bolboacă

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

32

no. 35/2015, www.todaysoftmag.com

Short Version Design is intentionally conceiving and giving form to artifacts that solve problems Computer code is such an artifact, therefore any piece of code that intentionally solves a problem is designed Therefore TDD is a method for obtaining design Good design means design that has certain qualities. The most common quality we seek today is changeability. TDD offers some built-in qualities: testability and improved mistake-proofing. The developer has to work to improve other qualities such as changeability. This is why practitioners use SOLID principles to guide their design decisions. Therefore the qualities of the design obtained through TDD largely depend on the skills of the designer When doing TDD, the developer designs before starting (eg. because using an MVC web framework) and all throughout the TDD cycles: when writing the test (pick class / method names, decide on types of classes to use etc), when implementing the code (variable names) and when refactoring. I propose that TDD is a method for incremental design, since the solution

grows step by step. This also relates to problem solving, and the circle closes – because design means solving a problem. Interested? There’s much more!

Design means to create an artifact that solves a problem

For some reason, the term “design” has become overloaded and confusing. Let’s take for a moment the example of a smartphone. What defines its design? How it looks? How it acts? The materials that compose it? Were the older mobile phones “designed” or only the newer, slicker smartphones are “designed”? It gets more complicated when we talk about software. Is a piece of code “designed” when it follows SOLID principles? Is it “designed” when it’s procedural code? Is it “designed” when it has long methods? I started asking these questions a few years ago because I had no idea about the answer. The only way to find answers was to learn more about design in other domains than software. After all, design is a discipline that’s been around for hundreds of years before our industry. I finally found a definite answer that is satisfactory: “Design is conceiving and giving form to


artifacts that solve problems artifact [is]… any product of intentional creation including … software Karl T Ulrich, “Design – creation of artifacts in society” Therefore, any piece of code that solves a problem in an intentional way is design. Older phones were “designed” because they were solving a problem: having phone conversations with other people. But if design is any piece of code that intentionally solves a problem, why do we use SOLID principles or clean code or other things? Probably for the same reasons that graphical designers use principles such as alignment or emphasis. To make design better.

Good Design Is Design With Certain Qualities The most difficult thing to understand about design is that design has certain qualities. For example, one of the qualities of user experience design is “usability” – how easy it is to use the application and how fast a user can solve its problem with it. These qualities are contextual. For example, a mobile user experience is different from a web user experience. The medium matters in this case. What about software design? What are some of its qualities? Here’s a quick list from the top of my head. Static qualities (when the code is not running) • Readability: the code can be easily read • Navigability: the code is easy to navigate • Reasoning: by reading the code, you can easily infer how it behaves at runtime

• Changeability: it is fast to change Bad names prevent us from understanthe code when fixing a bug or adding a ding code, just making it more difficult to feature change it. • etc. It’s important to note however that this is not the only design quality we shoDynamic qualities (valid at runtime) uld watch for. Technologies like nodejs or • Performance vertx favor performance over changeabi• Scalability lity. Stored procedures or views for creating • Security reports have the same effect. • Disaster resistance • Mistake proof: it is difficult to make Balancing design qualities is one of a mistake when changing the code the most difficult things for a programmer. • etc. Changeability is however a good start, being such a wide spread concern. The qualities of software design are If we understand what design and good contextual too. In case of a typical web design are, what is really TDD? application, changeability and perforStay tuned for the up coming article in mance are typically the most important, the next issue. with scalability and security coming close. For mobile applications, performance and changeability are important. For high volume data-driven web services, performance and scalability are key. And so on. One thing is constant: changeability is important in about 90% of the applications we build today. We have to change them often, so it’s useful if we can change them faster. Given all that, what is good design? Should be easy: Good design is a piece of code that intentionally solves a problem and that exhibits the design qualities necessary in the given context. The reason we keep talking about things like the 4 Principles of Simple Design, SOLID Principles and Clean Code is because we need one quality that these principles offer: changeability. Having tests helps us avoid mistakes when changing the code. SOLID Principles are all about the ease of changing code. Duplication prevents us from making changes fast.

www.todaysoftmag.com | no. 35/may, 2015

33


programming

Logs and metrics in Java

A

s we all know we are more or less logs-dependent. The scope of this article is not to present a logging-framework within Java, but superior level of abstraction for collecting, storing and analyzing, also the way good logs can help us to have a better overview over what our software application does and how good it does that.

But what are those logs and why we need them? I personally consider a log as a small point, but keep in mind that multiple points can draw a line and multiple lines a form or a direction that should be understood. What that means: • A single log cannot evolve (are immutable) • There are so many of them (thousands, millions per day - depends how big is our software and how complex it is, and also if there are used some additional resources for audit – if needed ) • Time to live (TTL) is generally short (30 days, 6 months, maybe more for financial systems and after that moved to some glacier system – depends from application and business requirements) In monolithic application the logging process is grouped usually by days i.e. (JBoss filename+”.yyyyMM-dd) and analyzing those can be very annoying and needs pretty good knowledge in regular expressions and Linux commands, or some scripting language (i.e. Scala, Python) etc. Also usually those apps are deployed using external hosting services (cloud) and connecting from exterior for getting those log files (and those can be quite large even archived) becomes rapidly a time consuming process, and the analyze phase is

Img. Load-balancer/proxy (tutorialspoint.com)

34

no. 35/may, 2015 | www.todaysoftmag.com

Img. Micro-service architecture (tigerteam.dk)

getting gawky and so many times those logs are not even checked unless something is not working anymore or someone complains about the speed of the system etc. Even in monolithic applications there are additional systems that are present (proxies, load-balance) and those are having their particular logs too, and the information that is hold in it is precious since can describe how app is used, security attacks, response times etc. But what this can be approached when is desired to have a distributed architecture i.e. micro-services? How to collect those logs from each machine? How to connect those logs and make them meaningful? How easy is for us to do it? And if those logs are analyzed only when something goes wrong, then maybe is some particular situations to be already too late. So my opinion is that as a continuous logs analyses is required in first months after deploy or at least things become stable (even in qa). What stable means is different from each project, functionality/product contract with client, etc. To not forget that what our logs contain is same important or even more. Because the content from them can provide a big impact in how application can be understood. Here developers have are full power on the content and can be


custom made but still to have a good patter over all the project/ modules. Since many Java is doing backend jobs, like processing data, data migration, async tasks, reports, etc. which are not providing direct feedback (as a web request/response) then the information becomes even more sensitive in order to confirm if the apps works correctly. Our solution – and not only ours:

1. ELK (Elastic, Logstash (+ loggregator), Kibana)

Calls of methods:

public void incIdsToMigrate(long d) { migrationSizes.update(d); } public void incFailedMigrationSessions() { failedMigrationSessions.inc(); } //migration util class @Override public Response migrate(String entityCanonicalName, List<String> idSToMigrate) { final Timer.Context context = MetricsUtils.getInstance().getMigrationTimer().time(); final MigrationSession migrationSession = new Migratio nSession(entityCanonicalName, idSToMigrate.size()); try {

Img.Logs - pipeline (blog.xebia.fr - Vincent S.)

… //validation, others MetricsUtils.getInstance(). incIdsToMigrate(idSToMigrate.size()); …. } finally { context.stop(); if (migrationSession.isGeneralError()) { MetricsUtils.getInstance().incFailedMigrationSessions(); } }

Process: 1. Applications use console appender (log4j + slf4j) - stdout 2. Then is used loggregator (CloudFoundry) – agent that takes the stream from stdout 3. Logstash receives logs (ETL, transform date in generic formats, etc.) Logs: [MetricsUtils.info:110] type=TIMER, name=com.... 4. Logs are then indexed in Elastic MigrationUtilsImpl.migration-timer, count=463, 5. Use Kibana to view them min=14185.432459, max=120866.415675,

mean=48638.78311404348, stddev=33618.49316878979, median=33732.338869, p75=68521.92468899999, p95=120788.85010139999, p98=120866.415675, p99=120866.415675, p999=120866.415675, mean_ rate=0.0023544359078945367, m1=2.964393875E-314, m5=2.2626576149598838E-82, m15=4.532485314583121E-30, rate_unit=events/second, duration_unit=milliseconds [MetricsUtils.info:108] type=HISTOGRAM, name=com….. MigrationUtilsImpl.migration-sizes, count=463, min=4, max=35, mean=19.541666666666668, stddev=12.021644127831763, median=19.5, p75=33.75, p95=35.0, p98=35.0, p99=35.0, p999=35.0

So we have a centralized system where logs from all aps are grouped together, with common formats and many other enhan- [MetricsUtils.info:104] type=COUNTER, name=com….Micements to become more easily to be understood, correlate and grationUtilsImpl.migration-sessions-failed, count=0 interpret. Also continuous monitoring day by day, weekly, monthly in a web app and not only can provide a good sense and meaning of Metrics. Core Metrics. how app is behaving Metrics library from Coda Hale is one of the most used and [LoggingFilter.filter:100] 13bd85d2-1464-406a-70eepopular being part in many successful projects (Cassandra). 99ef10545989 - method=GET code=200 url=workbases Round trip response duration=25 millis Developers can use the “registry”: [LoggingFilter.filter:100] 084f6732-8824-4311-7d3dLogger log = LoggerFactory.getLogger(MetricsUtils. class); MetricRegistry metrics = new MetricRegistry(); Slf4jReporter reporter = Slf4jReporter. forRegistry(metrics) .outputTo(log) .convertRatesTo(TimeUnit.SECONDS) .convertDurationsTo(TimeUnit.MILLISECONDS) .build();

And being used by: 1. counters

Counter failedMigrationSessions = metrics.counter( MetricRegistry.name(Entity.class, “migration-sessions-failed”));

2. histograms

Histogram migrationSizes = metrics. histogram(MetricRegistry.name(MigrationUtilsImpl. class, “migration-sizes”));

3. timer

Timer migrationTimer = metrics.timer(MetricRegistry. name(MigrationUtilsImpl.class, “migration-timer”));

d8596f8bfc43 - method=GET code=200 url=workbases Round trip response duration=29 millis [LoggingFilter.filter:100] 71ddc0fa-281f4f80-6664-1374aa14b0c2 - method=GET code=200 url=registrationruns - Round trip response duration=232 millis [LoggingFilter.filter:100] ebbf5225-7800-46b9-5e1c-bfec7d25dec1 - method=GET code=200 url=registrationruns - Round trip response duration=318 millis [LoggingFilter.filter:100] cb721bc3-adea-4bfd-708d8f8a7c39c9aa - method=POST code=201 url= registrationruns - Round trip response duration=5 millis

This kind of logs let us to keep statistics like:

Conclusion Going from monolithic apps to distribute architectures brings a lot of good things as flexibility scalability but in the same time new challenges. One of them is how to manage logs, the way are saved and accessed. Also to not forget about what logs contain. Is important to have logs that get us sense over app in time and help us to understand how is used, and never the less the current performance and future needs. www.todaysoftmag.com | no. 35/may, 2015

35


programming Logs and metrics in Java

And continuous monitoring of logs, correlate them will provide a good vision over what can be enhanced or how stable the system is. A really important aspect in a distributed orchestration is the visibility over the state of it and possibility to react at variations (because variation is the first sign if a system is not stable or scalable)

36

no. 35/may, 2015 | www.todaysoftmag.com

Vasile Mihali

vasile.mihali@arobs.com Senior Software Engineer @ Arobs


TODAY SOFTWARE MAGAZINE

management

Growing Constructive Cultures

J

ust like people, organizations become constructive through the principles, values, beliefs and the commands transmitted through education. In the professional context we call this educational package Organizational Culture. Let’s have a look at a few of the elements that influence a healthy organizational growth.

What makes an employee hide the mistakes when he makes them? To blame someone else or to blame faith? What drives him to say yes, when he wants to say no? How does he get to hide behind, or to justify his actions through procedures? Why does he get into a situation where he prefers to find guilty parties instead of aiming for results? For which reason do people look for defects in everything they see around them? Why do they need to control everyone all the time? How come an employee is concealing information that a colleague needs, or tries to “look good” over another one? Where does the need to do everything perfect come from? How come in some companies, employees are working effectively and getting results? What makes them share their points of view without fear? What makes them try new things? Why in some organizations people are helping and offering support to each other, unconditionally? How come people get to believe that everything is working more efficiently in teams and this is making them act in that direction? How do we get to have motivated employees or frustrated ones? What motivates employees want to do good things for their organization? What determines the quality people to choose working for a company and not for another? Why do we hear people talking in negative terms about the organization they are a part of? The answer to all this questions is linked, obviously, to our own individuality, to how constructive or destructive our thinking is, influenced by our past education and life experience.

Those personal thinking patterns and behaviors are influenced by the context in which we find ourselves. At the workplace, we all adapt our behaviors to the success criteria promoted by the organization; to what the company values; to behavioral norms promoted by the organizational culture. In other words, from these cultural elements, valued within the organization, we, as employees, can extract conclusions about the behaviors which are expected from us at our workplace. The dynamics of our thinking patterns is determined by two types of opposed needs: the security need and the satisfaction need - happiness. Constructive organizational cultures are the ones that develop a context which facilitates satisfaction oriented behaviors, which grow employees that strive for fulfillment, for achieving results, for growing together with the organization and to add value to themselves through personal development and valuing people. The opposite, destructive cultures, push the employees to security oriented thinking ways, towards protecting themselves. Causes them to act with fear and insecurity, to cumulate frustrations and see the job as a necessary evil; and obviously, in the end, to choose leaving the organization. In employee’s mind, the organizational culture is translated as the assumptions about company’s expectations from him in terms of behaviors. In other words, the kind of behaviors that would make him successful within the organization.

If we understand that by expressing our thoughts we have something to lose as long as they do not coincide with the other’s thoughts, we cease to express them. Or, if having different ideas than our boss we may be penalized in some way, we will stop expressing those ideas. If by trying to change the procedures for improving them we are penalized, we will begin to conform. Or, if it’s not desirable to “rock the boat”, we will avoid doing that, even if the situation is bothering us. These kinds of examples characterize the passive defensive, security oriented cultures, defined by approval styles, conventionalism, authority dependence and avoiding to assume responsibilities. As employees in organizations with such cultures, we understand success as remaining in the comfort zone, lacking the initiative, showing docility and manifesting opposition to change. These are the cultures that make us act driven by fear, and, in time, to cumulate frustrations. If we understand that the organization wants us to be in control all the time, to prove that we are better than others or to make things perfectly, then the behaviors which we are determined to assume are those of imposing, rivalry, suspicion, putting pressure on ourselves and others.

www.todaysoftmag.com | no. 35/may, 2015

37


management If we understand that, within the company we are working for, the mistakes are not allowed, when we make mistakes we will try to hide them or find others responsible for them. We get to such conclusions when we work in organizations which promote aggressive defensive cultures, competition between employees, control and pressure. These are the cultures that make us act driven by uncertainty, to always feel the need of proving something. In time, this leads to destructive conflicts, tensions and bad quality relations. Constructive organizations are the ones that stimulate our solution oriented thinking and not focusing on problems or guilt, encourage us to express our ideas and out of the box thinking, to value others and to be team players. In such organizations there is no fear of making mistakes, the controlling approaches and individualism are missing; the destructive competition and opposition to change are not common practices. Such constructive cultures develop themselves by valuing both people and long term results, by focusing on continuous improvement and innovation, by enabling strategic thinking , using structured ways of working and creating all premises for open communication, trust, support and respect. These are the cultures in which people feel good, happy and motivated to create added value. What truly motivates people is the culture where the feeling of belonging is strong and where they are feeling valued, supported, encouraged and appreciated; where they feel that they can influence things and their opinion matters; not the least, where the outcome of their work is valuable. Constructive cultures enable long term organizational success and their impact is visible in: • Increased motivation • Customer service excellence • Innovation • Cooperation and team synergy • Low attrition rate • Employer branding

38

Growing Constructive Cultures How do we develop constructive cultures? By defining constructive values, encouraging leaders to adopt and live by them, aligning leadership styles to those values and creating the premises of sustainability at organizational structure level, support systems, job design and the required competences. All of these can be developed through actions inspired by a healthy strategic direction which takes the cultural factor into consideration and understands the vital impact that culture has over organizational effectiveness and over the climate within the company. The starting point of the process is analyzing the current culture and the causal factors that lead to it. In parallel, we need to define the ideal/desired culture. By comparing the current with the ideal we can highlight the gaps between the current state and the ideal one and the intervention areas. Based on this analysis we can extract conclusions about the strategic direction to follow and then start creating the premises to move from the current status to the ideal one. The scheme below shows how organizational culture impacts customer satisfaction, which is the most important indicator for company’s success and long term stability. The long term success of the company depends on defining constructive cultural premises, aligning the leadership practices to those premises and creating sustainability. The factors that influence culture include: Mission and Philosophy (Articulation of mission and Customer service focus), Structures (Influence, Empowerment and Involvement), Systems (Selection & placement, Training & development, Respect, Appraisal & reinforcement and Goal setting), Technology (Autonomy, Variety, Feedback, Task identity, Significance and Interdependence) and Skills/Qualities (Communication, Bases of power and Leadership). These become the Levers for Change in the development planning phase.

no. 35/may, 2015 | www.todaysoftmag.com

When an organization’s systems, structures, technology and skills /qualities are in alignment with the stated values, vision, mission and goals, then a constructive culture will emerge.

Cristian Philipp

cristian.philipp@essentialtm.ro Senior Consultant & Managing Director @ Essential Training and Consulting


programare

startup

Fizbo, Simply rent – Real Estate rental mobile application

T

Lucian Pop

lucian.pop@fizbo.ro Cofounder @ Fizbo

he application is the result of the ambition of a former student of Technical University of Cluj-Napoca, who one day was looking for a rent in the Zorilor neighborhood. Visiting an apartment that he had found in an online newspaper and which was below his expectation, he decided not to waste any more time and visit other apartments nearby. Since he had just a smartphone at his disposal he looked on the Play Store for a real estate rental application, but no results. Then the idea came to him: “I will build an app that will help anyone who has a smartphone to look for rents near them or in any desired location”. minutes. • You can easily edit your added offers. Utility / functionality • You delete your added or saved rents Are you looking for a rent or accommowith a simple swipe. dation? Do you want to rent your place by • You have Facebook authentication, but getting rapidly discovered and have direct you can also authenticate by creating an contact with your potential customers? Fizbo account with email and password. comes to help you with the Android and IOS • You can easily edit your account details application that innovates, simplifies and • User data is secured by communicagives you total control of all the aspects of ting with the Fizbo servers over the https the renting process. protocol What makes this app simple and innovative? Application architecture • By clicking a switch button, the appliThe client side is represented by the cation becomes a platform for renting Android and IOS native applications. accommodations or a platform for renting On the server side, a Tomcat web server places for the long term. serves client requests through Java RESTfull • The device is automatically located web services, a MySQL database stores rents even with the GPS turned off and you get metadata and a File Server is used for storing on a map all the offers near you. rents pictures. • The interactive map displays for every The communication between the client rent, at its precise location, a pin with the and the server is done over https and the rental price. messages are sent as JSONs. • You can view rent details, pictures, architecture, utilities, location and Android application description. The Android application is available for • You can directly contact the owner. all the smartphones and tablets running • You have driving directions to the rent Android version 2.2 and later. location. Its architecture perfectly fits the opera• You can save a rent. tion system and doesn’t interfere with the • You can report a rent as being an abuse. main process responsible for handling user • You can search or filter rents by loca- input and system management. tion, price, specifications, surface, utilities. In building the app, the following tech• You can add your offer in less than two nologies have been used: www.todaysoftmag.com | no. 35/may, 2015

39


startup Fizbo, Simply rent – Real Estate rental mobile application using the Facebook iOS SDK.

Server

• Java Core: business logic • Google Maps, Google Geocoding API: interactive map • Google Places: suggestions and places autocomplete • Volley: image caching • Retrofit: REST client • Facebook Android SDK : Facebook authentication

iOS application Fizbo is built to run on all the Apple mobile devices running iOS version 7.0 or later: iPod, iPhone and iPad. Regarding the application architecture, the MVC pattern is used together with other Objective C specific programming techniques. This way, the modular architecture allows easily modifying existing components or adding new ones. AutoLayout is used for scaling the user interface for all kinds of device sizes. Im a ge C a ch i ng i s d on e u s i ng SDWebImageView component and data persistence is facilitated by CoreData data system management. The interactive map was built using the MapKit framework and for server data requests and parsing, native Objective C frameworks have been used. Facebook authentication was implemented

40

Fizbo server has a light architecture and exposes its functionalities through a Façade of Java RESTfull web services. Under this Façade we have Java classes responsible for the application business logic. Going down further, we find Data Access Objects that manage metadata from the MySQL database. Because of the light architecture, the data packages that are sent between the client and the server have very small sizes and are served in less than half of a second. This way, the system has a high scalability and availability.

Development challenges Our first challenge was to build a mobile application that is user friendly and simple to use. We have managed to accomplish this by designing and developing an intuitive user interface that facilitates immediate access to any information or operation related to the renting process. The second challenge was minimizing the effort and time needed for an owner to post its offer. Using the device location sensors, the camera and the Google geolocation APIs, we managed to allow the user to add a rent in less than two minutes. After adding, the rent becomes immediately visible on the map for those who look for a rent nearby. The third challenge was to create an application that can be easily extended. The data model and services design allows adding of new types of offers and services with small changes. Another big challenge was to create a light architecture that will benefit the system with a high scalability. We managed to build it using stateless components organized in low coupled layers and by exposing the functionality through a

no. 35/may, 2015 | www.todaysoftmag.com

Façade of Java RESTfull web services that serve over the https protocol very small data packages in JSON format.

Invitation We welcome you to find your temporary home or to rent your place using the free mobile application. Fizbo is available for download in Google Play for Android users and in App Store for iOS users. A short presentation video can be viewed at https://www.youtube.com/ watch?v=tMG9krOf-BY


TODAY SOFTWARE MAGAZINE

bookkeeping

All about the taxation of PFAs in 2015

B

y definition, a self-employed individual is a business entity authorised to carry out any business activity permissible under the law, using mainly its own labour. The business activities can cover all the fields, trades, occupations or professions which are not expressly forbidden under the law for self-employment. The business activities in which a self-employed person can engage as PFA are those listed in the NACE Code and not exclusively regulated by a specific law. Any business activity conducted on a permanent, occasional or temporary basis in Romania by PFAs should be registered and licensed, according to the provisions of the Government Emergency Ordinance no. 44/2008. The operating licence does not exempt PFAs from the obligation to secure, prior to commencement of the activity, all the authorisations, permits, licenses, etc. stipulated by special laws for certain business activities. For setup purposes, a PFA can register with the Trade Registry (in which case a Certificate of Registration is issued) or, in the case of liberal professions, with ANAF (National Agency for Fiscal Administration), (in which case a Certificate of Fiscal Registration is issued).

What taxes and contributions are payable by PFAs? In terms of taxation, a self-employed individual can be taxed on net earnings basis or on fixed income basis. Taxation on net earnings basis entails the application of the tax rates to the difference between receipts and payments. Taxation on fixed income basis only applies to PFAs without employees and entails the application of the tax rates to a fixed amount, determined annually by ANAF – through its local Agencies, according to the type of activity and other certain criteria. Each county shall establish the NACE codes eligible for this type of taxation. According to the Fiscal Code, the pre-determined income amount cannot be lower than the applicable national minimum wage at the time of reference, multiplied by 12. Currently, the minimum wage is 975 RON, and will increase to 1,050 RON from July 1, 2015. Fixed income bases can vary greatly from one

county to another. For example, for a PFA conducting activities related to NACE code 6202 – Information technology consulting, who earns an average income of approximately 6,000 RON/month and resides in ClujNapoca, the regulated fixed income base for 2015 is of 36,270 RON per year. If the individual in question is also employed under an employment contract, the taxes applicable to the fixed income base are the income tax of 16% and CASS (Health Insurance Contributions) of 5.5%. As such, the payments to the state budget and health insurance fund would amount to 7,798 RON per year, payable in 4 quarterly instalments. If the same PFA were registered in Bistriţa, the fixed income base would be of 19,700 RON per year, resulting in total taxes of approximately 4,235 RON per year. Sticking to the above example, on net earnings basis this PFA would owe annual taxes of 15,480 RON per year (assuming that no tax deductions apply). In the event that the PFA works as a full-time employee under an employment contract, it would be entitled to request the local administration to reduce the fixed income base by 50%. The trend created by the lawmaker in recent years was to reduce the number of NACE codes eligible for fixed incomebased taxation and to increase such fixed income amount from one year to the other. The taxpayers who in the previous financial year earned income from independent activities and were subjected to fixed income-based taxation have the opportunity to change the taxation classification and to shift to taxation on net earnings basis.

The shift from fixed income basis to net earnings basis taxation is compulsory if the gross income for the previous financial year exceeds the RON equivalent of Eur 100,000; the new system must be maintained for at least 2 consecutive years (the exchange rate used for equivalency purposes is the average annual exchange rate, as communicated by the National Bank of Romania at the end of the financial year). If the PFA performs several activities for which the net income is determined on fixed income basis, the annual net income shall result from the addition of all the fixed income bases at the place where each activity is performed.

Is the retirement contribution compulsory or not? Currently, besides the contributions specified as compulsory in the above example (income tax and CASS), if the respective PFA is not also an employee at the same time, it will owe retirement contributions (CAS). This contribution equates to 26.3% of the declared income, i.e. the income for which the respective individual wants to be insured. According to regulations, this income cannot be lower than 35% of the average gross salary income used for the preparation of the national social security budget, nor higher than the equivalent of 5 times the average gross salary income used for the preparation of the national social security budget. For example, the average gross salary income in 2015 is of 2,415 RON, on the rise from 2,298 RON in 2014. Consequently, the CAS calculation basis cannot be lower than 845 RON or higher than 12,075 RON. Applying the 26.3% CAS rate to these amounts, a PFA will pay a retirement contribution ranging from a minimum of 222

www.todaysoftmag.com | no. 35/may, 2015

41


bookkeeping management

All about the taxation of PFAs in 2015

RON (35% x 2,415 RON x 26,3%) to a maximum of 3,176 RON conducted by ANAF (in companies specialising in IT and other (5 x 2,415 RON x 26,3%) per month. lines of business) have focused mainly on salary income, performing detailed verifications of all the expenses incurred by a Is a self-employed individual entitled to unemployment or health company, whether with the provision of services by PFAs or other benefits? expenses likely to be considered employee benefits in kind. By Besides the mandatory contributions listed above, voluntary analyzing the relationship between the company and the PFA, contributions can be made to the unemployment insurance fund, cross-audits may identify the nature of this relationship - depenthe work-related accidents and occupational diseases insurance dent or independent. fund and to the fund for medical leave and health insurance beneThe consequence of re-classifying the self-employed actifits (FNUASS). vity as dependent is that the mandatory income tax and social As such, although the unemployment insurance is not contributions shall be recalculated similarly to employee salary mandatory for a self-employed individual, it can be voluntarily contributions and payable jointly by the employer and the contributed if the PFA in question wants to be eligible for unem- employee. The word jointly refers to the possibility of the fiscal ployment benefits in case the PFA has no activity. The monthly agent to address either the income payer (employer), or the work unemployment contribution is of 0.5% of the insured income. provider (employee). Self-employed individuals may conclude an unemployment insuIn art. 7, paragraph (1), point 2.1, the Fiscal Code defines the rance contract with the Employment Agency with jurisdiction criteria that should be met by an activity in order to be considered over their registered office. dependent: The contributions for medical leave and health insurance a. The income beneficiary is in a subordinate relationship benefits (FNUASS) are also voluntary, but a PFA may opt to pay with the income payer, respectively the management of the them in order to benefit from medical leave benefits. income payer and observes the work conditions prescribed by According to the Emergency Government Ordinance no. the latter, such as: job duties and performance thereof, place of 158/2005 on medical leave and health insurance benefits, such work, working hours. contribution is of 0.85% of the taxable income. b. In performing the work, the income beneficiary uses exclusively the income payer’s facilities, respectively properlyCompulsory maintenance of books of accounts equipped spaces, special or safety work equipment, work Beside the taxation classification, the differences between the supplies, etc. and contributes his/her physical or intellectual two taxation systems also relate to the account books which need work, not capital. to be maintained. c. For business purposes, the income payer bears the income Self-employed individuals subject to taxation on fixed income beneficiary’s travelling expenses, such as delegation-assignbasis apply the simplest accounting and ANAF reporting procement allowances within the country and abroad, as well as dures, completing only that section of the General Ledger related other similar expenses. to accounts receivables for the relevant activity. The goal of record. The income payer bears the annual leave entitlement and ding only accounts receivable transactions is to be able to track the allowance for temporary work incapacity on behalf of the at which point the turnover limit above which the PFA will be income beneficiary. treated as VAT payer is reached/exceeded (note that the income, not receivables, determines the turnover, which should be lower If any of the 4 criteria above occurs in the relationship than 220,000 RON per year so that the PFA is not VAT payer). between the company and the PFA, the activity can be re-clasAs of March 1, 2015, single-entry bookkeeping, compulsory sified as dependent. for PFAs subject to net earnings-based taxation, shall observe When deciding to start a business activity as PFA, considerathe provisions of the Order of the Ministry of Public Finance no. tion should be also given to the fact that the individual’s liability 170/2015. The main changes entailed by this Order are: for the obligations assumed in relation to the activity covers the • The General Ledger and the Inventory Ledger no longer entire personal property. As a trader, the self-employed individual have to be initialled by ANAF; can be subject to the insolvency procedure. • The self-employed individual willing to shift to double-entry bookkeeping may do so from the beginning of the What legislative changes are in store for 2016? financial year following the year in which the decision to Although it should be the simplest form of conducting busichange the bookkeeping system is made; ness, the legislation underwent continuous changes for this • PFAs set up after March 1, 2015 may opt for double-entry segment. bookkeeping or single-entry bookkeeping from the very Currently, there is a draft Fiscal Code pending approval, beginning. If the former option is made, all the regulations which also targets changes in the taxation of the income obtaivalid for economic operators shall apply, including the prepa- ned from independent activities, some favourable, some less ration of the trial balance, but excluding the annual financial favourable. statements. Below are the main changes proposed in the draft of the new Fiscal Code:

What does dependent activity mean?

Regardless of the taxation classification, a possible risk incur- CHANGE 1 (favourable) – CAS rates shall be reduced as of January red by self-employed activities is the re-interpretation by ANAF 1, 2016. as activity dependent on the payer of salary income, if the PFA is also an employee under an ongoing employment contract. This year, the spot-check audits and extended fiscal audits

42

no. 35/may, 2015 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE CHANGE 8 (favourable) – CASS shall be adjusted on an annual basis CHANGE 2 (unfavourable) – PFAs will owe CAS, even if employees

CHANGE 3 (unfavourable) – PFAs will owe CAS at the higher of the actual income and the floor limit, however not exceeding 5 times the average gross salary income.

In light of the above, in conducting business activities as PFA consideration should be given to the taxation system, on fixed income basis or net earnings basis. Also, to avoid any legal problems, it is important that the PFA should not be beneficiary-dependent. The fiscal agenda for 2016 features some favourable, as well as unfavourable changes. Our recommendation is to weigh these changes when preparing the financial planning, in order to make the best possible decisions. Good luck!

CHANGE 4 (unfavourable) – The CAS advance payments are not reimbursed or adjusted.

CHANGE 5 (favourable) – PFAs will not owe CAS if in the previous financial year their monthly income was below the floor limit.

CHANGE 6 (favourable) – The CASS calculation basis is capped to 5 times the average gross salary income.

Ioana Varga

CHANGE 7 (favourable) – PFAs shall no longer pay CASS if they do not obtain income, and if their income is below the floor limit, CASS shall be calculated accordingly

ioana.varga@aiconsulting.ro Expert bookkeeping Managing Partner @ A&I Consulting

Ioana Costea

ioana.costea@aiconsulting.ro Expert bookkeeping Managing Partner @ A&I Consulting

www.todaysoftmag.com | no. 35/may, 2015

43


management

Accepting Change. The Path to One Bug Per Month

I

believe great programmers can create unique software in a way it has never been done before. This is a story about me joining a team and how we came a long way from a traditional development process to an agile one. We will contemplate on the events and decisions that led from chaos to order and from strict rules to a happy workplace. A place where a complete enterprise storage solution is made with almost

Patkós Csaba

patkoscsaba@syneto.eu Agile Software Developer @ Syneto

no bugs found in production, thanks to a team ever open to change and continuous learning. This is a brief article, highlighting the key points of the much more detailed agile experience report available on the Agile Alliance website1 as part of the Agile Experience Reports Program.

Context In the summer of 2010, I was searching for a new workplace. I happened to end up at Syneto. I was assigned to an older project, now retired. Up until this point, my programming experience has only consisted of individual coding. More precisely, I used to make small programs for the companies at which I was a network administrator. Before joining Syneto, both in school and at my previous jobs, I had used process management techniques like Waterfall. Starting my activity at this company on a project planned in a similar manner could only make me happy that I was in a familiar environment. Little did I know at the time 1 h t t p : / / w w w. a g i l e a l l i a n c e . o r g / i n d e x . p h p / download_file/view/482/1410/

44

no. 35/2015, www.todaysoftmag.com

what was waiting for me. After a few months, some problems regarding the project started to become obvious. Releases of new versions were always delayed and the project’s budget was going to be exhausted before its term. It was obvious that a new vision and way of thinking and working was necessary. Between the years 2000 and 2005 the company had a chaotic development process. Plain and simple, features were implemented when and how the clients demanded. This may seem agile, but it isn’t. There was no vision for the product. There was no method of prioritizing tasks. The manager simply assigned tasks on some notes to the programmers. Nobody knew what had to be done and where we were heading. By mid-2008, our development process had become more organized. We went from chaos to Waterfall. It was another false sense of progress. Not only did it not improve the quality of the product, but with the introduction of Waterfall, the number of bugs and delay times increased. Moreover, the budget for one and a half years allowed only three releases of new


programare

programare

versions with six months periods carefully planned using Gantt Waterfall plans. We were still doing too much planning and too diagrams and complex documents. little prioritizing of our tasks. However, another peculiar effect emerged. The board offered A change was absolutely necessary. us a surprising and efficient new way to visualize our activity. We began to realize what and how much we had to do. We could see Our journey what people were working at, and more important we could see what had been done. Organizational Challenges Our board was fairly simple. A Release Backlog column conAny team can be defined by the work practices it uses tained what we had to do until our next release. Sprint Backlog everyday. Finding and continuous adoption of these new tech- contained what we would do in the current week. Development niques in order to improve the development process is one of the consisted of the tasks we were working on, and Done was made major challenges in agile. We at Syneto, are firmly convinced that up of the finished tasks. the best way to find the right practices for the current project is We made our first step in our agile transformation. We accepto adopt these potential methods, try them for six months and ted the first change, that of following our entire development evaluate their utility at the end of the trial period. If we find an process using sticky notes. unnecessary practice, we abandon it. If we find a perfect one, we As time passed, Flavius gradually introduced to us the other continue using it. In most cases we identify only isolated parts aspects of scrum. After a few weeks we had our first retrospective of these practices which are useful. In these cases, we adopt the and after that we started planning sprints, with this opportunity pieces as part of our process as a whole. we learned the term sprint. It culminated with mini-retrospectives of sprints and daily stand-ups. Discovering Scrum But not only the scrum meetings were new to us, also the way I can still remember that sunny spring day, when our manager we started communicating. We learned together terms like user during that period, Flavius, came in an hour late to work. Very story, story points, technical tasks, standup meeting, definition unusual for him, as he was usually the first person to arrive at of done, etc. Not all of these things were new to us regarding our work. activity, but until then they had not been well defined behind the Shortly afterward he sent Bogdan, a colleague of ours, to buy expressions. something. We were too concentrated and busy with coding, After the first few releases of new versions we started to feel so initially we did not pay much attention. After a few minutes, the positive effects of retrospectives and following the activity Bogdan came back with A3 papers, a bunch of sticky notes and with burn-down charts. In the following years we experimented a lot of markers. For the moment things seemed interesting ... with a lot of retrospective types from which we remarked two: but nah! ... coding was more interesting. We all ‘hid’ behind our good-bad-actions and the sinking ship. monitors and continued our coding activity. I can’t recall exactly how much time passed until Flavius Revision of the Planning Board interrupted us. To everyone’s surprise something similar to a Sometime in mid 2011, we began to use the board in a more advanced way. These are some of the key aspects of the new board: 1. The Development column was split in three: design for planning activities involving API and UI, one for actual programming, still named Development and one for testing. Every task had to be tested by another person to be considered finished. 2. Every column was improved with a definition of done. The policy was that only a task which meets all the criteria can be moved to the next column. 3. Categories for our activities were created: story – for improvements and new functionalities –, bugs – for undesired behaviors –, technical tasks – for activities adjacent to the project (like installing a server for continuous integration, testing, and deployment). 4. However, I consider that the most important change was taking responsibility for tasks by attaching a small note with the planning board was built on the wall. We did not realize exactly name of those who are working on that task. what it was all about, but Flavius continued with rigorous explanations. Our first column „Release Backlog” would contain what Adopting Lean had to be done in the future. After that, we would work in iteScrum was good for discipline, but we identified some prorations and discuss what we’d do in every iteration. These tasks blems with it. The allocation of resources was one of them, so would be placed in the „Sprint Backlog” column. Each one of us we started studying and applying lean techniques in our developwould choose something to do and move the sticky note to the ment process. „Development” column. When it’s done, the sticky note would be We tried to take into account all the lean principles, but two of moved to the „Done” column. Simple, isn’t it? Not quite... them stood out: eliminating waste – by getting rid of dead times I expected that this board would have a deeper impact, to in dependency chain between programmers with the help of pairbring some order in our chaos which slowly came back over the programming, or by encouraging activities like minor bugfixing www.todaysoftmag.com | no. 35/may, 2015

45


management

Accepting Change. The Path to One Bug Per Month

What We Learned Probably the most important thing we learned was that the only constant in life is change. No matter if it’s about personal – amplifying learning – by going to conferences, courses and life, professional one, or our favorite project, the way we act and encouraging experimentation through code retreats and offering organize should be in a continuous change. a library of exhaustive programming books. Change is determined by a lot of factors, internal or external to us, like new requirements of the market or the monotony of Implementing Kanban the workplace. Unavoidably, after changes in knowledge and practices, a After all, it’s irrelevant what determines change. We need to change of the board was necessary, again. be ready for it. It will surely come. Here are the essential aspects: 1. The Working On column was removed. Instead all the columns have the same priority, without any sub-columns. 2. We replaced Design with Design Spikes, a concept used in Agile Architecture defined by Rebecca Wirfs-Brock. 3. Every column has a limit of tasks it can contain. This limit can’t be exceeded and if it’s reached actions must be taken for finishing delayed tasks first. 4. There is no exit criteria, or a formal definition of done. Not because we don’t care, but because it became part of our culture and we don’t need to display this information anymore in a public manner.

Getting Digital At one point, we identified a problem with our physical board: it became too difficult to organize and identify tasks on backlog. So we switched to a digital board, in form of an application. This allowed us to identify and organize our task faster, but introduced an unexpected and deep problem. People would not have something always visible in their faces, on the contrary they had to make a conscious action to open a web browser and surf to the application’s page. And as we all know programmers are lazy, the digital board was initially a failure. However, a smart tv on the wall resolved the visibility problem and after the programmers got used to always having an open tab with the app opened, even the tv became useless.

46

no. 35/may, 2015 | www.todaysoftmag.com



sponsors

powered by


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