Thursday, 7 January 2016

Join me on my new blog

Hi everyone,

It's great that you found me!

This is my old blog. Please, have a look at my new blog.
www.andreaangella.com

Also feel free to connect with me on my social network.

See you all soon,

Thanks,
Andrea





Friday, 17 July 2015

Software Architecture - Triangle of Knowledge

I am currently watching the course Software Architecture Fundamentals Part 1 by Neal Ford, Mark Richards.

I do really love the triangle they used to represent the status of your knowledge.


The technical depth is the height of "stuff you know" while...
The technical breath is the height of the "stuff you know you don't know".

The key skill to become an effective software architect but I would say in general a knowledgeable T person is to move stuff from "stuff you don't know you don't know" to "stuff you know you don't know". In this way, you increase your awareness.

This is why constant learning, reading books, watching courses is so important. 

We all need to be long life learners!


Thursday, 9 July 2015

Book: Resonate Present Visual Stories that Transform Audiences

Here are my learnings after reading the book Resonate Present Visual Stories that Transform Audiences.

The first important lesson is that being yourself during a presentation is critical. Removing all the human touch from a presentation is wrong and ineffective. People attend your presentation because they want to know your perspective on the subject, so you should give it to them. Sharing emotions is important because your goal is to "make your audience feel what you feel".

Your presentation should be a story, not a report. 

Reports inform, while stories entertain.

The key is to see the audience as the Hero of your story. You create a desire in the audience and then you show how your ideas fill that desire so that people adopt your perspective. You start with an incident that captures the audience's intrigue and interest and then you start a journey from their ordinary world into your special world, gaining new insights and skills from your special world. The audience makes a conscious decision to cross the threshold into your world; they are not forced. The audience will resist adopting your point of view and will point out obstacles and roadblocks. The audience needs to change on the inside before they'll change on the outside. In other words, they need to alter their perception internally before they change the way they act.

I found quite interesting that great presentations usually have some kind of conflict or imbalance perceived by the audience that your presentation resolves. You should clearly contrast who the audience is when they walk into the room (in their ordinary world) with whom they could be when they leave the room (crossing the threshold into a special world).

Presentations should have a clear beginning, middle, and end. Two clear turning points

The first is the call to adventure—this should show the audience a gap between what is and what could be—jolting the audience from complacency. When effectively constructed—an imbalance is created—the audience will want your presentation to resolve this imbalance.

The second turning point is the call to action, which identifies what the audience needs to do or how they need to change. This second turning point signifies that you're coming to the presentation's conclusion. 

It's important to follow up the call to action with a vivid picture of the potential reward. The ending should repeat the most important points and deliver inspirational remarks encompassing what the world will look like when your idea is adopted.

Presentations are meant to persuade, so there is also a subsequent action (or crossing the threshold) the audience is to do once they leave the presentation.

Your job as a communicator is to create and resolve tension through contrast. Though people are generally more comfortable with what's familiar to them, conveying the opposite creates internal tension. Oppositional content is stimulating; familiar content is comforting. Together, these two types of content produce forward movement.

You want to make each person feel like you're having a personal exchange with them. 

For this reason, it helps to split an audience into segments—but humans are more complex than that. In order to connect personally, you have to bond with what makes people human.

No matter what the tool is, the audience should leave each presentation knowing something they didn't know before and with the ability to apply that knowledge to help them succeed.

The key skills is to remove the inessential.

Striking a balance between withholding and communicating information is what separates the great presenters from the rest. The quality depends just as much on what you choose to remove as what you choose to include.

Finally Be honest.

Be honest with the audience and give them the authentic you. You're not perfect; they understand that. If you are honest with yourself and with them, your presentations will have more moments of vulnerability and sincerity.


Sunday, 5 July 2015

How often do you deliberately read code?

I am currently reading the book 97 Things Every Programmer Should Know and I come across again to the most obvious but less followed advice ever.
You should read more code!
I like reading technical books and this is not the first time I see this advice.

Are you deliberately reading other people code?

