Thursday, April 25, 2019

The one certainty I have about open source software

Photo by Hanny Naibaho on Unsplash

This is the short version of something much longer I have been thinking about.

Many things are currently being said about Open Source development, its maintenance, and how people who contribute towards it are supported.
It's a big, complicated subject with lots of strong opinions and no easy solutions.

I do, however, think there's one simple thing that anyone who uses open source software can do to help.

Say Thank You.

How do you say thank you?
Here are a few ways:

  • Send them a thank you tweet or email.
  • Leave a review or rating in the store/marketplace/repository where you got it from.
  • Donate, if/where appropriate.

Here are a few links to a few of the places you may be getting the results of the hard work of other developers.
Visual Studio extensions | VS Code extensions | Azure DevOps extensions | NuGet | Chocolatey | NPM

Help make open source developers feel happier and more appreciated by finding something you use at one of the links above and saying thank you.

You benefit too. Being grateful makes you happier. Harvard medical school say that's the case so it must be true.


Have you thanked an open source developer today?

Tuesday, April 23, 2019

Can I put the best parts of a user group/meetup in a podcast?

tldr: I'm going to start a new podcast that will just be developers talking about what they've developed. If you want to be on it get in touch.

----

I organized and ran user groups for the best part of ten years. Firstly, I took over DevEvening, and then I started the Windows Phone User Group which eventually became Windows Apps London.

Of these groups, one of the things I was most proud of was the ability to get regular attendees to talk about what they were working on or had built. Many group organizers will tell you that this can be very hard to do.
Having people talk about their actual experiences was also one of the most requested things whenever I asked attendees about what they wanted at future meetings.

My family circumstances changed a couple of years ago and we now live in a remote area that makes hosting in-person user groups/meetups difficult. However, recently, I've been thinking about how I can take some of the best parts of the groups I used to run and do something that would work regardless of location.

So, I'm going to try this:
I want to take the short, simple demos that were so popular at in-person events and create audio versions of them and package them like a podcast.

Yes, a visual format might be better for some things but I'll start with just audio and maybe extend to video in the future based on feedback.

It will be simple.
For many people, standing up and giving a talk can be daunting. I made it simple by asking the speaker to answer three questions:

  1. What have you built?
  2. Why did you build it?
  3. What did you learn in the process?

I'm hoping this structure will work for a podcast/audio version too, as it's simple but provides opportunities to develop in different ways as appropriate.
As with the short demos people used to give, it will be between 5 and 15 minutes long. Anyone can talk about what they've made for 5 minutes and will easily find they can say much more.

