PostHog – Essential product insights for startups

Standard

I’ll admit it; I used to think metrics were only an afterthought when creating a software product.

Build the product according to client specs, add some Google Analytics to capture the basics like pageviews, and that’s a wrap!

This approach may have been valid for projects with well-defined user requirements, where the market was already known, but startup products are different.

Startups need analytics from the start

Startups are testing an unknown market with an offering they cannot possibly know will fit in that market. Most startups fail and, of those that fail, most fail due to poor product-market fit or marketing problems.

If market alignment is so existential for startups then it makes sense that metrics & insights should inform the development and evolution of a startup product, not be added at the end.

But, as with most things, saying something is important is much easier than implementing it.

Startups need flexibility

I’ve used several tools over the years for insights & analytics (namely Firebase & Google Analytics). All are great on their own merits, but none have provided an all-in-one solution to my small startup needs. For a small startup scenario in the EU, I ideally need something that provides:

  • Control over the data. Data privacy is always important, especially in the EU where rules are arguably tougher than in the US.
  • Open source. Not only does open source give reassurance over how the data you are collecting is being used, but it also allows self-hosting if required in the future.
  • Scalable pricing. Small startups are generally unwilling or unable to pay upfront for tools. Having generous free tiers and fair scalable pricing allows startups to test their assumptions with minimal risk.
  • Developer experience. Small teams have very limited time & resources, so being able to move quickly is a must.
  • Usability. Having a tool that can equally be used by developers, marketers and managers is important, especially if the developers need to hand off the project at some point.

PostHog

PostHog is a new entrant but already fulfils all of the criteria above. It is an all-in-one customer insight platform that empowers startups to gather essential metrics, providing a clear pathway to refine their product and align it with market needs.

PostHog offers a suite of advanced features that go beyond basic tracking. Startups can leverage A/B testing to experiment with different versions of their product, ensuring they make data-driven decisions. Session replays allow teams to watch real user interactions, providing invaluable insights into user experience and potential pain points. Additionally, feature flags enable developers to roll out new features gradually, testing their impact without a full release.

PostHog also has a user-friendly interface, making it significantly easier to navigate than Google Aanalytics. This ease of use means startups can quickly set up and start collecting data without the steep learning curve.

As an open-source solution, PostHog offers the flexibility to self-host, addressing privacy concerns that come with third-party hosting. The approach is similar to Supabase’s open-core model, providing the best of both worlds: robust features with the option to maintain complete control over your data.

Try it on your next project

In summary, PostHog is not just another analytics tool; it’s a comprehensive user insights platform. It is specifically designed to help startups find their product-market fit. With an easy setup, the flexibility of self-hosting, and scalable pricing, PostHog is a valuable asset for any startup aiming to understand its users better and grow smarter.

AI all the things?

Standard

AI is incredibly powerful and it is relatively easy to add a rudimentary integration to new and existing software. It’s easy to get caught up in the hype and see every problem as solvable with an AI hammer.

But just because you can, doesn’t always mean you should.

Don’t get me wrong, I use AI-augmented tools every day and am amazed at what they do for my productivity. I also create AI-augmented features in the software that I build.

However, if I reach for the LLM AI “hammer” first, I bypass the opportunity to achieve better results and user experience. By focusing on the root problem at hand and structuring my data a bit better, I could nrgate the need for AI and achieve better outcomes.

For example, if your software needs to match job seekers with job specs, you could reach for the AI hammer to do the work, but you don’t need to. Why? Because AI yields “poorer” quality results than getting human assistance breaking down the constituent parts of a user profile and the parts of the job spec into structured data, matching these structured pieces, and human oversight to make the final judgement on a ‘good’ match.

For example, if your software needs to generate a list of similar job titles to one listed in a job post, you could reach for the AI hammer to do the work, but you don’t need to. Why? Because it might be cheaper, quicker and yield adequate results using existing databases like the US O*Net database of careers and salaries.

