Issue 37 - July 2015 - Today Software Magazine

Page 1

37 • June July 2015 No. 36 2015• •www.todaysoftmag.ro www.todaysoftmag.ro• •www.todaysoftmag.com www.todaysoftmag.com

TSM

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

Finding similar entities in BigData

The WheelNav application I know Scrum, Kanban and a few other Agile words IT Brainiacs

Windows Store

models

A Short Handbook for the Unicorn from Ruby

Rapid Software Testing - a change in perspective

Download from

on Rails

A Dive Into Personal Objectives World From bureaucracy to success in starting a business High-End Content Management, Adobe version Continuous Delivery compatible tests using Selenium



6 TYPO3 – a whole new world, a new point of view Alexandru - Cătălin Diniș

23 I know Scrum, Kanban and a few other Agile words Ovidiu Șuta

8 IT BRAINIACS

26 Continuous Delivery compatible tests using Selenium

Ileana Fritea

Robert Lantos

10 Ve officially launches its latest new development centre in Cluj Bogdan Mureşan

12 A Dive Into Personal Objectives World Bogdan Mureşan

15 Finding similar entities in BigData models Ovidiu Petridean

20 The WheelNav application Csongor Korosi and Cristian Chertes

30 High-End Content Management, Adobe version Alexandru Gheboianu

32 A Short Handbook for the Unicorn from Ruby on Rails Emil Luța

36 Rapid Software Testing- a change in perspective Monica Rațiu

38 From bureaucracy to success in starting a business Ioana Varga

23 I know Scrum, Kanban and a few other Agile words Ovidiu Șuta


editorial

T

Ovidiu Măţan

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

he time of holidays, which brings along the escape from the urbane linger and daily routine, is welcome and well-deserved after a year’s work. Also, the holidays keep at work those applications related to navigation and they empower the casual games for the break after coming from the beach. If one has preferred reading and they have come to the end of a sensational novel, it is time to read now the latest issue of TSM, in order to make the coming back from the holidays smoother. Anyway, back from the holidays, we are all fresh, with new revelations and new perspectives on the manner of work until then. If you are in Cluj, do come to the release event of this month. We have come back full of energy and we are preparing a new edition of Cluj IT Days for the end of November, where last year’s keynote speaker, Peter Lawrey, has already confirmed his presence. We applaud the debut in this issue of our colleague, Alexandru Dinis, who describes in his article his experiences regarding the participation in a one week training in Koln, on the TYPO 3 theme, where he had the opportunity to meet the IT community from that area. Another article provides the review of those seven months of the IT Brainiacs program, which aimed at introducing secondary and high school students into the universe of programming. And they have succeeded; the proof is represented by the writing of some interesting games in Java and Objective-C/Swift. We wish those of Telenav and Apex_Edu good luck and we hope they will continue this program next year, too. We begin the technical articles of this issue with The discovery of similar entities in the BigData models, which represents an introduction to data mining. We also enter the IoT area with IoT Applications with Java ME Embedded 8 and Eclipse, where a Raspberry PI is used together with Java ME. For the people with moving disabilities, an application has been developed, for the participation in the AT&T Connect Ability Challenge. You can find more details in the WheelNav Application. The fact that Ruby on Rails is beginning to no longer be a niche language is proven in the Short guide of the unicorn of Ruby on Rails. High-End Content Management, Adobe version presents the product, but also the architecture of a solution that wishes to transfer the publication of information from programmers to content managers. Finally, I know Scrum, Kanban and some other words in Agile invites you to find the time to reflect upon the maturity of IT concepts.

Ovidiu Măţan

Founder of Today Software Magazine

4

no. 37/2015, www.todaysoftmag.com


Authors list

Editorial Staf 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 Mircea delia.mircea@todaysoftmag.com Junior developer: Alexandru Diniș alexandru.dinis@todaysoftmag.com Marketing specialist and tehnoredactor: Ana Maria Bivol anamaria.bivol@todaysoftmag.com

Alexandru - Cătălin Diniș alexandru.dinis@todaysoftmag.com Junior PHP Developer @Today Software Magazine

Ileana Fritea

ileanafritea@gmail.com President Apex-Edu @ Apex-Edu

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

Senior QA Engineer @Betfair

Alexandru Gheboianu alexandru.gheboianu @pitechnologies.com

Bogdan Mureşan

Emil Luța

Director of Engineering @3Pillar Global

Developer @ Yonder

Ovidiu Petridean

Monica Rațiu

Senior Software Developer @ SDL Research

Marketing Specialist @ Altom

Csongor Korosi

Ioana Varga

iOS Developer @ Telenav

Expert accountant Managing Partner @ A&I Consulting

Cristian Chertes

Sarah Hernandez

bogdan.muresan@3pillarglobal.com

opetridean@sdl.com

Made by

Today Software Solutions SRL

Robert.Lantos@betfair.com

Software Engineer @ Pitech+Plus

Csongor.korosi@telenav.com

Printed by Daisler Print House

Robert Lantos

Cristian.chertes@telenav.com iOS Developer @ Telenav

emil.luta@tss-yonder.com

monica.ratiu@altom.ro

ioana.varga@aiconsulting.ro

sarah.hernandez@veinteractive.com Director of Commercial Marketing @ VE Interactive

Ovidiu Șuta

ovidiu.suta@isdc.eu QA & Bid Manager @ ISDC

Copyright Today Software Magazine 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. 37/july, 2015

5


education

TYPO3 – a whole new world, a new point of view

A

couple of weeks ago, I received from the Arxia company the invitation to participate in TYPO3 Summer Camp 2015. I admit having been a little bit reluctant, due to my lack of experience with this framework, but TYPO3 eventually turned out to be a wonderful experience for me, which I have lived together with wonderful people. Alexandru - Cătălin Diniș alexandru.dinis@todaysoftmag.com Junior developer @Today Software Magazine

6

no. 37/2015, www.todaysoftmag.com

I had recently read, accidentally, about TYPO3 and about its powerful devel opme nt i n We st Europe, but I had never imagined what this framework can truly mean. I reached the conclusion that T YPO3 can combine all the qualities necessary to a framework: it is easy to use, it is fast, and, last but not least, it can be used in a wide range of applications. R e g arding t he choice of the place where Summer Camp w a s org an i z e d, I think it was an excellent one, since the TYPO3 community in Koln is known as being very close connected, showing a high degree of involvement in all the activities. My participation in

this camp took place within the PHTH company, a company that deals only with T YPO3 software development. Situated in a peaceful area of Koln, the company led by Mr. Philipp Thielle prov i d e s a c o s y space, favorable to the development of software. The efficient organization of the community and the concern for a better communication between its members could be noticed right from the first day, when I was received at the airport by Philipp. After a short tour of the city and a short tour of the company, when they presented the technology to me and the way it is organized, I was


TODAY SOFTWARE MAGAZINE introduced to the community. They emphasized the importance of my active participation within the community and at the same time, the willingness of the community to make this possible. During the first day in the PHTH office, they presented the workflow to me, and, to my surprise it was perfectly similar to my daily workflow within TSM. Next, I was introduced to the extension which I was to contribute to and they explained to me what it consisted of. I appreciated the fact that they asked for my opinion regarding the Agora extension and on what I consider a CSM should do. Agora, as a technology, is based on Extabse & Fluid. As a TYPO3 extension, Agora has to answer the following functionalities: • The extension – contains at its base one or several threads. • Each thread may contain one or several posts, and they behave according to the standard model on the blog. They can be commented, followed, marked as favorite. My first task was as simple, as it was competitive for me. I was asked to implement the user signature for each thread and post, so that I could get used to the framework. Thursday brought along my first real task, namely, the implementation of a complete notification system in Agora. It implied notifications for the different user roles: the creator of threads, the creator of posts and simple users who follow a post or a thread. What I found surprising was the simplistic manner of implementation of the system of sending emails, since in TSM I found myself in the situation where I had to implement the same requirement, but using Fat-Free as framework, which was a rather costly operation. In order to highlight the easiness of using TYPO3, I will attach a short code sequence, used when sending a notification in the form of an email to all the users, which observes a given thread: Out of the desire for diversity, the next task was the creation of a backend module, which should allow the administrator to manage the functionalities offered

by Agora. Thus, for the first time, I got in touch with the “magical” methods offered by the Injected Repositories. The backend module was a challenging task, since it was a necessity to implement such a module. Moreover, everyone from PHTH wanted to see it functional, so that it could be tested. During this entire period, I had the opportunity to see the manner of work and the predominant type of mentality within this type of company. What I most liked was the relaxed attitude, the feeling of safety and trust manifested by all the members of the team, as well as the degree of involvement and the desire to help. Furthermore, I was pleasantly surprised by their curiosity in relation to the manner in which programming is done in Romania. I had the honor to talk to some great contributors within the community, such as Marcel, Philipp, but also Bjorn Chr. Bresser. Towards the end of my staying in Koln, I was introduced to the Core TYPO3 contributors. Philipp supported me in fixing the first bug in Core and reporting it after fixing. These operations were followed by the validation process (which in TYPO3 is carried out based on votes), and last week I noticed that the solution was validated and it will be included in the next version. Though the work days were rather long (10-11 h), I had enough time to enjoy the beauty of Koln city, by taking short walks in the parks or visiting impressive monuments, such as Cologne Cathedral Dom. Koln is an extraordinary city, which offers a wonderful touristic

experience, due to its wide cultural and social variety. Its inhabitants are very proud of their traditions and sites and would talk about them for hours to anyone willing to listen, of course, over a glass of Kolsch, the traditional beer in Koln. In conclusion, the experience offered by TYPO3 Summer Camp 2015 was unique, both from the point of view of my professional evolution, of getting in touch with a new framework and a new manner of work, and from the point of view of a new cultural and social experience. I want to thank those from Arxia for the extraordinary experience offered and I warmly recommend this kind of events to anyone who wishes to progress on the professional and personal level.

www.todaysoftmag.com | no. 37/july, 2015

7


education

IT BRAINIACS It’s all about emotion...and talent... and lots of work...

I

t can be a bit intimidating to write an article on TSM as an expert in education, rather than an expert in the relevant field. At first... until I reached the 3rd or 4th line... when I realised that I am writing about talented students capable of nice performances in programming, about young programmers willing to share their experience, about learning, or the factors that influence performance in this field. That is, a subject of interest for any IT professional or company. The ITBrainiacs programme developed by Apex-Edu and Telenav was designed with a focus on two main concepts: the need to discover as early as possible children/youth capable of high performances in the field, as well as the development of an intervention aimed to capitalize at the highest possible extent on the identified potential. A true intervention and, above all, an educational one, an experience that changes all involved. Obviously I started off with what science teaches us. Educational literature emphasises the multi-deterministic nature of superior performances. Skills are important, whether we refer to general cognitive skills or very specific skills. Opportunities are important, whether they are an exceptional educational action within an institution, a fortuitous meeting with a mentor, or the luck to be in the right place at the right time... And add to all this the psychosocial skills that help us manage learning, motivation and emotions, to persevere, to persevere ... to persevere. Because work beats talent, if talent doesn’t work hard enough.... A complex circumstance of the type described above is provided by the ITBrainiacs programme conducted by Apex-Edu and Telenav, which developed a framework for intense interaction between very bright students and passionate programmers, with a strong commitment to development and learning.

