Good communication with Development Teams

Good communication is essential for any successful development manager.

Without it, projects can be delayed, teams can become disorganized, and morale can suffer. As a development manager, it’s your job to ensure that your team is communicating effectively with one another, and that everyone is on the same page.

Here are some tips to help you communicate with your employees more effectively:

1. Be Clear and Concise: Make sure that your messages are clear and concise. Avoid using jargon or technical terms that your employees may not understand. If you need to explain something in detail, make sure to be as thorough as possible.

2. Listen: Listen to what your employees have to say. Ask questions and encourage them to share their ideas. This will help you to understand their perspective and provide feedback that is tailored to their needs.

3. Set Expectations: Make sure that everyone on your team knows what is expected of them. This will help to ensure that everyone is on the same page and working towards the same goal.

4. Provide Feedback: Provide feedback to your employees on a regular basis. This will help them to understand what they are doing right and what needs to be improved.

5. Encourage Open Dialogue: Encourage open dialogue between yourself and your employees. This will help to foster a sense of collaboration and trust between you and your team.

6. Be Respectful: Respect the opinions of your employees and be patient with them. This will help to create a positive working environment and ensure that everyone is comfortable speaking up and sharing their ideas.

7. Show Appreciation: Show your employees that you appreciate their hard work and dedication. This will help to motivate them and make them feel valued.

 

By following these tips, you can ensure that your team is communicating effectively and working together towards a common goal. Good communication is essential for any successful development manager, so make sure to take the time to foster it in your team.

[C# 7.2] Readonly Structs

Lets look at some new features recently release with the C# 7.2 minor releases, I will explain what it was trying to solve and how.

A bit of background, with structs in C#, its possible to expose public properties as well as setting private properties, the example below shows its structure:-

public struct Document
{
public string Title { get; set; }
public string Author { get; set; }

public Document( string title, string author )
{
Title = title;
Author = author;
}

public void ChangeDocument(Document newDoc){
this = newDoc;
}
}

 So from this we can see that it causes the struct to be in a mutable state whereby we allow the public properties to be modified using the "this" key.

Moving for a more immutable solution we can leverage the new C# 7.2 feature and decorate the struct with readonly.

public readonly struct Document
{
public string Title { get; set; }
public string Author { get; set; }

public Document( string title, string author )
{
Title = title;
Author = author;
}

public void ChangeDocument(Document newDoc){
this = newDoc;
}
}

 This will cause a compile error with the this keyword as a result.

The code can then be shortened to refactor towards immutability as follows:-

public readonly struct Document
{
public string Title { get; set; }
public string Author { get; set; }

public Document (string title, string author)
{
Title = title;
Author = author;
}
}

 

So in the usage in the code, it can be updated from:-

var doc = new Document();
doc.Title = "SomeTitle";
doc.Author = "SomeAuthor";

to:-

var doc = new Document
{
Title = "SomeTitle",
Author = "SomeAuthor"
}

 

So with this new change, it encourages developers to program with immutability in mind and even though the default parameterless constructor is still available, readonly will cause a compile time error.

 

What is the difference between PUT, POST and PATCH?

Here are the main differences everyone should know with your Http Verbs.

HTTP POST

Should be used when sending data to the server for newly created resources.

Example:-

POST /test/create HTTP/1.1
Host: jonbock.com
name1=value1&name2=value2

Response:-

  • 201 (Created)
  • 200 Ok
  • 204 No Content

Ensure that POST

  • Are not cached on the client or server side, each call will result in a attempt to create the resource
  • Requests have no restrictions on data length

 

 

HTTP PUT

HTTP PUTs should be idempotent when used to create/update a resource, this means that each call should result in the same result occurring. The main difference between PUT and POST is that POST could result in side effects when called multiple times.

Example:-

Response:-

  • 201 (Created)
  • 200 Ok
  • 204 No content

 

HTTP PATCH

HTTP PATCH is used to update partial entity, it is usually used to send one or more changes to the server to be applied.

Example:-

HTTP PATCH /users/1

[
     { “op”: “replace”, “path”: “/email”, “value”: “[email protected]” }
]

Response:-

  • 204 No content