Andy Crouch - Code, Technology & Obfuscation ...

Station & Notion

Photo: Ilya Pavlov - Unsplash

I was getting frustrated with some of my daily workflows recently. I found that I ended up with a large number of tabs running for the various web applications I use daily. Web applications, research and articles meant it was not unusual for me to have over 30 tabs open each evening. This is compounded by having personal and work accounts. I have also been a long-time Evernote user and have found issues with it’s Windows desktop app that irks me. Decreased speed, constant upgrade popups and new version reminders. I have long felt like as a product it had stopped innovating but couldn’t find anything to replace it.

In the space of a week, I came across two apps that have transformed my workflow. They are Station and Notion. How I didn’t know about either before now is frustrating.

Station is an Electron-based application. It aims to be a smart browser which can house your web applications. It allows you to add your web applications from its marketplace. A “Smartdock” to the side of the application handles the organisation and fast switching of applications. You can sign in to multiple accounts for the same web application and Station provides a way to switch between them. It also provides a way to save pages and bookmarks within a web application using sub-menus. I have seen a few applications that claim to do this but none of them is as polished and useful as Station. I love the fact they have a community section built-in which allows you to request and vote on features and get help from other users. Its killer feature is the consistent approach it applies to web applications. The way it will handle opening the right application based on links and other metadata is brilliant. If a link is to an app you don’t yet have installed it automatically installs it from its market place and asks you if you want to keep it. Easy seamless integration. I love it.

Given that I have switched to i3 as my window manager this allows me to group all of my apps in one container on one workspace. Before the Electron haters start hating I have noticed that Station uses very little resources. It does have a built-in indicator to show if it’s dominating your processor.

The second application I have adopted is a replacement for Evernote. Only it’s not just a replacement for Evernote, it’s also a replacement for a lot of web applications. Notion states it is an “All-In-One Workspace” that allows you to write, plan, organise and collaborate. It really does!

Not only can you create notes which mix rich content types Notion allows you to create and manage:

  • Full blow documents
  • Knowledge bases
  • Databases
  • Kanban-style boards

and much more. It provides templates for lots of the above to help you capture your thoughts and plans. It provides desktop, mobile and web applications across all OS’s. It is so rich in features I don’t think I have even scratched the surface. I have migrated my Evernote content to Notion and my Trello content. The bonus for me with Notion over Trello is configurable reminders on tasks.

The great thing with Notion is that it allows you to create workspaces. These can have public and private sections and can be collaborated on by teams. For a new project I am working on I have a wiki, project documents, a Kanban board and contacts database all set up in a workspace with several collaborators.

Notion starts free but provides a good set of features for $4 per month.

Both of these applications have looked at the existing market and done something new and original. Neither is the standard copy of an existing app but instead, add value through doing it differently. Station is a very simple idea delivered very well and I am surprised it has taken a team this long to do it. Therein perhaps lies the secret, getting the right team behind the idea. Notion is a new and simple way to manage data collaboration and has combined several existing ideas to create a powerful and compelling application. I am happy to have found both.

If you have any tips or comments on either app or your would to discuss my thoughts above then please contact me via twitter or email.

Bali

Photo: Andy Crouch

The past month I have been taking a slight break and took time to travel with my family. We decide to head to Bali for some sun and to celebrate my wife’s milestone birthday that is coming up next month.

We flew on Qatar, stopping at Doha for a short stopover. This resulted in total flight time from London to Denpasar of about 18 hours. We had booked an All-Inclusive package at the Melia Bali hotel which is in Nusa Dua. This is in the South East of the island and about 20 minutes from the airport. Built in the ’70s, the area is all about tourists with a high number of 5-star hotels and complexes.

The hotel was stunning. There really is no other way to describe it. Set in over 20 acres of grounds it sits on a calmer reef lagoon beach. We had opted for a lagoon garden view room which meant we had a swim-up pool outside our room. The room was very well kept and presented and was really spacious. The main bed could sleep the three of us with extra room but the living area had a separate bed for my son. The grounds of the hotel are luscious and kept immaculately and this extends within the hotel buildings. Plants and local flowers of vibrant colours are everywhere.