I personally read snippets of code in books, in online videos and of course I read and review code written by my colleagues at work.

Is it enough?

I don't think so.

Code in books or online courses are just snippets so they can helps you to learn a specific technology or best practise but they do not help in teaching you how to read an entire code base or quickly jump into a new project.

Code at work is surely a source of learning but often you just read the code related to the task at hand instead of learning the overall project.
Programmers are writers. 
Great writers read books. 
Great programmers read code.
To make things harder, there are no books on the market teaching you how to read code, how to learn a code base from scratch and be productive quickly. This is a question I asked often and I rarely found an answer. 

Why some people are so good in jumping in on a new project?

They surely know the language and the technologies but more importantly they are used to read code, they can read and understand code quickly!

This is something you need to learn by doing.

There is no alternative. 

Saturday, 21 March 2015

Inclusive Leadership

I have just completed the Inclusive Leadership course on Edx and in this post I'd like to share the keys things you can learn from it.

It all start with an interesting TED talk about creating a movement.
The biggest lesson...is that leadership is over-glorified. That, yes, it was the shirtless guy who was first, and he'll get all the credit, but it was really the first follower that transformed the lone nut into a leader....If you really care about starting a movement, have the courage to follow, and show others how to follow.


Leadership is not a person!

Leadership is about influencing others to achieve a common goal. Anyone can lead! It requires simple action. Followers are also leaders!

Who is an inclusive leader?

A person who empower the direct reports and team members, hold them accountable, is courageous and show humility. These characteristics are embedded in the acronym EACH.

Empowerment: allows people to do things their way! Support people to develop themselves and give them the space to do so.

Accountability: holds people responsible for their own actions. Trust them to do the job. It's all about results, it does not matter the time they put in it.

Courage: helps people put group interests above personal ones. Inspiring trust letting people know who you are. Be yourself.

Humility: encouraging people to learn from one another and demonstrate vulnerability and trust. Be comfortable sharing your limitation, weaknesses with people around you. Learn from criticism.

Remember, being an inclusive leader is not about “using” everyone’s opinion and building consensus. It is about having your team, direct reports, and those you lead feel safe and comfortable sharing their ideas and opinions to enrich the discussion and arrive at a better solution or outcome.
Inclusion happens when YOU value both the differences and the commonalities of others.
"What’s critical to be an effective leader is you have to be willing to relinquish power. It is not just humility in creating space for others to contribute, says Bock, it’s “intellectual humility". Without humility, you are unable to learn.", Laszlo Bock
It's important that you spend time to reflect about the kind of leader you want to become and find who are the leaders that inspires you and their attributes or behaviors

My top two leaders that I admire are Bill Gates and the Dalai Lama.

Bill Gates
  • Ability to vision the future and define a clear plan towards it
  • Ability to influence and motivate people and create movements
  • Ability to create things immensely bigger then himself to improve humanity
  • Ability to inspire people to take action
  • Confidence and passion
  • Technical competence and ability to create the most successful software company
  • Tenacity and determination in pursuing goals. He never gives up until he wins.
  • Not afraid of spending money to improve humanity and fight inequality and poverty
  • Ability to communicate complex things in a simple and understandable way
  • Ability to learn from failures and use them as a motivator to improve things
  • Ability to empower people/employees to achieve their potential
Dalai Lama
  • Compassion for other human beings
  • Ability to listen other points of views
  • Ability to keep inner peace regardless of negative situations or emotions
  • Patience
  • Humility and respect of others
An another important thing to be aware of your own unconscious bias and stereotypes
Inclusive leaders are aware of otherness and the impact it can have on individuals. Inclusive leaders not only can empathize with feelings of otherness but are also willing to explore those feelings in themselves and let that experience inform them as leaders and influencers.
It's increasingly evident that business leaders who are capable of experiencing and demonstrating empathy, compassion, and humility have greater success. The best leaders are humble leaders.

What makes a great leader in the 21st century?