The ITBrainiacs Students The average age of the ITBrainiacs students was 15, and they are 7th, 9th and 11th grade students with well-outlined interests in the field of IT and strongly motivated to learn. We selected them from around 70 applicants because they were the top 10 based on their results at specific

8

psychological tests. Previous program- Results ming knowledge was not a requirement to We started from scratch, with minimal be enrolled in this programme. or no programming knowledge, and this is what we achieved: two games developed The ITBrainiacs Mentors under Java (Alien Invasion, a multiplayer The ITBrainiacs mentors were passi- target-based game), three games developed onate programmers at Telenav, who were under Objective C (AirHockey, a goal shohappy to take on this challenge to share oting game and a military strategy game), a their experience and to get the children Tic Tac Toe type game for Android, one for acquainted with various programming Swift (Pairs), a Swift application with recilanguages and to guide them in developing pes and a personal finances management a programming product. application for Android. For example, the application “Save your money”, already The Context available on the Market, started off like The ITBrainiacs programme was this: conducted over a period of 7 months “At first it was difficult because I knew and included weekly meetings between absolutely nothing about programming, students and mentors, in a one-on-one but now, after this project, I learned lots of format. A one-on-one format. I would things I have never heard of before. In the like to repeat this several times because first part of this project, Filip (the mentor, I think this was the key element to the author’s note) started explaining to me success of this programme, that lucky what programming means, and we started circumstance. This type of interaction is, writing code in pseudocode. Filip insisted beyond any doubt, the main reason for the very much on this part because this is the extremely personal and authentic nature quickest way to learn the essentials. After of the experience ITBrainiacs has offered. we finished writing code in pseudocode, he Although I knew from theory the effects started explaining to me what Java is using of mentoring on the education of stu- real life examples. We started writing code dents capable of high performances, the in Eclipse Luna, where Filip showed me the practical experience I had the privilege of basics any programmer should know...”, being part of revealed to me the complex Alexandru Iuga, 9th grade student intertwining of the mechanisms that drive the children’s development. Above all, this For the children format enabled the mentors to customise But this was not all. In fact, the most the intervention depending on the real significant results, as far as we are coninterests of the children. This full adapta- cerned, were obtained at a much more tion to the children’s needs ensured a high intimate level, both for the children and level of motivation and enabled mentors to mentors involved in this project. These teach at the right time the strategies requi- were changes one can only expect to red to make learning easier or to provide achieve with very, very hard work as a a model of how to manage emotions that result of a training experience, for examcome with it. ple. We saw attitudes changing. And such changes ensure durable results: what the students and the mentors obtained as a

no. 37/july, 2015 | www.todaysoftmag.com


programare result of the programme was not only limited to the results of the individual mentoring meetings, but has become a personal asset of each party involved. That is, we saw long lasting changes occurring, with effects on the long run. For the children, this generally meant a change in the attitude towards learning and effort. And not only towards effort per se, but also towards the effort of those who stood by them during these months and guided them, an effort they became aware of and deeply appreciated. This type of result usually becomes a priceless asset for any developing child and is instrumental not only in the way they manage their learning and career, but also in how each of them makes his way through the world of social relationships. And believe me, as a parent with long time experience with children from preschool age to university post-graduates, this change of attitude towards effort and perseverance is something quite biiig!!!! As soon as they were enrolled, the children knew that the support they are receiving also carries their responsibility to make an effort to create a programming product. And I emphasise this choice of words: to make an effort. As part of the programme’s concept, the result was important, but less important than the process itself. The mentors have taken into account the children’s potential and managed to focus the intervention on the children’s next area of development, but never losing sight of their limits. They required a lot and gave a lot. And the currency was effort and involvement. From both sides. Sometimes the children had their doubts, and had their ups and downs, as one has during any learning experience. They had to do homework, had to work overtime and to meet deadlines... But they always had support when faced with difficulties and I think they learned something extremely valuable...to walk that extra mile. For example, Dani Pop, a 9th grade student, showed us that when there’s a will, there’s a way: “During computer science classes I worked in notepad++, and then I compiled the code at the company, since I had no Mac to compile the code.” Another effect of the programme I had anticipated, but not to its full extent (!), was that the learning experience the children went through at Telenav has turned out to be a complete occupational guiding intervention. All conditions were given ...and then some... The children had the opportunity to see for themselves, repeatedly,

TODAY SOFTWARE MAGAZINE the typical work environment at an IT company, the typical tasks a programmer has to perform, as well as the social environment within an organisation, and they managed to become aware, through their interaction with their mentors, that this is the road they want to and can take. Add to this all the fun they had while working alongside young programmers who taught them exactly what they wanted and needed to know, by means of perfectly customised ways adapted to their own learning pace, but also the satisfaction and pride that comes with the development of a programming product, and we have the wonderful recipe for the design of a true and meaningful learning experience. “For me, this project meant a lot, because I really learned programming in the true meaning of the word, and not what Internet tutorials teach you. I worked at a real company and managed to master a very difficult programming language, Objective C. At the beginning of the project I had minimal knowledge of C, but my desire and my mentor’s passion lead to surprising results. We developed a Clash of Clans type military strategy game using SpriteKit, an advanced technology developed by Apple for OpenGL type graphical engines, basically built on OpenGL. Another important feature of our game is that all information is parsed from JSON files, and nothing is hard-coded, at least in theory :). All in all, the ITBrainiacs project offered me an opportunity I never dreamed of: to become a true developer at only 15!”, Daniel Pop, 9th grade student „My experience at this company was unique. In addition to learning a lot, I also had fun and had many meetings with my mentors and programmers working at the company. I recommend this experience to every young person, because it is something truly unique. At the same time, we have to be aware that we are one step closer to this profession.”, Alexandru Vădan, 7th grade student

the right way, to organise your knowledge, to contemplate their order, usefulness and addressability. Teaching involves another type of practice: responsibility. This responsibility made the mentors turn to their textbooks again, assess different methods and choose the ones that were best suited for the given student and the specific programming task, as well as to hand over not merely technical knowledge, but also to be supportive when fluctuations in motivation and emotions that come with learning occur. And this requires efficient communication, empathy and the ability to manage one’s own thoughts and emotions. Because you are a model! They managed these tasks brilliantly. I bow before them! „As far as I’m concerned, the ITBrainiacs experience taught me first of all to tidy up my thoughts. I can hardly wait for the next edition and I would like to see more such projects organised” Mihai Costea, Telenav „This was a learning experience for me, as well. I learned how to better express my thoughts, because I had to rephrase anything I wanted to explain in order to make it as easy to understand as possible. Paul was also delighted with this programme, he learned many things he would not have learned in school, and I’m sure that now, when this is over, his passion for programming has grown.” Mihai Șerban, Telenav Essentially, the ITBrainiacs programme was a learning experience built around positive emotions. It was built on commitment, passion and enthusiasm! And lots of fun!

Ileana Fritea

ileanafritea@gmail.com

For the mentors Probably the most surprising effects of the ITBrainiacs programme were the things happened to the mentors from Telenav. The support provided for the children not merely to acquire programming skills, but, most importantly, to put them in practice by developing games and applications was a learning experience for the mentors, as well. A new and true one. The act of teaching itself is a constant act of learning that forces you to say the right things, at the right time and especially in

Chairman of Apex-Edu @ Apex-Edu

www.todaysoftmag.com | no. 37/july, 2015

9


business

Ve officially launches its latest new development centre in Cluj

V

e is delighted to announce the official launch of its most recent tech development centre in Cluj, Romania. With over 80 talented developers now hired and fully trained, this latest opening brings Ve’s award-winning global development team to a total of 240 developers, across offices in London, Paris, Bilbao and now Cluj.

The Cluj development team will be focused on Ve’s exciting innovations in the Big Data space, and across Ve’s portfolio of special projects in the B2C Retail and Travel tech space. Ve chose Cluj as it’s 4th technology development hub because of the city’s reputation for world-class education in technology, its 11 universities, and unprecedented investment into tech by the Romanian government. “Ve is a champion of innovation and ambition, and Cluj represents these core values as a city. When carefully selecting where we would base our technology hubs, it was these valuable qualities that attracted us to Cluj. The passion and skill of the local workforce is renown.” Raul Martinez, CTO, Ve. Spearheading the recruitment of the team of talented developers is Cristian Cazan, Business Development Director, who brings more than 15 years experience in development and senior management. Cristian has joined the team from Endava, where he was Delivery Manager and Head of Development, roles in which he gained experience of managing and developing over 160+ IT professionals in multiple

10

locations. In his capacity at Ve, Cristian is responsible for talent spotting, attracting and leading Ve’s 80+ talented professionals; helping Ve to challenge the status quo in the digital world and become one of Cluj’s tech giants.

It supports over 10,000 domestic and multi-national online businesses and retailers in the delivery of real-time marketing communications at key points within their customers’ journeys.

About Ve: Ve Interactive is a multi awardwinning technology company that offers a suite of apps across its VePlatform. These apps help online businesses successfully reduce bounce rate, increase customer engagement, minimize website abandonment and drive conversions. Tracking £billions of transaction daily, Ve’s comprehensive data set provides unparalleled insights into customer activity, whilst driving each app to deliver highly-targeted content to customers based on their purchasing activity and profile. Recipient of a Ruban d’Honneur in the 2014-15 European Business Awards, Winner of a Data Strategy Award 2014 for Real-Time Marketing and a Gold Medal in the International Business Stevie® Awards 2014 for the company’s VePlatform, Ve works across 18 languages and has 27 offices worldwide, within 43 territories.

no. 37/july, 2015 | www.todaysoftmag.com

Sarah Hernandez

sarah.hernandez@veinteractive.com Director of Commercial Marketing @ VE Interactive


comunități

TODAY SOFTWARE MAGAZINE

IT Communities

T

he events of this period are organized and carried out by some people who are passionate about technologies and their teams. As you can see in the calendar, they are exclusively published on meetup.com, having an audience formed of the local communities. In August, we will also have a magazine release in Oradea. We are waiting for you !

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

Calendar July 31 (Cluj) Launch of issue 37 al Today Software Magazine www.todaysoftmag.ro August 10 (Cluj) PMI Monthly Meeting meetup.com/PMI-Romania-Cluj-NapocaProject-Management-Meetup-Group/events/224143323/ August 27 (Cluj) OpenStack Nova Deep Dive meetup.com/OpenStackRomania/events/222910344/ August 4 (București) PMI: Requirements discovery&elicitation meetup.com/PMI-Romania-BucharestProject-Management-Meetup-Group/events/224228173/ August 5 (București) Startup Grind Bucharest Hosts Ionut Cotoi (CEO & Co-Founder at DeviceHub.net) meetup.com/Startup-Grind-Bucharest/events/223967970/ August 26 (București) August BucharestJS Meetup meetup.com/BucharestJS/events/223597688/ August 24 (Oradea) Launch of issue 38 al Today Software Magazine facebook.com/todaysoftmag todaysoftmag.ro