The point is, AI can do many things, but it’s not a panacea. You might find you get better results by exploring the root user problem and structuring new or existing data to solve the problem more accurately.

Supabase: Making development easy, scalable & affordable

Standard

*this post is the 2nd of a 4 part series of posts exploring Supabase, Vercel & Svelte. This post goes deeper into Supabase

Part 1: Intro
Part 2: Supabase
Part 3: Vercel
Part 4: Svelte

In the previous post I outlined why Supabase, Vercel & Svelte make up my current ideal technology stack. This post delves deeper into Supabase and why it has helped me fall in love with full-stack development again.

What is Supabase?

Supabase is a managed service which encompasses (but is not limited to) all of the following: authentication, database, file storage & serverless functions.

Supabase is like other “backend as a service” (BaaS) offerings like Firebase, but with a few notable differences; the project is open-source & is centred around an open-source relational database (Postgres).

What makes it so useful?

As I have lamented in the past, app development is complicated. Anything that reduces stack complexity can help focus developers on the things that really matter.

I tried Supabase for a weekend project for a local charity and achieved so much in a single weekend that I would consider myself an advocate for the product.

Following that experience, I have now used Supabase successfully for two additional production projects and plan to use it in the future for similar scenarios (small team startups).

Advocating Supabase at a JavaScript meetup. Slides below…

Creating a relatively simple app over a weekend is not a huge accomplishment. There are other services and no-code platforms that can do something similar in the same timescales.

However, experience has taught me to get into the weeds with a product and then extrapolate into the future to gauge the real value of a tech stack. Low code and no-code tools are great, but at some point, in a growing project, you will hit a wall.

What makes Supabase stand out is that coupled with other developer tools like Svelte, it can be at least as productive as no-code tools without the drawbacks e.g. vendor lock-in, limited customization, up-front costs and scalability.

Embracing Open-Source and Community

My gravitation towards Supabase is also influenced by its open-source ethos which promotes transparency, collaboration, and community-driven innovation.

Being open to open source is more than just being idealistic, it’s also pragmatic.

The Supabase project is open source e.g. the code that runs its managed service can be downloaded and used on a server of your choosing.

If Supabase decides to increase the managed service cost to a level where it no longer makes sense to use it, you can manage the services yourself elsewhere.

Supabase has been completely transparent about its open-core business model from the start, hopefully, this model continues to work for them.

However, relying on open-source projects is not without potential pitfalls, especially when open-source companies’ heads get turned by greedy VCs and start over profiteering.

At one time, Elastic was my tool of choice for multi-faceted search, but the change in licence by the company has left a bad taste.

However, even though open-source licences can change, it is still better than the closed-source alternative where you are completely at the vendor’s whims from day one.

Simplifying the Complex

Creating apps is a complicated process even without having to worry about managing servers.

Delegating responsibility for managing auth, database, and storage to a managed service allows small teams to concentrate on more impactful concerns.

Not only does Supabase take these concerns away from you but it does it all in an easy-to-use dashboard.

The developer experience in general has been, dare I say it, enjoyable.

Using the Supabase tools and libraries has successfully reduced the complexity and lines of code in my apps.

The Security Model: Easy to Understand

The simplicity of the row-level security model in PostgreSQL is easy to configure and understand.

It presents a straightforward yet robust framework that drastically reduces the risk of misconfiguration—making security accessible to all of the team, even for newcomers, from day one.

However, it’s not perfect.

I have had experience in the past with different approaches to securing data. My least favourite way in the past was to implement the security rules totally in code i.e. lots of if/then statements hidden away in code that only the core developing team could understand or change.

In contrast, in my opinion, the “best” way I have experienced is to use declarative authorization rules, defined in the data schema e.g. Amplify authorization rules.

In the example below, any user can read from the “Todo” table/graphql type, but only the person who created the row can update or delete their own data.