It's defined and evidenced by three questions:
  • Where are you looking to anticipate change?The answer is in your calendar! Choose wisely what to focus on.
  • What is the diversity measure of your personal and professional network?Ability to make connections with people who are very different (biological, physical, functional, ...) and despite that they trust you and cooperate with you to achieve a shared goal.
  • Are you courageous enough to abandon the past?Great leaders does not talk about risk taking, they actually do it.

Wednesday, 11 March 2015

The Cambridge .NET User Group is born

The Cambridge .NET User Group, a new .NET technical community is born in Cambridge, UK.

On 10th February, 2015 we held the inaugural event Envisioning the Cambridge .NET User Group and this post want to be a summary for the people who were not able to attend so that everyone is on the same page.

I started the event with my long experience with communities in Italy and in UK, sharing what I think were successes and failures with the aim of clearly define what for me is a real community. The most important lesson I learnt is that it's not about the number of members, or the number of events, or the number of expert speakers you can bring in but it's all about members engagement.

What is a community?
A community is a set of people with the same passion and interests willing to share knowledge and experience every day both online and face-to-face with the goal of develop themselves through collaborative learning.
I like to see a community as a knowledge sharing platform.

What is the Cambridge .NET User Group?
The Knowledge Sharing Platform for .NET developers in Cambridge
Base on my experience with communities in Italy I learnt that it is extremely important to set in stone the principles of a community otherwise future members can easily ruin the initial spirit of the community.

For this reason, I defined our community manifesto taking inspiration from the Agile manifesto.

The Cambridge .NET Community Manifesto

  • Members Engagement over number of members
  • Members Contribution over external experts contribution
  • Constant Knowledge Sharing over sporadic events
  • Collaborative learning over self-promotion
  • .NET technologies over other technologies
  • Free Events over paid event
  • Respect and humility over technical competence

As I said before, members engagement is by far the most important thing. I don't care about the numbers of members, what I want to see is high engagement among members. That's where the value of the community comes in. 

Because members are the key part of a community, the content should come from them and not only from external contributions made by experts in the field. We will surely bring some experts in the future but that's not the goal of the community and events made by members will be always prioritized.

An another key element for engagement is that conversations should not only happens during physical events. Events happens sporadically, every months of two, so it would not be possible to create real engagement only from them. The only way to have real engagement is to have a social network where members can discuss every day online, learn together and share ideas. This is powerful and mandatory for the community to be a real community.

The community brings a lot of value for speakers that can self-promote themselves and improve their brand. This is certainly a positive thing but should not be the main reason why people share. If you only present at events without actively participating in online discussions or collaborating with members you are not a real member of the community. Collaborative learning is the goal. You learn by sharing, people learn from you and everyone grows.

We are indeed a .NET community so .NET related talks are prioritized. Other technologies can be presented in the context of .NET developers.
For the community to really fly, events must be free and will be always free! Presenting to our events will be always a volunteering activity made by speakers who love teaching and being part of a community.

Least but not last, respect and humility are the foundation for every interaction between members. We love people who are passionate, enthusiast, willing to learn and we don't judge them based on their technical competence. Everyone is welcome and nobody should feel worried about it. 

From these principles, the ideal member emerge.

Who is the ideal member?
  • Passion for learning and self-development
  • Passion for .NET and Microsoft technologies
  • Actively contribute in sharing knowledge and experience
  • Open minded and curious about other technologies
  • Believe in the power of “learning by teaching”
  • Love to discuss and share opinions
  • Respect others regardless of their skills
  • Promote the community on social network

It's clear that a community is a win-win situations for all the members.


Now, the difficult part.... how to get content from members?

In my experience, it is really difficult to get people sharing and presenting.

The reason is that everyone of us (included myself) suffer from a disease.

The Impostor Syndrome


We believe other people knows way more than us and we are not feeling "good enough" to share and present at events. Reality is different! We should focus our mind to the picture on the right, our knowledge intersect with the knowledge of others and we have something to share with the world, our unique experiences and opinions. To stimulate yourself in sharing more, you should see this exercise from an egoistic point of view that is for growing yourself. At the end of the day, this is the reason why communities work.
Always dream and shoot higher than you know you can do. Do not bother just to be better than your contemporaries or predecessors. Try to be better than yourself.  
William Faulkner
The Knowledge Sharing Process