The hotel has 5 restaurants. They all serve a breakfast buffet and so you can choose your morning view. For lunch and dinner they server Ala Carte menus. The food on here is very good but, and this is our only negative comment, the selection is limited. Each menu only really contains a small number of dishes. Only two restaurants really serve anything vegetarian at all. Luckily these were the beach restaurant and the main indoor restaurant. The other problem with these menus was the fact they never change. So over the time we were there it started to feel a little repetitive. The beach restaurant was right on the beach and the setting was fantastic. After dinner, they had a fire pit on the beach and rolled out bean bags and tables for you to sit and drink and listen to the various music.

We had planned to do various trips and see various parts of the island but once there and chilled out we didn’t. The two main things we did was head to Uluwatu temple for sunset one evening and we walked out to the Water Blow.

Uluwatu temple is on the other side of the southern part of of the island and we took a bus across to see it at sunset. The bus drove through many villages and it was really interesting to see “real” Bali. The temple at Uluwatu is located on a clifftop and provides some pretty stunning views. That evening, the temple was being used for worship. So we were able to experience the sights and smells and crowds. The temple itself and the grounds are home to monkeys and you do have to watch your bags, cameras and sunglasses. One guy found this out to his cost as he stood helpless watching a monkey snap his glasses in half. You get to walk around the grounds and the temple and along the cliffs to see various monuments. I enjoyed this and would recommend a trip.

The other place we ventured to was the Water Blow which was about a km’s walk from the hotel. The Blow is formed in the cliffs and when the tides are right waves of several meters blow up through the cliffs and into the air. The Blow is situated in a nice park that is used by the locals and again it was nice to meet them and see a less touristy part of the island.

There is a small shopping mall about a 2km walk from the hotel called The Bali Collection. This was a nice place to walk to early evening and had a good range of shops selling local and international brands. There were a lot of restaurants all with staff trying to attract you but they were not persistent and happily understood “no thanks”.

The rest of the days were spent paddle boarding and cycling, swimming and relaxing. I have wanted to visit Bali since I was a kid in the 90’s reading about it in Surf magazines. While my surfing days are long gone, Bali surpassed my expectations. I would go back tomorrow given the chance. This time I would very much like to stay and travel around the less touristy parts. Saying that, the staff and people we met at the Melia were some of the nicest people I have ever met and made our stay perfect.

If you have places you would recommend or have any questions about our trip then please reach me via twitter or email.

Summer Post Break

Photo: Lrns - Unsplash

After a long first half of 2019, I am going to take most of August off to travel.

For any readers, I appreciate your continued interest in my blog and my ramblings will return at the start of September.

If you would like to contact me then please reach me via twitter or email.

180-Degree Review Experiment - Part 2

Photo: Mimi Thian - Unsplash

Back in June, I published a post about an experiment I was trying with my team. I had asked them to complete the same review document that I complete with each of them every 3 months. I have now had all the responses and have been reviewing their thoughts.

It was an unexpected task for the whole team. I had a couple of people that completely embraced it and provided great feedback. Some of the team didn’t want to partake but I encourage them to. Some were afraid to leave anything negative. The interesting result was that engagement had nothing to do with seniority.

So what was the feedback? Here goes:

  • The team feel I generally manage them well. More than one of the team felt that I had their backs and would fairly manage issues and expectations.
  • The team is too agile. By this, I mean the true sense of the word and not concerning workflows. As a small team that is reacting to a business that is growing 100% year on year, priorities change. This makes some of the team feel under more pressure than they feel they should be.
  • My group communication style doesn’t work for everyone. This was interesting. In the past I have tried different approaches, meeting schedules and mediums. I have not succeeded in finding a good solution here.
  • My involvement in the wider business is seen as a distraction. I directly manage the team and have no team lead. This means that if I am distracted by financial or management tasks I might not be as available to the team as much.
  • They like the honest, opinionated, feedback I give. My approach to guiding team members to solutions goes down well. Certain team members warm to wider discussions about technology and stacks away from .Net. Others find that a distraction and they are not interested.
  • I could be franker. In certain situations, one of the team felt like my delivery could be more frank or direct.
  • My mood can impact that of the team. It was pointed out that when I am frustrated or distracted by non-team-related issues that I can impact the team.