Tabăra de testare Testers community from IT industry with monthly meetings Website: www.tabaradetestare.ro Since: 15.01.2012/Members: 1243/ Events: 107

www.todaysoftmag.com | no. 37/july, 2015

11


management

A Dive Into Personal Objectives World

I

n the last years, I have become more and more familiar with terms like “management by objectives”, “company objectives” and “personal objectives”. In the beginning, this was a real struggle, then it got worse, then it started to take shape and finally come around.

Bogdan Mureşan

bogdan.muresan@3pillarglobal.com Director of Engineering @3Pillar Global

The journey always started with company objectives which needed to be broken into personal objectives, and I must admit it was a challenge for me to apply the concepts even if they seemed easy to understand. It was really interesting to connect the dots and make them really work for me. In the hope that some of the learnings I took in the process will help others struggle less than me with this, I will highlight some of the findings here. And the interesting thing is that I don’t think that this applies only to the IT world, but has a high level of application in a lot of other areas.

The big picture

As our company grew a lot in the last years, the need for synchronized processes came very naturally. If, on a small scale, we can have things working only by our gut feeling, when the size of the organization increases, there is a need to set some ground rules in order to be able to keep the things under control. As a company tries to grow, part of the strategic thinking is to have a well-designed plan. And one important part of the plan is to define clear objectives. Objectives can be long term, mid-term or short term, but no matter what temporal frame is targeted, these objectives need to be cascaded through and adopted by the entire organization in order to maximize the chances to make

12

no. 37/2015, www.todaysoftmag.com

them happening. This sounds awesome as a concept, but it’s not so easy to actually do it. The challenges we faced can be split in two areas: • the transition of the big objectives from strategic high-level company objectives to individual objectives. • actually defining meaningful individual goals. If defining the right strategy for a company and setting the right yearly objectives is a huge challenge, the implementation at the company level through departments and individuals is at least as challenging. If either of the parts fails, the entire process is compromised. A bad yearly strategy cannot help anybody and a bad individual implementation can easily affect the overall result. Nevertheless, the biggest challenges we faced were related to the second part: defining meaningful individual goals. During this process, I discussed a lot with people who were ready to adopt this, with people who were totally against it, I read a lot and I put a lot of thinking into it. The twists that helped me go further and helped me shape my mindset around this have a deep root in all of this above.


programare Let them flow

My real focus in this article is directed towards personal objectives. Before defining personal objectives, company objectives need to be set and they need to be cascaded down the company structures. And then they get to individuals. Some theories say that company objectives policy should stop at the department level. Some theories say that they need to be dispatched to each individual. If we think about our personal life, we set objectives for ourselves in any point of it. Formal or informal, the objectives are there. It’s somehow natural to have them also in our working environment, so my personal preference goes for the second option: objectives for everybody. This needs to happen in a natural way and in order to have everybody’s buy-in, there are a couple of considerations which we need to have in mind when we are doing this.

Not everybody needs to influence directly the company objectives This is the number one mindset directive on my list. Some people may influence directly some company objectives, but most of them will have only an indirect influence. And that is actually quite good. Because the easiest way to indirectly help on company objectives, if there is not a direct connection, is to become better on what we are doing, so our focus when setting the objectives can go to that. And to be honest, the motivation to achieve a goal when the target is to improve one’s personal knowledge and skills is much higher. Let’s try a simple sample: suppose that one of the company’s objectives for this year is to get Microsoft Azure expertise by having three people certified into advanced Azure by the end of the third quarter. The company has 200 employees from which only

TODAY SOFTWARE MAGAZINE 50 are working on .NET technologies. If it’s impossible to set a target for every .NET person to get the Azure certification, imagine what storm will be created if you are expecting this from the developers which are working with other technologies.

Mutual benefit brings better motivation This might sound selfish, but it’s the human nature and cannot be ignored. One thing that organizations need to understand is that when personal goals are set just to meet the organization’s criteria, individual motivation can go down in an instant. In order to have people buy in, personal objectives need to benefit the individuals also. Going back to the previous example, it would be a really bad move to force some of the 50 .Net developers to take the Azure certification. The logical step would be to find those who want to do so and are attracted by this idea. It’s almost impossible that nobody would want to soar into new stuff. Personal development of a person helps also the company so it is ok if someone’s personal objectives target cannot be tied by a specific company initiative and focus only on personal growth. It might be the case that this could have the biggest buy in from the person.

Making it personal Knowledge is different than understanding I heard this in a different context, and I found this phrase very powerful and applicable in a lot of contexts. There are tons of materials on the internet to define what an objective is and even more important on how to define a SMART objective. The short version is that when you are setting an objective, the chances of meeting the objective are considerably higher if the objective is SMART. This means that the

objective needs to be specific, needs to be measurable, needs to be achievable, needs to be relevant and needs to be time-based. When I read the first time about SMART objective, I was like a child who discovered chocolate. The interesting thing is that we discover chocolate very early in our life, maybe at the age of two or three, and we are not able to open the package properly without help. And we need to do some practice on how to do it. But once we learn how to open it, after many tries, our life would be changed in good forever. And like any good stuff in this life, we need to understand how it works and we need to have it with moderation, otherwise it can turn against us.

SMART is not a myth As I said before, defining a SMART objective is not as easy as it looks, but based on the thoughts put down on paper so far it is very important • Specific allows us to be focused on what we want to achieve. If the objective is not specific, it is very easy to get derailed in a variety of ways and lose our focus. And when we are derailed, it is easy not to see the light at the end of the tunnel. And this can lead to demotivation before the journey ends. Let’s say that we are targeting to better understand the wearable concept. This is a very generic buzz-word and we can bring it down a little. We might want to do some research on iWatch and all of a sudden our objectives become very specific. • Measurable is what gives us the opportunity to say very clearly if we have met our objective or not. How do I know if I really researched something related to iWatch? I can plan to provide a prototype for some functionality or

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. 37/july, 2015

13


management A Dive Into Personal Objectives World integration with some other software. This way we can say for sure at the end of the time frame if we are there or not. We can have the finality and accomplishment for our work. • Achievable is what keeps us on a realistic level. We can push ourselves and set a target to implement the best iWatch application in the next 3 months, but if we are just starting to learn about iWatch development, this is hard to achieve. Not being achievable might push us hard in the beginning but again can lead to demotivation really fast as we go for the same reason: we don’t see the end result happening. • Relevant allows us to keep the focus without effort on our goal. If I am a .NET developer in a .NET oriented company being proficient in iWatch development doesn’t make sense. Even more, my daily tasks may not have any connection with this either now or in the future. I would have to find time to totally disconnect from current work context and this can easily be deferred in the daily work whirlwind. But if I know that a new team needs to be set in place for this I can connect to other people, I might get a mentor to help me and the company has all the interest to set up the framework for me to do this; so, all the premises to allow me to focus on this are there. • Time-based is essential in order to avoid procrastination. And it is essential to avoid stress. And it is mandatory in order to be able to have a finality in my work and my efforts to achieve my objective. If I don’t set a timeframe, Apple might be acquired by Microsoft before my prototype is ready and iWatch might become obsolete.

Each person owns his objectives This is one of the toughest lessons I learned. Once a person has committed to an objective he / she should not rely on somebody else to achieve the objective. That person is primarily responsible to make it happen. Usually, the achievement of personal objectives is monitored and evaluated at the end of the year by somebody, but it is not that person’s role to make it happen. A manager can help his team members and guide them through the process, but if they are waiting for the manager to push them constantly in order to meet their personal objectives, those are half missed from the beginning.

14

These tips actually work: • store them somewhere easily accessible; imagine the ‘motivation’ when we want to revise the progress on them and we don’t have them in front of us • review them on a constant basis in order not to lose focus on them; if they were defined wisely and meaningful, this comes very naturally.

Fear of commitment is the biggest objectives enemy I met a lot of situations when people have done something interesting like writing an article when they didn’t have this set as an objective. These people love to write, but when they were asked to commit writing more, they freaked out. It seems that we are genetically designed to have a fear of commitment. What if, any time that we acknowledge this, we think about the fact that humankind has overcome the ultimate fear of commitment: people started to get married. So, committing to a yearly objective should be piece of cake. Leaving the joke aside, when we have doubts if we should commit to something, we need to think what the root cause of that is. That commitment might really hurt us or is it just the fear of commitment? And the easiest way to overcome this is to commit to something which we really want to do. I find impossible the fact that there is nothing out there which we can find to help us improve, to help us grow, to help us become better in what we are doing.

The conclusion

Don’t underestimate the power of the journey This might be a walking cliché, but it is the truth and nothing else but the truth. Fishing is not always about the fish, as some people might think. It’s about what knowledge you gain in order to get there. It is about learning how to overcome the obstacles. It’s about the game. Winning, in this case achieving the goal, is a bonus. If somebody wants to get some expertise with a new framework and sets a personal objective to implement a prototype by the end of next quarter, I view the knowledge gain on the process much more important than the prototype itself.

no. 37/july, 2015 | www.todaysoftmag.com

I see objectives as a good way to progress, no matter if we are talking about a company or a person. Even more, I see them as a good way to measure progress. From my perspective, this is the main purpose of objectives. And on a personal level, objectives work for the people who want them to work. If somebody doesn’t believe in this, then setting objectives may transform into a demotivational and not useful process from the beginning. Whether you believe in them or not, I found the thoughts I enumerated very helpful, as they have really helped me understand objectives and make them work for me. And my hope is that they will also help other people. This is not an objective, because I don’t know how many people I want to help, I don’t know by when and I don’t know if this is achievable or not. It’s just a hope.


Finding similar entities in BigData models

T

he purpose of the article is to present a way to find similar entities in BigData models. We will present an algorithm used to find similar sentences in a very large data corpus. Even though the examples presented are focused on finding similar sentences, this algorithm can be used to find any kind of entities that can be described by a set of characteristics. Ovidiu Petridean

opetridean@sdl.com Senior Software Developer @ SDL Research

The Problem How do you find similar sentences in a very large data corpus (peta-bytes of data)? An important problem that arises when we search for similar items of any kind is that there may be far too many pairs of items to test each pair for their degree of similarity, even if computing the similarity of any one pair can be made very easy.

The solution A fundamental data-mining problem is to examine data for “similar” items. So, by similar items we can refer to sentences or documents or something totally different. Eventually we will come to the conclusion that the problem of finding similar sentences can be generalized to a problem of finding similar items.

that is, the ratio of the size of the intersection of S and T to the size of their union. We shall denote the Jaccard similarity of S and T by SIM(S, T ). Example: Let’s look at two sets S and T . There are three elements in their intersection and a total of eight elements that appear in S or T or both. Thus, SIM(S, T ) = 3/8. Similarity of Documents (sentences) An important class of problems that Jaccard similarity addresses well is that of finding textually similar documents in a large corpus such as the Web or a collection of documents. Here are some examples: Plagiarism, Mirror Pages, Articles from the Same Source.

General knowledge