Talking for 5-15 minutes about something you are an expert in is easy. (If it's software that you developed, I consider you an expert in it.)
I'm also hoping this will avoid people being put off by not requiring a lot of preparation or being worried about "filling an hour".

If you've developed something, however big or small, other developers want to hear about it.

Expect lots of links in the show notes.

For now, I'd like to just focus it to Windows. Hey, it's what I know a bit about and having a level of targeting/focus will, hopefully, help with finding an audience and setting appropriate expectations.

If you've built something for Windows (however you define that), be it an app, a tool, a library, a service, or something else and would like an opportunity to tell people about it, then I'd love to have you on my new podcast.


Tuesday, January 22, 2019

Tuesday, November 27, 2018

This is a test - a big, complex test

Duration: 3:46:04 - 96 Tests Failed - 24 Tests Passed
Before
Duration: 2:27:27 - 30 Tests Passed
After
It's not a fun place to start.
After creating a series of tests (120 in total), only 24 passed and it took 3 hours and 46 minutes to run.

No, these aren't simple unit tests. Something would be very wrong if they were.
These are complex integration, end-to-end system tests.

These tests relate to Windows Template Studio and verifying that apps generated with different frameworks (CodeBehind, MVVMBasic, MVVMLight, Caliburn.Micro, and Prism) all produce the same output.
I already have separate groups of tests which check equivalent apps created in C# and VB.Net produce the same result.
I also have tests which compare functionality and output at a passive, static level but I suspected there was potential value in running the generated apps and checking them too.

When creating templates, the MVVM Basic version is usually created first, so this became the reference version.


Here's what each test does:

For each navigation type and page that can be added to the app:

  • Generate an app with the reference framework, specified nav type, and just the specified page.
  • Generate apps with each of the other frameworks using the same nave type and page.
  • Disable .NET Native compilation for the projects. (So they build much faster--the tests would take much much more time without this.)
  • Build the release version of all the apps (using the created certificate.)
  • Install the temporary certificate created with the app and used to sign it.
  • Install the generated apps (Must be a signed, Release version for this to be possible. --This is the equivalent of what VS does when deploying/running a version for testing.)
  • For each of the other frameworks.
    • Create a new test project.
    • Update the project to have references to the reference app and the comparison app.
    • Run the tests in the test project. They:
      • Launch the ref app.
      • Maximize the app once opened.
      • Take a screenshot.
      • Restore the app size.
      • Close the app.
      • Launch the comparison app.
      • Maximize the app once opened.
      • Take a screenshot.
      • Restore the app size.
      • Close the app.
      • Compare the screenshots (allowing for areas that will be different--like the app name in the title bar--and running on different size screens and system scaling.)
  • If all screenshot images are identical.
    • Uninstall the apps.
    • Remove the certificates.
    • Delete the apps and test projects.
  • If screenshot images are not identical.
    • Create an image highlighting the differences.
    • Leave all artifacts created during testing to help investigate why the test failed.

See, not a simple test.

Originally I had separate tests for each comparison but changed to the above approach to reduce the number of times the reference app needed to be created. The details in the failure message meant that having separate tests didn't help with debugging at all. Also, the ability to run individual tests and customize the reference frameworks meant that I could avoid unnecessary work when verifying specific fixes.

The good news about all this work is that it did find some issues with the generated projects and fixes have been made.

Having known test suites that take more than 5 days to run in their entirety, I have strategies for managing long-running test suites. Running all the tests in this solution takes over 18 hours, but the long-running ones are only run manually before a release and many can are normally run in parallel.

No, we don't run all the tests, all the time.

A notable extra lesson from these new tests was that page layouts behave differently for an app that is opened and then maximized and apps that are opened maximized. Seriously. It's potentially concerning but I have more important things to focus on right now.



Thursday, November 15, 2018

Diversity in tech is about more than gender

It's about a lot of things.
In the context of diversity within tech communities, here are two that I'm not hearing other people talk about: technology discrimination and alcohol.

Do you like my new T-shirts?

It's not about the technology used but what's done with it that counts

If you want to be part of a group of people that are just like you: who have similar experiences, interests, areas of technical focus, and goals, that's okay.
However, I think everyone benefits when a community is open and inviting to people with different backgrounds, interests, skills, and experiences. When there's variety in the room it provides the opportunity for us all to learn new things.

We all benefit when we are exposed to others who are different to us. It makes us better developers and better people.

If you want a community to grow. If you want new people to learn and adopt a technology so it becomes successful that requires that you help new people and make them feel welcome.

You mustn't make fun of people because of the programming language they currently use.
They may have had no say in this. They may be very successful with it and have created many popular, loved, and financially rewarding pieces of software with it. The programming language used to write a piece of software rarely plays a large part in the success or failure of that software. Don't pick on people because they use something that's older than what you use or that you have stopped using.

Do not make fun of people because of the platforms they build tech on.
Again, developers rarely have a say about the platforms they use, particularly in corporate environments. If developers only worked on the latest platforms or used the latest frameworks then the majority of software in the world wouldn't be being maintained or updated. If we want to keep society moving we can't abandon all old software and we can't constantly re-write everything that's in use.

I've seen the numbers. Most developers don't use the latest and greatest technologies or the hottest new language.
If you do, then congratulations. How about sharing your knowledge with others who haven't had that opportunity yet? Help them learn new things. Even if that means you have to help with "older" technologies.


Alcohol and a drinking culture

Not everyone wants to or can drink alcohol. Some people are unable to be around alcohol.
Even if someone who doesn't drink alcohol is in a place where alcohol is served they don't want to be made to feel different or left out.

As a user group organizer, I found people were really positive when we had more than just a small selection of beers to drink. More people were even more positive when I extended the range of soft drinks that were provided. When organizing an evening user group event and providing drinks, I now do one third as a mixture of alcoholic drinks, one third as soft drinks, and one third as fruit juices. Fruit juices were amazingly popular when we first started having them.

When holding evening events in offices or meeting rooms I'd often propose going to a bar afterward. This choice of location was chosen because it was easy and pretty much the only location available. Plus, "it was just what you do." I have the cultural experience where going to a pub to socialize is the norm. However, only a small percentage of people who came to the initial meeting would also come to the pub afterward. There are many reasons for this but I believe the location was one of them. Next time I run an evening event where we can't stay in the meeting venue indefinitely, I'll look harder for alternate locations where we can continue discussions afterward.

I don't drink alcohol. I choose not to based on past experiences and my levels of self-control. Other people don't drink alcohol for other personal or religious reasons.
I'm happy to be in places where alcohol is served and drunk. There are people who are not. Again, this could be for personal, religious, or other reasons. If you host an event involving alcohol it will automatically keep some people away. If an event is about technology, why use something unrelated (alcohol) to keep a large number of potential attendees away.

I've been to a number of events where the presence of alcohol made me (as a non-drinker of alcohol) seem less welcome.

  • I was at a conference party with multiple bars serving alcohol. There was only one serving soft drinks. I discovered this as I went round all the bars asking for soft drinks and it was only the last one I came to that had anything. The options were limited and hidden at the back while multiple alcoholic beverages were on display on the counter. The message I took from the conference was that my needs as an attendee were not important.
  • I was invited to an event where special, custom, themed, cocktails were being served. This was a tech event and the cocktails were free. I asked what non-alcoholic drinks they had but these were very limited and I had to pay (an unusually large amount) for a coke. The message I took from this was that this was an event for people who drank alcohol. Even though I'd been invited they didn't value me as much as other attendees.
  • I once attended a tech event in a bar and the only soft drink they had was coke. I was looked at like there was something wrong with me when I asked if they had any other non-alcoholic drinks. Just drinking cola all night can be unpleasant. Ensure there is more than one non-alcoholic option and don't make people feel uncomfortable if they don't want alcohol.
  • I've known tech events where the social aspect was a bar-crawl. Events that encourage lots of drinking (even if that's just implied by visiting lots of different places that serve alcohol) discourage some from attending. 
  • I've been at invite-only tech events where the social aspect of the event was beer and spirit tasting. Again, this is actively excluding people from something that was supposed to be tech related.
  • I've been to a tech event held in a brewery. A great way to exclude people who can't visit such locations.


I know it's hard to find locations for events. I know it's the norm to do these kinds of events. I know I may seem hypocritical for saying this as I've held events in pubs and bars.
However, if you reward or recognize people in your community with alcohol or events involving alcohol then you make people who don't drink alcohol or actively avoid it less welcome in your community.

If you're a leader or organizer and you want to grow your community (both in numbers and diversity) I hope you'll think about this.

Personally, I'd love to organize and attend more meetups in coffee shops and learn from people who use technologies I don't.