If you overcome the impostor syndrome, the knowledge sharing process is quite simple.



Do you want to be part of the community?


Participate to the online discussion on the Public Message Board (we collaboratively decided to use this board as our online social platform for now to see how it goes)

Follow us on Twitter @DotNetCambridge. (yeah DotNetCambridge is the short name of the community).

Volunteer to share your knowledge and be a speaker to one of our future events.

Thanks to Red Gate

Red Gate Software is our first and main sponsor. We are lucky enough to have a good equipped room to use for our events and food and drinks offered so that we can focus on delivering great content and be an awesome community. This helps is really appreciated and I'd like to thanks Red Gate for his amazing involvement in making this community a success.

Future activities


We decided to have regular Community Dinners where members get together for dinner to socialize and learn in a more informal way. The first community dinner is yet to be announced but likely to be in May.

We aim to become an official Microsoft Technical Community and get Microsoft as a sponsor. 


I am incredibly excited about the potential of this community and I am looking forward to see what's our members are going to share. Happy learning!

What our members say?







Tuesday, 10 March 2015

Goodbye DotNetToscana

I am a bit sad but it's time for me to step down as a staff member of DotNetToscana.

I co-founded DotNetToscana 7 years ago and since then the community grows a lot (even if honestly not exactly in the direction I wanted).

The main reason of my decision, is because I founded a new .NET community in Cambridge and I want to focus all my energies in making it a success. Secondly, I am now living in UK full-time and I don't have time to make an impact in Italian communities and actively participate in face-to-face events. Because of this, I am not contributing and getting value out of DotNetToscana anymore.

I'd like to thanks all the members of DotNetToscana that over the years helped me to grow a lot as a professional especially Matteo Baglini, Luigi Berrettini and Nicola Baldi. It has been a fantastic experience and I learnt a lot!

My wishes for DotNetToscana is to see more engagement of members on social networks and see interesting discussions. This will allow me as a member to participate to the discussions. I really hope to see this happening as this is for me the essence of a community.

I wish DotNetToscana the best for the future.

Andrea

Friday, 19 December 2014

Il tuo obiettivo per il nuovo anno? Entrare in Red Gate Software!

Guarda il video per scoprire cosa significa essere uno sviluppatore software in una delle migliori aziende software inglesi. Sono un italiano che 5 anni fa ha deciso di fare il grande passo e andare a lavorare in UK. Posso dire che e' stata una delle decisioni migliori della mia vita!

Vuoi lavorare con noi?
Per un accesso privilegiato, scrivi una mail all'indirizzo andrea.angella (at) red-gate.com



Friday, 12 December 2014

The pleasure of Down Tools Week

I have just arrived home.

It's Friday and an another Down Tools Week is ended.

I am writing this post to capture my feeling in this exact moment before my emotions disappear and I start to enter in the "Week End Mode".

I feel very tired. It was hard work but I am incredibly proud of what we achieved.

For the entire week, I didn't have meetingsI didn't check emails but I only focused on writing the minimum code that works in order to present something for the "Show & Tell" that usually happens on Friday afternoon.

The feeling during Down Tools Week is awesome.


Down Tools Week: feeling awesome
You are completely absorbed on the tasks at hand, in the most pragmatic way you collaborate and assign tasks between the newly formed team. You can feel a constant release of adrenaline. Even after work, you can't stop thinking about what you want and should do the following day.

The most intriguing thing is that even if I worked very hard and I ate very quickly just to be able to start coding and squeeze every minute, the time passed incredibly quickly. You don't feel the time at all, actually you fight against it.

This is what I define as "Fun", what I define as "Feeling a programmer" and what I define as "Feeling alive".

Surely my passion for programming amplifies these emotions.