Data mining The most commonly accepted definition of “data mining” is the discovery of “models” for data. A “model,” however, can be one of several things: statistical modeling, machine learning, summarization (e.g. Google’s PageRank), feature extraction. Hash Functions A hash function h takes a hash-key value as an argument and produces a bucket number as a result. The bucket number is an integer, normally in the range 0 to B − 1, where B is the number of buckets. Similar Items To define similar items we will use the Jaccard Similarity. The Jaccard similarity of sets S and T is:

The algorithm for finding similar items The algorithm has three main steps: “Shingling of Documents”, “minhashing” and “locality-sensitive hashing”. To present the algorithm we will use a practical example of finding similar sentences in a large data corpus.

www.todaysoftmag.com | no. 37/july, 2015

15


programming

Finding similar entities in BigData models

1. Shingling of Documents (Sentences)

winter at hotel Napoca” The most effective way to represent documents as sets, for the We now have the following sets (using the words with ignore purpose of identifying lexically similar documents is to construct case): S1 = {i, enjoyed, my, stay, during, summer, at, hotel, califorfrom the document the set of short strings that appear within it. nia} S2 = {i, enjoyed, my, stay, during, winter, at, hotel, napoca} In our particular use-case we have referred to words as shingles. It is important to remember that the characteristic matrix is unlikely to be the way the data is stored, but it is useful as a way Hashing Shingles to visualize the data. The similarity of these two sets is defined as Instead of using substrings directly as shingles, we can pick the number of rows in which the sets agree divided by the total a hash function that maps strings of length k to some number number of rows. So, in this case we conclude that the similarity is of buckets and treat the resulting bucket number as the shingle. 7/11 which is 0.63. The problem is that as said before storing this sets will take a huge amount of memory (or disk space). Therefore Similarity-Preserving Summaries of Sets we introduce the following technique called “mihashing”. Sets of shingles are large. Even if we hash them to four bytes each, the space needed to store a set is still roughly four times the 2. Minhashing space taken by the document. Our goal is to replace large sets The signatures we desire to construct for sets are composed by much smaller representations called “signatures.” The impor- of the results of a large number of calculations, say several huntant property we need for signatures is that we can compare the dred, each of which is a “minhash” of the characteristic matrix. signatures of two sets and estimate the Jaccard similarity of the To minhash a set represented by a column of the characteristic underlying sets from the signatures alone. matrix, pick a permutation of the rows. The minhash value of any column is the number of the first row, in the permuted order, in Matrix Representation of Sets which the column has a 1. It is helpful to visualize a collection of sets as their characteristic matrix. The columns of the matrix correspond to the sets, and Example the rows correspond to elements of the universal set from which Let’s suppose we pick the following order in the previous elements of the sets are drawn. matrix: This permutation defines a minhash function h that maps Each of the following examples only uses two sentences to sets to rows. Let us compute the minhash value of set S1 accorshow how to solve the similarity problem. However, the effici- ding to h. The first column, which is the column for set S1, has 0 ency of the algorithm can be seen when we talk about a large in the first row, so we proceed to row 2, the second in the permudata corpus. We use the algorithm to find similarities in peta- ted order. There is again a 0 in the column for S1, so we proceed to bytes of data Let’s assume the following sentences: S1: “I enjoyed my stay during summer at hotel California” S2: “I enjoyed my stay during

row 3, where we find a 1. Thus. h(S1) = “at” and h(S2) = „napoca”

Minhashing and Jaccard Similarity There is a remarkable connection between minhashing and

16

no. 37/july, 2015 | www.todaysoftmag.com


programare

TODAY SOFTWARE MAGAZINE

Jaccard similarity of the sets that are minhashed. We pick the following two hash functions h(x) = x mod 11, The probability that the minhash function for a random per- g(x) = (2*x + 1) mod 11. mutation of rows produces the same value for two sets equals the Jaccard similarity of those sets. Now, let us simulate the algorithm for computing the signature matrix. We will not go through the whole process and just Minhash Signatures show the first iterations. Again, think of a collection of sets represented by their characteristic matrix M. To represent sets, we pick at random some Because there are 11 rows, we will have to do 11 calculationsof number n of permutations of the rows of M. the functions h and g. Initially, this matrix consists of all ∞’s: Perhaps 100 permutations or several hundred permutations will do. Call the minhash functions determined by these permutations h1, h2, . . . , hn. From the column representing set S, construct the minhash signature for S, the vector [h1(S), h2(S), . . . , hn(S)].

Computing Minhash Signatures It is not feasible to permute a large characteristic matrix explicitly. Fortunately, it is possible to simulate the effect of a random permutation by a random hash function that maps row numbers to as many buckets as there are rows. Thus, instead of picking n random permutations of rows, we pick n randomly chosen hash functions h1, h2, . . . , hn on the rows. We construct the signature matrix by considering each row in their given order. Let SIG(i, c) be the element of the signature matrix for the ith hash function and column c. Initially, set SIG(i, c) to ∞ for all i and c. We handle row r by doing the following: 1. Compute h1(r), h2(r), . . . , hn(r). 2. For each column c do the following: a. If c has 0 in row r, do nothing. b. if c has 1 in row r, then for each i = 1, 2, . . . , n set SIG(i, c) to the smaller of the current value of SIG(i, c) and hi(r).

Step 1: Looking at the input matrix we can see that for row 1 both S1 and S2 have 1’s, therefore we will calculate the hash functions (h(x) and g(x), where x is the number of the row) for row 1. So, h(1) = 1 and g(1) = 3, which means that both values are of course smaller than ∞ and so the previous table is changed to this:

Step 2: We now move to row two where again we see that both S1 and S2 have 1’s therefore we need to calculate the hash functions. Now, h(2) = 2 and g(2) = 5 and because both these values are higher than what we have in the Signature matrix we will not change anything. Steps 3 and 4 will not change anything and therefore we move to step 5.

Step 5: As we can see both S1 and S2 have 1’s in row 5 and so we compute h(5) and g(5). Because h(5) = 5 and g(5) = 0 we can see that we need to update the minimum value for g since this is smaller than what we currently have.

Let’s look at the previous input matrix and compute the minhash signatures. www.todaysoftmag.com | no. 37/july, 2015

17


programming Finding similar entities in BigData models Steps 6 to 10 will not change anything and so we skip to step 11.

matrix. We set the similarity threshold to 0.5 which means that want Step 11: to find out segments that have at least 0.5 Jaccard similarity. Here we can see that only S2 has a 1 in the 11th row which We also know that we have 10 rows (no of functions). means that after computing the values for both h(11) and g(11) we Therefore the combination of the threshold set to 0.5 and the will only update S2’s values if there is the need to do so. number of functions set to 10 leads the conclusion that we will So, h(11) = 0 and g(11) = 1, which now leads to the final form have 5 rows with two rows for each band. of the signatures matrix. Step 1 - Calculate the signature matrix hn(x) = (n*x+1) mod 11, 0<=n<=10

We will now skip to the final step and the final signature matrix looks like this:

Now looking at the previous process we can conclude that the two segments agree in one of the two rows from the signature matrix. This means that their similarity is estimated to 0.5, which is not a bad estimate considering that the Jaccard similarity is 0.63. Of course in order to get better results we can add more functions which lead to a better estimate. Often, we want to focus only on the most similar pairs or all pairs that are above somethreshold in similarity. There is a general theory of how to provide focus, called locality-sensitive hashing (LSH) or near-neighbor search.

3. Locality-sensitive hashing for Minhash Signatures

One general approach to LSH is to “hash” items several times, in such a way that similar items are more likely to be hashed to the same bucket than dissimilar items are. We then consider any pair that hashed to the same bucket for any of the hashings to be a candidate pair. We check only the candidate pairs for similarity. If we have minhash signatures for the items, an effective way to choose the hashings is to divide the signature matrix into b bands consisting of r rowseach. For each band, there is a hash function that takes vectors of r integers (the portion of one column within that band) and hashes them to some large number of buckets.

Analysis of the Banding Technique Suppose we use b bands of r rows each, and suppose that a particular pair of documents have Jaccard similarity s. We can calculate the probability that these sentences (or rather their signatures) become a candidate pair as follows: 1. The probability that the signatures agree in all rows of one particular band is s r . 2.The probability that the signatures disagree in at least one row of a particular band is 1-sr . 2. The probability that the signatures disagree in at least one row of each of the bands is(1-sr)b . 3. The probability that the signatures agree in all the rows of at least one band, and therefore become a candidate pair, is 1-(1sr)b. The threshold, that is, the value of similarity s at which the probability of becoming a candidate is 1/2, is a function of b and r. An approximation to the threshold is (1/b)1/r. For example, if b = 16 and r = 4, then the threshold is approximately at s = 1/2, since the 4th root of 1/16 is 1/2.

Example We use the same two sentences but in order to make the example meaningful we use 10 hash functions to compute the signature

18

no. 37/july, 2015 | www.todaysoftmag.com

Step 2 - Calculate the polynomial functions for each band Due to the fact that we have 5 bands we will need 5 polynomial functions that take two arguments. The arguments are the numbers that compose the part of the signature that is considered for each segment. Let’s first look at the five bands from next page. We will choose polynomial functions in the form a1* X1+a2X2+ ... +anXn mod m, where n is the number of functions and m is a very large prime. For this example we will use the following functions: p1 = 2x1 + 3x2 mod 13 p2 = 3x1 + 5x2 mod 13 p3 = 5x1 + 7x2 mod 13 p4 = 7x1 + 9x2 mod 13 p5 = 9x1 + 11x2 mod 13

So, let’s do the math. (S1) p1 = 21 + 30 mod 13 = 2 (S2) p1 = 20 + 30 mod 13 = 0

Let’s name the resulting buckets B1-2 and B1-0 Now we move to the second band


TODAY SOFTWARE MAGAZINE (S1) p5 = 90 + 110 mod 13 = 0 (S2) p5 = 90 + 110 mod 13 = 0

We now also have just one resulting bucket B5-0. This means that we have the following buckets:

B1-2 = {S1} B1-0 = {S2} B2-10={S1} B2-0={S2} B3-0={S1} B3-12={S2} B4-0={S1,S2} B5-0={S1,S2}

Now since the two segments have hashed together in at least one bucket (actually B4-0 and B5-0) we will consider them as candidate pairs and calculate the Jaccard distance to find if they are indeed similar.

Conclusions

(S1) p2 = 30 + 52 mod 13 = 10 (S2) p2 = 30 + 50 mod 13 = 0

The resulting buckets are B2-10 and B2-0 For the third band we have the following: (S1) p3 = 50 + 70 mod 13 = 0 (S2) p3 = 51 + 71 mod 13 = 12

The resulting buckets are B3-0 and B3-12 The fourth bucket

This algorithm is proven to be the most efficient when it works with a large data corpus. In order to deal with a large amount of data, it is recommended to use a MapReduce implementation. The use of this algorithm is not reduced to finding similar sentences. The algorithm can be used for any data set whose items can be individually described as a set of characteristics. The larger we make the signatures, the higher is the chance to get less false positives and false negatives - but this also involves more computing time and space. Check that candidate pairs really do have similar signatures by using Jaccard and don’t rely only on this algorithm, since we know it produces false positives.

(S1) p4 = 70 + 90 mod 13 = 0 (S2) p4 = 70 + 90 mod 13 = 0