## Configure schema and auth rules
## in one place 
type Todo 
  @model 
  @auth(rules: [{ allow: public, operations: [read] }, { allow: owner }]) 
  { 
     content: String 
  }
## Implementing something similar
## using Postgres/supabase
create policy "Allow select, update and delete for users based on id" on "public"."Todo" as permissive for all to public using ((auth.uid() = id));
 
create policy "Read for all users" on "public"."Todo" as permissive for select to public using (true);

It would be great if Supabase could cater for the type of declarative security as above, if anyone knows if it can, please reach out.

Scalability and Performance: Meeting Tomorrow’s Needs Today

Premature optimization is the root of all evil, let someone else grapple with the demon

In the past, I have spent countless hours trying to eek out marginal gains in performance in case my app goes viral. Spoiler alert… it didn’t… and I’ll never get those hours back.

Let someone else (with probably more expertise) obsess about performance and scalability.

Supabase’s seamless scalability ensures that as you grow, your backend does too—smoothly and reliably. This peace of mind allows you to focus your energies on innovation and enhancing user experience, secure in the knowledge that your technological foundation is a given.

The Cost-Effectiveness of Dreaming Big

Free and Pro pricing (March 2024)

In the world of startups, where every resource counts, Supabase’s pricing model is perfect.

The free tier is generous enough to battle-test your idea. The follow-on tiers are predictable and fair.

It’s not just about infrastructure costs where Supabase shines. The comprehensive savings in developer hours it enables through its exceptional developer experience is significant.

Again, this efficiency allows you to channel resources into areas that directly amplify user value and platform growth.

A Comparison with the Giants

In my career, I have used other back-end-as-a-service offerings and Supabase compares favourably for the projects I’ve been doing lately i.e. small team startup.

I have used all of the following comparable technologies in production environments: Firebase, Retool, AWS Amplify, Budibase.

I have tried, but not implemented the following tools: Planetscale

I have not tried, but want to look at, the following: Parse, NHost, Backendless, AppWrite

My advice, if any is needed, is to look at your particular situation and try out any or all of the tools above on a pet project.

The “try out” part is key, all these sites have wonderful marketing websites which promise the earth. It’s not until you get down into the weeds on developer experience and pricing that the suitability becomes clearer.

*this post is the 2nd of a 4 part series of posts exploring Supabase, Vercel & Svelte. This post goes deeper into Supabase

Part 1: Intro
Part 2: Supabase
Part 3: Vercel
Part 4: Svelte

Procrastination is productive

Standard

“Procrastination is productive”

Sounds crazy right? But my experiences with software development has shown me time and time again that procrastination on certain tasks can be the ‘correct’ and productive way to approach even crucially important tasks.

Please let me explain. I usually organize all my development tasks on some sort of Kanban board ordered by priority. Normally the advice is to take the top item off the list or to choose the biggest, nastiest task/’frog’. This type of approach is advocated by Brian Tracy in the mostly awesome book ‘Eat That Frog‘), and, in general, this is solid advice.

However there are times when I look at the top task and lose the will to live! Sometimes the problem seems too difficult/long/important to solve immediately. Rightly or wrongly, what I tend to do is to leave this nightmare task at the top of the list and ignore it. Instead choosing a much easier, but related, task, further down the list i.e. procrastinate.

Why? Because experience has taught me that these kind of tasks will bog the project down. I am not ready for it yet. The project is not in the right state yet. Things change. Requirements change. This is not a ‘quick win’. The decision to act on this task needs to be deferred until I am older and wiser.

procrastination_ron_burgundy

Defer Important Decisions Where Possible