Psychologists call this feeling "The Flow".
The FlowA mental state of operation in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement and enjoyment in the process of the activity.
I never worked with James and Peter before. Actually I never met them before in the company. In a week, I have learnt to work with them in a very effective way. I don't know if they feel the same way but I have to say that I am very impressed by what a team can do in a so short amount of time. It is fascinating to see what a bunch of people can do when time is given to them to do what they want.

The initiative is called Down Tools Week an integral and fundamental element of the culture of Red Gate where creativity is unleashed, people are empowered to learn together and create great things.

When I was young, I used to feel like this quite often. I coded games for my friends losing track of the time while I was doing it. This week remembered me those good days.

I'd like to thanks Red Gate to offer me the ability to feel in this way. I'd like to thanks James and Peter for helping me in developing further the idea of "Code Complexity as a service" (technical details will follow in a new post).

Above all, this week was seriously fun!

Monday, 27 October 2014

Webcast: Vuoi essere uno sviluppatore software in Red Gate (UK)?

Red Gate Ingeniously SimpleGiovedi' 13 Novembre 2014


Sede: 
evento online
Ora: 17:30 - 18:30
SpeakerAndrea Angella
Q/AJodie Pinkowski 

Red Gate Software produce "ingeniously simple tools" per professionisti e sviluppatori Microsoft in tutto il mondo. L'azienda e' principalmente specializzata in MS SQL Server, Cloud, .NET e Oracle con l'obiettivo di diventare leader nel Database Lifecycle Management (DLM), la componente database dell' Application Lifecycle Management (ALM). Sviluppatori e DBA saranno in grado di trattare database come ogni altra parte dell'applicazione adottando processi di sviluppo moderni, come continuous integration e continuous delivery, per rilasciare spesso e in modo sicuro.

Red Gate

Per raggiungere questo obiettivo ambizioso, Red Gate e' anche alla ricerca di sviluppatori software italiani.
  • Ti sei mai chiesto come possa essere l'esperienza di uno sviluppatore software in UK?
  • Sei alla ricerca di un ambiente di lavoro piu' stimolante e gratificante che possa veramente farti crescere professionalmente?
  • Sei alla ricerca di un migliore bilanciamento tra lavoro e vita privata?
  • Stai considerando la possibilita' di fare una esperienza all'estero?
Andrea Angella e' un italiano che lavora in UK da 5 anni e presentera' tutti i vantaggi di lavorare in Red Gate dando risposta a molte delle domande che un italiano si pone prima di compiere il grande passo. Durante l'intero webcast, la responsabile delle risorse umane, Jodie Pinkowski, sara' a disposizione per rispondere direttamente alle vostre domande (Only In English).



Friday, 25 July 2014

Database Unit Testing and Learning TSQL

Did you know that you can write database unit tests for SQL Server?

There is a framework called tSQLt that helps you to do it.

There is also a tool from Red Gate Software called SQL Test that provide a nice UI on top of it, integrated in SQL Server Management Studio.


What about using tests for learning TSQL?

I think that it is not unreasonable to design a TSQL course where each lesson is made of a set of tests that you need to make pass. This idea of learning by making tests pass is used in the nand2tetris course that I am doing with the friends of the Cambridge Programmer's Study Group.

In this post, I try to create an example using tSQLt.

The database I use is from the Training Kit: Querying Microsoft SQL Server 2012.

Installing tSQLt

First run the following SQL statements.


Execute the tSQLt.class.sql script provided by tSQLt.

Creating the test

First, you need to create a test class that we call Tests.


Then, we create a test.
The framework tSQLt allows you to create fake tables but in this case the test use the actual table HR.Employees and the actual data contained in it.


Running the test

You can run the test individually using the tSQLt.Run or alternatively you can run all the tests in the database using tSQLt.RunAll
You can also create a keyboard shortcut to run all the tests easily.

You can see that the test fail!


Make the test pass and learn

You can make the test pass simply adding the DISTINCT keyword in the select statement.  

Run the tests and they all pass.