The interesting fact is that now we only have one bucket B4-0 since both the resulting values are 0. The fifth bucket:

www.todaysoftmag.com | no. 37/july, 2015

19


programming

The WheelNav application

T

he AT&T Connect Ability Challenge is a competition for leveraging mobile technologies to improve the lives of people living with disabilities. Having the opportunity to help millions of people with disabilities around the world, we took the initiative and created a software solution to empower their lives. Csongor Korosi

Csongor.korosi@telenav.com iOS Developer @ Telenav

Cristian Chertes

Cristian.chertes@telenav.com iOS Developer @ Telenav

20

no. 37/2015, www.todaysoftmag.com

This article will describe our experience with developing such an application. Currently you can only find applications showing points of interest with accessibility on the map but no applications for people with disabilities to navigate on the App Store. WheelNav combines these two features and for the best navigation experience, it uses the Scout SDK.

The WheelNav application O u r i O S appl i c at i on is c a l l e d “WheelNav�. As its name describes, it combines information about wheelchair-accessible places and navigation. Points of interest Let us talk first about the accessible places part. It is a very big problem that


programare some places are not accessible for people using wheelchairs. Either the entrance step is too high or there are no disabled toilets available. Instead of implementing a service which attaches this kind of information to places, we decided to use an open source service called http://wheelmap.org. It is a service which is used to search, find and mark wheelchair-accessible places all around the world. Their API enables developers to interact with wheelchair accessible places. We grabbed this information and displayed it on the map. We are differentiating 4 types of places, each displayed with different colours: • Accessible (green): no entrance step, all rooms accessible without steps, disabled toilet is also available. • Partially accessible (orange): entrance step not higher than 7 cm, most important rooms accessible without steps. • Not accessible (red): entrance step higher than 7 cm, most important rooms not accessible without steps • Unknown accessibility (grey): there is no information about the place. From the top left menu, users can select the accessibility of POIs to be displayed on the map.

TODAY SOFTWARE MAGAZINE This feature improves the quality of the accessibility data given back to the community. Taking into consideration the accessibility of the places, it’s possible to plan whole journeys from home, to meet with friends only at accessible places, to visit other cities knowing which places are accessible. Searching for locations Searching for locations is possible from the search bar located at the top of the screen. It retrieves results from the POIs on the map and matching addresses. Selecting a result from the list will center the map to the location of the result showing a callout.

Navigation The other big component of the app is navigation. We tried to customize the whole navigation experience for people using wheelchairs. WheelNav offers The top right button opens a menu for selecting which cate- the possibility to create routes gories of POIs to be presented. Currently WheelNav supports the from the current position of the user to any other position on following categories: the map. • Public transfer • Food In order to implement the • Leisure navigation experience for peo• Money post ple forced in wheelchairs, we • Education integrated the Scout iOS SDK. • Shopping The routes are calculated taking • Sport into consideration the altitudes • Tourism of the positions along the route, • Accommodation so it provides the fastest and • Misc. smoothest routes to the user’s • Government destination. • Health The users of the app can review further information about these places and have the possibility to change the accessibility of the place, if they consider that the current accessibility attached to the place is wrong.

www.todaysoftmag.com | no. 37/july, 2015

21


programming The WheelNav application

Entering in navigation the user gets visual and audio turn by turn information. Our target was to give a hands free experience to users. Following the instructions of the audio guidance component, this can be easily achieved. WheelNav also offers a solution to another common problem when some areas of the city, parts of the streets are blocked. In this case, it’s very hard to know on which street to go forward. Using the block road feature of the app, the engine will re-route the user and help him get to the desired place. The navigation settings screen can be accessed by tapping the map and selecting the “Settings” option from the action sheet. Here users can turn off the audio, change the map style to night mode, see an overview and information about the route, report a blocked road, enter panning mode, select from 2D and 3D display of the map or quit the navigation.

22

no. 37/july, 2015 | www.todaysoftmag.com

Conclusion With the feedback provided by our end users and friends, we improved the app and we got to a production ready state. The following steps are to implement a voice recognition component, in order to ensure that the application is fully hands free, cluster the POIs and use the RealReach feature from the Scout iOS SDK. In the near future, the application will appear on the App Store, and we hope that it will help to improve the life of many people. A demo of the application and information about the challenge can be found on the Challengepost website: http://challengepost.com/software/wheelnav .


programare

I know Scrum, Kanban and a few other Agile words

I

Ovidiu Șuta

ovidiu.suta@isdc.eu QA & Bid Manager @ ISDC

’ve been working in IT for the past 10 years now and it has definitely been both fun and a challenge to observe (and sometimes follow) the trends in terms of Methodologies in our industry. By definition, the IT industry involves a creative process, although the terms of “Factory house” and a few others exist, primarily we are talking about an industry that is not focused on a “production” factory type setting with repetitive work, but rather a creative one where finding some sort of standards in terms of how we work has been a struggle from the beginning. If you look at how software development is done nowadays, it focuses a lot on Agile methodologies. And there are a lot of them out there. It seems like each one of the original authors of the Agile Manifesto went on and created their own methodology afterwards. We have XP, DSDM, Crystal, Adaptive Software Development, Advanced Development Methods, Scrum and a few others, all coming from the same people that originally agreed on a few basic principles and then went on and implemented them in a different way. This in itself is quite descriptive of the problem we face. If they cannot agree on how to do things in a standard way, how could we? So putting in place some sort of methodology on how to do software development proves quite difficult just because it is a creative process and one that is influenced by a lot of things like technology, culture of engineers, size and type of projects, and a lot others.

Another aspect in my view is the financial one, everybody wants to have the best efficiency, to have products on the market yesterday, to cut as many corners as possible; IT in general has kept up (and some would say even influenced) the world’s “fast-forward” development. Everything is faster now, compared to a few years ago, and things are not slowing down, quite the opposite. There is a lot of money to be made with these methodologies, we have trainings, certifications, workshops, consultancy services, conferences, products, tools, all focused on getting the “users” of a specific methodology up to speed and increasing the “development speed” by quite some percentages. Entire careers have now been created around methodologies and justifying one’s professional existence has led to a serious number of debates in the IT world, what is right, what is wrong, which one is the best, most efficient, etc. If you do a quick google on what “Agile

www.todaysoftmag.com | no. 37/july, 2015

23


managment I know Scrum, Kanban and a few other Agile words is” and let the autocomplete suggest some alternatives, the 3 most popular are “Dead; bullshit; a cancer”. There is equally as much money to be made from preaching against Agile as there is to be made by praising it. But Agile is just one of the steps in terms of Software Development Methodologies in the history of IT. If we look back in the history of IT, we will see things like: Structured Programming (1969), SDM (or PANDATA in 1970s), SSADM (1980s), OOP (initially in the 1960s, took off in the 1990s), RAD (1991), DSDM (1994), Scrum (1995), RUP (sustained by IBM from 1998), Extreme Programming (1999), and a lot others. The point is we seem to put something on the market in terms of how we work, build a hype around it (“The new kid on the block”), misuse it, blame it and move to the new one, hoping for better results. But is it not the methodologies that fail, but the people using them, generously helped in doing so by the industry build around the methodology itself (remember all those trainers, consultants, events, etc.?). We, in IT, have very short memories. But where is this behavior coming from? Why do we keep on inventing stuff, using it for a while, reaching the conclusion that “it is rubbish” and then moving on to the next cool thing? I believe this comes from 2 main parts.

things, is almost nothing. Look at other industries such as avionics, manufacturing (cars or other goods), logistics, research, medical, etc. We are a mere infant compared to the other ones. They had more time to fail, to learn, to adapt. If you look at head count, according to the IDC research worldwide we are around 11 million professional developers (making a living of it) and about 7.5 million hobbyist developers. That is insignificant compared to the overall worldwide work force (over 2.3 billion), less than 0.5%, but with a much higher impact. Looking at those numbers and the perspective, it sounds rather logical that IT “has not yet found its way”, we are still struggling to form some standards and work decently well. But we are doing this while the world is on an accelerated pace to new development, much more than it was 50 or 80 years ago. In certain ways, it is like trying to jump into a speeding train. Not easy. Maturity takes time, but time is something we as a society have little of, we want everything and we want it yesterday. There is no patience to grow up, and that sadly we see in all layers of our society, especially and unfortunately in our children. This lack of maturity coupled with the increasing speed and demands is reflected in the success rate of projects worldwide. 1. The maturity (or lack of) There are different statistics on this one, IT industry is rather new. We have a life but let’s say that IT project failure rate is span of 50 to 70 years (depending on who somewhere between 30 to 60% on different you ask) and that, in the grand scheme of levels (never seeing usage, severally over

24

no. 37/july, 2015 | www.todaysoftmag.com

deadline or budget, etc.). Now, how many of you would buy a car or build a house or get on an operating table knowing there are 30 to 60% chances it would all go horribly wrong? Sadly, as an industry we have already started to create an expectation of failure. Whenever an IT project is involved, contingencies are made in terms of money and time as it is expected to have overruns. Doing a job where more and more people are expecting you to fail is probably the low point for me personally in terms of career choice.

2. The silver bullet One could argue that the silver bullet is still a representation of immaturity, but for me this has a special place. Our constant search for that recipe that would make the perfect project, would ensure success, would make the teams happy, would make the management happy, does not exist! It never will, yet people are searching for it, and where there is a demand, there will be an offer; hence the overflow of methodologies, trainers, consultants out there. They exist because there is a need, artificially created in my opinion by some management, that believes that once this company/department/ project is Agile/doing Scrum/working Kanban/”insert anything here” they will be the best and all the problems will go away. I often run into scenarios where management/customers believe they “need to optimize” time usage for the teams, and that too much time is spent on doing


TODAY SOFTWARE MAGAZINE planning and estimating, too much time is wasted on retrospective sessions, so decisions like moving from Scrum to Kanban (hey, this one has no planning, right? So more time codingď Š ) are taken top down with little regard or understanding of actual reasons a team is not performing as it is supposed to.

The punchline How you do things is of little consequence now. It is too early, we have not yet understood WHY we do things and have already moved to the how. Once you have a clear grasp on the why, the how becomes much clearer. Once you understand WHY there is a need for team alignment, WHY there is a need to have predictability, WHY there is a need to have customer feedback, WHY should there be built in a system for the team to voice its concerns and frustrations, how we do it becomes easier. In the end, it is not the recipe that matters: focus on the principles, build a culture where people challenge the rules, let them find the best way to do something. Someone once told me that if somebody survived more than 6 months in IT, given the high intellectual maturity of the job they are already in the 5% smartest people in the world. Now, maybe I just want to believe it because I am also working in IT . Generally we are talking about very smart people that when presented with a problem will find the best way to solve it (better than any consultant could). Just teach them the WHY and get out of their way. It might sound all flower power, but it works!

www.todaysoftmag.com | no. 37/july, 2015

25


testing

Continuous Delivery compatible tests using Selenium

A

Robert Lantos

Robert.Lantos@betfair.com Senior QA Engineer @Betfair