Now, I am not advocating always doing nothing, these tasks are usually fundamental tasks that need consideration. When a fundamentally important decision can be deferred I usually will defer. By waiting until the last minute to make a decision not only gives maximum flexibility to the project but it is also made when more knowledge about the problem has been gained. For example, if the task is a fundamental one like ‘Choose a database technology’ this raises alarm bells immediately. When the full extent of the expected solution is not known and an obvious choice is not prevalent, then this a risk which should be deferred. If I can choose not to address this task now, then I wont. For me, a solution in a case like this would be either not to choose a technology at all yet or choose a technology that I am familiar with but make sure that any implementation can be swapped out with another technology at any point i.e. procrastinate but engineer some ‘wriggle room’ (please please read Mary and Tom Poppendieck’s book ‘Lean Software Development: An Agile Toolkit‘ for some fantastic practical advice on what software development priorities should be).

Eat That Frog?

So what should one do? In software development, should we follow Brian Tracy and Eat the largest ‘frog’ (task) first or should we eat smaller, tastier ones until we get good at eating frogs and make sure that the bigger one isn’t poisonous?

Clean Code Tools

Standard

Writing code is an inexact science, imperfections in your code are inevitable and add up.

Having a tool that constantly nags you to strive for perfect code is a must have for flawed [see human] developers.

 

Compiled Code

Where code analysis tools really excel is with compiled code.

With compiled code, the clean code tools not only analyse the quality of your code but also automatically fix and style it!. With compiled code you get piece of mind when these ‘automatic’ changes are made because the compiler is there to reassure you.

Thank God for Resharper!

I use these type of productivity tools religiously; in particular, for any C# or JS code that I write, I always use/need Resharper from JetBrains.

resharper_stylecop clean code

Some people might say that it is ‘lazy’, letting a productivity tool ‘automagically’ do what you should be doing out of hard learned habit. I agree, it is lazy, and I am often sloppy with my code knowing that my ‘magic helper’ will clean up after me. But, I have found that, after a while, I start incorporating the suggestions and changes that the tools give me into my ‘unclean’ code, so that the tools have less work to do and my code becomes cleaner ‘naturally’.

 

resharper uninstall clean code

Too much of a good thing?

However, you can go too far with these tools.

Not only do you start to rely heavily on these types of tool to do a lot of the basic coding for you but also some of the suggestions it make for code changes can lead to your code becoming less ‘human readable’. It is soooo tempting to accept the suggestions to lambdify or linq entire sections of your code just because Reharper tell you to do it and it compresses your code to a single line. I thoroughly recommend watching the clean code Pluralsight course or reading Robert Martin’s (uncle Bob) book on clean code, to understand why human readable code is so important.

resharper - clean code

 

Interpreted Code

Things get more trickier with interpreted code e.g. Javascript. With interpreted code you do not have the compiler to reassure you that any ‘automagic’ changes are ‘safe’. For this reason, most clean code tools for interpreted code will give advice, rather than make changes for you. However, the ‘linting’ tools for interpreted code (JS in particular) have come a long way and are an essential part of any coder’s utility belt. For instance, when writing Javascript code I now rely [heavily] on Douglas Crockford’s JSLint to tell me that have been a naughty boy (I would highly recommend all Javascript developers to read Douglas’s book: Javascript The good parts and watch his talk on pluralsight) about Javascript.

jslint - clean code

What lint/analysis/style/refactoring tools do you use everyday and cannot live without? Leave a comment below:

 

E-Learning

Standard

Some much to learn, so little time.

Apart from ‘dark matter programmers‘, most developers are faced with the uphill struggle to find the time to continuously keep up to date with the industry. To paper over my (many) technical shortcomings I tried out some of the prominent online course providers and was extremely impressed.

The software industry moves so fast that keeping up to date with the latest tech and processes is virtually impossible; unless you do it virtually.

Brave New World of E-Learning

When I first tried online learning I was a bit skeptical that it could match the learning potential of ‘traditional’ methods. However, mainly due to the way you can learn at your own pace, I now would not want to learn any other way.

Institutions have big reputations from years of delivery. However, in this brave new world the methods of delivery are changing and new reputations are being formed.

Using this type of learning has a number of benefits for time starved developers:

Flexible. Finding spare time as a software developer is not always easy. We are fortunate enough to be in an industry which is currently booming and that means there is plenty of work to be done. Online courses are perfect for time-constrained individuals as most courses allow you to work, more or less, at your own pace and at hours of your choosing

– Accreditation. Many of the providers now offer “recognized” accreditation on completion of a course. How “recognized’ the qualification is largely depends on who is judging. For example, your next potential employer might not have heard of Pluralsight and its qualifications but might be a personal user of Coursera and is well aware of its merits/shortcomings.

Wide Variety. The course providers currently have a huge library of every type of subject and there libraries are expanding every year as e-learning becomes more popular.

Cost. Some are free but the rest are paid for. On the whole though, e-learning courses are generally cheaper. If you compare the cost of ‘taught’ industry courses that require you to travel to the trainer’s location, there is no comparison.

What I didn’t like

This type of virtual learning is not everyone’s cup of tea. Quite a few people can be put off by the impersonal nature of the courses. Without a lecturer to interact with and a physical text book, some just do not see anything else as ‘learning’. Most of the online course providers do try to simulate these inter-personal connection with the student, but in reality it is half-baked at best.

resized_conspiracy-keanu-meme-generator-what-if-they-find-a-way-one-day-to-physically-enter-virtual-reality-8a527e

I personally had trouble making sure that I kept enough time free in my schedule to make sure I completed the courses fully. Sometimes I really needed was a lecturer or dean making sure I kept on track.

Despite the disadvantages I can thoroughly recommend trying some sort of online learning; there is a surprisingly diverse catalog of courses out there, most of them very well thought out content and delivery.

Horses for courses

However, not all the online providers have the same range of courses, I find that some providers are better for certain topics than others.

The providers that I regularly use for different topics are as follows:

Pluralsight – Great for technical training such as web and server training.

Coursera – Great for specialized accredited courses from recognized universities.

Udemy – Great for social/personal development type courses.

 

Other providers do exist and i would be interested in hearing what else is available and your experiences with them?

Podcasts

Standard

So little time, so much to learn

Gone are the days for the software developer where you can learn one technology inside out, sit back and work at the same job for 20 years. Continuous learning, the ongoing voluntary pursuit of knowledge, is becoming an essential pursuit to most working in the software industry.

The technological landscape is evolving so fast that most of us programmers have to continually learn, or risk having an increasingly extinct set of skills.

learn

There are a number of tools that I have started to use which have helped me better keep apace with some of the changing I.T. industry landscape.

Technical Podcasts – Learn On The Go

If, like me, you have a relatively long commute into work [30 minutes or more], there are many excellent ways that you can utilize this time. Some like to read newspapers, listen to music, enjoy a good novel; I like to use this time to ‘sharpen my axe‘ by catching up on the latest goings on in the software development world through listening to technical podcasts.

Using this time to listen to podcasts has been highly beneficial to me in a number of ways:

  • Learn the lingo. Once you start listening to podcasts you are much more aware and confident with many of the phrases and terms used within the industry. Terms like ‘big iron’, ‘cranking code’, ‘heisenbug’, ‘pokemon handling’, ‘stringly typed’ etc are all now part of a colorful vocabulary thanks to listening to others using them confidently on podcasts.

heisenbug

  • Bleeding Edge. Most of the podcasts pick up on new technologies or practices. If someone uses a brand new technical term in the office that starts you sweating that they will ask you your opinion on something that you cannot even spell… you can be sure there is a podcast for that.
  • Different Viewpoints. Going outside your comfort zone, like listening to web podcasts when you have spent your life as a desktop developer, will open your horizons to similar, but different ways, to approach your own field (you never know, you might pick up a new golden hammer).
  • General Consensus. As well as picking up new terms and technologies it also helps to reinforce current terms or technologies that you are already using.

 

Lots of Great Podcasts