I really like the idea of learning by making tests pass.

What do you think?


Monday, 7 July 2014

Enneagram Personality Test

I like psychological tests to learn more about myself.

Few months ago, I tried the Personality Type Indicator test.

Today, I did the Enneagram Personality Test that shows how you are balanced between nine personality types (called wings) and to see which one are the dominants.


It looks like I am pretty balanced with a preference of the Type 3 (The Achiever), Type 9 (The Peacemaker) and Type 1 (The Reformer).


What is your result?

Thursday, 5 June 2014

Secrets of Success from the Story of Bill Gates - Part 2

Persistence

Never give up there is always a way out. Do what you are supposed to do; it will lead to bigger opportunities along the way.

If you can make up your mind that you will not settle for less, you will not settle for less. You will keep right on going and you will achieve your goals and dreams. If you convince yourself nothing is impossible, nothing will be impossible for you.

Don't concentrate on how hard it is but focus on the reward and satisfaction you get by achieving your goals.

Always focus on the final outcome from the start, never lose that ability to focus. As the road gets harder, you get harder; as the road gets tougher, you get tougher; as the journey becomes difficult and seems like it’s impossible, just continue to focus and keep going and watch what will happen. The only true failure is when you give up and you stop moving on.

Reward your progress when you reach a milestone.

Bring your best to every situation; you may never know when your breakthrough opportunity presents it to you. Persistence always pays off. Don't take rejections to heart or personally, it’s only a normal process of taking out what is not good for you. Persistence takes action.

The most successful people in life are always persistent. Persistent people are often accused of being cold and heartless, but a careful re-evaluation shows this is not the case at all, they are simply singled minded in their pursuit of their own personal destiny.

Wednesday, 4 June 2014

Secrets of Success from the Story of Bill Gates - Part 1

This is an very inspiring and motivational book: Secrets of Success from the Story of Bill Gates.

Bill Gates is a person that always inspired me and continue to inspired me. 

Bill Gates built Microsoft from scratch – he created the single most influential technology company of our modern age, and it made him so wealthy that he is now able to focus on the eradication of poverty and disease through the work of his charity foundation.

In 1994, Gates and his wife Melinda founded a charitable organisation called the Bill and Melinda Gates Foundation which supports initiatives in global health and education. The aim of the foundation is to eradicate poverty, disease and illiteracy from the world.

Bill Gates has received numerous international and national accolades, and honorary doctorates from the Royal Institute of Technology, Stockholm, Sweden in 2002, Waseda University, Tokyo, Japan in 2005, Harvard University in June 2007, and other universities. He was also made an honorary Knight Commander of the Order of the British Empire (KBE) from Queen Elizabeth II in 2005.

The book describes the key elements of  the history of the Bill Gates but he also introduce a lot of examples from other great people who are equally inspiring.

Tuesday, 3 June 2014

Learnings from software development coaching sessions

Back in November 2013 I wrote a post sharing with you my decision of being mentored by a friend and agile coach Matteo Baglini with the goal of exposing myself to agile engineering practises and become a better developer.

At the time, I promised to write posts about my learning but ultimately I didn't. So, it is time to start now!

First of all, I wish to thanks my manager Dom Smith in Red Gate Software to offer me the opportunity to have these sessions during working hours. This really offers me the ability to have sessions regularly every week.

In this post I will condensate the learning of the last few months of mentoring with links to the various resources that I read since then.

We started discussing TDD and the approach described by Kent beck:
  1. Write new code only if an automated test has failed
  2. Remove duplications
Duplication is the most important code smell and it can be hard to see. For this reason, sometimes it is useful to write verbose code just to help you find duplications.