So on the whole, not too much was fed back, some good and some area’s to work on:

  • I am glad they feel I have the teams best interests at heart. Having worked on teams where that hasn’t been the case I know the impact on productivity and morale it can cause. I see my role to enable the team and support them in delivery. This will only support the ongoing growth of the business and it realising it’s long term goals. This doesn’t mean I always side with the team, it means I find the best solution to an issue and communicate why that is the case. So far it looks like I am successful in this.
  • The team are right about the constant priority switching. This is something I have been aware of for some time. This is the natural growing pains of any company but it is having an impact. Our development process is going through a significant review due to new team members joining in September. This is going to be implemented using a tool to make the roadmap and the Product development open to the whole company. I hope that this will enable more honest conversations with the business over priorities. It will also allow them to appreciate the time it takes to deliver a feature.
  • The points made about my mood and the impact of the non-technical focused part of my role were the most noteworthy to me. I am going to carve out specific time in my calendar to address team and core development issues and the rest of my responsibilities. This will allow me to communicate my focus throughout a week better to the team. I am also going to be a lot more mindful of my delivery and interactions when dealing with issues to limit any negativity I might be letting off. I feel I might benefit from some coaching around compartmentalisation and this is something I will look into.

This is the first time that I have asked the team to do this. I will be pushing the process forward. I will be asking them to do it again in 3 months and every three months thereafter. I hope that as they become more used to the process the feedback will come easier for them to give and be more useful to me. While no earth-shattering feedback was received this time around I can see the long term benefit. While it made me feel very uncomfortable waiting for the responses I suggest you try this with your teams and see if you find it beneficial.

If you have any comments around this post then please contact me via twitter or email.

Singleton Patterns

Photo: Jantine Doornbos- Unsplash

Design patterns are a key element of any developers toolkit. Even if you do not realise that you are using them as you start your career, you are. They have two major benefits:

  • They have developed as proven ways to solve common patterns in software engineering. They are not the work of a single developer or company but rather are an evolving set of best practises.
  • They define a common way to imply intent. Developers will understand code that follows or is based on common patterns. Patterns have become a shared language amongst developers.

Patterns are the basis of a solution. Even if you find you have to add to them for your problem they still provide a useful starting point. Since first being defined by the Gang of Four book in 1994 many more patterns have been identified. In parallel, many antipatterns have been developed. These guarantee that a solution is a wrong way to solve a given problem. Some patterns fall into both camps for some developers. For me, the one pattern I never use in an object-oriented program is the Singleton pattern.

A Singleton defines a class which can only have one possible instance created. It defines a constructorless class that controls how it is instigated and accessed. It offers no public, instance-specific state. Instead, it can introduce global state into Object-oriented programme. They are also always defined as static objects.

I have seen Singletons used in many projects and I have always found there to be better ways to solve the problem. I usually refer to them as a code smell. In a recent project, I was looking at a Singleton class was defined to interact with Cloud provider storage. The class defined a common set of methods for uploading and downloading of files. The implementation for each cloud provider was implemented using a pluggable backend set of classes. The provider to consume was set in configuration during application startup. In theory quite a flexible piece of functionality.

The issue with the code in this project was that it had been implemented in a non-thread-safe manner. This meant that the problem I was investigating was easy to find. A slow method that was looping through a list of objects. It was using the Singleton based instance to create a URL to assign to the object for the location of a file. The solution was to revamp the Singleton based class using option 4 on Jon Skeet’s excellent article on the topic. I then moved the foreach loop to a Parralleel.Foreach and reduced the execution time for the method by 83%. I didn’t refactor the Singleton to a better solution as the class was consumed over 400 times throughout the project. I didn’t have the luxury of time.

This leads me to something else that is problematic using Singletons. You can not easily unit test a singleton. It is a static object which means that if you include it in your tests you will not be able to fake or mock it. Hardly ideal for such a core piece of functionality for this program.

A key aim in object-oriented applications is to remove the use of global state. The Singleton pattern provides a mechanism to use global state. Singleton instances also violate the key aims of the SOLID principles. There are many performance issues to be aware of and refactoring Singletons out of an established code base is very hard. Experience has shown that their use, especially in an early-stage project, is not worth the cost later on.

If you have any comments or thoughts around this post then please contact me via twitter or email.