Here are some recommended podcasts that I am currently listening to:

  • .NET Rocks : My favorite podcast for technical content. Excellent audio quality, content and banter. Not as Microsoft centric as you might think.
  • Hanselminutes : Again good content and quality but sometimes steers away from tech relevant subjects.
  • Herding Code. Great web podcast. Sometimes a bit Microsoft centric.
  • Javascript Jabber. Good for web/javascript technology talk. Sometimes a bit tangential but very enjoyable.
  • Stuff You Should Know : My favorite non-technical podcast. Good for some respite from too much tech talk. Josh and Chuck are very funny and present some dry topics in an entertaining way. Some great and varied subjects like ‘How Pinball works‘ to ‘How the scientific method works’.

 

What other resources have you come across?

Have you had any experience with any of the resources I have mentioned, what did you think?

 

Angular – My New Golden Hammer

Standard

Web Development feels ‘hacky’

For most of my career I have been a desktop developer but a few years ago I started making the move towards web development.

The move, at first, was horribly painful. For most of my working life I was working with the safety of compilers, full featured code libraries, mature test frameworks, UI frameworks and data-binding only to be thrown into the then (and even now) ‘wild west’ of web development.

My biggest gripe with web development was “how can it be so hard to do such simple things?”. I was finding that putting a button and some input controls on a screen that saved to a database required me to write waaaayyyy too much code. Never mind all the problems with screen size and browser compatibility, even simple things felt verbose and ‘hacky’

. silverlight_logo_large_verge_medium_landscape-300x169

Silverlight – Desktop like, but flawed

I quickly retreated back from pure Javascript/HTML/CSS development to using something more ‘desktop-like’ and started using, and advocating, Silverlight.

Silverlight is [was] Microsoft’s attempt to replace Flash (more or less). Things were good, I was productive again and spitting out highly functional web apps until I started fully realizing the limitations of using a plugin based approach. On the brink of giving up web development due to frustration, I started looking at the latest web technologies that were beginning to gain some traction.

Knockout JS. Better, but still too many dragons to slay…

knockout

The first bit of relief came when I discovered Knockout.js. Knockout is a fantastic library that enables easy MVVM data-binding in your web apps. This was more like it, not having to write as much ‘grunt’ code to hook up data with UI felt much better. Something as simple as the data-binding that knockout gave me renewed my enthusiasm for web development and I started to look for other libraries that could address the other reservations that I had about web development.

AngularJS-large

Angular, now we’re talking

The next discovery, and most fruitful, was AngularJS.

Angular is a Javascript library from Google which makes web development sooooo much easier. For almost every problem that I started to ask Angular it seemed that the developers had already had the same pain and had already built the functionality into Angular already. If there was something that I needed from the framework that didn’t already exist, there was usually an Angular extension that was readily available or I was able to make a directive from an existing Jquery plugin.

Angular has become so much of a golden hammer for me that I find it hard to contemplate starting a large website without using it.

Looking to the future

The landscape for web development is evolving rapidly but with frameworks like Angular, and maturing and adherence to web standards, it does not seem as anarchic as it once was. There are several other libraries that have made my life easier such as underscore/lodash, twitter bootstrap, and breezejs, but the underlying library that has made the most difference is Angular. Since converting to Angular I am now a happy and more productive web developer. Before, I was extremely frustrated and unproductive and although Angular, and web development in general, is still far from perfect, it is a more enjoyable place to be.

A Word of Caution for Angular 2

Before you get carried away and start seeing everything in angular tinted glasses, you need to consider the ramifications of the upcoming Angular 2.0.

I have had a look at the 2.0 syntax and it is a big departure from 1.x. IMHO this is a strange and worrying decision from Google as many people looking to dive into Angular at this point in time will be uneasy that the code they write now will not be supported/current in the near future.

2 Golden Hammers?

Although promises of a clear upgrade path are promised by Google, it might be time to find a backup golden hammer (i.e. React) to hedge my bets.

Has anyone else got similar experiences with Angular? Have you found other libraries that you feel you cannot do without? How do you see the future for frameworks like Angular, React, Backbone or Ember?