Issuu on Google+

No. 13 • July 2013 • www.todaysoftmag.ro • www.todaysoftmag.com

TSM

set d n i ct M

u

Prod

pring S T C I

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

13 (I) 0 2 e rop

Eu

I)

ll (II e k s Ha

HTML 5: WebSockets Migrating MVC 3 website and DB to Azure (II) The high price of lean software developement adoption of Software Craftsmanship techniques: Technical Coaching Interview with Peter Lawrey high performance systems in Java

fresh … ideas! Hadoop (III) Book review: Java Message Service Romania, the ugly duckling of the software outsourcing lake Towards an IT community – via HR (2) 3 Months of Springboard


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

28 TOWARDS an IT COMMUNITY – via HR (II) Dan Ionescu and Cristina Nicule

9 I T.A.K.E. UNCONFERENCE

32 Interview with Peter Lawrey

Ana Maria Constantinescu

Attila-Mihaly Balazs

10 3 Months of Springboard

34 The high price of lean software developement

Bogdan Iordache

Florian Ivan

12 Agile Summer Camp Diana Tîrnovan

15 Product Mindset Dan Suciu

18 The adoption of Software Craftsmanship techniques: Technical Coaching

35 Romania, the ugly duckling of the software outsourcing lake Mihai Nadăș

36 Migrating MVC 3 website and DB to Azure (II) Dragoș Andronic

39 Hadoop (III) Radu Vunvulea

Alexandru Bolboaca and Adrian Bolboacă

20 Book review: Java Message Service Silviu Dumitrescu

22 HTML5: Web Sockets Radu Olaru

22 Team building (I) Andreea Pârvu

41 Functional Programming in Haskell (III) Mihai Maruseac

44 fresh … ideas! Antonia Onaca

46 It’s time for vacation… Simona Bonghez


editorial

T

Ovidiu Măţan, PMP

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

SM’s participation in ICT Spring Europe 2013, event that took place last month in Luxembourg, was a unique experience. There were 3300 participants from Europe, America and Asia. Among the most important guests, there was Jimmy Walles, the founder of Wikipedia, who talked about what the power of information means, when we deal with a global knowledge library: Wikipedia. Trip Hawkins, the founder of Electronic Arts, presented the power of games in our society and he anticipated a possible evolution of education, where young people no longer accept the role of a passive listener in the classroom. We enjoyed two entire days of presentations in the conference room. A special corner was dedicated to start-ups and there were only pitches. There was also a corner of experts. Networking was the key word, encouraged by the great presence of technical stands and dedicated events such as Networking Cocktail. You are welcome to find out more details in the first article, which is dedicated to ICT Spring. Number 13 is an issue that brings a light holiday breeze. Therefore, we publish Andreea Parvu’s article on organizing team buldings, the one by Simona Bonghez “It’s holiday time…” and “Orange Fresh Juice” by Antonia Onaca. We are pleased to publish the second part of the study conducted by Danis company about the IT environment in Cluj, which aims at the creation of some HR best practices in the domain. We also have an interesting interview with Peter Lawrey, taken by Attila Balazs, about the realization of high performance Java applications, used especially in the banking and exchange domains. Coming back to events, I congratulate Yonder for the initiative to organize an event at Victoria cinema in Cluj-Napoca as well as for projecting during it a Star War episode. It was an interesting local event in which they shared their vision on the evolution of the software market. You can get to know it, too, in the article of Mihai Nadas. Still in the event section, we have a review of I T.A.K.E Unconference, organized by Mozaic Works in Bucharest. For those who are in Cluj between the 18th -19th of July, Florian Ivan will organize a two day Agile workshop. You can find more details in the article dedicated to this. The series of technical articles reached number three for Functional Programming in Haskell and Hadoop. HTML 5: Web Socket shows us a practical solution for client-server communication available in HTML 5. Product Mindset signed by Dan Suciu presents the product oriented strategy versus the service orientation in the outsourcing domain. Enjoy your reading !

Ovidiu Măţan

Editor-in-chief @Today Software Magazine

4

nr. 13/July, 2013 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE Editorial Staf Editor-in-chief: Ovidiu Mățan ovidiu.matan@todaysoftmag.com Editor (startups & interviews): Marius Mornea marius.mornea@todaysoftmag.com Graphic designer: Dan Hădărău dan.hadarau@todaysoftmag.com Copyright/Proofreader: Emilia Toma emilia.toma@todaysoftmag.com Translator: Roxana Micu roxana.elena@todaysoftmag.com Reviewer: Tavi Bolog tavi.bolog@todaysoftmag.com Reviewer: Adrian Lupei adrian.lupei@todaysoftmag.com Made by

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

Lista autorilor Alexandru Bolboaca

Dan Suciu

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

Director of Delivery @ 3Pillar Global

Ana Maria Constantinescu

Mihai Maruseac

Community Manager @ Akcees

IxNovation @ IXIA member of ROSEdu, ARIA

Silviu Dumitrescu silviu.dumitrescu@msg-systems. com

Radu Vunvulea

alex.bolboaca@mozaicworks.com

anamaria@akcees.com

Java consultant @ .msg systems Romania Mihai Nadăș mihai.nadas@tss-yonder.com CTO @ Yonder

dan.suciu@3pillarglobal.com

mihai.maruseac@gmail.com

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

Adrian Bolboaca

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

Bogdan Iordache bogdan.iordache@howtoweb.co Co-Founder of How to Web

Radu Olaru

rolaru@smallfootprint.com Senior Software Developer @ Small Footprint

Diana Tîrnovan

Diana.tirnovan@tech-league.net

Cristina Nicule

cristina.nicule@danis.ro

Coordinator @ TechLeague

Consultant @ Danis Consulting

Attila-Mihaly Balazs

Andreea Pârvu

Code Wrangler @ Udacity Trainer @ Tora Trading

Recruiter at Endava

Dan Ionescu

Florian Ivan, PMI-ACP, CSM, PMP, Prince2 Practitioner, MVP, MCTS

dify.ltd@gmail.com

dan.ionescu@danis.ro

andreea.parvu@endava.com

florian.ivan@rolf-consulting.com Executive director @ Danis Consulting

Managing Partner @Rolf Consulting Germany

Copyright Today Software Magazine Simona Bonghez, Ph.D.

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

simona.bonghez@confucius.ro

Antonia Onaca

anto@aha-ha.com trainer and consultant

Speaker, trainer and consultant in oroject management, Owner of Confucius Consulting

Dragoș Andronic

www.todaysoftmag.ro www.todaysoftmag.com

dragos@txtfeedback.net CTO @ TXTFeedback

www.todaysoftmag.com | nr. 13/July, 2013

5


events

ICT SPRING EUROPE 2013 (I)

T

he first TSM delegation abroad took part in the ICT SPRING EUROPE 2013, event that took place in Luxembourg and lasted for two days. The public was numerous and, as partners, we had the opportunity to share our magazine within the event. The stars of the event were Jimmy Wales, founder of Wikipedia and Trip Hawkins, founder of Electronic Arts. Let us begin with the story of the event. From Cluj, Luxembourg is not very far away, a flight to Charloi (Belgium), and from here,

a shuttle directly to our final destination. Luxembourg has about 500.000 inhabitants and the city itself, about 300.000. A great part of those who work here come from the neighbor countries: France, Germany and Belgium. Traditionally, the country’s economy is based on the banking area, its ace up sleeve being the bank privacy. However, this right will be lost in 2014, but the current focus is on the IT area, especially communications, data centers, as well as the development of bank software. This is achieved through the political involvement in sustaining the local business, promoting and facilitating it. We would like to mention the possibility of deducting 80% of the Intellectual Property costs from tax contribution or the support of up to 50% of the costs involved by the participation of companies to events abroad. Taking all these into consideration, no wonder we find here the highest income per inhabitant in Europe. Coming back to ICT Spring, the event was organized in four areas:

6

nr. 13/July, 2013 | www.todaysoftmag.com

1. The exhibitors’ stands, which gathered technical products, start-ups and organizations, 2. The conference room, where the keynotes took place, 3. The start-ups’ corner, where during the two days we saw the pitches of start-ups, 4. The experts’ corner, where we saw a series of technical presentations, approaching some restricted areas. The presentations were interesting, focusing on innovation. Oliver Royant, chief editor in Paris Match, explained the importance of the message in the media, the reporters’ passion for their work and its significance in our lives. Each media platform: print, web, mobile requires experience and specific content. Pe t e r S o n d e r g a a r d – S e n i o r VicePresident Research, Gartner. We select some of the opinions he expressed: • In the next few years, all the budgets will be only IT budgets. • Enterprise is represented by Facebook, since they are in control of the data, not the corporations. • Paradoxically, technology will decrease the car sales, since more and more people will prefer the virtual environment instead


TODAY SOFTWARE MAGAZINE of the direct contact. • Recession remains a problem, but technology is not slowed down. More and more business leaders orient towards the digital. According to the Gartner chart, only 2% of the 391 CEO and Senior Business Executives have a digital strategy as a business strategy. However, 49% have it as a plan, but 14% do not take it into consideration at all. • While the traditional positions of CEO or IT executive remain at the same level or decline, the role of innovation increases and the position of Head of Innovation becomes more and more important. • The data and the clients represent the key investments in IT, but the sales and marketing leaders will no longer have absolute control. • Business analytics, enterprise mobility and business process outsourcing are the first three positions in the top of investment priorities.

Nexus of forces –represent the way people will interact with each other in the future and will deal with their information. The choice will be made at four levels: mobile, social, Cloud and information. The end of the presentation was unedited, as the following incentive was uttered: Start a marketing program digitization. May the IT force be with you!!! Next, we attended the Kidoria startup presentation. They drew an application which allows adding all data on children, beginning with their pictures and continuing with their medical information or grades received in school. The application is based on a monthly pass and there is the possibility to create photo albums from the stored photos. Until now, they have received a financing of 180.000 euro, most of the amount being used for application development and the programmers’ salaries. Dan Siroker – Co-founder & CEO of

Optimizely – former analytics manager in the presidential campaign of Barack Obama. He shared with us some of his experience from the last presidential campaign and he presented a few of the actions taken in order to increase the impact of the messages presented on the site. In order to increase the impact of an application or a web page, reduce the number of options: less is more. Among the examples given was the online sales page of Sim City, where, by giving up an online banner, sales increased by 43.8%. During the campaign for presidential elections, the donations were increased by 15.2% when the text was changed from “Donate now” to “Donate and get a gift” for those who hadn’t registered before on the site. But the same option reduced the donations by 24.6% for those who were already registered and who no longer donated. For them, the best choice was “Please donate”, which increased the donations by 27.8%. Learnt lesson: explore in order to find the best option, instead of refining the existent solution (http://insideintercom.io/ criticism-and-two-way-streets/). The conclusion of the discourse offered us a revision of the presented rules: 1. Define successful metrics that can be measured. 2. Less is more. Reduce the options. 3. Words count. Focus on the action. 4. Try to reach the global maximum. 5. Start today. Bart Vercammen - Product Manager, Technicolor, told us about the interconnected devices and applications: Services of Things. “Technicolor” is synonym with the special manner of processing color movies, but the company is also a leader in the home gateway production. The main challenges from a connected home of our days are the multitude of protocols used by the different devices, the number of devices, App’ification of the connected home. Their control represents a challenge and the solution suggested by Technicolor is Qeo. This is a communication framework based on a Publish-Subscriber architecture which uses limited hardware resources, having extensible data patterns and a coded data transfer. This is open-source and can be downloaded for free. At the same time, the Qeopedia standard was created for the interconnection of different ecosystems. The first day of the event ended at 17:30 and afterwards there was the special socialization event: the Networking Cocktail, where I met Oana Casapu and Alexandru Rotaru from Altom Consulting. We were surprised to meet there. TSM did not pass unnoticed, thanked to the great number of tweets displayed in the conference room and the exhibition area, enabling thus the connection. Also, they used the participation code made available www.todaysoftmag.com | nr. 13/July, 2013

7


startups in the former issue of the magazine and in the TSM Facebook community. We continued with the official dinner, European ICT Awards Gala Dinner, event opened by Xavier Bettel, mayor of Luxembourg city. During it, the winners of this year’s European ICT awards were announced. These awards are a reward for ICT good practices.

European CIO of the Year

Lance Fisher, CIO of SThree company, specialized in human resources in London. The award was given as a result of his global strategy and implemented projects, technical choices and management knowledge.

European ICT Innovation of the Year

Applidget, a web development company from Paris, specialized in software solutions for organizing events. The award was given for its innovative products and the contribution brought to this domain.

European Startup of the Year

The award was received by Uplike, an application that turns bookmarks into “real” things, by the possibility to share by a simple click. In the next issue we will tell you about the second day of the event, when guest stars Jimmy Walles, founder of Wikipedia and Trip Hawkins, founder of Electronic Arts, made their appearance.

Ovidiu Măţan, PMP

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

8

nr. 13/July, 2013 | www.todaysoftmag.com


events

TODAY SOFTWARE MAGAZINE

T

I T.A.K.E UNCONFERENCE More than just a conference

he conference I T.A.K.E. UNCONFERENCE happened in Bucharest on 30-31 of May and it was more than just a conference. The speaking part was about code and new techniques for programmers, testers, architects, technical managers. Over these two days a lot of interesting things happened.

There were workshops organized where the participants were asked to write code and had a lot to learn due to the high level of interaction with the other group members. The topics were: Agile Architecture Techniques and Values, TDD, DDD and BDD. Moreover, there was an Open Space where the participants brought the topic, picked the time and together with the ones interested had some informal discussions. They talked about things like: „How to start writing Unit Test?”, „How to keep control when refactoring”, „Problems and solutions for big data bases”, etc.

B esides this, at the I T.A.K.E. UNCONFERENCE one could understand what a Product Owner role means and which are the responsibilities that come with it. There was a Product Management area where everybody, either speaker or participant, contributed to the development of a web application called KeepInTouch that allows the participants to keep in touch even after the conference. The Product Owner, Flavius Stef, prepared an initial backlog that guided and prioritized the development stages of the application. The participants practiced Agile Software Development techniques, iterated every hour, used pair programming, unit testing and TDD. The result? A fully functional

application according to the plan. Speaking, Open Space, Product Development, and this is not all. Due to the fact that a programmer needs to practice and become better at writing code, the organizers of I T.A.K.E. UNCONFERENCE prepared a Kata Lounge, an area where the challenges were waiting for the programmers to take them. Each participant that solved one of the problems, called Katas, got feedback from the speakers. The winners for the cleanest code were Catalin Lazar who got an invitation for one of Mozaic Works workshops and three months subscription to the Today Software Magazine and Eduard Stanculet, who also got a three months subscription to Today Software Magazine. The conference started with Rebecca Wirfs-Brock, president of Wirfs-Brock Associates and IEEE Software’s Design Columnist, well-known and respected object-oriented practitioner. She invented the way of thinking about objects known as Responsibility-Driven Design and is the lead author of Object Design: Roles, Responsibilities, and Collaborations (2003) and the classic Designing Object-Oriented Software (1990). During the presentation on the topic “Maintaining your code Clint Estwood style”, she explored options for revising, repairing, and extending good, bad, and ugly code. When she talked about good code she advised us to write easy code despite its complexity, keeping in mind that in the future the respective code will solve much more than it solves today. Moreover, she started from Clint Eastwood’s idea that “Whatever success I’ve had is due to a lot of instinct and a little luck” by confessing that in her case “Whatever success I’ve had is through a lot of hard work and a little luck”. Vasco Duarte, Agile Coach held a workshop about TDD. Vasco has Product and Project Management experience. Having worked in the software industry since 1997, Vasco is one of the leaders and catalysts of

Agile methods and Agile culture adoption at Avira and previously at Nokia and F-Secure. He said that TDD is an investment in becoming a good programmer. Between the problems concerning TDD, he mentioned that it is hard as programmer to detect repetition and usually one tends to complicate the solutions. Therefore, he recommended to write easy code and do lot of Refactoring. Aimee Rivers, with many years experience in web programming and behaviour driven development, helped to test and deliver the BBC’s Interactive Video Player for the Olympics. On the link: http://aimeerivers.com/weather/berlin one can see the weather in Berlin on the whole webpage and one can replace Berlin with any other city.

Mostly the conference was about Clean Code, Architecture, Design, Unit testing, TDD, Functional programming, Domain Driven Design, Legacy Code, Productivity, Testing.

Ana Maria Constantinescu anamaria@akcees.com Community Manager @ Akcees

www.todaysoftmag.com | nr. 13/July, 2013

9


startups

3 Months of Springboard

I

n December 2012 I accepted a very interesting challenge: to become the programme manager of Springboard, one of the best (no modesty, I know, but that’s a fact) European accelerator programmes. The 2013 edition also brought an element of absolute novelty: it was the first European programme dedicated to hardware startups, a very interesting movement which followed a 2012 year full of news for the hardware developers. The 3 months have passed at high speed and the work amount was sometimes overwhelming. To be in charge of the Springboard programme while you give a helping hand to launch TechHub Bucharest, while you help your colleagues from Conectoo and you start organizing How to Web 2013, that is the definition of a busy schedule. This is also the reason why I have no longer had the time to write on the blog, which I hope to make up for in the following period. After 3 months spent in Cambridge, I can say that this has been one of the most interesting professional experiences I have lived in the last few years. I had the opportunity to work with Jon and Jess, the ones who have founded/ led/ developed the Springboard accelerator during the last 3 years, but also with 8 fabulous teams, gathered from all the corners of the world (UK, Spain, Portugal, Canada and Bulgaria). Footnote: the Springboard team will be in charge, from this year on, of TechStars London, the first extension outside US of the most important accelerator programmes network and an extraordinary significant development for the European eco-system, which thus gets an open door towards the US market. Cambridge is one of the key points of European hardware (if not THE key point), a city of 100.000 inhabitants, where important companies appeared, companies such as ARM (the producers of processors for almost all smart-phones and tablets in the world, having delivered 9 billion processors last year), Raspberry PI, Acorn Computers (for those who have a passion for history), but also the newer Neul and Weightless.

10

I accepted Jon’s proposal (my first real job since I was 21) because I was eager to understand how an accelerator programme is organized and which are the key elements that make such a programme successful. Besides many practical considerations (among which the most important is that an accelerator programme must be led by entrepreneurs and/ or investors), it is now clear to me that the most important ingredients are the quality of the teams and of the mentors, or, in other words, the context that one creates around the programme. When among the mentors you have personalities such as Hermann Hauser, David Cleevely, Eben Upton or Peter Cowley, together with representatives of (without any exaggerations) tens of first class investment funds/ groups, as well as corporations such as Unilever (income of 51.32 billion EUR in 2012) or Bosch (income of 52.3 billion EUR in 2012) which make their top executives available for meetings and presentations with the teams, combined with a global selection area, well, things cannot be bad for you. All these interactions build a context that can help you from several points of view: you will get a valid feedback for all the development alternatives that you analyze, you will get a ton of interesting information that is relevant for what you are doing and you can, ideally, meet your future investors and partners. But nothing is more concrete than the fantastical tension that floats in the air when the discussions heat up and the debate challenges you to find solutions and alternatives near people that are excellently trained from the professional point of view, because those are the moments

nr. 13/July, 2013 | www.todaysoftmag.com

when, just like an athlete that runs in the company of some better athletes, you professionally outrun yourself. I feel that, after only 3 months there, I need other 3 more months to fully understand the experience I’ve been through and which, one way or another, I wish you to live, too.

What does an accelerator programme for startups look like from the inside?

In the two weeks since I returned to Romania I keep getting, in almost every discussion, questions such as: “What exactly is Springboard?”, “What is it that you did over there?. Here are some additional explanations. Springboard is (was?) one of the most important European accelerators, surely placed among the top 3, besides (my 2 cents) Seedcamp and Startupbootcamp. The 2013 spring/ summer programme was dedicated to startups from the “Internet of Things” domain and represented the last Springboard batch in the near future. In February, Springboard announced its fusion with TechStars and the Springboard team will manage, from this month on, the TechStars London accelerator programme (the Springboard – TechStars fusion is an extraordinary success which brings the best network of accelerators to Europe). The Springboard brand is, for the time being, laid away. The overlapping of the two programmes (TechStars London began to be intensely prepared from May) made that the Springboard team (Jon and Jess) need a helping hand. This was, in short, how I got to work for Springboard as a programme manager for 3 months. I was eager to see


TODAY SOFTWARE startups MAGAZINE what an accelerator programme looks like from the inside (and not from the perspective of a startup). Springboard IoT had the classical structure of a mentor-driven accelerator: 3 months of programme, in the first half of which the teams meet more than 80 mentors, then, in the second half, the teams order the information they received, make strategic decisions regarding the target market, the typical client and the development strategy and they iterate the products in the desired direction. Even though the title of programme manager sounds somewhat high-flown, Jon Bradford, the founder of Springboard (also an Irishman having a downright manner) and an old friend of mine (the first official Springboard T-shirt appeared in How to Web 2010) put me through all the possible tasks that someone can perform within an accelerator. So, what does a programme manager do? Well, first of all, a lot of logistic work: • Organizing and managing the meetings with the mentors, which are surprisingly complex because of their great number (over 80 in Springboard) • Organizing workshops on different subjects, from business modeling, connected issues, marketing, financing, to campaign creation on Kickstarter • Organizing pitching meetings, which prepare the teams for Demo Day • Organizing Demo Day, the final event of the programme, where startups present their progress to the investors, media, etc. • However, my favorite part was working individually with the teams: • The (almost) weekly session of Office Hours, where we individually talked to each team about the strategic problems they were facing • Show and Tell, the weekly meeting where the teams presented their previous week’s progress and the following week’s challenges • (A little bit of) Competitive Analysis, analysis by strategic investors from an upright angle, etc. Because our role was not that of giving advice (unless it was explicitly asked for), but that of facilitating the process the startups were going through, the debates that resulted were sometimes of a spectacular refinement. The role of facilitator was a new and extremely useful experience, which helped me better understand the decision making processes. A quality accelerator programme surely has an impact on the teams that attend it, but its quality depends a lot on the mentors and the involved teams. Equally, it is extremely easy for the programme to be replicated as a structure, but it may not have any kind of consistency from the point of view of the results. Look carefully to whom you are going to meet when you choose the accelerator to apply for! Bogdan Iordache bogdan.iordache@howtoweb.co Co-Founder al How to Web

www.todaysoftmag.com | nr. 13/July, 2013

11


events

Agile Summer Camp Cluj-Napoca

F

lorian Ivan - SCM AC PMI, PMP, Prince2Practitioner and Microsoft MVP challenges you to 2 days with and about the most famous Agile practices in the world, a training that promises to make you become truly Agile. As a must for professionals in software, Agile is an indispensable tool for the delivery of quality software. Whether the projects relate to product development, software solutions or outsourcing, Agile is widely recognized as a solution that enables the on time delivery at high quality standards, though maintaining the cost constraints. Diana Tîrnovan

Diana.tirnovan@tech-league.net Coordinator @ TechLeague

Agile Summer Camp is an insight into Agile methodologies (such as Scrum, XP, Kanban, Lean, FDD, Crystal, DSDM), that aims to contribute to: • Build confidence and increase team’s motivation; • Develop a close relationship to the customer; • Increase productivity on a regular basis; • Increase the personal organization. • On time and on budget project completion; Florian Ivan’s over 15 years of experience in the software industry makes this event to be quite an experience. Not just theory and frameworks, but real life stories and lessons. See Agile in actions through different scenarios from start-ups to large corporations. All very real, covering topics like: • Introduction to Agile methodologies and standards • Key Agile methodologies: Scrum, XP, Kanban, Lean, FDD, Crystal, DSDM • Agile delivery teams: Roles and responsibilities, Accountability in project teams, Communications and stakeholder management, Leadership and management in Agile projects, Tools

12

nr. 13/July, 2013 | www.todaysoftmag.com

and practices, Information sharing in Agile projects • Project initiation: Project and portfolio management, Key project indicators, vision and charter • Backlog management: User stories, Requirement collection techniques, Planning, organizing and prioritization, Re-prioritization and grooming, Change requests management • R e l e a s e / i te r at i on p l a n n i ng : Agile planning concepts, Estimation techniques, Story points and other estimating indicators, Story mapping and product roadmaps, Wireframes and personas • Inside and around the iteration: Before the iteration, Daily stand-ups, Reviews and retrospectives A goal of the course is to understand and correctly use the tools and Agile practices. One such case is estimating the stories in several points. We will discuss why an apple gets to have more points than a cherry and why the road to Bucharest gets more than the one to Sibiu. And of course we will try to understand the concept of task management from a new perspective, namely the one of relative values, and not absolute ones as we


TODAY SOFTWARE MAGAZINE were accustomed to until now. Florian Ivan brings a unique view on how projects should be led. His belief is that through profound education, pragmatic experience and correct attitude we all can achieve far better results. Florian is the managing partner of Rolf Consulting Germany, a project management consulting and training company with a strong focus on Agile methodologies. Prior to dedicating himself to training, he worked as a Partner Program Manager for Microsoft Corporation. Before joining Microsoft, Florian was involved in a software start-up specialized in business intelligence and data management. Agile Summer Camp takes place on 1-2 July in Bucharest and 18-19 July in ClujNapoca. The event in Cluj is sponsored by Accesa and organized by TechLeague – the IT professionals‘division created out of passion for technology. Equally embracing events such as: presentations, trainings, workshops

– mainly dedicated to Microsoft technologies- TechLeague is being introduced for the first time to the Cluj audience through the Agile Summer Camp event. TechLeague aims to become the ideal context through which the passion for technology challenges you to discover, to get to know and share methods of technical excellence. Agile Summer Camp is an event with a limited number of seats. This is why we eagerly expect your registration at: • Florian@rolf-consulting.com • Diana.Tirnovan@tech-league.net For further details please visit us: http://www.rolf-consulting.com/ http://www.tech-league.net/

www.todaysoftmag.com | nr. 13/July, 2013

13


communities

IT Communities

I

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

Calendar August 5 Launch event of no. 14 TSM (Cluj) www.todaysoftmag.ro

Comunitatea TSM Community created around Today Software Magazine. Website: www.facebook.com/todaysoftmag Started on: 06.02.2012 / Members: 745 / Events: 11

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

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

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

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

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

14

nr. 13/July, 2013 | www.todaysoftmag.com


management

TODAY SOFTWARE MAGAZINE

Product Mindset

A

ccording to human resources specialists, IT in Romania is one of the few domains in which the number of available jobs has raised after the beginning of the economical crises and one in which companies compete for the best specialists.

Dan Suciu

dan.suciu@3pillarglobal.com Director of Delivery @ 3Pillar Global

The idea that keeps coming up is that in the competition with the low costs of the employees of other geographic areas (such as, for example, Asia), the solution is to migrate from outsourcing to one’s own products, or, in a less radical process, to change the relationship with the clients and turn the status of mere executant (such as it could be induced by the outsourcing model) into a status of consultant (which would turn the IT companies into partners for their customers). Product Mindset represents a modern and challenging approach based on the idea of developing one’s own product applied in a context that is specific to providing IT services, by maintaining the main advantages of both directions. This approach has both advantages and disadvantages and the purpose of this article is to present in detail the most important ones.

Services oriented companies (CoS) and Product oriented companies (CoP)

Before offering a detailed image of what product mindset would represent for the outsourcing area of the software industry, we will present some definitions. Product mindset refers to the idea of extracting information about what the clients want from a product without them stating directly or exactly this thing, eventually

developing a product they are happy with. By contrast, services mindset represents the idea of achieving very well what a certain client wants and specifies. The clients voice the requirements and if these requirements are not well defined, successive questions are asked with the aim of clarifying all aspects. The main difference between the two approaches is represented by the decisive involvement of the person developing the product to identify the features and define its final form. If the services mindset approach sees the development team as formed by mere (but very good) executants, product mindset sees the development team as a team of consultants for the development of the product, the client and the team becoming, thus, partners. We will further detail some of the defining aspects of the companies that are services oriented (CoS) as compared to those of product oriented companies (CoP). For each of the two approaches we enumerated those aspects which seemed relevant to the subject of the present article. In the case of CoS, it often happens that a project lasts for several months, after which the members of the project team continue to work (together or not) to totally different projects, that belong to different domains and, why not, using totally different technologies (or the same technology, but different frameworks

www.todaysoftmag.com | nr. 13/July, 2013

15


management Product Mindset and versions). About 50-60% of the new employees will learn and will make the transition towards new technologies right from the beginning and almost all are likely to change the technology during the employment. In a very high percentage (90%) the candidates for the vacancies in CoS will not be interviewed by the team in which they will work. By contrast, the applicants in CoP are interviewed much more carefully in order to see if they fit in with the team they will work in, both from the technical point of view as well as from that of personality. Furthermore, during the period of employment they will not change the technology and the team that easily. CoP generally attach great importance to employee satisfaction and considers that the leave of one of them constitutes an important loss. The experience accumulated in time in the development of the companies’ products makes a certain person hard to be replaced. On the other hand, in the case of CoS, the employees leave more often and seldom affect the company significantly. The low impact on the company is due to the fact that most of the times the CoS employees rarely develop expertise at product level, as mere programming knowledge is enough to carry out the tasks. On the other hand, the frequency of these often changes of jobs can be explained to a certain extent by the fact that the employee has the opportunity to work in time on different projects and in different teams within the company (the transition towards another company may seem an ordinary process). The dynamic technological context contributes in its

turn to facilitate the changing of employer. In a CoP there is the possibility to work for a longer period of time on a very particular technology. In this context, the employees are much more interested in remaining and specializing within the company. In the services oriented companies, the employees are evaluated according to the quantity of work they perform, the responsibilities they assume and the degree of client’s satisfaction. The connection between effort and promotion or remuneration is, generally, more clear. In the case of product oriented companies, the effort put to achieve the aims of the product is seen as a natural, basic activity. The promotion or a more significant leap from the point of view of the salary happens when other activities are performed, activities that are not connected to the natural work activity, such as article writing or keeping professional blogs, putting forth technical presentations within different events, etc. Consequently, there is also a certain contrast in relation to the title of the position/ seniority occupied by the employees. The transition from junior programmer to intermediate and then senior programmer is done more quickly and more easily in CoS and it is directly depending on seniority. In CoP a person remains on a senior position constantly for a longer period of time and the number of years spent in a domain does not constitute an argument sufficient for promotion. The main argument is that of expertise in the domain in which the employee works. Parenthetically, we have to mention that the position “earned” by a person in a CoP remains permanent and it strengthens

in time. In CoS, with every new project, the position has to be reconfirmed and the client’s trust in the person that plays a certain role must be re-earned. As opposed to the new projects in CoP, where a person brings along their reputation gained during the previous projects, in CoS everything starts from zero and the client must be persuaded by the team’s quality as if there were no relevant past behind. In another train of thoughts, CoS gains contracts before its competitors, by ensuring a quicker delivery of the same quality (and/or lower costs). In many cases, this is materialized in a sustained effort of the team and the completion of the project is celebrated by the team. CoP very rarely delivers the products on their deadline, but most of the times they are richer in features than it was initially planned. Another interesting paradox is the fact that in CoS the projects are obtained upon proving the employees’ professionalism and the history of references. However, for most of the newly obtained projects, new people will be hired for the project team, people whose professionalism has not been yet proven. We will not find a company exclusively oriented towards its own products trying to obtain a maturity certificate. Why would it need the certification of an external organization when it is already developing new products on the market? On the other hand, such a certification assures the clients that the products achieved by a CoS are according to certain quality standards. Financially, the CoS grow linearly along with the increase in the number of projects and the number of employees. However, Our core competencies include:

Product Strategy

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

16

nr. 13/July, 2013 | www.todaysoftmag.com

Product Development

Product Support


TODAY SOFTWARE MAGAZINE the necessary of capital is low, since the money for the offered services will be received right from the beginning of the project. In CoP, financial growth is according to the number of clients and outlets for their products and the relation between the profit and the number of employees is much more favorable than in the case of CoS. Moreover, a bigger capital is necessary for the development, promotion and sale of the product. A special budget is allocated to marketing and sale. In practice we are likely to never encounter one of the two approaches implemented in a pure manner. For each of the mentioned traits we can find valid counterexamples among the companies we see around us. This thing happens, on the one hand, because of the vision that some of the managers of companies have, but also, on the other hand, to some companies’ lack of maturity, which sometimes leads to the implementation of wrong strategies, ignoring the context. Still, the essential features are maintained in most of the cases and they represent a very good starting point for the debate on product mindset.

Product Mindset

One of the most interesting challenges is that of bringing together the advantages of the two above mentioned approaches and diminishing the disadvantages that derive from each of them. Their combination refers to introducing elements that are specific to services based project approach into CoP or to the implementation of a product based approach in CoS. There is also a third type combination, namely that in which we deal with a company oriented on services as well as on products, but this case can be reduced to the preceding cases if we do not take into consideration the departments that manage the products and the services of such a company. We will focus below on the second type of combination, leaving the other two as subjects for a possible future article. Product Mindset is a manner of approaching services which implies a significant value added to the provided services. It offers greater satisfactions to the clients and the gained profit is noticeably enhanced. In the case of IT industry, the client’s product or products are “adopted” by the company which implements such a product mindset and the software companies’ involvement is no longer exclusively centered on execution. New roles appear, which double or sometimes even replace the ones

that are naturally included in the client’s responsibilities (such as, for example, the role of product owner). There are two elements specific to CoS that impose a certain inflexibility in the activity and require special attention when one wishes to implement a product mindset. First of all, there is the team’s reluctance to work with incomplete specifications. Generally, the team expects all the details concerning a feature (or a user story) to be clarified by the client before beginning its development. Arguing that this way they avoid wasting effort on developing and rewriting some parts of the application twice or several times, the project team postpones the development of some essential elements of the application, focusing its effort on a “ping-pong” exchange of emails or clarification meetings which can last forever. Product mindset project approach implies the implementation of features that have not been completely specified by the client. Obviously, this means knowing as well as possible the business domain of the client and at the same time it implies a higher degree of risk. However, this way, the development of important features is no longer impeded, since the client is now much more capable to identify its needs, having an already implemented example. A second essential issue is represented by the project team’s incapacity to understand and follow through the client’s suggestions regarding the completion of a product or module to the detriment of its quality. A solution that is particular and not generic, flexible and adaptable (but which takes longer to develop), the maintenance of some components written in an “ancient” technology instead of rewriting and “updating” them, a partial implementation of some features or the incomplete testing of the product sometimes represent the clients’ explicit requirements in order to force the meeting of some deadlines that are essential to the product’s fate. If they are not made to a team having a product mindset, such suggestions may lead to its members’ frustration and even to the refusal of some of them to continue working on the project, as they complain about a supposed lack of professionalism. Solving this problem implies effort from both directions: the client has to be willing to share with the project team the elements that relate to the product’s life, but the team also needs to be interested in these aspects and not entirely focused on execution. A product mindset approach helps

long lasting collaborations between the CoS and their clients, as the latter see the development team as part of their own organization, crediting it with trust and respect. This togetherness, however, may result in an attachment, sometimes exaggerated, of the team members for the client and its product(s), some of them even considering themselves employees of the client and not of the services company they are part of. Furthermore, some special attention must be paid to project completion, since such moments can actuate the resignation from the company by many of those who have developed a great attachment to the project.

Conclusions

The analysis of the implementation of a product oriented approach in a company whose activity is mainly oriented toward services is far from being an exhaustive one. However, the tackled aspects are relevant ones, as they influence decisively the path and success of a CoS in IT and the advantages of implementing such a combination are obvious. The manner of implementing this combination is, of course, another discussion as it greatly depends on the organizational culture and the internal procedures existing in each and every company.

www.todaysoftmag.com | nr. 13/July, 2013

17


programming

The adoption of Software Craftsmanship techniques: Technical Coaching

W

e know from the experience of the industry that the techniques promoted by the Software Craftsmanship movement have the potential to increase the productivity of the development teams. Test Driven Development helps obtaining solutions with better design and more stable in a shorter period of time.

Alexandru Bolboaca

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

Adrian Bolboaca

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

18

nr. 13/July, 2013 | www.todaysoftmag.com

Pair Programming helps eliminating the mistakes while the code is produced, fast knowledge dissemination in a team and finding simpler solutions. Continuous Integration helps solving integration issues between components fast and without stress. Continuous refactoring helps keeping the code flexibility, so that when the customers ask for unforeseen functionalities, the team can add them very fast. There is though the other side of the coin. Test Driven Development can lead to tests hard to maintain and to abandon them in time. Refactoring is often understood as „iterations” or „periods” of refactoring, that can go up to weeks, sometimes without any result. Trying to do pair programming can be interpreted as lack of trust for the programmers: „someone will be my supervisor while I write code”. Continuous integration can generate a lot of problems when it is applied on projects that have tens of different components, resulting in an arguable return of investment. What specifically makes the difference between the success examples and the failures? What can lead to a successful adoption? The answer consists of managing change. Here the coaching part comes into place; in this specific case, because the practices that want to be adopted are uber-technical, we speak about technical coaching. The adoption of technical practices in an organization A technical coach is concerned with several important aspects of adopting a practice: • Identifying the purpose: why do we adopt the particular practice? From a business reason (ex. reducing the release cycle from 12 to 3 months, from 3 months to 2 weeks, continuous delivery, increasing the customer satisfaction)? From

an operational reason (ex. Reducing the number of non-billable hours, reducing the number of calls to the support team)? Reasons like „I heard about TDD and it’s cool”, “I heard about X practice and it will help us” are not good enough; a coach can help identifying the appropriate technical practices to reach the objectives of the organization. • Defining an adoption road map. Usually a pilot project is defined, inside which 2-4 teams will offer themselves volunteer to adopt the practices. The results of the adoption are monitored and discussed continuously with the management. • Identifying and managing the risks. Some risks are visible from the start (for example the lack of necessary knowledge to write simple unit tests, a release date during the coaching period), but others appear during the adoption. • Working directly, hands-on, on the production code with the programmer teams. • Mini ad-hoc trainings, when necessary. • Introducing the communities of practice, where any person interested can see and try the practices that will be adopted. The technical coach can be from inside or from outside of the company that wants to adopt TDD, refactoring, or event Extreme Programming. Both approaches have their advantages and disadvantages. The internal coach has the advantage of understanding the structure of the company and the projects, but has usually the disadvantage of being part of the system and so it is harder for them to see some things that need to be changed. And external coach has some advantages that need to be considered: • The experience with teams and


TODAY SOFTWARE MAGAZINE different contexts: an experienced technical coach passes through tens of teams and projects, through technologies and diverse solutions. This experience enables them to adapt fast to a new environment. • The relationships with other consultants, technical coaches or elite programmers: part of the technical coach job is teaching and speaking at conferences. A good technical coach creates a network of acquaintances who can answer specific technical questions, helping to solve some difficult problems faster. • Leadership and communication: a good technical coach must be able, together with the managers, to define a vision that the developers will follow and convincingly circulate. It is sometimes difficult to understand how an external technical coach can become productive very fast in a team with a completely new application. Sounds magic, right? The explanation is in fact simple: the technical coach does not need to understand the business and all the internal details of the application. The product of the coach is the team; the team makes sure they understand the application and the business. The technical coach relies on the solid knowledge about the practices that will be adopted and on architecture, design and code patterns, but also on human interaction to bring the entire team to a higher level of productivity. The coach cannot work without a team, in the same way as the software product cannot be created without a team. Only through tight collaboration with the team, by having discussions, honest and continuous communication, through trust and mutual respect, the coach can help the team adopt a new practice.

The adoption of technical practices on an individual level

Until now we have discussed about adopting one new technical practice inside a company. On the individual level, the things are similar but much simpler. A motivated programmer that has the necessary conditions can learn alone a new practice. Using individual practice techniques like coding kata or having pet projects is recommended, together with following web resources (ex. http:// katacasts.org) and reading two or three recommended books on the subject. Further on, everything resides in the tenacity, willingness and self-motivation.

Attending coding dojos, code retreats or technical conferences is useful to keep the motivation. Pair programming with chosen people is another way that can be applied to continue learning. Not all the developers, though, have the will and the necessary self-motivation to sustain this process. For them, a technical coach is one of the means to reach their purpose of learning a new practice by: • Identifying the strong points and the points that can be improved. For example, he/she understands code very fast, but writes very complicated unit tests. • Determining the aim for the next 3-4 months. For example simplifying the unit tests. • Defining a learning plan made up of: reading books, writing code that is revised by the coach, pair-programming sessions, etc. • Following the learning plan. The coach makes sure the programmer keeps the promises and helps them eliminate the blockages that appear during the learning process. On the individual level, the coaching activities are very similar with those of mentorship or with the craftsman – master relationship. A technical coach helps you to identify and reduce the impediments more than a traditional mentor. The typical impediment declared by the programmers is the lack of learning time, that can be easily solved by short learning sessions each day (30-45’ per day), better planning or more intense but less frequent sessions (ex. pair-programming, coding dojos or code retreats). It is worth explaining the role of pair-programming during the learning process, because it is fuzzy sometimes. Pairprogramming can be used in production, with the purpose of learning the project and to prevent coding mistakes. In the context of adopting a practice, pair-programming can be used as a means by which the technical coach passes the knowledge related to a certain practice (for example Test Driven Development) to the programmer. To apply pair-programming in production, an adoption period is needed as well, and adopting pair-programming is done by pairing session between two programmers under the supervision of the technical coach. While the programmers focus on solving the problem they work for, the coach will focus on the interaction between the two and on eliminating the communication problems and the inefficient discussions. So there is a major difference between adopting

pair-programming, using the technique in production and learning other techniques by using pair-programming. The technical coach needs to master very well the pairing techniques in order to succeed in sending the necessary information even to those programmers that have never done pairprogramming, but want to learn one of the techniques described above.

Conclusion

In conclusion, a technical coach manages the adoption process of one or more technical practices on individual, team or 2-4 teams level. The expertise of a technical coach can make the difference between success and failure when a company or a programmer wishes to adopt practices like unit testing, TDD, incremental refactoring, improving design, minimizing the issues for existing code that is hard to understand, etc. The coach can be internal or external to the organization. The advantage of an internal coach is that they are familiar with the organizational context and applications, but has the disadvantage of limited experience and belonging to the system. An external coach has the advantage of being part of tens of projects with different constraints and needs and can look at the organization with a fresh view, outside of the system. The external coach needs to understand just briefly the business needs of the application and trusts the team with the specific details of the project. The product of the technical coach is the team; a team that learns new techniques, that they can apply directly in production with trust, succeeding in the same time to reach their business objectives. The tight collaboration between the technical coach and the team, based on mutual respect, communication and honesty is the main success factor of the adoption. After the initial coaching period, the team has the necessary means to continue the learning, the coach having only a support role (“the voice of the conscience”). So think what you miss every time when you are saying you do not have enough time to adopt a certain practice. Maybe you lose customers, opportunities, innovative potential, a better job. A technical coach can help you decide which practice is useful in the context of your business and your existing applications and can help you adopt the practices that will help you reach your potential.

www.todaysoftmag.com | nr. 13/July, 2013

19


programming

Book review: Java Message Service by Mark Richards, Richard Monson-Haefel and David A. Chappell

J

ava Messaging Service and associated architectures are an alternative to traditional communication methods and associated architectures such as RPC and distributed systems. The level of trust, flexibility, extensibility and modularity of an application are much higher when using these architectures instead of the classic ways, previously mentioned.

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

Some of the advatages of useing Message Service are listed below: • Integrating heterogeneous platforms, for example ActiveMQ platforms and IBM WebSphere MQ, but also non-Java clients such as those developed in C and C++ • Hybrid architectures, which are a combination of centralized and decentralized architectures • Patterns of messages, point to point and publish-and-subscribe. This means that a message is addressed either to a single producer consumer or to a group of consumers The development of messaging ser vice had many milestones during the last 10 years. The emergence of new techniques and technologies such as Message Driven Bean (MDB), Spring messaging framework, Event Driven Archite c ture, S er v iceOriented Architecture, RESTful JMS interfaces and Enterprise Service Bus (ESB) are just some of the important marks in this development. The Message Service is managed by an API, now

20

nr. 13/July, 2013 | www.todaysoftmag.com

in version 1.1. This is actually the second version of the specifications, after the initial 1.0 version. Java Enterprise Platform, 7th version, which is close to being officially launched, brings a new version of JMS specifications: 2.0. Improvements are plentiful, most of them on the simplification of the code and adjustments to new technology developments (sending messages asynchronously, introducing factory, etc.)


business The book which I submit for review this edition of TSM, Java Message Service, second edition, having Mark Richards, Richard Monson-Haefel and David A. Chappell as authors, represents a complete guide for using messages and architectures based on these messages. Divided into 11 chapters, the book presents step by step aspects related to achieving performance when using Java Message Service. If the first chapter approaches general aspects of messages, such as considerations and parallel with other architectures, in chapters two, three, four and five the authors present everything that a beginner should know about this architecture. The structure of a message consists of three major parts: headers, properties and types of messages. Then, using point-to-point and publish-andsubscribe messaging are described with discussions on possible methods of implementation. Each of these chapters is fully illustrated with strong examples. From a classic chat application up to a loan and lenders application, all emphasize the theoretical aspects presented in the book. Section 6 covers the message filtering aspect. Filtration of a queue or a topic in the message is made using message selectors. Message selectors apply to message consumers. Consumers will receive only those messages that meet the filter conditions. Selectors will use properties and message headers to test conditional expressions of filters. The chapter concludes with aspects regarding the design of applications that use filters. The seventh chapter is divided into two related subparts, the first one is about how to verify messages, and thus the consumption of messages and the second one is associated with transactions. JMS transactions are determined by the different perspective that producers and consumers have upon a message. The producer has a contract with the messaging server that ensures that the message will be delivered to the server. The server has a contract with the consumer which ensures that the message will be delivered to him. The two operations are distinct, which is an indisputable benefit for asynchronous messaging. Transactions follow this separation of send and receive operations, but it groups messages which means that either they get all or none to the server. JMS transactions, although similar to JTA (Java Transaction API) are managed by the messaging provider. Chapter eight presents a major step forward in the optimal management of this architecture: Message-Driven Beans (MDB). MDB’s are logical components that are automatically instantiated by the container and which waits and consumes messages from various producers. The advantages are significant for the entire life cycle is managed by the container and the asynchronous processes receive a considerable support. The chapter concludes with best practices for using MDB, which is facade pattern. Chapter nine presents the support provided by Spring for developing applications based on JMS. Chapter ten is focused on resources used by the JMS architectures. The last chapter is based on messaging design with specific discussions related to internal or external destinations, messaging request/reply design, anti-patterns in the messaging design. The book includes four appendix related to JMS API, message headers, message properties, installation and configuration of ActiveMQ’s. In my opinion, the messaging service offered by Java is not used, probably because it is not known enough, at its true potential. The major advantages highlighted at the beginning of this

TODAY SOFTWARE MAGAZINE

review together with the improvements brought by version 2.0, makes this service worth a lot more interest than the current one. I think that, at a backend level, regarding asynchronous communication, JMS and MDB are excellent solutions. As always, I look forward to discussion related to the topic of the book. Enjoy the reading, Silviu Dumitrescu Java Consultant msg systems Romania

www.todaysoftmag.com | nr. 13/July, 2013

21


programming

HTML5: Web Sockets

I

f we think of the most important influence any protocol had over computer communications, it has to be HTTP. This protocol made possible the web we use daily which itself spawned revolution after revolution in these last years. The first web pages were mostly static, few having modest multimedia content. But after a while, complex applications started to emerge prompting developers to hunt and discover the new possibilities as well as the limits of the Internet at that time.

Radu Olaru

rolaru@smallfootprint.com Senior Software Developer @ Small Footprint

22

nr. 13/July, 2013 | www.todaysoftmag.com

TCP and HTTP

Communication protocols allow long debates and discussions. In short, there is a protocol that defines communication between systems called TCP, and a protocol built upon that defining the communication between a web client and a web server, called HTTP. HTTP implements TCP communication but adds web specific features: a client calls for a web page, the server gives a response after which the communication is considered closed. For new information from the server, the client has to make a new call. HT TP implements t he simple and efficient communication between an application and a server offered by TCP, guaranteeing the destination of its received messages – but also limits the server to a single response. This kind of

communication is useful for applications, but is far from being enough. The server is not allowed to send messages to the clients by itself. Any message coming from the server must be asked for by the client. If the server receives another useful information later, for example some data updates which the client has just asked earlier, it cannot deliver them until the client makes a new request.

From acceptable solutions to plugins

Over the years, many attempts have been made to bypass this case. Meanwhile the web applications got more and more complex, defined new tendencies and finally became compulsory for the majority of companies. The AJAX revolution created the illusion of a permanent connection between the server and the clients. Other


TODAY SOFTWARE MAGAZINE attempts were made to force the HTTP protocol to emulate a permanent connectivity – but to no avail. A somewhat drastic solution were plugins which simply opened a new TCP port and forwarded messages there. Flash and Silverlight are probably the best known examples. Permanent communication with minimum lag seemed to need unpractical solutions competing with the rewriting of the whole HTTP protocol. The solution? As HTTP is not a standalone protocol but works over TCP, if the browser could interpret that protocol it could permanently connect to a server to communicate without interruption. HTML5 defines a specification allowing just that: the interpretation of a communication protocol similar to TCP in a browser.

Upgrade to WebSockets

connection.send(file);

TCP and HTTP differences

WebSocket switches the HTTP connection in a new one, similar with TCP. The resulting protocol is not raw TCP, but an upgraded version of it. WebSockets implements full duplex communication with the remark that the messages are not byte streams, but text streams (of course, binary data may also be sent). The HTTP message sent to initiate the new communication method is the following GET /mychat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw== Sec-WebSocket-Protocol: chat Sec-WebSocket-Version: 13 Origin: http://example.com

To which the server responds with: HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: HSmMlYUkAGmm5OPpG2HaGWk= Sec-WebSocket-Protocol: chat

The implementation is also smart: the browser request a web page using HTTP, but the page is then able to change the conThe exchange is identical with the nection to WebSockets: protocol upgrade from HTTP to HTTPS. var connection = new WebSocket( The HTTP message allows the servers ‘ws://site.org/echo’, [‘soap’, ‘xmpp’]); to receive both HTTP and WebSockets connection.onopen = function () { connection.send(‚Ping’); }; connections on the same port, but the connection.onerror = function (error) WebSockets upgrade involves protocol{ console.log(‚Error: ‚ + error); }; specific messages. connection.onmessage = function (e) { console.log(‚Server: ‚ + e.data); }; Once the connection is done, the client We can see above the page initiali- and the server may exchange information zing the websocket communication and in full-duplex. The data contains minimal setting up handlers for the connection overhead, basically having a small heaevents. When the connection opens, a Ping der followed by the message itself. Sent message is sent to the server. In case of WebSocket data is called a message and a communication errors, they are logged in single message may be split among many the browser console. If the server sends a communication pages sent separately message to a client, it will also be logged in (just like TCP). This allows messages with the console. Of course, any other instruc- unknown size to be sent – the message is tion may be executed at each point. paginated, the last page being marked with By running the above code, no TCP a special end flag. port will be opened. The existing HTTP connection will simply receive an upgrade request, switching to a different communication protocol. The protocol used will not be HTTP anymore, but WebSocket – running over TCP. In order to send messages, the server must also implement the WebSocket specifications. There are many libraries for the main programming languages and platforms which implement WebSocket. Also we can send binary messages: var img = canvas_context.getImageData(0, 0, 400, 320); var binary = new Uint8Array(img.data.length); for (var i = 0; i < img.data.length; i++) binary[i] = img.data[i]; connection.send(binary.buffer);

Or files: var file = document.querySelector( ‘input[type=”file”]’).files[0];

CONNECT to create a persistent tunnel. Although the WebSocket protocol is not aware of any proxy and firewall, it uses an HTTP compatible handshake allowing servers to grant access to HTTP and HTTPS ports (80 and 443). WebSockets defines the ws:// and wss:// prefixes, indicating the type of required connection: simple or encrypted. Both use the same upgrade mechanism described before. Of course, the proxy will have the final decision to allow WebSocket traffic or not. The main thing is the protocol does not require new ports to be opened nor the composition of complex messages, outside of the regular HTTP standard. Also, the protocol does not require any supplementary configuration to the existing firewalls – if the HTTP port is open, the WebSockets communication will work alongside HTTP.

WebSockets cu Node.JS

We have seen how simple WebSocket communication is initiated from the client using JavaScript. Well the server part is simple as well. Internet Information services requires version 8 together with further Windows configurations to allow the new protocol to work, but for brevity we will demonstrate a WebSockets server using Node.JS – and again, JavaScript: var WebSocketServer = require(‚websocket’). server; var http = require(‚http’); var clients = []; var server = http. createServer(function(request, response) { // aici se procesează cererile HTTP // dacă implementăm un server pur WebSocket, nu // trebuie să scriem nimic aici }); server.listen(1337, function() { }); // inițializăm serverul WebSocket var wsServer = new WebSocketServer( { httpServer: server }); wsServer.on(‘request’, function(request) { var connection = request.accept(null, request. origin); // mesajele primite de la client vor fi // procesate aici connection.on(‚message’, function(message) { if (message.type === ‚utf8’) { connection.sendUTF(‚Hello’); // trimite înapoi un mesaj la client clients.push(connection); // rețin clientul } }); connection.on(‚close’, function(connection) { for (var i = 0; i < clients.length; i++) clients[i].sendUTF(‚someone left’); }); });

Basically the work model is similar to the Observer pattern: a list of subscribers Proxy traversal is stored. When the server has a message to The WebSocket implementations will publish, the message is sent to each memtry to detect if the browser uses a proxy ber of the list. when connecting to a destination. If a proxy is detected, the client will use HTTP Requirements and restrictions www.todaysoftmag.com | nr. 13/July, 2013

23


programming HTML5: Web Sockets As we have seen, WebSockets is more than an HTML5 API. The client communication instructions are standardized in the HTML5 specification – but the protocol must also be implemented on the server. The server part is specified in RFC 6455. So WebSockets communication requires a browser which supports the protocol but also a server which implements it. Currently all mainstream HTTP servers have been updated to support WebSockets: IIS 8, Apache, LightHTTPD and of course Node.JS which can build compatible web servers. Still, the main restriction comes from previous versions of IIS – IIS 8 is available only in Windows 8. As of browsers, again, all mainstream browsers allow WebSocket communication – but for companies requiring Internet Explorer, the only compatible version is Internet Explorer 10, available again only in Windows 8.

Resources and references • http://www.html5rocks.com/en/tutorials/websockets/basics/ • http://www.websocket.org/ • https://developer.mozilla.org/en/docs/WebSockets • http://tools.ietf.org/html/rfc6455

24

nr. 13/July, 2013 | www.todaysoftmag.com


HR

TODAY SOFTWARE MAGAZINE

Team building (I)

M

any companies are organizing in this period team building activities and managers are talking about what kind of activities are suitable to be used during these events. My purpose in this article is on a more practical approach. I donâ&#x20AC;&#x2122;t want to insist on defining the concept of team building because people are already used with it, but I would like to mention 7 steps related to how to organize team building activities.

Andreea Pârvu

andreea.parvu@endava.com Recruiter at Endava

Step 1: Paricipants needs assessment. The easiest method is to use a survey. The most interesting part is to define the proper questions to find the right information. The answers are interpreted, and based on that the objectives of the team-building are defined. On the other side, there are also other methods that could be used: the structured interviews who have clead criteria defined. Depending on the number of the team members, more than one tool could be used. Step 2: Define the objectives. In order to have an impact on the development of the participants, the objectives should be SMART (S=Simple, M=Measurable, A=Achievable, R=Realistic, T=Timeline). Step 3 : Define the development blocks. The role of these blocks is to encompass more than one activity. In order to have a clear understanding of the concept of development block, I will give an example : one block could be : develop communication skills in the team.

Step 4 : Define the activities. For each block it is necessary to define the purpose and objective of each activity. Step 5 : Define the timeline needed for every activity. Based on the objectives set, every activity should have a timeline defined. Step 6 : Identify the proper trainers. It is a complex process, because it is necessary to have a well prepared and capable trainers or company team. Step 7: Prepare the team-building based on step 2. Each activity defined in the teambuilding program should have a session outline that should be used by the trainer. Step 8: Coordinate the activities during the team-building, for a better time schedule and for a better communication. In the second part of the article I will present 2 activities that you can use for a better team consolidation.

www.todaysoftmag.com | nr. 13/July, 2013

25


HR Team building (I)

Activity 1

Timelime

5 minutes/ participant

Activity name  Teams Location Materials

Total: RULMENTUL 4 teams (10 members/ team – maximum) Indoor / outdoor One flipchart with the following questions : 1.

Your craziest dream ?

2.

Your craziest/ funny activity in your childhood ?

3.

The most interesting place you ‘ve visited ?

4.

The most wanted place where you would like to go ?

These are 4 questions defined for a personal interaction between the participants.

Obiectives Obiectives Materials

To be mentioned : these questions are only a suggestion, but they could be defined based on the group. Get to know the other members of the team Team members are splitted in circles and every participant has 5 minutes to answer to these 4 questions. An A4 with the questions for every participant

It is recommended that the get to know each other activities to be deployed in the first part of team-building programme. The better the participants know each other, the easiest the interaction is between them and conflict resolution approach will be more personal. It is worth mentioning that these activities of knowing each other should not to exceed more than 30% of the total time spent on team-building.

26

nr. 13/July, 2013 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE

Activity 2

Timelime Activity name Teams Location Materials Obiectives

teams/ 20 minutes + debriefing 30 minutes (maximum 10 persons in a team). Total: TURNURILE GENERAČ&#x161;IEI Teams Outdoor/indoor A4 with the rules for the facilitators of the teams created. The role of a facilitator is to observ every team and to write down the most important things happening during the activity played. These will be used in the debriefing part. Planning the activities Organizational communication Responsibility and accountability Feedback

Description

Conflict management The team is splitted in smaller groups (not more than 10 persons/ group). Every group will start the construction of one tower with a minim 2.5 meters height who needs to support a tennis ball. After 20 minutes the teams change the places and they have to continue to work on the tower of the other team.

Debriefing

After another 20 minutes the teams change places again until they will reach the first tower they started to build. How it is to depend on others work? Why it is important to have written plans? Who does seem the initial vision with the final tower? What would you do better? Did you choose to continue the work of the others or you decided to destroy everything?

Materials

How did you prepare the working environment for the others? String, cartoons, PETs,paper, tennis ball, scissors, scotch

Activities to improve communication skills, the ability to work in teams and to achieve a common goal and gaining the confidence of others are particularly relevant as the debrifing is more detailed and personalized on how the team is involved in the games and how everybody reacted during the task solving. The debriefing is necessary to always have some clear conclusions jointly agreed by the team members to see the relevance of the work undertaken in daily work. The purpose of the following article will be to continue this series and have other activities. Good luck and have fun!

www.todaysoftmag.com | nr. 13/July, 2013

27


HR

TOWARDS an IT COMMUNITY – via HR (2)

W

Cristina Nicule

cristina.nicule@danis.ro Consultant @ Danis Consulting

Dan Ionescu

dan.ionescu@danis.ro Executiv director @ Danis Consulting

28

nr. 13/July, 2013 | www.todaysoftmag.com

e come back with the second article which presents the opinions of several HR representatives from well-known Cluj IT companies. These opinions were gathered during the second workshop from the total of four that we planned for 2013. We aim to identify past and present HR best practices, possibly useful for the process of creating a mature IT community in Cluj. We would like this initiative to be followed also by other professions in the region. For now, we believe that IT industry, being “on the top”, may constitute itself in a real model for success, setting working standards for others too (good income, exciting working environment, managers close to people). But, for this, there is still some work to be done! In the previous article (from TSM no.11) we presented what IT companies did in order to develop in the past few years and what management practices were most appreciated. During the meeting from June, 11, at Danis office, we approach some of the most actual concerns in IT companies, from the Human Resources point of view. These topics were developed by HR representatives from the following Cluj IT companies: AROBS, IQUEST, FORTECH, RECOGNOS, to whom we thank a lot for dedication and honest interest!

What are the main issues that challenge HR now in Cluj IT companies?

From the very beginning, we would like to point out that it is more than obvious for all of us that THE BIG PROBLEM of human resources professionals in Cluj IT companies is recruiting and retaining people. This process has become a kind of “obsession” and a key-competence for a HR professional in IT company. In the same time, this has also become a “tabu” subject, due to the difficulty of the recruitment process. We DID NOT approach this topic during the workshop because it is rather saturated and, we believe it is almost useless to do it: there is quite impossible to find methods to bring new employees (without “stealing” from other

companies…) when there are not enough people on the market. The difference between the request of IT companies and the number of IT professionals available is so big, that we found useless to talk about efficient recruiting strategies… Maybe this subject will reappear as important when we will approach discussions about a mature community of IT professionals, here in Cluj… But, until then… The topics approached during this second workshop were based upon the participants’ suggestions and the debates from TSM launching panel discussions. The main ideas that will be presented here may be structured into two main categories: 1. The process of employees’ development in IT companies – some particularities in the way of approaching own development, techniques of gaining the involvement of people into these actions, the challenges given by IT employees (versus other employees from different industries); 2. Ways to build and maintain performing working teams in IT domain – practices for reaching quickly a certain level of maturity and results; way to overcome challenges regarding high level turnover;


HR The ideas and opinions shared in this article may be useful to any Human Resources manager / specialist from an IT company, and also to any leader (from top level until team-lead level) who really assumes the responsibility for raising the performance of people that he manages. If these ideas are new to you, please, feel free to test them in your organisations. If you have already used similar practices or other more efficient, we would be happy to debate them during the panel discussions on the occasion of launching TSM.

The process of employees’ development in IT companies

Why this process of employees’ development is a challenge for HR professionals in IT? There are at least two reasons: 1) the IT professionals are technical, logic, rational people that need practical things – this is why the learning actions that they participate at need to be very qualitative; 2) people from IT industry find themselves in a favoured, positive context: they gain usually very early and quickly good jobs, they are “fed emotionally” in their working environment (with all kinds of benefits), they are involved in cool projects – all these represent a set of advantages, but in the same time may slip into a trap of self-sufficiency that can impede some of IT professionals to develop internal motivation to develop themselves, considering already good enough. These challenges were solved in good amount in the companies present to our workshop, by a set of practices meant to raise the degree of determination, involvement and real desire for their own development. The tendency to manifest resistance in the face of development proposals come from the company, HR or managers seems to be bigger in the case of IT professionals that employees from other fields. The IT people are intelligent people and far more independent, than those formed in different professions / companies. Therefore, any form of imposing – even gentle – will not work! This is why, in order for the development actions (trainings, programs, conferences etc) to work out, people need to be involved in the decision-making process. This thing can be done in several ways. Monica David from AROBS shared the idea of internal surveys – in order to evaluate the needs and interests of the employees for the development, what are the areas of improvement, who are the persons that wish to be involved

TODAY SOFTWARE MAGAZINE in learning and development actions. “If a person doesn’t feel the need for development from the interior, it’s useless!”. The other companies preset to this discussion also support the idea of using any form of analysing and evaluating the development / training needs in their company – periodically or linked to internal performance evaluation systems. Through these surveys, you may also make comparisons between what people want and what their managers want (for their people) in terms of learning needs. If discrepancies appear, you may analyse where they come from / where the rupture in the direct communication between manager and employees is. But our participants in the workshop said that, usually, they didn’t observe big discrepancies between these two perceptions: IT professionals and their managers had, most of the time, similar opinions about development objectives – in Fortech, for example. After probing all these views, it’s much healthier to organise any form of training / development, based upon the survey’s results. The tendency of rejection will be smaller. These surveys may offer you valuable information, but sometimes too general: you may found out “big chunks” (= big categories), desired patterns, but not specific, personalised needs (as Razvan Voica sustains). This is why, a method for establishing detailed development needs – complementary to surveys – may be the performance management system in the organisation. In iQuest, for example, the system – mentioned also in the previous article – of “career management” has, from the beginning, also the objective of helping employees to develop, not only to evaluate performances. Thus, you may obtain “fresh” information about development needs, because the manager who conducts monthly discussions with employees is also a kind of coach for them, offering support and guidance. In addition, when at least once a year every employee has the opportunity of a 360degree evaluation, there is a raise in the acceptance of individual development needs because they came from such a complex feedback. For all these suggestions of approaching the development process in IT companies, the main principle is transparency – explicitly valued in Fortech, too. IT professionals – more than professionals from other domains – need clarity and good arguments, “need to know why they were selected for a certain training” in order to obtain their real engagement in the

development process (Alexandra Bayer). The tendency of IT people to reject a development action is stronger regarding the “soft-skills” development. It is quite easy to understand why: IT-ists are technical people that operate easily with exact information and with computers. When it comes to human relationships, interpersonal communication, various information regarding human nature, things are not so exact anymore and HR has a supplementary challenge in “selling” needs for development in this area. In this case, the most successful strategies are close, repeated discussions with people regarding the importance of these abilities in work, in the team and in the relationships with clients. The most impact messages will not necessarily come from HR, but may be those who come from recognised, appreciated persons in the organisation (strangely, these persons are recognised and valued for their technical and business competencies – “hard-skills”). In other words: IT professionals will come to believe that soft-skills are important, if the most hardskilled persons among them will tell them this! If competent leaders from organisation will practice and “preach” learning in the human relationships area, communication skills, team work, then the employees from that company will accept far more easily to participate into these kind of development actions. Regarding using intelligent development actions for intelligent people from IT, Monica David, for example, advocate the idea that the training / conference / workshop provided to IT professionals need to have a direct applicative component that will lead to immediate results – otherwise, participants will signal immediately the usefulness. Razvan Voica and Cosmin Molnar from iQuest support this idea and shared with all of us the experience their company had a couple of years ago, when they start looking for very valuable development actions in order to be naturally accepted in organisation. Successful practices turned out to be: on one hand bringing famous providers / trainers (who’s quality was already recognised) and, on the other hand, conceiving long-term development programs. Simple trainings were completed with follow-up sessions, scheduled after several weeks or months. This technique raises the possibility to apply and retain the things, concepts discussed in the training and therefore to determine concrete results. This technique is even more valuable in the case of soft-skills that need

www.todaysoftmag.com | nr. 13/July, 2013

29


HR TOWARDS an IT COMMUNITY – via HR (2) time to provide visible effects. In Recognos, until now, it has been applied the technique of internal trainings, that are very well received among employees, gathering weekly a big number of developers – both juniors and seniors. The continuity of these training sessions shows the real interest to learn new technologies and tendencies in this field that is in a constant change.

Ways to build and maintain performing working teams

Team work is the most usual way of organising in IT companies. More than that, forming a team is usually a challenge for HR and for team leaders, because the team must obtain the results and to work good together quickly, even if it’s newly constituted. The short amount of time available for reaching high performances is clearly a particularity in IT field. In addition, the turnover and the dynamic in an IT team – at least in Cluj – can be very high. New people may enter frequently in the teams, determining the need for a permanent re-adjustment. This is the reason for discussing together with the participants in our workshop how can be overcome this challenge for the IT teams. A performing and mature team in IT field is a team that first of all, have the results, and in the same time all the members work together well; it’s a team that reflects company culture (it’s not a separate entity) and it’s formed from all the diversity of roles and personalities necessary (you have creative people, but also good implementers and finishers; you have both good organisers and also good communicators etc.). In the same time, a healthy team is a team that has a natural “self-cleaning” system, through which members that don’t match with the culture and the team working style, can leave the team when their performance become an obstacle for the rest. This mechanism is important so that the team activity should not block. Cosmin Molnar from iQuest considers that the most efficient way of creating a performing team in IT is making a wellbalanced mix from seniors (or longer employed in the company), mid-level developers/ testers and juniors. The percentage may be different according to what you allow yourself in terms of resources, but the presence of seniors is vital from at least two reasons: 1) the technical skills of the seniors may be transferred quickly, through

30

mentoring, to the juniors; 2) people that are longer employed in the company may determine a quick infusion of accepted and valued working way – a cultural infusion. The presence of seniority in a new team has also the advantage of gaining recognition from the other members that will follow naturally the track given by the seniors, leading to rapid, good results. The other participants to our workshop agreed upon this idea; Alexandra Bayer added the fact that, in Fortech’s experience, there was enough a couple of seniors / longer employed in one team of new employees. In addition, she stressed the importance of “on-boarding” / induction process of the new-comers in a team that is already formed. This process is important to be made quickly, efficient and to contain both technical and working behaviour elements. In case of long-term projects, in Fortech, some video-tutorials were created. The new-comers had to watch these tutorials, thus raising the team’s efficiency. Regarding the case of constituting an entirely new team, with new people and no possibility for using older human resources from the company (i.e. a branch of the company in another location, or a team for a new client / product), the top priority for Human Resources and the management of the company has to be the transfer of the organisational culture. This process may be unfolded through systems like tutorship, buddy system, mentorship – each new employee being taken over by an older employee (from another team) to receive help in the induction process, especially in transmitting that code about “how we work in our team”. In the same time, the longer employed people in the company must be present as often as possible in the new team: through visits, explaining procedures, systems. One test that shows if the process of creating a new team has succeeded (not only the technical results) is that when you go visiting this team, you feel that you are in the same organisation, not in another one – you feel like “home”. A quick and often-used method in the IT companies for raising the level of cohesion in a team is the famous “teambuilding”. But also in this area, there are some particularities in case of IT professionals, that need to be taken into account for good results. The team members need to be involved in choosing the type of desired actions, location, services. In the same time, the planned activities need to guide participants to do things all together! It’s

nr. 13/July, 2013 | www.todaysoftmag.com

useless to send a team in Barcelona, for example, all-expenses ensured by the company, if everybody will do different things or if small sub-teams will be set up ad-hoc. It is important for the whole team to do activities together, activities that are full of meaning for them and are very attractive. In some cases, professional facilitators will help a lot, by analysing the participants’ behaviour and helping the team members to give feedback to each other, to become aware of each contribution to the team’s results. In the same time, in our guests’ opinion, the percentage and depth of these facilitated discussions must have a limit, because IT professionals may be very easily invaded if these analyses become too personal. *** As we can see in all these opinions of people who care about people in IT companies, the employees from this industry have a series of particularities regarding life experiences, way of approaching things, intelligence, working style, economic context etc. that must be taken into account when we try to identify successful practices in IT organisations. We are very anxious to reach to the point when we will discuss how all these particularities – challenges – may be taken into account in the process of crating a mature IT community in Cluj… A community in which innovation, efficiency, quality, professionalism should be the strengths that create an image in the eyes of clients all over the world that Cluj is “the place where we can find those superintelligent, good-working IT professionals that deserve our attention”. What do you think: does it worth the effort of thinking about it? Monica David (Arobs Transilvania Software) – a psychology-pedagogy professional, who started the HR career in 2008, in a well-known, old IT company from Cluj (Brinel). Recently she became HR Coordinator in Arobs. Before trying the private business, she gained a lot of experience in NGO-s field, where she learned a very structured way of working – imposed by foreign investors. Comparing private and non-profit working field, she finds a big challenge in both: working with people. Joking, she likes to say that, if in NGO-s she worked with “disadvantaged” people, now, in IT, she clearly works with “advantaged” people!


HR Alexandra Bayer (Fortech) started the works in IT field seven years ago, when she became a member of Fortech. Practically, she grew together with the company and learned together with their management colleagues how to gain the trust from the IT people: with logical, concrete, statistical arguments. The basic engineer profession helped her a lot in this structured approach of the Human Resources activity. Even now, when in Fortech are almost 300 employees, Alexandra sees herself as a helped for the entire company, as having “eyes and ears” for everybody, although it becomes more and more difficult to accomplish this considering the size of the company.

TODAY SOFTWARE MAGAZINE responsible of the biggest challenge of HR from IT field: personnel recruitment and selection…wish you all the luck!

Andrea Chaimovits (Recognos) is a devoted employee – from 2007 – of a tradition company in Cluj: Recognos, passing through different positions in organisation: technical, administrative and now, human resources – adding to her expertise in this latest field an HR master education. She experienced, along with Recognos organisation, the specific changes due to continuous growth from a small company to a bigger one. Because of these direct experiences, she may be able to understand from different points of views the needs of Răzvan Voica (iQuest) has an “old” her colleagues. background in IT (from 1997), having a great diversity of professional experiences, including that of a programmer. From 2011 he joined the management team in iQuest – one of the important players in IT market in Cluj (and not only). He admits that this job – a managerial position in Human Resources – was difficult and very challenging for him. Since his start in iQuest, he initiated and developed many HR Systems and processes, about which he is willing to speak with pride and passion for hours! Cosmin Molnar (iQuest) psychologist as a profession, he has an experience of seven years in Human Resources field, passing through very different organisations: automotive, production, distribution, human resources and now, IT. Having these experiences in different domains he is able now to analyse objectively the profile of an IT professional and the specific differences from other industries. In iQuest, he is

www.todaysoftmag.com | nr. 13/July, 2013

31


interview

interview

Interview with Peter Lawrey high performance systems in Java

H

ello, everybody! This is Attila for Today Soft Mag and today I have with me Peter Lawrey. Peter thank you for agreeing to this interview and we will talk about Java performance. Could you please introduce yourself? [Peter] Yes, my name is Peter Lawrey, I am a Java consultant in the low latency space. I have a popular blog called “Vanilla Java” which gets about 120 000 hits / month; I also have a library called Chronicle which is for low latency persistence IPC and data store and also I’m third on StackOverflow for Java. When people think about low latency / high performance, they you have to back off in C++ usually say things like “C++ is better”, they phrase things in terms anyway. You end up building of the programming language. How important do you think is the a lot of the protections that programming language and what other factors influence the latency Java gives you already, like or the throughput of the system - besides the programming language. you end up having some sort [Peter] What I found is that different programming languages of message brokering system can attract different development styles and developments and, to isolate the components in particular, if you’ve got a low level language like C++ or C and of your system, to protect you don’t have a pretty good understanding of exactly what’s going from crashes, for example, on, you’ll shoot yourself at the foot pretty quickly and you’ll learn all those sorts of things Java fast. You have to. Whereas at Java, a lot of Java developers are deli- will do for you efficiently. So Peter Lawrey berately protected from needing to know all these details and so there’s no guarantee that the therefore often they don’t, which is generally a good thing except C++ systems would be faster. when you want to be able to program in low latency, you need to In particular I worked in one place where all of the client facing have a much better understanding of what is the code really doing, application was written in C++ and that was the less latency senand so it’s not that Java you can’t do it, it’s more that there aren’t sitive, whereas the hedging of all of the funds, the latency sensitive as many Java developers that have the skills set and in C++ you’re code is written in Java because we had much faster time to market kind of forced to have that skills set – you won’t survive if you and in fact all of the fast delivery, a lot of the new changes were don’t. The libraries can make a difference as well, but the biggest going into the Java system, simply because the C++ had reached advantage for Java is the fact that so many of the common libraries the point where it was very difficult to maintain. And they would are likely to need are built in, whereas in C++ you have to go to print for example daily crash reports. Instead of throwing exceptithird party libraries to do a lot of the same things. ons the whole program would crash and restart, all those sorts of So, do you find that the general opinion that C++ is faster or things that would be considered unacceptable in Java. compiled languages are faster than Java holds up or is this just a Interesting. So what advice would you give somebody who is a myth? Java programmer and is just starting to get interested in the per[Peter] In theory, C++ is always faster, in theory. The thing is formance of their system? Maybe they are interested themselves or that in practice you have limited resources, you have limited time, maybe there is an external reason, like the client is saying that the you have limited expertise and you have changing requirements system is too slow. What would be the first steps they should take? and in that sort of environment what can happen is that you don’t [Peter] The most useful thing is visibility. What is going on have enough time to micro- optimize every little bit, (…) you can’t in your system, where is the time being spent, using things like fine tune everything because data becomes unmaintainable. So, profilers as a first part to look across your whole application. But given let’s say a week or a month, a developer who’s reasonably then, once you feel you have an understanding of what your appliequally skilled in both languages will produce much the same cation is doing, putting time stamps in and recording those, either performance. It’s just that if you give that same developer a year logging them or using something like my Chronicle to record instead to do the same task, that will be faster in C++ and when them in the low latency way, then that gives you visibility as to you see the libraries that are particularly faster in C++ and C are what the application is doing, and it allows you to see where is my well understood problems that don’t change very much and have time being lost, what is it doing and then, the simple problems been really tuned to death, things like video processing, matrix you can solve, you break those down and make them faster and operations, the sort of operations that have been around for a very faster. The way I got into the low latency space is that I initially long time involve huge pulse, simple code repeated many times, started with a company which wasn’t particularly low latency, but and in those situations you find that C is faster. But in most busi- I had this aim of making the system ten times faster than it neeness related applications, the amount of code fine tuning you can ded to be, and then for the next client, the next people I worked do on each line isn’t so important as the whole performance of for, I did the same thing, and again and again. And eventually your application and business logic tends to change over time and I knew from hundreds of milliseconds down into the hundreds then, what you tend to think about is maintainability and once that of microseconds and eventually sub-hundred microsecond range. starts coming in, and robustness and you face lots of changes then So, you can do it in a stepwise fashion, but I generally find that

32

nr. 13/July, 2013 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE if you make a system that can handle ten times the volume that is actually asked for, it’s usually very stable as well. So, there are benefits to doing this; you’re not just doing the absolute minimum all the time. Good. So Peter, what is your favorite thing about Java? Either the language or the platform? [Peter] The favorite thing about Java is just that it has so much of what you need built in and the tool set is very good and mature. There’s a lot of cooler new languages out there, but they don’t have good profilers and debuggers and a lot of the tools set around there to help you write the code and code analysis and it’s really the tool set that really brings Java to life, so to speak, rather than just the language itself. Part of the reason why there is such a good tool set is that Java is such a poor-feature language, in the sense that it’s very economical in terms of what features it adds, but this means that every feature is well understood, the interactions between features is well understood, they’re relatively easy for an application to reason about in terms of checking and profiling and analyzing and looking at side effects and so on. So, because it is a relatively simple language at its core, the tool set is generally very good and it can save you a lot of work, so a lot of the complaints people have about Java, things like “it’s very verbose”, a lot of those can be taken care of, using good tool sets and certainly I’d recommend anyone who’s not using an IDE with a profiler, they really should be. And learn to use the debugger when you’re trying to debug your program and it’ll save you a lot of trouble. Great. Java 8 is coming up and it should be launched this autumn, I think. Are there any particular features of Java 8 which you are excited about? [Peter] I think the most exciting thing about it is that there are a lot of features being added, not huge ones in themselves, but a lot of improvements. Closures is the one that gets the most press, although technically it’s really just catching up with C#. They couldn’t agree on what specifications they should have for closures, so they eventually settled on what C# does. They added virtual extensions, which internally are called something else, I can’t remember, but why did they call it “virtual extensions”? – Well, that’s what C# calls them. So, in a way, it’s really just catching up with what other languages are doing. But a lot of the other features - there’re 66 improvements, of which 3 relate to closures - a lot of them are smaller improvements but you see

quite a lot of developments in the evolution in the JVM, things such as JodaTime’s DateTime being brought into the language – probably one of the most popular addons till now is to be able to use a proper DateTime and things like for me at the lower level it’s things like having a proper discreet memory barriers. So Unsafe has a force load / force store memory barrier that’s explicit. In the past, you sort of had to do it indirectly by using other operations that also had these features, whereas now you can deal with them explicitly. But that’s a very low level feature. Are there any features which you would like to see in Java and are not included in Java 8? [Peter] Probably the biggest thing that I would like to see improved is because I use Unsafe quite a lot, is not add the feature but actually make it part of the specification. There’s a lot of functionality in Unsafe that’s used in Chronicle and Disruptor and other libraries which are outside the specifications, so they’re there in OpenJDK and HotSpot and other compatible JVMs such as JRocket or Azul Zing, but they’re not standards. So, they wouldn’t need to do anything in terms of adding functionality, they would just need to make it that this is a standard feature of all Java platforms. In that way you’ve got then a standard way of dealing with low level memory access. And in a threat safe manner. Are there any resources like books, blogs, videos, training courses that you would recommend to Java programmers who are interested in the domain of performance? There is of course your blog, which you mentioned in the beginning, and we will link to that, but what other resources would you recommend? [Peter] I would actually recommend looking at the Performance Java User’s Group because that’s where I put all of what I considered the most interesting video posts on the subject and I hope to encourage other people to post there as well. So, I think that’s probably the best place to start. There are two other blogs. Sorry, they aren’t really blogs, they’re forums, e-mail forums that are worth looking at, and that’s “The Mechanical Sympathy” which is led by Martin Thompson and he was the CTO at L-MAX when Distruptor was developed, and that’s very low level though. Even most people who are interested in Java performance wouldn’t have use for about 99% of it but it’s a very interesting discussion, all the same. There’s also a forum called “Friends” at jClarity which is led by a couple of guys

who developed the “Well Grounded Java Developer” for Java 7 and that’s Benjamin Evans and Martijn Verburg. They very much focus on GC and related issues, but they’re very practical based and offer good advice and they also provide consulting if you’re interested. They have a couple of products as well that are in that space but that forum is very interesting if you’re looking for tuning your GC. Great. We will include links to all these in the comment section and annotation for this video. Is there anything else you would like to talk about, related to this? [Peter] Yes, I’ve got a new version of the Chronicle coming up, which is added to a new organization called on GitHub called OpenHFT that’s set of open highfrequency trading based libraries. And Chronicle itself is being split into sections: memory, memory manipulation and deserialization, separate from its logging, so you don’t have to use logging to disk to use its features and it’s also been made more performant, for example, on this laptop I can get 80 million messages a second passed from one thread to another, and that’s with every message being persisted. Also it will have a support for rolling logs which you can do yourself in Chronicle 1, but a lot of people would have liked the library to do it for you and so, that’s gonna be a feature added in Chronicle 2. There’s also another library being started up which will look at storing huge amounts of data off-heap. In particular into memory map files, so it will provide similar features to what Terracotta’s BigData does but instead it’s only limited by the size of your disk space rather than your main memory, so you can have much bigger capacities and also the data will be stored much more efficiently, so you can get data in and out faster and use less space, as well. And it will be open source. And the other thing that’s coming up is a fix engine that will be based around the Chronicle as well, so you’ll be able to have low latency parsing and writing of fix messages. It will be loosely based on what QuickFix except that it’s designed to be much more efficient.

Attila-Mihaly Balazs dify.ltd@gmail.com

Code Wrangler @ Udacity Trainer @ Tora Trading

www.todaysoftmag.com | nr. 13/July, 2013

33


management

The high price of lean software developement

I

think I’ve always been a big fan of lean philosophy. Even back when I didn’t know about it or its name for that matter. And not because it looked fancy but probably because I always knew it felt natural. I must be one of those people who think the world keeps moving even when we’re pausing.

Florian Ivan, PMI-ACP, CSM, PMP, Prince2 Practitioner, MVP, MCTS florian.ivan@rolf-consulting.com Managing Partner @Rolf Consulting Germany

34

nr. 13/July, 2013 | www.todaysoftmag.com

Lean is all about movement. It starts with accepting that regardless of your area of practice you cannot stay still. And not because some marketing reason like „competition never sleeps” or tehnical pressure to be up to date. It is in our nature to evolve so we might as well do it in a controlled environment. It is not by accident we call the stillness, lazyness! The history of lean takes us back to the beginnings of industrialization. And it all started with craftsmen. Very skilled but expensive and highly unlikely to replicate. Not to mention to scale. The obvious problem: people wanted things to be more affordable. Mass production was invented which meant high volumes of the same product. Exactly identical! Henry Ford couldn’t put it better: any car you wish as long as it’s a black Ford T. But then again, more problems. High volume means huge quantities of final products but also of components. Just imagine what would happen if a component was wrong. Indeed, quality was a big challenge for mass producers as errors were difficult to spot and most importantly, to fix. Another big trouble was adding variety. Huge volumes equal huge stocks. Highly unlikely to be able to repond to a particular demand. Meanwhile, the software industry has been through the same phases. Long time ago it took a team of hightly skilled engineers to program a computer. Or a mainframe, to be more accurate. Things evolved rapidly and once the PC became a common presence in our lives, we needed software to be more diverse not just to process some data. And even more importantly, we started to rely on software for more and more aspects including some very sensitive like flight control or medicine. So, we started to ask for software of better quality and very diverse. Heard that before?

Lean, better known under Agile or Scrum in the software industry is where it all started. And not recently but about half a century ago. Back then, Japanese desperately needed a solution to produce car that would beat Fords in areas like quality, price and variety. Next to impossible, right? They did it by inventing a system (later known as TPS – Toyota Production System) that would use limited stocks, nearly close to zero. That allowed them to spot errors immediately and to improve quality constantly. And with virtually no stocks they became able to respond quickly to any particular customer demand. Now, that’s being Agile! By focusing on producing more cars on each production cycle they were able to produce more value for the same amount of effort spent. And that’s how those cars got really cheap. In software, we focus on small batches of work which we usually take from a much larger backlog of things to do. Small meaning enough to spot any errors and to be able to switch imediatelly if the customer needs. And by increasing the value of what we offer on a cycle bases (typically called sprint or iteration) we can actually deliver great value at a very reasonable cost. Just like the manufacturing is no longer viable without lean, it started to look like doing software is no longer viable without delivering high value at low cost. Just take a look at any major vendor’s market place and you’ll notice that less than 20% of the apps are actually making money accounting for most of the market. That Pareto, again!


trends

TODAY SOFTWARE MAGAZINE

Romania, the ugly duckling of the software outsourcing lake

T

he ‘90s have been dominated in Europe by the aftermath of the fall of the iron curtain. Eastern-European markets, which had been marked by the principles of the planned economy, were opened towards capitalism. Then a chaotic increase ensued, which left no industry untouched. Some mammoths, such as metallurgy, steel industry and mining, fall into the category of losers; however, a new species started developing, distinguishing itself among the winners, namely the information technology in general and software development in particular. Mihai Nadăș mihai.nadas@tss-yonder.com CTO @ Yonder

In 1993 a programmer from Cluj-Napoca was earning approximately 50 German marks, the equivalent of 25 euro, per month. Today, the best professionals have expectations that exceed 2000 euro, an increase of almost 1000% in less than 20 years. This is probably the most spectacular salary increase in modern Romanian economy. At the same time, in Western Europe, the salary of a programmer is close to the amounts earned in Romania, and, should the trend of increase be maintained the competitive advantage based on reduced costs and a suitable geographical positioning (i.e. nearshoring) will fade in a few years n comparison to destinations such as the Ukraine, Serbia, Russia or the traditional India. This background forces the outsourcing companies from Romania to think differently when it comes to their strategy and to diversify their portfolio of services in order to justify the significantly higher price compared to 10 years ago. In other words, the outsourcing companies must re-invent themselves, and innovate in order to remain competitive in a globalized market in a flat world, like Thomas L. Friedman called it in The World is Flat.

million and sometimes even billion of users. In contrast to the products, software projects represent efforts to optimize business processes through software, are secondary from the point of view of the company funding them and are to be found mostly in the form of internal, individual initiatives of departments that are designing their own software system in order to make their work easier (e.g. the internal system for the management of reservations of a tour-operator) or of some websites for presentation-related purposes. This distinction is important, because, if the objective is to increase the value Romania brings through outsourcing, then the effort must be concentrated in the area in which the impact is the greatest, and from this point of view one must wager on software products and on the manner in which Romanian outsourcing could create value in this area. “Projects”, as introduced above, have low impact by default, and are therefore available for outsourcing based on reduced costs, an area in which the Romanian outsourcing companies compete against cheaper destinations, thus eroding their own competitive advantage potential.

Software Projects vs Software Products

The needs of a software product company

I would like to make the distinction between two broad software categories: projects and products. By products I mean Microsoft Office, Google Search, Salesforce. com, Skype, Evernote or Dropbox. These represent the central element in the strategy of the company producing them, have a large-scale impact and are used by thousands,

Value is created by addressing needs, and if the greatest impact outsourcing companies can have is in the area of software product companies, then understanding their needs is the first step to be taken. Essentially, from this point of view, we can speak of two big needs: the need to adapt to change and the need of predictability in delivery.

www.todaysoftmag.com | nr. 13/July, 2013

35


trends Romania, the ugly duckling of the software outsourcing lake The need to adapt to change refers to the fact that we are living in a world in which the only constant is change. Market requirements are changing, competition is changing and, last but not least, technology is changing at an increasingly rapid pace. If we are to look at technology in further depth, we can notice how, for a product company, losing an innovation cycle (by innovation I understand the adaptation to new technology and technological trends) could destabilize its position on the market in a decisive manner. An average product company cannot afford to invest too much in innovation, a reason for which the risk from this perspective, and thus the need, are very high. The needs of predictability in delivery pertain to being professional. We are talking about on-time delivery, according to the agreed quality standards and within the agreed budget. This is a wide field in which initiatives such as the Capability Maturity Model Integrated (CMMI), a model developed by the Software Engineering Institute (Carnegie Mellon University) seeks to decipher a complex issue. The lack of predictability in delivery is, again, a risk factor, which, has more than once taken product companies out of the game (e.g. Netscape).

A functional model

Change starts from vision, but vision itself does not lead to change. Change needs models, results and proofs. The vision described above was implemented at Yonder and, for almost 2 years, we have been able to speak of a functional model within which we notice how addressing the need for change and predictability on the European market of software product companies generates value that differentiates us and offers completely new perspectives of development in comparison to the

36

2. Mobile-Centric User Applications 3. Cloud Computing: IaaS, PaaS, SaaS 4. Big Data and Next Generation Analytics This is a time that highlights not only the change from a reactive attitude to a proactive one in local outsourcing, but also the implementation of a vision that presents a clear and functional alternative to the current model, and which already has behind it a series of successful case studies.

Conclusions

traditional model of outsourcing, which is based on low costs and low added value. Beyond the efforts to address the need for predictability, resulting in certifications such as CMMI and in changing the organizational chart, which took place in 2012, this year we reached a new benchmark by launching a booklet that concentrates our vision on the need for software product companies to adapt to change. The paper is called â&#x20AC;&#x153;The Innovation Roadmap of Successful Software Product Companies1â&#x20AC;? and presents an innovation model that software product companies must adopt in order to remain relevant on the market in the long run and describes in detail four trends that we believe the companies must take into account when defining their plans for developing their products. The four trends identified are:

nr. 13/July, 2013 | www.todaysoftmag.com

1. Contextual, Social and Modern User Interfaces 1 http://tss-yonder.com/latest-news/downloads/

On November 11th, 1843, Hans Christian Andersen published a story about a transformation for the good, about trust and perseverance. Romania, as an outsourcing destination, is similar to the story by the Danish author, but, unlike the duckling in the story, which has benefitted from its genetic inheritance and witnessed a fatalist transformation process, Romanian outsourcing must determine its own phenotype in order to go to the next level of maturity. In the same way in which the software companies need innovation in order to remain relevant on long term, we can speak of local outsourcing companies where adoption of a vision and of a strategy based on added value will make the difference Ă  la longue.

References 1. tss-yonder.com/vision 2. innovation.tss-yonder.com 3.http://www.youtube.com/ watch?v=c1AsihGwuxU)


programming

TODAY SOFTWARE MAGAZINE

Migrating MVC 3 website and DB to Azure (II)

A

brief review of the previous article (part 1): We were given a “classic” web architecture: an ASP.net MVC 3 & 4 web portal, backed up by a MS SQL database with Entity Framework as a ORM.

Dragoș Andronic

dragos@txtfeedback.net CTO @ TXTFeedback

This architecture had to be prepared for scaling – ported to a system that would allow for a high number of requests to be served. After analyzing multiple upgrade options (the full reasoning can be read in the previous article) we decided on SQL Azure and Windows Azure as a migration platform. In this article we will go, step by step, over the database migration procedure, what tooling we did use and what problems appeared or could appear.

The database migration

The database was accessed through Entity Framework – this made our job considerably easier as one of the roles of an ORM is transparency regarding the chosen database.

The first thing we have to do is to check if the SQL Azure and SQL server databases are compatible – what can be migrated “as it is”, what has to be changed and what cannot be migrated. A good place to start documenting ourselves is the Windows Azure General Guidelines1 and Limitations on MSDN. If you are dealing with an enterprise database then you have to go over the whole article, otherwise it is enough if you know that the following are not supported by Windows Azure: • Cross database stored procedures – if you are dealing with such a scenario then you will have to move the join logic to a superior architectural level (e.g. LINQ) • Automatic transactions on operations across multiple databases – same as above, if you find yourself having to support this, then you will have to move all the synchronization an rollback mechanisms to a higher abstraction level. • SQL Server agent or SQL server jobs – SQL Azure provides no support for SQL Agent so all your internal jobs have to be moved to an external service that will 1 h t t p : / / b l o g s . m s d n . c o m / b / s q l a z u r e / archive/2010/07/30/10044271.aspx

www.todaysoftmag.com | nr. 13/July, 2013

37


programming Migrating MVC 3 website and DB to Azure (II) be periodically executed (for example you can move it to a thread on a Azure WebRole). Other alternative solutions can be found here • Tables without clustered indexes – the good thing is what on every table it is relatively easy to add a clustered index. If you find yourself asking why this limitation exists read this article If you like a little less theory and a more practical approach, you can attempt a migration with one of the migration tools and, in case incompatibilities are detected, all the tools will provide you a detailed report.

The migration procedure, step by step: 1. We select from Management Studio the database we wish to migrate to azure and select Tasks -> Deploy database to Azure 2. We input the name of the database we wish to create and specify the Azure SQL server instance that we wish to use – the SQL Azure server has to be created before from the windows azure management dashboard ) Note: if you already created a SQL Azure database the wizard has the bad habit of setting the already created database name in

Migration tools

Ok, what can we use to migrate our SQL database to SQL Azure? 1. SQL Management Studio 2012 (SSMS) – the 2012 version (or newer) is a must due to the fact that in this version a new migration to Azure task has been introduced which will make our life a lot easier. If you don’t own a SSMS license you can use the Express version. 2. RedGate SQL Toolkit – complexity wise is on the same level with SSMS. You will require a license for the SQL Toolkit – depending on preferences and requirements, your development shop will most likely have either a SQL Toolkit license or a SSMS license. 3. SQL Azure Migration Wizard – available on codeplex, is the free & open source (but not less powerful) migration tool alternative.

After the migration is done, to check that everything works correctly we change the connection string in our web project to point to the SQL Azure database. We start up the project and either run some database unit tests or manually go over some basic scenarios. Due to the fact that we have Entity Framework, everything should work as expected, no other change being required. That’s about it regarding the database migration. If you encounter problems during your migration or have questions you can contact me directly at dragos(at) txtfeedback.net In the next article I will go over how we moved our website & virtual directories structure to Azure.

We used SQL Management Studio 2012

– as Bizspark member we had free access to it.

easy: the only detected problem was the fact that not all tables had clustered

nr. 13/July, 2013 | www.todaysoftmag.com

Migration validation

Final thoughts

the Connection Properties, „Connect to database” setting. We are trying to create a new database so we have to make sure that the “Connect to database” setting points to “default”. If we don’t do this we will get an error during the migration procedure. 3. We start the migration procedure and, once it ends, we go over the migration Log and see what incompatibilities were detected. In our case we got off

38

indexes: we had to manually add a clustered index to each table (this was easily done from SSMS). 4. After all incompatibilities were solved we repeat step 1, until the migration succeeds.


programare

TODAY SOFTWARE MAGAZINE

Hadoop (III)

I

n the former issues, we discovered the world formed by Hadoop, a world in which 100GB or 500GB files are something ordinary. This allows us to do things we werenâ&#x20AC;&#x2122;t able to do before.

Radu Vunvulea

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

When?

Costs

The data our company collects can become a gold mine. As we are able to process huge amounts of data, we can visualize the data in a way that was not possible until now. The first question we should ask when we wish to analyze the data with Hadoop is: What do we want to analyze? The answer to this question is important, because we need to clarify what we wish to do with the data, what information we wish to analyze and which is the value of this data. A simple scenario is the identification of a userâ&#x20AC;&#x2122;s profile. We can thus recommend or advertise different products. Moreover, by using a system like Hadoop, we can create a mechanism for identifying frauds, by selecting the exceptions from the known patterns.

Compared to the rest of the solutions that are available on the market, Hadoop comes with extremely low costs. It does not require a special hardware on which to run. It can work without any problems on any kind of system, be it the laptop you have at home or the server from work in the 500.000 euro machine the client has purchased. Depending on the task we wish to perform, a job can take between a few minutes to hours or days. Hadoop has no restrictions from this point of view, being able to run for days, with no problems. By simulating the environment in which it runs and the manner in which Hadoop is built, we are allowed to do something that cannot be done on any system of the kind. Scalability is linear. This means that if we double the number of nodes we can reduce to a half the analysis time. This way, we can

www.todaysoftmag.com | nr. 13/July, 2013

39


management

programming Hadoop (III) start with a simple configuration and, if the data volume increases, we can increase the number of nodes. Due to this feature, there are many cloud providers who offer this service. Any cloud provider can use the machines he has to run Hadoop and can scale the number of machines according to the client’s necessities. A rather interesting story is that of Pete Warden who used Hadoop to analyze the profile of 220 milion Facebook users. This took only 11 hours and the cost was extremely low. Do you wonder how low? The final cost was 100 $. This is the perfect example where Hadoop works very well, on minimum costs.

How? As we have seen so far, the Hadoop architecture is simple, being based on HDFS – Hadoop Distributed File System and Map Reduce. HDFS is able to divide, distribute and manage very large amounts of data. All this data, once stored in Hadoop, can be processed using MapReduce. The moment when the data is being processed, Hadoop does not send the data to the nodes that are responsible for processing it. Each data storing node in the system will process the data that it stores. Thus, data analysis is done much faster and the system is more scalable. The MapReduce operation is an operation that unfolds in two phases. During the first phase, the Map operation runs on each

separate node. The second analysis phase, called Reduce, is optional. The entire logic that we write – the manner in which we analyze data lays in the Map and Reduce operations.

Language

your Map and Reduce operations. By using Pig and Hive, any person who has no proEnvironment gramming knowledge can define their own If we wish to set up a Hadoop system, rules. we must be ready to use Linux. Even though Hive is based on a language called it has no problem running on Windows, HiveQL. This is extremely similar to SQL. All that anyone has to do is to define a query of the kind: SELECT * FROM CARS WHERE type = ‘BMW’ AND value > 30000

initially Hadoop was designed to run on Linux. Linux knowledge will be useful to us the moment we have to set up this system. Under Linux, Hadoop runs on a Linux version derived from Ubuntu and RedHat. This is called CDH – Cloudera Distribution of Hadoop. A solution I recommend at this point is using some images that already have this system installed and set up. This way, in no more than 10 minutes we can have a functioning and ready to work Conclusion system. In the last three articles from this series we discovered the Hadoop world, how it Development can store and process such a big amount of If we are at the development phase, data. All that is now left for us to do is to then it is not recommended to run the take the next step and start using it. code directly on a real system, since the debugging process can be extremely Good luck ! ticklish. In an initial phase, we can employ the Local Jobrunner Mode, which allows us to run small size tests and debug the Map and Reduce type operations. Once we have a functional code, we can move on to the next step and use PseudoDistributed Mode. This is a replica of the real environment, but offers us some debug functionalities. If we got beyond this step as well, then we can take the final step and go to the next, Fully-Distributed Mode. This is our real environment, that of production. By developing and running the code in the three modes, the development cost decreases and the number of found bugs is high. The programming style we have to apply the moment we use Hadoop is that of defensive type. We must try to figure out all the possible exceptions and treat them correspondingly. Running on several nodes, it is required that we treat each exception carefully.

The logic that we have to write in order to be able to write the analysis processes can be written in different languages. The thing we should not forget is that the language in which Hadoop was written is Java. For this reason, even though we can use other languages besides Java, we will Pig and Hive get the best performance by using Java. For In case you are not a developer and you example, if we use Streaming API, the per- do not know any programming language, formance may decrease by up to 20%. it doesn’t mean that you cannot define

40

Hive will translate this query into jobs which Hadoop can execute. Pig is fairly similar to Hive. It uses its own language called PigLatin. PigLatin is a simple language, with operations such as FOREACH, value comparing and SQL functions such as MAX, MIN, JOIN, etc. It translates the orders it gets into MapReduce type orders. Both systems are easy to use and optimize. For those who are not developers, using Pig or Hive is a much better option than learning a language from scratch.

nr. 13/July, 2013 | www.todaysoftmag.com


programming

TODAY SOFTWARE MAGAZINE

Functional Programming in Haskell (III)

I

n the last article we offered a short review of Haskell types, both the existing ones and the ones which can be defined by the programmer. We continue to uncover features of this language in this article by giving a short insight into another type system characteristic: the special way in which polymorphism is implemented in Haskell: typeclasses.

Mihai Maruseac

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

Though the notions of class and polymorphism bring into mind the object oriented programming, remember that Haskell is different. By the end of this article you would know that the similarities with OOP are very few and squinted. Here, there are totally different concepts having the same names. Let’s start with a simple function (+). Last time we used it as having type Integer -> Integer -> Integer but it is self-evident that in this way we could not add two real numbers together. Changing type to a -> b -> c gets us into a situation with 2 problems: we cannot construct type c from types a and b (if it were a constant type we could have chosen a null constructor and use a constant function – not a correct implementation for (+) anyway) and we can also have invalid formulas like True + “ana has apples”. Restricting

the signature to a -> a -> a in order to solve the above 2 problems will still allow us to write the semantically invalid True + False. We need a way to restrict the types of values of type variable a to the numeric ones. Let’s consider another example: converting values to strings. In Java we can use toString from class Object by overriding it in each of our classes. However, unlike the majority of languages, in Haskell functions are first-class values. Taking into account that we cannot convert a function to a string (excluding the lexical obvious example of “function at line 42”) we arrive at the real problem: we need a function of type a -> String where values of type variable a are restricted to those types for which the conversion has a valid semantics. The same is true for the reverse case of a function of type String -> a to convert a

www.todaysoftmag.com | nr. 13/July, 2013

41


programming

programare Functional Programming in Haskell (III)

string to another type. We can also look at functions (==) :: a -> a -> Bool, (<) :: a -> a -> Bool, etc. In each of these cases, we need a supplementary restriction on the types of variables in the signature. These restrictions apply to the type, not to the values of the type. Finally, let’s consider a more contrived example: in a way, it is useful to define functions like map:: (a -> b) -> [a] -> [b] but for other container-like data types (trees, stacks, graphs, etc.). We’d rather generalize the function instead of defining different functions for different containers. That is, instead of having mapTree :: (a -> b) -> Tree a -> Tree b and mapStack :: (a -> b) -> Stack a -> Stack b we would prefer to have fmap :: (a -> b) -> f a -> f b where f is an unary type constructor (needs a single proper type). Of course, we need to restrict f to those type constructors representing a container of values. In the above fmap signature f cannot be any proper type (for example, it cannot be Bool). Practically, we need a type system for the types of Haskell. This is the kinds system, each type has a kind. The proper types (Bool, Integer, functions) have kind *, while type constructors have kinds along the lines of * -> *, * -> * -> *, etc. In GHCi, one can find the kind of a type expression by using :k. Going back to type variables restrictions, we consider the way they are implemented in OOP languages: to force a class to implement some methods we use inheritance, especially interfaces. An interface in OOP world is just a contract: if this class implements that interface, then this class has usable definitions for all methods of that interface. Exactly the same idea resides behind the Haskell’s typeclasses. A typeclass is only a specification for the functions which are associated with a type enrolled in this typeclass. The definitions for these functions can be written by the programmer or generated by the compiler. The second case is when the programmer uses the deriving clause when defining a new type. So, the equivalent for a typeclass is the OOP interface, not the OOP class. That is as long as we neglect the fact that an OOP interface doesn’t allow implicit definitions for methods or automatically deriving of method’s implementations. Let’s see now how the typeclasses are used to solve the problems with which we started this article. For the numeric types we make use of the Num typeclass (along

42

with a typeclass hierarchy starting from it: several GHC extensions activated by using Real, Rational, Integral, etc): the LANGUAGE directive. class Num a where (+), (-), (*) :: a -> a -> a negate :: a -> a abs :: a -> a signum :: a -> a fromInteger :: Integer -> a x – y = x + negate y negate x = 0 - x

{-# LANGUAGE #-} {-# LANGUAGE cies #-} {-# LANGUAGE #-} {-# LANGUAGE

MultiParamTypeClasses FunctionalDependenTypeSynonymInstances FlexibleInstances #-}

The types from the last article: It is evident that (-) and negate are Name = String defined one in terms of the other. Thus, for type type Age = Int enrolling a type in Num typeclass we only type Address = String need to define all methods but one of the 2. type PhoneNumber = Integer To convert to strings we have the Show newtype NameAgeTable = NAgT Age)] deriving Show typeclass which contains the function show [(Name, newtype NameAddressTable = NAdT :: a -> String. Similarly, for the inverse con- [(Name, Address)] deriving Show NamePhoneTable = NPT version we have a typeclass named Read newtype [(Name, PhoneNumber)] deriving with read :: String -> a. For the equality Show tests we have the Eq typeclass from which we need to implement one of (==) and (/=). We still use deriving Show to get a texFinally, to have an order relation between tual representation of the tables. two elements we need to make use of a Let’s construct some values for the 3 typeclass named Ord types: class Eq a => Ord a where compare :: a -> a -> Ordering (<), (<=), (>), (>=) :: a -> a -> Bool max, min :: a -> a -> a

For enrolling a type into this typeclass we only need to implement compare. It is possible to also define the 4 inequality tests. Observe that there is one more restriction into play: a type cannot be enrolled in Ord without being a member of Eq as well. Otherwise, the operators (<=) and (>=) would lack sense. Finally, the fmap function can be applied to all types enrolled into the Functor typeclass. The name comes from a concept in Category Theory and the class has more power than it is visible at the moment, power which will be unleashed in a future article.

nameAge = NAgT [(„Ana”, 24), („Gabriela”, 21), („Mihai”, 25), („Radu”, 24)] nameAddress = NAdT [(„Mihai”, „a random address”), („Ion”, „another address”)] namePhone = NPT [(„Ana”, 2472788), („Mihai”, 24828542)]

Now it is time to define a typeclass for searching by name in one of these tables: class SearchableByName t a | t -> a where search :: Name -> t -> Maybe a

Because we need 2 type variables in the signature of function search we need two type variables in defining the typeclass: t for the table in which we search and a for the type of the returned values. Since the table defines the type of the returned values class Functor f where we use fundeps (between | and where). fmap :: (a -> b) -> f a -> f b Because of this we needed to activate Now it is time to see how we can enroll GHC’s extensions above. a type to a typeclass without using the deriNow, let’s enroll our types to our ving clause. Here is an example for doing typeclass: this for lists and typeclass Functor: instance Functor [] where fmap = map

Let’s continue the example from the last article: we have 3 data tables with information about persons. Last time we defined 3 different search functions but we want to define a single one and let the compiler specialize it to the proper one. We will need

nr. 13/July, 2013 | www.todaysoftmag.com

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

instance SearchableByName NamePhoneTable PhoneNumber where search name (NPT l) = lookup name


programare l

TODAY SOFTWARE MAGAZINE

Searching is simple now:

*Main> search „Ion” nameAge Nothing *Main> search „Mihai” nameAge Just 25 *Main> search „Mihai” nameAddress Just „a random address” *Main> search „Gabriela” nameAddress Nothing *Main> search „Gabriela” namePhone Nothing *Main> search „Mihai” namePhone Just 24828542

The type of the datatable in which we search completely specifies the type of the result. We use a single function for searching in several tables and the compiles specializes it to the proper implementation. Next time we will extend this code to implement join operations.

www.todaysoftmag.com | nr. 13/July, 2013

43


HR

programare

fresh … ideas!

E

xperience is good as long as you need to solve problems that you already solved once. Experience, unfortunately, is un-good when you’re faced with new problems or you need new solutions.

Why? Antonia Onaca

anto@aha-ha.com trainer and consultant

The human mind is simple. This is great as long as you need to act fast and be efficient. We know, however, that today we need more than quick and easy. We need something NEW, unseen, creative, innovative, fresh … The inexperienced have it easy. They don’t have validated patterns (from previous experience) that activate when they need to solve something. For them the challenge is new so they can create a new solution. However, sometimes we need a NEW solution that is not just new to us. That means we sometimes need new solutions that are different than previous solutions (even carried out by other people) How to do that? There are many solutions to stimulate creativity and divergent thinking. I’ll just talk about one that so far created some pretty cool and new ideas for those who tried it. It takes a while but it’s sure worth the effort.

in a place I like” to “How do I motivate my team?” It’s better to formulate the challenge starting with how to instead of black and white phrasing “Am I buying an apartment or not?” “Am I giving them a performance bonus or not?” Don’t get into too many details, they won’t help.

Now that we know what the challenge is … generate 54 solutions. Yes, I know: “54? Are you serious?”. I am serious. I’ll help you out a bit. First solution “I don’t do anything and leave things as they are” Rules for the 54 solutions: • Write whatever comes to your mind • Do not think about the solutions or try to analyze their feasibility • Do not get into details or try to imaIt’s a kind of magic. Magic54, version 1. gine how they will work • Even if you feel you found the perfect solution, keep writing up to 54 • The written solutions can be variations or nuances of previous ones

Some realistic preview of the process: It will be frustrating and the temptation to quit will be high at around 20 and Where is it you need some fresh soluti- 30 and 40 and 50. The first 12 solutions will ons? What challenge/problem do you need be solutions that you already considered to fix? or variations of them. Usually the next 12 It can be anything from “How can I live (from 12 to 24) are solutions that don’t rock

44

nr. 13/July, 2013 | www.todaysoftmag.com


TODAY SOFTWARE MAGAZINE the boat. Ok. Now you have a list of 54 solutions only after 24 you really start thinking or more. Next we’ll do some simple math. … about what you want to obtain and how Bellow you find some suggestions for solumuch you are willing to put in. tions that can be combined. You can also choose which ones to combine: Some recommendations to make this 3+12 easier on you: 24+39 Every time you get stuck you can use 29+53 any of the following “unstuckers” or find 13+25+37 some new ones. The purpose is to use 3+42+47 other parts of your brain, parts that you 7+17+29+52 would not normally use when solving your 19+? (choose your solution) challenge: 26+? • Re-read the list and spell check it 4+14+24+? • Talk to someone and try to explain ?+? the challenge ?+? • Drink a big glass of water ?+? • Take a shower 45+?+? • Solve some math problems or read ?+?+? poems ?+?+? • Look at pictures ?+?+? • Solve a Sudoku or any other mind game • Sing You can even re-read the list and try to rephrase previous solutions. Remember, not all the solutions need to be perfect. You can, and I encourage you to, write solutions that appear to be weird on unfeasible. The purpose is to let your mind wander and look at the challenge from new perspectives. If it helps, you can turn to the World Wide Web for inspiration and guidance. … but if you manage to really stick to it … your brain will impress you

Pick your thing!

Now you have a long list of solutions. Pick the best ones, at least 6 and write them down on a new piece of paper.

Come up with a plan!

I noticed that rarely there is one solution to a challenge so I recommend you to draw up a plan (write it down) where you take all the solutions from the short list and put them in reality. If needed, you’ll change the plan when you implement it, according to the outcomes it produces.

Is it worth your while?

Now you have a list of not less than 6 solutions and a plan to make them happen. Think about it. Is it worth it? Think if the positive and negative outcomes of implementing it coupled with the effort of making it real weighs more than the current situations. It is possible to see that it is not worth your effort or you can even find the drive to make it real. It is indeed an exercise that is enabled by stubbornness. In this case, stubbornness A combination is when you create a rules. new solution from the ones you combined. It is fun, but it also requires effort. Bonus feature. This is my favorite part. But your mind is awesome; don’t waste it just by travelling on the known path. Write down 10 non-solutions. Nonsolutions are things that might work but certainly will not or even things that might make the situation worse. If you generate the non-solutions your mind will relax and lower the performance anxiety (create good solutions). Right after this list think of at least 5 solutions for the original list.

www.todaysoftmag.com | nr. 13/July, 2013

45


management

It’s time for vacation… Gogu saw Chief entering the office and swallowed his line. Misu, with his back to the door, didn’t notice the movement and without any comment from Gogu, concluded: - So you think that being boss went to his head?! - Who are you talking about?! asked Chief. Hello, Chief to Misu, reception! He insisted towards a stiff Misu; only his narrowed eyes looking at Gogu were silently screaming for help. However Gogu ignored him and, looking at Chief, put another log on the fire: - Come on Misu, don’t stay there as a shepherd, Chief asked you something! He smiled fondly under the mustache; Misu’s innocence was incredibly lovely and he couldn’t help but stoking him. Misu’s narrowed eyes past from silent pray to dumb reproach, which made Gogu burst out laughing: - Before we tell you what this is all about, Chief, maybe you can clarify something for us. Misu’s eyes passed to fear. Hi-hi, the “we” part doesn’t comfort him at all, Gogu thought and continued: - For two weeks we have been doing only alarm exercises, like if we are an emergency unit. We already dream who is responsible if a tender appears, who and to whom seeks clarifications, who jumps to a claim on the contracts in progress, who goes to what meeting, who can negotiate and to what extent. It only remains to determine what to do in case of nuclear attack, all the rest being already clarified. I think you can even go home at peace ... Oops! Zdrang, Gogu realized. Chief, are you preparing for vacation?! - Well ... something like that, Chief smiled. You eventually got it, Gogu. All men must relax, even me. When are you going on vacation? - Ha-ha ... as if I could leave! In the middle of the project?! With the phone ringing on the beach every 10 minutes?! My wife will kill me!!! I won’t go, Chief, not until the project is closed. - So you’re saying that this summer you won’t take your wife and son to the beach, mountains, sun?! Big mistake, Gogu! It seems that you still need to learn a few things about management. - What do you mean, Chief? You’re not satisfied with me? You never complained before about how I lead the projects... Gogu minded. And you stop staring at me, he rounded on Misu, who got it blameless. Poor Misu didn’t have a clue about what they were talking; he looked stunned at both of them, the line exchange had probably been too fast and somewhere along the way he lost the string. Chief looked accomplice to Misu (who still wasn’t getting anything and therefore didn’t understand the sense of Chief ’s accomplice looks) and continued: - Wait a minute, Gogu, don’t enflame yourself, no one here would ever doubt your ability to keep a project under control. But men live and learn... So now we throw out of pocket the folk wisdom, Gogu thought but refrained from comment. He waited to see what follows. - Think for a moment about what you’ve just said regarding the preparation of the department. I delegated both responsibilities

46

nr. 13/July, 2013 | www.todaysoftmag.com

and decision authorities for the majority of situations that may arise. Do you know how that helps? I’m leaving on vacation for two weeks! And I will not check my emails nor will I answer to any phone call. Do you know what the result will be? - Yes, I’d fire you! Well no, the line was not said out loud; Gogu only thought of it and waited for Chief to continue; it was obvious that it was just a rhetorical question. - I will sit quietly on the beach, I will savor every moment of the vacation, and here everything will run smoothly. He grinned satisfied, and Gogu, although pissed off, could only agree with him. Everyone knew what had to be done and for special situations Chief had taken care to clearly establish both responsibilities and decision boundaries. - Well, yeah, Chief, but in projects things are different, he tried answering. - Really? And how are they different? Chief smiled patiently. How about that, Misu, are things different in projects? he turned to their younger colleague. Gogu looked at Misu: well figure that, he regained his intelligent look, he thought while casting his classic „you’d better not comment!”gaze to Misu. But it seemed that junior didn’t like to owe anything to anyone so he ignored the dumb message form Gogu’s eyes and with noticeable satisfaction he replied to Chief: - No, there’s no difference. Management is in both cases. The only difference is that you are much more experienced... You snake! I grew up a snake at my breast, Gogu thought bitterly. But he noticed Misu’s playful tone and thankfully found out once again that, although slow to speak, Misu was doing just in time all the necessary connections. Maybe too many connections, I wouldn’t be surprised if soon he’ll start giving me lessons, he said to him; but he was proud of Misu rather than angry. This was felt also in the tone with which he said: - That’s it, Misu, continue to brag, I have your request for leave. I don’t think I can approve it because I have no one else to replace me when I’m on vacation. - Didn’t you say you’re not going?! How can the project manager leave in the middle of the project? Misu frightened. - What did we discuss so far? A manager needs to relax at least once a year and if he’s really good then his absence won’t be felt. Because he knows how to delegate, right? Wait ‘till you see how being boss will go to my head...

Simona Bonghez, Ph.D.

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


sponsors

powered by


[Title will be auto-generated]