s part of a new internal web project, one of the QA team’s goals was to design and run a reliable and fast regression suite as part of the CD pipeline. This was meant to raise confidence levels for each build by running a full set of tests instead of a select set of sanity tests, however, for this to be a viable option, we needed the tests to be executed relatively fast (a maximum of ten minutes/run). But, when you have a large number of tests, reducing the runtimes is easier said than done. Right from the start we had three major challenges that needed to be overcome.

Test runs should be fast. A typical deployment consists in running tests on at least 2 nodes and a VIP. Each of these runs entails a total of 450 front end tests and another 70 backend tests. This means that at least 3 regression runs are needed and, to keep our deployment times down to under 30 minutes, a test run time should be kept under 10 minutes.

Tests should be reliable. For regression runs to be a viable solution, we needed to make sure that the tests are reliable and that random false positives like dependency failures, caused by environment hiccups, do not cause the suite to fail, thus halting the entire deployment process.

Test packs/runs should scale easily. We also needed to consider scalability, so if additional tests are added we could still keep runtimes down. Using the following guideline, we successfully built a test suite that was not only fast, but also reliable enough for our Continuous Delivery goals. We managed to constantly run our regression suite in approximately 7 minutes with no build failures.

26

no. 37/2015, www.todaysoftmag.com

1. Tools used and test environment

The tests are based on Selenium’s RemoteWebDriver (grid) and the tests are using a remote selenium grid environment with multiple nodes for a better scalability and a local hub with one node for local tests runs.

2. Paralleling your tests as much as possible

Running hundreds of tests fast is not possible without using some kind of paralleling method. Simply put, the more parallel friendly your tests are, the faster a suite can be run. However, building a parallel friendly test project is not that simple, each test method needs to be designed with multi-threading in mind. This means that each test method needs to be created as an individual module independent from other tests. To be able to adhere to the earlier mentioned strategy, we used the following method to create RemoteWebDriver instances:


TODAY SOFTWARE MAGAZINE

MyDriver, in our case, is a custom class that extends the Custom onTestFailure RemoteWebDriver class, we use it to override some default selenium functions i.e. the getScreenshotAs method. Modular tests allow you to scale your tests as you wish, testNG parallel capabilities combined with a large enough selenium grid allows a great number of methods to run in the same time, thus drastically reducing suite run times. Here is an example of a test class with a couple of tests using Custom onTestSuccess the above method: Note:

Note: AbstractTest in the above examples is a test setup class that is used by all our tests and it handles the spring context loading and the listener initializations.

5. Test stability and dynamic waits

As you probably noticed I’m not using the @BeforeMethod to setup the test method or @AfterMethod to tear down the driver instances. This is due to some thread safety issues when running a large number of tests in parallel and especially when using data providers with all instances running in parallel. Instead, we chose to make use of custom listeners and to override the onTestFailure and onTestSuccess methods to clean up after each test, but I will get into this in more detail a bit later.

3. Use Page Objects

Within your web app’s UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.

4. Custom listeners and good session management

One of the most important requirements for the regression step in the Continuous Delivery process is for the tests to be stable and to be able to be run consistently without false positives and with 100 % pass rate. However, this is actually very hard to implement, especially for front end tests. There are a lot of things that can go wrong like dependency issues, slow page loading, actual bugs etc. What we have done on our test project to increase the regression stability was to use dynamic waits and a conditional retry mechanism. Selenium has a very useful wait mechanism, the implicit wait is to tell WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available. The default setting is 0. Once set, the implicit wait is set for the life of the WebDriver object instance. But unfortunately this is not always a bulletproof solution especially in the case of JS heavy pages. To cover these shortcomings conditional wait are the answer.

Custom listeners extend testNG’s TestListenerAdapter to Examples: make use of the ITestResult object. These listeners offer a very flexible management of posttest actions, which is especially useful This method will wait for Jquery to be active and for the when WebDriver instances need to be cleaned after each test, so document.readyState to be complete: that the grid is not saturated with redundant sessions and has resources available as soon as possible. The following code snippets show how we handle ramp down on test failure and test success. www.todaysoftmag.com | no. 37/july, 2015

27


testing Continuous Delivery compatible tests using Selenium

The second example will wait until the target element is series of predefined options (like elementToBeClickable). clickable

6. Test stability and conditional retries

As mentioned earlier another key instrument to increase the stability of your test is the conditional retry mechanism. Simply retrying failed tests a maximum number of times will make your test pass rate rise. Still, this has some major flaws, like, for instance, the possibility of actual defects left unnoticed because it Note: Both examples use the wait.until(<condition>) only happens once in a while. method, the conditions can be custom made or you can use a Our solution for this problem was to retry only when a certain

28

no. 37/july, 2015 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE condition is met. This is done by checking the exception of the failing test. So when, for example, the tests fail because the setup of test data fails, the test will be rerun but if the tests fails for any other reason it will be marked as failed.

7. Workarounds

One of the more annoying issues with selenium and chrome is the “Element is not clickable at point” bug. Selenium’s click method tries to click the target element on the center point, but sometimes even though the page and its elements are loaded an additional rendering is done to reposition the element this causes the earlier mentioned issue. A workaround for this is to use javascript to click the element or the Actions object. jsClickElement

Actions

Sometimes, you will need to run your tests on IE, and even though newer versions of the browser are comparable with the more mainstream browsers there are some issues left. One of these is the problem with SSL certificates, the ACCEPT_SSL_CERTS capability doesn’t work in later IE versions. The only workaround that I found so far was to use this method to accept the certificate for the target page. By working on this project we have learned a lot about the capabilities of Selenium and that it can be customized and used to fit your needs. For us this has meant being able to integrate our tests into our Continuous Delivery solution, offering a fast and reliable way of testing our product.

www.todaysoftmag.com | no. 37/july, 2015

29


programming

High-End Content Management, Adobe version

T

Alexandru Gheboianu alexandru.gheboianu @pitechnologies.com Software Engineer @ Pitech+Plus

he number of companies that use strategies and methods for the storage, management and distribution of content and documents associated to the processes of the organization is growing. These methods are grouped under the name of Enterprise Content Management (ECM). Under the ECM umbrella, we find solutions for the management of documents, web content management, searching, collaboration and the management of digital assets. The ECM type solutions aim to facilitate the management of organization information by simplifying the storage, security, permissions, retention and informational flows. Following the acquisition of the Swiss company, Day Software, by Adobe, the Day Communique product line turned into Adobe CQ, and will soon turn into Adobe Experience Manager (AEM). In the year 2014, those from Adobe became market leaders in the Gartner Magic Quadrant for Web Content Management solutions. AEM is a platform dedicated to the most complex and ambitious organizations, which allows the management of high degree granulation information. The situations where it is suitable to use this product are the multi-site and multi-language portals, where the independent administration of content by several content editors, based on some processes defined by the organization, is required. This thing is possible due to an ingenious technical solution and a thorough understanding of the ECM domain by the creators of the product. From the point of view of technologies,

30

no. 37/2015, www.todaysoftmag.com

AEM is a mix of Java open source frameworks and Adobe proprietary libraries. In order to manage a high complexity system such as AEM, they decided to use an OSGI container, Apache Felix, for the management of packages and libraries. OSGI is in itself a topic for several articles, but in the given situation, the main advantage it brings is the possibility of turning different parts of the system on and off, without affecting the general functioning of the application and zero downtime deployment.


programare

TODAY SOFTWARE MAGAZINE

The truly innovating part is the introduction of Apache Jackrabbit Oak as a solution for the level of data storage. Jackrabbit Oak is a content repository arborescent which implements the JCR (Java Content Repository) and WebDAV standards, which allows the uniform handling of the resources, regardless of their typology. Thus, for an Oak user, it becomes transparent if the resources he accesses are web pages, documents, images or other digital assets.

personalized components for the client’s needs. The development of custom visual components is relatively easy, being based on well-known technologies such as JSP and ExtJS, to which we also add an Adobe library, called Granite. On the infrastructure level, AEM was designed to run in a distributed environment and it offers different capabilities of setting up the server instances, from a single instance to cluster or load balancing on several instances.

taken off the programmers’ shoulders, since the Dispatcher automatically invalidates the cache the moment when a page has been modified. In conclusion, the Adobe solution is dedicated to multinational organizations which have accumulated considerable amounts of content which they wish to use in different ways. We appreciate the transfer of responsibilities from the development area to the content editors. They can work independently from a develop-

The web framework is also open source, Apache Sling, which allows the JCR management in a REST manner. The Sling power resides in the fact that it abstracts the access to JCR and offers different ways of resource rendering, through a mechanism of selectors. Thus, a JCR node can be presented as JSON, HTML, XML etc. With these frameworks at the base of AEM, the system offers a wide range of UI components which editors can use directly in the pages through a drag & drop mechanism. So, the responsibility of creating the page has been transferred from programmer to the content editor. It is the programmer’s responsibility to set up the templates based on which the pages will be developed and to create, when necessary,

The AEM server can function in two modes: author and publish. In the author mode, the instance is used to set up the platform and to create content, whereas, in the publish mode, the instance conveys the content to the clients. The number of author and publish instances do not have to be correlated, and AEM provides a mechanism of data replication from the author, on publish. Thus, the uploading on servers is distributed, and a high activity of the editors will be felt only on the author instances, without affecting the performance for the clients, since they connect to publish. Adobe also offers a separate module, called Dispatcher, which has the cache and load balancing functions. The responsibility of managing the cache is

ment team in order to create a site, since there is a series of components available to satisfy their needs. The AEM disadvantages are: the prohibitive price (450.000$ average cost for licenses and a total implementation cost reaching about 2M $) and also the fact that the learning curve for this technology is steep, requiring a team that has experience in Java EE technologies and ECM concepts.

www.todaysoftmag.com | no. 37/july, 2015

31


programming

A Short Handbook for the Unicorn from Ruby on Rails

R

uby on Rails starts slowly to come out from under the hipsters’ influence area, as an increasing number of products are being developed using this framework. Adding this to your tools can surely be a plus for your career. Furthermore, surely you will be called a “unicorn” if you are programming in Ruby on Rails – everyone has heard of such developers, but no one has actually seen one in real life.

Top 5 websites built under RoR 1. Twitter – in its first years of existence, Twitter was based solely on RoR; later on the decision was made to move it in a Java environment. 2. Basecamp – the project on which David refined Rails. 3. Yellow Pages – the famous book with telephone numbers stepped into the virtual world under the name of YellowPages.com. 4. Github – is any comment necessary? 5. Urban dictionary – a crowdsourcing type of project for an online slang dictionary. And now, let us delve into the particularities of Rails which turn it into such a publicized avant-garde.

However, before delving any further An analysis of the diagram above into the matter, let’s see what you might allows us to infer a number of interesting need for this “ruby on rails”. things: Ruby is much stronger than PHP and Javascript and is very close to C#. We notice a modest start in 1995 as a very obscure programming language and What impresses is the fact that Ruby we may infer that its popularity comes is such a viable solution in comparison to from the Rails framework, which has cre- other popular options used at this time in ated an enthusiastic community. Rails was the development environment. designed and created by David Heinemeier You can find below a mini-collection Hansson in the summer of 2004. For more of websites which, I believe, reflects the specific details about Ruby(1) and Rails(2) potential of the Rails framework for webplease see the references at the end of the based applications. article.