I did the full Money example in the book TDD By Example exactly how Kent did it (with few changes as I did in C#) and deeply reflected on each step. I spent a full day to do it but it was worth the effort.

Learning well a refactoring tool like ReSharper is very important. However it is important to consider that the biggest advantages of a refactoring tool is not merely productivity:
  • Avoid the human error
  • Remove the context switch between using keyboard and mouse
  • Shorten the feedback loop by decreasing the time needed to refactor a piece of code
  • You can answer quickly questions like: Is the new design better?
Doing a kata multiple times without changing the solution to just focus in how you code and use refactoring tools is a very useful technique.

Here is a collection of very useful advices:

  • Check the error message when a test fail
  • Run tests often
  • After a refactoring run the tests
  • Avoid copy & paste as much as possible
  • When you find something to do, don't stop your current task. Add a note and do it later.
  • Don't stop the flow only to rename a method or a property! Add a note and do it later.
  • Primitive obsession can be often removed by introducing Value Objects
  • Sometimes you can add a test and comment it out in order to do necessary refactoring
  • Don't be too confident! Always use tests to validate what you are doing
  • Keep tests as stupid as possible. Limit test logic as much as possible!
  • In case of regression (red bar) never change test logic otherwise you won't know what was right
  • If you lose control, just slow down or discard changes and restart
  • Don't restrict yourself in a Top Down or Button up approach.
  • The code guides you. TDD is a feedback tool.
  • Consider adding code even if it is not strictly required to improve readability or simply to add symmetry
  • Some tests are simply tests to support you during development. You can remove them when other tests cover the same functionalities. Don't be afraid. 
  • Consider the "Copy Type" ReSharper command
  • The production code tests the tests!
  • Extract Method is a powerful refactoring tool
  • It is sometimes useful to make a private internal method public just for the sake of temporary writing unit tests but don't submit that code! Use it only to increase your knowledge about the problem.
  • Learn how to do small steps when needed.
  • A test is done only when duplication is eliminated!
  • Consider writing a test to force the creation of an object that we expect to need late but attention of not doing upfront design
  • Relying on the compiler can be a useful technique
  • If it takes a lot of time to make a test green... reflect!
  • Prefer static methods to factory classes when implementing the factory pattern
  • Getters are smells. Pay attention to not use objects as mere data structure.
  • Resist the temptation of not creating new classes... try, get feedback and see!
  • Observe the frequency of change. Change should be distributed among classes.
  • Use the Single Responsibility Principle to see pattern of change
  • The class who own the data should do the operation: Tell, Don't Ask!
  • In designing API it is best to offer a single way to do something. Make it simple!
  • Use the history in SCM to get insight about your project
  • Analyse temporal correlation of class changes
  • If you feel that something is annoying in the code base that is a sign of poor design.
  • Remain at the same level of abstraction within a test
  • Write a high level test and when you see the need to cover a lot of cases go down of one level of abstraction and write more specific unit tests.
  • You will often be pushing tests up and down between different levels of abstraction
  • Remember to not look inside the object when you do testing even on individual classes! Test the behaviour so that you can easily change the instance of the class with a new class but keep the tests intact.
  • Do not use TDD as a way to get permissions to write production code (that is cheating).
  • Do not be too enthusiastic about new technologies or methodologies. Slow down and reflect. There will be always a hype and later a fall. If you are pragmatic you can fall less.
  • Consider writing the assertion first

The essence of object orientation is thinking about behaviours

TDD test are always behavioural and at different level of abstraction. TDD can be done at different levels of zoom: it is sort of a dance between them. Unfortunately TDD has been often misunderstood and even attempts were made to fix this with ATDD and BDD. But these methods have often been identified with tools and things like Cucumber only create a new layer without bringing much value: having the on-site customer is far better than executable requirements that are a dream.

Pair programming helps a lot to keep focused and the role of navigators is supporting drivers in maintaining discipline and avoiding distractions

I and my mentor discussed many times about the Theory of Constraints and the importance of identifying bottlenecks in order to remove them. It is quite interesting to note that also humans can be a bottleneck and therefore an issue that can be addressed by increasing sharing. This can be done both with pair programming or with the Expert in Earshot pattern.

Quotations:
I never known exactly how to achieve high cohesion and loose coupling regularly until I started writing isolated tests, Kent Beck
I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence (I suspect this level of confidence is high compared to industry standards, but that could just be hubris). If I don’t typically make a kind of mistake (like setting the wrong variables in a constructor), I don’t test for it. I do tend to make sense of test errors, so I’m extra careful when I have logic with complicated conditionals. When coding on a team, I modify my strategy to carefully test code that we, collectively, tend to get wrong. Different people will have different testing strategies based on this philosophy, but that seems reasonable to me given the immature state of understanding of how tests can best fit into the inner loop of coding. Ten or twenty years from now we’ll likely have a more universal theory of which tests to write, which tests not to write, and how to tell the difference. In the meantime, experimentation seems in order. Kent Beck
Resources:

Monday, 2 June 2014

Stored Procedure to Calculate Expressions

I was reading the section Character Functions in the Chapter 2 of the book Querying Microsoft SQL Server 2012 and pretty soon I get bored of trying individually the various functions on strings available in T-SQL.

Then, I challenged myself to write a stored procedure (this is my first one) to evaluate an arithmetic expression with parenthesis and show the individual steps of the calculation. I wanted something generic but I added some restrictions to it after seeing how crazy is to implement a split function in T-SQL.


This is the stored procedure. I know, it is crazy and I am sure there are much better way of doing it. Remember that my goal was to just get confidence with the T-SQL functions on strings. Anyway, I am happy to receive feedback on it and see different way of implementing this behaviour.


This is the result of the execution.


It was fun :)



