Attach to Process

Thoughts and Notes on Software Development

Interesting read on “the Spotify model”, why Spotify themselves don’t use it and neither should you.

While Spotify gave teams control over their way of working, many people did not have a basic understanding of Agile practices. This resulted in teams iterating through process tweaks in blind hope of finding the combination that would help them improve their delivery. People lacked a common language to effectively discuss the process problems, the education to solve them, and the experience to evaluate performance. It was not really agile. It was just not-waterfall.

Huh, this seems awfully familiar.

When Agile Scrum introduced new meanings to a bunch of words like burn-down and sprint, it did so because it introduced new concepts that needed names. Spotify introduced the vocabulary of missions, tribes, squads, guilds, and chapter leads for describing its way of working. It gave the illusion it had created something worthy of needing to learn unusual word choices. However, if we remove the unnecessary synonyms from the ideas, the Spotify model is revealed as a collection of cross-functional teams with too much autonomy and a poor management structure.

When I first learned about “the Spotify model”, I loved the idea of getting to work in a tribe, squad or guild. I thought it sounded pretty cool. I bet it appealed to most developers who've played MMOs before.

Link: Failed #SquadGoals

Tags: #Bookmarks #Agile #SoftwareDevelopmentManagement

Discuss... or leave a comment below.

I was playing around with Visual Studio 2019 and the open source ASP.NET Core blog engine Miniblog.Core. I cloned it to my local, opened it in Visual Studio 2019 and tried to build the solution. I immediately ran into the error below:

Error CS8630 Invalid 'nullable' value: 'Enable' for C# 7.3. Please use language version '8.0' or greater.

So, I looked up the error message and every Stack Overflow page I ended up on, says that I have to set the Language Version in Visual Studio. Okay, so how do I do that? I eventually found this answer, which gives you the steps to get to the Advanced Build Settings dialog box for the project.

  • Right-click YourProject, click Properties
  • Click Build if it's not already selected
  • Change Configuration to All Configurations
  • Click Advanced...
  • Change the language version

When the dialog box showed up however, it didn't give me an option to set the Language Version.

Visual Studio 2019 - Advanced Build Settings

Solution

The solution I ended up with involved manually editing the project file and adding an entry for the Language Version. So, I opened up the Miniblog.Core.csproj file and added <LangVersion>preview</LangVersion> under the <PropertyGroup> settings. It looks like this:

Setting the Language Version manually

Tags: #DotNet #VisualStudio #MiniblogCore

Discuss... or leave a comment below.

Updated: 4/26/2021

Coney complained to me this morning that the YouTube videos on my latest music log entry were getting cut off when viewed from her phone. I've known about this issue for awhile, but didn't really try to find a solution for it. Well, today I did and it turns out to be really easy.

The issue stems from the fact that I have to use iframes to embed videos on write.as sites. To make the YouTube videos I embed on write.as sites responsive, I simply followed the instructions from this Responsive Youtube Embed post. Specifically, these are the changes I added to my journal.

Read more...

If it ain't broke, don't fix it.

The most important software development principle that everyone should be following is “If it ain't broke, don't fix it.” I know, I know, it's not really a principle coming from the realm of computer science or software development, but it should be. Adhering to this sage life advice is just as beneficial when writing code, as it is in everyday life. Forget about trying to master the five SOLID design principles if you can't even follow this one.

If you're constantly trying to fix stuff that wasn't broken to begin with, you're in for a lot of headaches in your software development career. Not to mention, headaches for other developers in your team. If you find a piece of code that is working, that is not causing bugs, that is not causing performance issues, you best leave that piece of code alone.

Tags: #SoftwareDesignPrinciples

Discuss... or leave a comment below.

I was reading this article about Xamarin and Swift when I noticed this useful piece of information at the end:

If Swift continues to take the iOS world by storm, more such documentation may be needed. The February 2020 TIOBE Index, which measures programming language popularity, shows Swift at No. 10, having moved up a full 10 positions from the February 2019 ranking, making it the biggest mover in the top 20. C#, used for Xamarin coding, is at No. 5, moving up from No. 7 last year.

Interesting. That bit of info led me to this, the TIOBE Index.

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system.

I see this as a very useful tool for software developers, not just in figuring out what programming language to use when building a new application, but also in figuring out what programming language to learn or focus on to improve your career as a software developer.

I'm glad to see C# making its way up on the list. I thought Python would be on top, but I guess Java is still too popular nowadays. Also, I keep reading about Rust in the dev blogs/websites that I follow. I wonder when it will break into the Top 20 list? Either way, I think this index is a good list to keep our eyes on as software developers.

Tags: #Bookmarks #ProgrammingLanguages

Discuss... or leave a comment below.

This is a great resource for anyone who wants to get started with C# and .NET Core.

Link: Hundreds of practical ASP.NET Core samples to learn the fundamentals

Tags: #Bookmarks #AspDotNet #DotNet #DotNetCore

Discuss... or leave a comment below.

In this post, I'll share my thoughts regarding the use of the Single Responsibility Principle based on my experiences with it.