32

no. 37/july, 2015 | www.todaysoftmag.com

The Benefits of Ruby on Rails 1. Convention over Configuration

I cannot stress enough how this small functionality make Rails not only

unique, but also formidable. Having this tool available, a developer can concentrate on code in a pragmatic manner, instead of using their energy and attention on the configuration files. This aspect can be best observed in the Model-View-Controller type of architecture that the language enforces. The manner in which it manages this is interesting enough to raise smiles on any developer’s face.


already installed). I don’t know what your opinion is, but I find it useful and quick! It is noteworthy the fact that the conventions can also be changed if this is desired, but Rails emphasizes the idea of using them as they are provided. Another reason for which you will love this practice is the ease of the users to go through any project. If you have once learned these conventions and you have to move to another Rails projects, there are very high chances that you will understand the logic behind the actions from a simple UML. Furthermore, you will be able to manipulate the code without having to receive information from the previous developers. Now I’ll ask you again: isn’t this great? Don’t worry; there are also other strong points!

2. The Community Thus, instead of having to configure which model (atomic unit for storage in the database) goes to which table from your database, Rails offers you a very simple rule: let’s suppose you have a model called User; in this case you will know for sure that it is going to be associated with a table named Users (the plural of User). Even more, the logic responsible for the code handling the model is to be found in the controller named UserController, which will be mapped for a set of pre-defined routes by the resource named users (endpoints of the RESTful type are offered - index/ show/ new/ create/ edit/ update/ delete) which will correspond to the methods of the same name defined in the controller as access points. Then, of course, the views rendered by these methods can be found in the Views folder, in the Users subfolder, each having the same .html name as the endpoint.

From this point of view, we can say that you are really grounded. There is a huge library of the open source type available for Ruby on Rails. Even more, the majority of the sources are very well documented (4) (I often think of how they managed to bribe the programmers so that they would make the documentation of such high quality!) and exemplified (5) everywhere.