Friday, 30 May 2014

My Personal Brand Survey Results (2014)

In the last few years, I read some books about personal branding and pretty much all of them highly recommend to take an anonymous 360 degrees surveys in order to understand how people perceive you.

For this reason, I decided to give it a go and try.

After a little bit of research I decided to use the 360 Reach platform. The survey is completely free for 15 days but I decided to pay for a premium version in order to get more results and a detailed report out of it.

In this post I am going to share with you the most interesting results.

Wednesday, 28 May 2014

Preparing for Querying Microsoft SQL Server 2012

Few months ago I joined Red Gate Software and I am having a lot of fun so far. We have a great team in SQL Compare and we are working hard to add support for SQL Server 2014.

I think that learning more about SQL Server is very important because a lot of Red Gate products are designed to make DBA and developers working with it in a very productive way.

This is why I decided to start the path toward becoming a MCSA on SQL Server. To be honest, as a developer, my goal is just learning more about SQL Server and not necessarily get certified. However I will use the certification materials as a clear path to increase my knowledge.

The first exam on the list is
[70-461] Querying Microsoft SQL Server 2012

I know SQL and I have studied database development and design at University. However I don't know much about SQL Server specific features and the incredible power that the platform can offer. 

In order to keep me motivated I will post on my blog all the things I found interesting during my learning.

The following is a list of all the resources I will use to prepare for this exam:

It's time to write SQL :)

Tuesday, 27 May 2014

Growing Object Oriented Software, Guided By Tests

Few weeks ago I finished to read the famous book
Growing Object-Oriented Software, Guided by Tests

In this post, I try to summarize what I think is the most interesting content.

The book present the interesting approach of starting a new project with a Walking Skeleton that is a tiny implementation of the system that performs a small end-to-end function
The point of the walking skeleton is to help us understand the requirements well enough to propose and validate a broad-brush system structure.
In most Agile projects, there’s a first stage where the team is doing initial analysis, setting up its physical and technical environments, and otherwise getting started. This is usually called Iteration Zero.


Friday, 23 May 2014

Top 10 Debugging Tips in Visual Studio 2013

I watched the "Debugging Tips and Tricks in Visual Studio 2013" session from TechEd and I found some very interesting debugging tips I was mainly unaware of.

Run to Cursor (CTRL + F10)

Run the debugger and stop in the location of your cursor. This allows you to debug your code from a particular location without the need to set a breakpoint. This is useful because often people create breakpoints but forget to remove them and the debugging becomes very slow.

F11 
You can start your application and automatically break at the first line of code. This avoid you to manually find the entry point of the application.