The Single Responsibility Principle is one of the five design principles listed in SOLID. Gary McLean Hall in his book “Adaptive Code via C#” says,

“The single responsibility principle instructs developers to write code that has one and only one reason to change. If a class has more than one reason to change, it has more than one responsibility. Classes with more than a single responsibility should be broken down into smaller classes, each of which should have only one responsibility and reason to change.”

It is my favorite principle out of the five because of two reasons:

1. Easy to Implement

First, it is very easy to implement. You don't have to be an experienced software developer to start implementing the single responsibility principle in your code. All you need to keep in mind when writing code for a new class or sometimes even a method is, this block of code should be responsible for only one thing.

Are you writing code for a class to parse text files? Then make sure all the code in that class is oriented towards parsing text files. Are you writing code for a class that is supposed to send email notifications? Then keep the code focused on sending email notifications.

2. Better Code

Second reason is that it will always make your code better. Better in the sense that it helps decouples your classes/methods, which reduces the potential for bugs when refactoring code. This in turn also makes your code easier to test. In my experience, I have never seen code that was made worse by implementing the single responsibility principle.

Drawbacks?

The only argument or drawback I've heard to the use of this principle, is the possibility of increased maintenance of the code. Since each class is responsible for doing only one thing, you could end up with a lot more classes, methods, files and projects in your solution. Still, in my opinion, that is preferable if it means I have stable code that is less prone to bugs, than to have code that is low maintenance but is susceptible to bugs.

There is also the chance that a developer will try to implement this principle on a very simple app that doesn't need to change after it's been written. In this case, trying to implement the single responsibility principle will probably take more time and add complexity to the code. (I haven't exactly ran into a situation like this with this principle, but I think that's a possibility.) Sometimes you will have to pick and choose where and when to implement this principle, and that can only come with experience.

Example

Let me go through an example where I think the use of the single responsibility principle would help.

Say you have a business rule that needs to be implemented for various products. Say that Product A, B and C all use this business rule. One thing I've seen in my experience is that if the business rule logic is similar between Products A, B or C, some developers will opt to create just one class to implement the business rule for all products. Again the argument here is that since the business logic is the same, it is easier to maintain just one class for the specific business rule. Okay, fair enough. As long as the business rule doesn't have to change between any of the products, having one class/method for the business rule is acceptable. It is in violation of the single responsibility principle, but if the business rules won't ever change, then it is an acceptable implementation.

But what if the business rules does change for one product, say for Product C? Now you'll have to modify the one class that all products use, to accommodate changes for just one product. What this means is that while working on the new changes, you have an increased chance of introducing bugs to the rest of the products. This also means that any changes to that business rule for any one product, means you have to perform testing for all other products affected by the changes. That is extra work that could have been avoided by following the single responsibility principle.

Now what if you have to add new products that will also have the same business rule, except the new products have slightly different business rule logic in them? Will you modify the existing class to accommodate changes for the new products? If so, you'll run into the same issue above. Adding new products will almost feel like a way to introduce bugs to your code. You can avoid that by following the single responsibility principle.

With the use of the single responsibility principle, each product would have one class that implements a specific business rule. Any changes to the business rules for one product, will not affect the other products. Which means going forward, you only need to worry about testing the changes for the products that changed or the products that were added. Everything else should keep working the same way they've been working before. Stress free coding with minimal chances of introducing bugs, just the way I like it.

Tags: #CSharp #DotNet #SolidPrinciples #SoftwareDesignPrinciples

Discuss... or leave a comment below.

Update 4/23/2021: The write.as team has introduced some rate-limiting features on their API to combat spam bots. That stopped this Glitch app and my other Blazor WASM apps from working.

I created a Glitch App that displays the most viewed posts on my online journal. I embedded it on my About page. Just to show how easy it is to embed a Glitch app into a Write.as post, I embedded it at the bottom of this post too. For more information on embedding Glitch apps into posts on Write.as, look here.

Read more...

Update 4/23/2021: The write.as team has introduced some rate-limiting features on their API to combat spam bots. That stopped this Glitch app and my other Blazor WASM apps from working.

Took me a couple of days, but I got my journal search page up and running. That was a great learning experience.

If you want to remix my search app, you can find it here. If you want to remix the original Write.as Search app, you can find it here.

Prior to creating a Write.as blog, I've never even heard of Glitch. Below is a list of notes and references I've made while trying to get my search page working.

Read more...

The most convenient way it seems to get .NET Core 3.0 installed on a Windows PC, is to download the free Microsoft Visual Studio 2019 Community edition. Installing Visual Studio 2019 will also install .NET Core 3.0 and after the installation is done, you can start playing around with it.

If you want to download the SDK or just the runtime separately, you can find them here.

To check if you already have .NET Core 3.0 installed, you can pull up a Command Prompt and run the dotnet --version command.

Lastly, if you're trying to learn ASP.NET Core like I am, this recommended learning path seems to be a good starting point.

Tags: #CSharp #DotNetCore

Discuss... or leave a comment below.

Enter your email to subscribe to updates.