Anytime you need something, there is a gem (I’ll come back to this) especially constructed which solves your problem in the “Rails style”. In what the gems are concerned, you can see them as similar to the libraries or plug-in-s from other programming languages. In order to use the gems through the application, there is a file called gemfile which allows you to add or delete as you wish any library through url. In order to make sure that your machine or Now, what would it be like if all these were to be generated other projects, each with their own different gems, each having a with a single command? different version, are not polluted, there are several approaches. I suggest confidently using the rvm-(6) (ruby-versioning-manager). Well, the scaffolding allows for this possibility, having available an application which runs in only a few seconds (with Rails

www.todaysoftmag.com | no. 37/july, 2015

33


programming A Short Handbook for the Unicorn from Ruby on Rails

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

The last bonus of the community is the fact that it is proactive. Generally, communities linger, grown old or are even a hindrance in the projects of the boom-type. But this is not the case. Even more, one can say that it is even more enthusiastic than when it all started! As one last aspect – if you even need to solve a certain problem and you don’t know how, railscasts(7) will guide /inspire you most of the time in finding a solution.

3. It Makes You Happy!

No, it is not a bad joke. Ruby’s aim, as underlined by its creator, was to make the programmers happy. This is actually the thing that drew David from the very beginning. After literally falling in love with the syntax, he decided that Ruby is the basis on which he will start his framework. And, in order to carry on with the tradition, he optimized it even more in order to bring programmers as much happiness and as few nuisances as possible. And still you can ask yourself: how exactly does this make me happy? Well, alongside the fact that you can write code almost in pure English, you also have the benefit of getting rid of the most boring bits of the web development (avoiding the configuration files!), all these being accessible to you in the quickest manner. From my point of view, this would make the most hardcore programmer wag their tail.

5. Expressiveness

The convention is useful because it relies on the configuration files and the relationships that you are memorizing. This is the number 1 benefit. Then there is a second one, namely Ruby’s expressiveness, which, I say it again, is the main reason for which David chose Ruby over any other language. You may ask: how is this useful? Well, in several ways. For starters, when you are writing code you are feeling well. Not only you don’t have to set everything at every step through the application, but also you can easily deduce functions that are already implemented. For example, when I started to learn Rails, at a certain point, I needed to know whether in a list of strings, include includes a particular string that I had calculated. And, of course, there are always the two options: you iterate through it, in the classical manner and you check at every step, or you search it on Google. So, here I am, searching on Google “find string in strings array Rails” – and this was the first link(9) that I clicked on. I will allow you to find out what surprised me when I opened it. And this has happened several times when coding. I even reached the point when I was guessing which verb or which combination of verb and adverb will give me the right answer, and, in case it did not work, I searched on Google (sort_by, .present? .empty?).

So maybe you are not impressed. So I will share another small secret with you. Rails resembles English so much because it uses This philosophy is strongly embedded in the Rails’ DNA. an internal DSL(10). How is this good for you? Well, allow me to According to the methodology in which the code is divided in write a code snippet for you; then, I will ask you to read it. models, controllers and helpers, you will never need to duplicate User < ActiveRecord::Base the code. Even more, the logic is already extracted in the gems class devise :confirmable, :registerable by the community (see how they are interacting?!) and you can validates_presence_of :name, :day_of_birth, :email use them by simply inserting them in your gemfile. Thus, if you need an admin panel, you can always import activeadmin which before_save :compute_age is both minimalistic and stylish, but on top of all this it is also has_many :books configurable. If you need authentication solutions, devise will do has_attached_file :avatar, :styles => {:small => it for you. Then, probably you will need authorization (taking into “240x240>”} account the fact that you have users, you will have types of users, and in the end this is the aim, they authenticate in order to see Are you not convinced yet? Let’s try it in a different manner. different content), without any problem, as cancan solves this for Show this snippet to one of your friends and ask them which is you. And the list (8) goes on… the easiest to read:

4. You Don’t Have to Have a Duplicated Code

34

no. 37/july, 2015 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE Ruby return Fridge.get_beer_if_available PHP $result = $fridge->getBeerIfAvailable($beers); Java return Fridge.getBeerIfAvailable()

The main advantage is that you can express your thoughts easily using English, without needing a supplementary level of abstractness. Furthermore, the code is simple, so that you can read it as English.

Conclusions & Resolutions Ok. So, it seems we reached the end of the article. I am certain I did not persuade you to ask your boss if he wouldn’t want to steer the profile of the company towards Rails. But… from now on, I think there is no reason why you should not have items on the list of good ideas to be implemented. You have the tool to make quick changes to an application and to fuel your curiosity in seeing how it could work. So, why not do it? As a conclusion, I want to underline the fact that RoR will make both you and the owners of your product happy.

References: (1) https://en.wikipedia.org/wiki/Ruby_(programming_language) (2) https://en.wikipedia.org/wiki/Ruby_on_Rails (3) http://www.unlimitednovelty.com/2009/04/twitter-blaming-ruby-fortheir-mistakes.html (4) http://api.rubyonrails.org/ (5) http://guides.rubyonrails.org/getting_started.html (6) https://rvm.io/ (7) http://railscasts.com/ (8) https://rubygems.org/ ( 9 ) h t t p : / / s t a c k o v e r f l o w. c o m / q u e s t i o n s / 1 9 8 6 3 8 6 / check-if-a-value-exists-in-an-array-in-ruby (10) http://en.wikipedia.org/wiki/Domain-specific_language (11)http://12devs.co.uk/articles/writing-a-web-application-with-ruby-onrails/ (12) https://www.heroku.com/ (13) http://api.rubyonrails.org/ (14) http://guides.rubyonrails.org/getting_started.html

P.S. Here are some resources that could be useful 1. 2. 3. 4.

Getting started with Rails tutorial.(11) Deployment options.(12) Official documentation.(13) Official tutorial.(14)

Emil Luța

emil.luta@tss-yonder.com Developer @ Yonder

www.todaysoftmag.com | no. 37/july, 2015

35


testing

Rapid Software Testing- a change in perspective

A

s some of you might have already read, almost one year ago Altom Consulting brought Michael Bolton (the tester, not the singer) to Cluj for Rapid Software Testing and Critical Thinking trainings, accomplishing one of the company’s targets: to bring an international trainer to Romania every year.

Altom’s goal is to organize at least one international testing event per year in order to: help spread the knowledge about new beliefs on testing, facilitate the relationship between the Romanian instructors and the international trainers and to ease access to specific information on testing. This year, it is James Bach’s turn to return to Romania, at the end of October, to deliver the Rapid Software Testing and Rapid Software Testing for Managers workshops.

36

What is Rapid Software Testing? As James Bach himself says, ”Rapid testing is a complete methodology designed for today’s testing, in which it is dealt with complex products, constant change, and turbulent schedules. It’s an approach to testing that begins with developing personal skills and extends to the ultimate mission of software testing: lighting the way of the project by evaluating the product. The rapid approach isn’t just testing with a speed or sense of urgency; it’s missionfocused testing that eliminates unnecessary work, assures that important questions get asked and necessary work gets done, and constantly asks what testing can do to help speed the project as a whole. One important tool of rapid testing is

no. 37/july, 2015 | www.todaysoftmag.com

the discipline of exploratory testing-essentially a testing martial art. Exploratory testing combines test design, test execution, test result interpretation, and learning into a simultaneous, seamless process that reveals important information about the product and finds a lot of problems quickly.”

Who are the ideal participants in the Rapid Software Training? The answer that might come to everybody’s mind is: the testers. But, in order to have a better understanding of the concept, we let James Bach and Michael Bolton explain who the ideal participants are: “The ideal student is anyone who feels driven to be an excellent software tester or


mean that the theoretical part is being ignored. Another difference is that the old-fashioned teaching methods are left behind, bringing to light new methods, that are more interactive, and do not offer a standardized solution to an issue, but make the participants develop their own solutions, getting them out of their comfort zone.

Who is James Bach?

software test manager. The class is useful to all levels of tester, but seems to be most appreciated by experienced testers who want to become expert testers. The class works well when strong-minded and skeptical students attend the class. They challenge the instructor and make the class better, just like testers should. We try to make the class the most stimulating intellectual experience you can handle.” For the second workshop with James Bach this autumn we had to choose between Rapid Software Training for Programmers and Rapid Software Training for Managers. We chose the latter, taking into consideration the effects that Rapid Software Testing might have on the participants that will want to put into practice what they have learnt, but still need the approval of a manager in order to make the whole process more smooth.

What is Rapid Software Testing for Managers?

James Bach owns and operates Satisfice, Inc. He’s a founder and leading voice in the Context-Driven school of testing (one of our industry’s several prominently competing communities of practice). He’s also a founding member of the Association for Software Testing. He has written many articles, co-authored “Lessons Learned in Software Testing”, and wrote “Secrets of a Buccaneer-Scholar”, a book about technical self-education. He has introduced numerous ideas to the industry, including formalized exploratory testing, the Allpairs test tool, session-based test management, sapient testing, blink testing, visual test strategy, models of software risk and testability, “good enough” quality analysis, and numerous heuristics in support of rapid testing. He also co-created the online, free, Black-Box Software Testing course. These days, he consults on difficult and high stakes testing projects, such as medical devices (in partnership with QualiTest) and software-related court cases. He teaches his Rapid Testing methodology around the world and via text-based coaching sessions over Skype. Our proposal for the ones that have never met James Bach, or might have met him a long time ago, is to participate to the workshops in Cluj this October.

As cited on satisfice.com, ”Rapid Software Testing for Managers is a one-day class, available for individuals or small groups, in which What to expect: three inspirational days that will revolutionize test management is explored, any organization’s context and how the students’ perspective on testing in the Rapid Software Testing to respond to it. The work is done through experiential exercises, workshop, along with one motivational day full of fruitful discuspuzzles, and scenarios, along with short presentations, conversa- sions in the Rapid Software Testing for Managers Workshop. tion, and some actual testing and reporting. The goal of the course is to teach students how to respond with the management action appropriate to the context while recognizing the near-universal situation: testing is almost always done under extreme time pressure and conditions of uncertainty.”

Who are the ideal participants to Rapid Software Testing for Managers? While the target audience for this course is primarily test managers and test leads, peers of test managers such as development managers and project or program managers, and higher managers interested in testing are welcomed.

Monica Rațiu

monica.ratiu@altom.ro Marketing Specialist @ Altom

How are these courses different? First of all, the difference comes from the amount of practice that students have to do: exercises, puzzles, they all lead to a better understanding of the concepts and courses. But this doesn’t www.todaysoftmag.com | no. 37/july, 2015

37


management

From bureaucracy to success in starting a business

L

ately, more and more information has emerged on how to access irredeemable European funds, business accelerators and ideas; however, everyone seems to overlook the part about the actual company establishment.

Ioana Varga

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

For some of those who want to start a business this step seems to be very difficult to overcome precisely due to the lack of information. Likewise, there are others who are reluctant to start a business just because they think that setting up an LLC is a highly complicated procedure and moreover, managing a company seems even more difficult. We want to shatter many of these fears in order to boost even further the implementation of the brilliant business ideas that you have. Thus, we will address the issue of launching a new company from several points of view.

Setting up an LLC We start by mentioning that all the necessary steps needed in order to register a company can be made for a fee directly at the Trade Register Office from the county where the new company will have its registered office. In case you do not have the necessary time or do not wish to have direct contact with all the bureaucracy, you can refer to a lawyer or a consultant specialized in such operations, who will take over the necessary activities in this stage under a service agreement or an express mandate. The first step you need to take for

38

no. 37/2015, www.todaysoftmag.com

opening an LLC is to go to the Trade Register Office and reserve the company name. At this time, the cost for this document is 72 lei. With the name availability proof provided by the Trade Register Office, you will go to a lawyer or an attorney for the statuary declarations, respectively that the partners and directors meet the conditions stipulated by Law 31/1990. We would like to bring to your attention the following situation: if in the past you were a partner and/or director in a company that maybe did not have any activity or you simply did not file the tax return (even if with value zero) or the balance sheets in the terms stipulated by the law you may be surprised to have these facts registered in your tax record (attention! not your criminal record) and this might prevent you from being granted the quality of partner or administrator in a new company. It is also important to know that you can be a sole shareholder in only one company. Hence, if you already have a business and you wish to open another company, you will have to choose a partner, even if only formally (with 5% of the shares). We are often asked if the Registered Sole Trader status falls into the same category and the answer is no; if you are a Registered Sole Trader and do not have a


programare company, you can be a sole shareholder in the new company. In case the director(s) cannot be present at the Trade Register Office when you file the documents, you will be required to prepare the specimen signatures before an attorney. An essential element while establishing a new company is the office. It can be your personal residence, a lawyer’s office, a rented space or received through a bailment agreement. Depending on the chosen option, certain documents need to be prepared. Thus, if the space to be used as the office is not a store but a residential space, you need to have the agreement of the neighbours or tenants’ association to use it as headquarters of the company. If the area concerned is a house, this agreement is necessary only if the house has common walls with another establishment or if a tenants’ association exists in that area.

TODAY SOFTWARE MAGAZINE proof of registration. Without this evidence, the registration of the company will not be accepted by the Trade Register Office judge. Once you have established the headquarters, you will have to prepare the articles of association. This is a document that defines the operational framework of the company; to be more precise, it stipulates the associates and their contribution to the company, the directors, NACE codes etc. If there are specific references between the associates with regard to gains and losses, it is very important to detail them in the document. Even if at the time when you start the company you are considering a certain activity, we recommend specifying in the document all the NACE codes that do not have a special status, and later you will only activate the ones required for the desired activity. This way, the costs of subsequent changes or activations of NACE codes will be smaller and the modification term reduced. If you choose a limited number of NACE codes and subsequently you wish to expand your business with an activity not included in your articles of association, you will have to recommence the formalities and draw up updated articles of association.

If another company is registered in the same location, then you need to prepare a statuary declaration with an attorney that the conditions regarding the registered office are met. The declaration can be given both by the manager of the company that will be set up, as a user of the space, and by the owner of the premises. The Trade Register Office will verify how many companies are registered at each address. The articles of association must also If you choose to base your company at include the period of the administrator’s a lawyer, then you do not have to prepare mandate which can be unlimited or for these statements. a specific period of time. It also has to specify the limits allocated to the direcIf you have a lease for the space to be tor. If we do not discuss the context in used as headquarters, you should know which the management is ensured by that the owner has the legal obligation third parties contracted for this particular to register the lease at the Public Finance function, then we recommend stipulaAdministration and to provide you with ting that the administrators individually a copy of the contract together with the have full powers of representation and

administration. One of the questions we are usually asked in this situation is if the directors can become employees of the company later on, and the answer is yes. In order to set up the company, you will have to open a primary capital account with a bank of your choosing in which the partners will have to transfer the subscribed capital. If such operation is delegated to a third party, the power of attorney will also stipulate that the delegate is authorized to deposit the money in cash, on behalf of the respective partner. Besides the documents mentioned above, some other forms are also required, such as copies of documents, fiscal stamps and in particular cases other documents. A complete list of these documents can be found here. The fees charged by the Trade Register Office for setting up a company are approximately RON 500-600. After the registration of the file with the Trade Register Office, it normally takes 3 days to pick up the incorporation documents. The previously described steps are valid both for the establishment of a company with 100% Romanian capital owned by individuals, and for a company with legal entities as partners. However, more documents need to be provided by the partner companies. If you wish to associate with non-resident individuals, in addition to the above you should know that non-resident partners must sign the necessary documents (declarations, specimen signatures, articles of associations etc.) in the presence of an interpreter for the language of the residing country. If you are in this situation and your foreign partners will not be present at the signing of the documents, they can authorize you by power of attorney given

www.todaysoftmag.com | no. 37/july, 2015

39


management From bureaucracy to success in starting a business in their country of residence or before the Romanian Consulate in that country; the power of attorney will have to be then translated and legalized. In this case, we recommend that you get samples of the documents that they need to notarize, to send such samples to them so as to be accurate and to avoid wording mistakes or content problems in the documents you will file with the Trade Register Office.

Financial and tax issues for a newly created company Considering that Benjamin Franklin’s principle, i.e. that the only things in life are death and taxes, apply in our country, as well, you will have to choose one of the two tax systems for LLCs depending on the conditions met. Choosing is just a way of putting it, as in fact this is not really optional. Thus, the standard system for newly established companies is income tax for micro-enterprises. According to this system you are being charged 3% of the company revenues. Attention: revenue= the services provided according to the issued invoices, not equal to returns. This taxation system will apply to a turnover of Euro 65,000 and/or until you have revenues from consulting of over 20% of the company’s total revenue. The other system of taxation is the corporate tax. You will be able to choose this taxation system from the beginning, only if the main activity field is related to consulting services. Otherwise, you can switch to this system only after your turnover exceeds the limit of Euro 65,000, at which time, the entire fiscal year will be reconsidered and recalculated as if it were corporate tax. Basically, in the year when you exceed the limit, the amount which was already paid during the year as income tax for micro-enterprises shall be considered payment for the corporate tax. The same applies if during the fiscal year the weight of the income from business and management consultancy exceeds 20% of your total revenues. In terms of VAT, a newly established company will not pay VAT. Registering as a VAT company is compulsory after achieving a turnover (as defined in the Tax Code) of RON 220,000. If you wish to register the company as VAT-registered prior to the realization of such turnover the law allows for it. The registration procedure is not very easy and transparent, but we recommend making a sound analysis of the VAT registration opportunity. For IT services we recommend choosing the VAT registration by way of option, because you can deduct the VAT for all purchases you will make in Romania (equipment, furniture, services etc.) If paying VAT in the classical sense is not in the fiscal interest of the company, but still you wish to make intra-community acquisitions (both goods and services), you are obliged to obtain a valid VAT code enlisted in the Register of intra-community trade operators only for intra-community operations. Thus, using this code, you can provide intra-community services or make purchases without VAT from the EU, but you will declare and pay the VAT for purchases made in Romania. If you make imports or exports of goods and services, you will have to obtain the EORI code form customs. The procedure in itself is not complex, however the application where you need to fill in the data has not kept pace with the IT development (it can be filled online but it must be submitted in original at the Customs).

40

no. 37/july, 2015 | www.todaysoftmag.com

A few necessary steps after the set up With the opening of a business there are some minimal compulsory procedures to be made from the start. When the registration with the Trade Register Office is completed, within 30 days you will have to submit statement 010 together with copies of the documents you received from the Register to the Public Finance Administration. Practically there is communication between the Public Finance Administration and the Register, however you have to file the statement and copies of the company documents, otherwise you will be fined. Then, within 30 days as of the establishment, you need to procure a Control Ledger from the Public Finance Administration. In this ledger, you need to register all the inspections carried out at the taxpayer by all the specialized control bodies in the fields of: safety, labour inspection, financial-fiscal, health, plant protection, consumer protection, fire protection, urban planning, construction quality etc. Corporate tax payers need to purchase the Tax Audit Register within 30 days as of the time when the company became a corporate tax payer. The register needs to contain all the information considered in the determination of the taxable profit and the calculation of the corporate tax. Companies must notify any cash transaction exceeding Euro 15,000 to the National Office for Prevention and Control of Money Laundering. For this process, when you establish the company, you need to appoint one person responsible for reporting these transactions to the Office and you need to draw up an internal procedure for tracking and reporting these transactions. The fine for not designating the person responsible ranges from RON 10 000 to RON 50 000 and for not declaring the transaction form RON 10 000 to RON 30 000 (depending on the seriousness of the offense, there may be other penalties including closing down the company). Invoices and receipts can be issued electronically, but the company’s representatives have to appoint one or more persons in charge of the allocation of the series and numbers of the used invoices and receipts. This decision needs to be taken annually, at the beginning of the year. Before the hiring of any employee, you must receive a certificate from an occupational physician, confirming that such employee is fit for work. You must also conclude an agreement with a company that provides personnel training for Fire Prevention and Fire Fighting. Even if it seems like a difficult and complex process it should not hamper the implementation of business ideas. You can refer to a consultant for help any time and just keep in mind that all enterprises need to be taken step by step.



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.