We’re excited to announce that Pete Deemer has joined us at Calcey as Advisor. A familiar face within the Agile software community, Pete has spent many years in Silicon Valley building products and leading teams. He played a pivotal role as VP of product development at Yahoo! after serving as SVP at c|net Networks. Oh, and he also co-founded the award-winning website GameSpot.
In recent years, Pete has dedicated himself to promote Scrum and Agile development. He is the founder and CEO of GoodAgile, which has offices in Sri Lanka, Singapore, and India, and is the lead author of The Scrum Primer, one of the most widely read introductory texts on Agile development. Pete was Chairman of the Scrum Alliance in 2016 and served on its Board of Directors from 2012-2017.
“We are delighted to welcome Pete into the Calcey family. The standards set in the Valley are regarded THE benchmark for software development. Pete’s appointment will help us keep our processes and engineering practices world-class through the next phase of our growth” said Mangala Karunaratne, founder and CEO of Calcey Technologies.
“Having seen what Calcey has accomplished over the last 18 years, I’m very excited to help Mangala and the team grow and evolve the business even further. Moreover, Calcey’s ability to stick to its refreshingly honest principles and deliver world-class software from its beautiful innovation park in Colombo, is a testament to both Calcey’s future potential as well as that of Sri Lanka!”, Pete added.
Ayubowan Pete!
Tech
Resolving data sync inconsistencies in calorie counts and energy expenditure that arise with Apple Health integrations
Apple Health and Fresh Fitness Food: How many calories did the team at Calcey burn to find a solution for data integration?
In December 2020, Fresh Fitness Food, one of London’s leading providers of bespoke nutrition, took the next step in on-the-go accessibility through the launch of its mobile app. Fresh Fitness Food (FFF) provides precision nutrition tailored to each individual’s needs and dietary restrictions. With the new mobile app, however, FFF has the potential to be so much more.
The app can track fitness goals, daily activity, and calorie expenditure. It can then suggest and provide guided workouts and meal plans to help you achieve your goal. Real-time data can be entered on the go and accounted for in the design of your next meal. FFF employs a Michelin-star-trained menu consultant to create this bespoke meal plan and will deliver it right to your door.
Calcey, who developed a new web portal for FFF, was the team behind the design of the mobile app. The app was meant to be easily connectable with other activity-tracking devices and programs such as Fitbits and Apple Health. However, soon after the launch, the team was made aware of a discrepancy.
Where’s the fire?
The number of calories burnt each day was provided to the user through the FFF app. To do this, the app would integrate data from Apple Health or any other fitness monitoring system the user already had. When comparing the numbers provided by the app against those provided by Apple Health, it was found that they varied by 50-200 calories each day. The team at Calcey was puzzled over this inconsistency and began to search for an explanation. Seek and ye shall find – the team soon discovered the reason behind this.
Apple Health used a system of time intervals to produce the final number of calories burnt at the end of the day. It was a two-part calculation, using Active Energy – the energy expenditure while walking, exercising, etc- and Resting Energy – the energy spent for metabolic processes such as food digestion. Some time intervals however, would straddle two days. E.g. – 11.30 pm to 12.30 am. This was the cause of the discrepancy between the data recorded by the FFF app vs Apple Health.
Douse the flames
Once this was brought to light, the next step for Calcey was to find a way to extract the correct number of calories belonging to each day. They did this by proportionately allocating calories based on time. Eg – If the time period was 11.30 pm – 12.30 am and the total calories burnt during this time was 100, 50 calories would be allocated to the first day and 50 to the second. Similarly, if it was 11.45 – 12.45 with the same number of calories, 25 calories would be allocated to the first day while 75 would be included in the count for the second day.
The team wrote and re-programmed the FFF app to include this method of calculation and the change has been implemented for future downloads. Any user who was affected by this discrepancy in the month since the app’s launch was afforded the opportunity to have their calorie number corrected and updated. The team at Calcey does not anticipate any further stumbling blocks with the FFF app; however, should any arise, the team will spend as many calories as required to ensure the best possible service is provided to a client!
AnnouncementsHow toTech
London’s leading precision nutrition service goes Mobile! Here’s how Calcey made it happen
Over a year ago, Fresh Fitness Food (FFF), introduced its web platform to the market. Now, FFF is kicking off 2021 with a brand new mobile app, live and ready to download!
For those unfamiliar with the brand, FFF Fresh Fitness Food (FFF) combines precision nutrition with convenience, by offering individualized meals, cooked, and delivered to your door, daily. In a market brimming with generic healthy meal providers, what sets FFF apart is its ability to individually tailor meals to every customer, taking into account their nutritional needs, health goals, allergies, and food preferences. Selecting appropriate meals per customer, then preparing and sizing them to suit individual nutritional requirements is daunting enough – but to do this at scale, particularly at the scale at which FFF operates at, is extremely complex. Currently, FFF delivers more than 70,000 meals per month in London and the suburbs.
This is largely made possible through the end-to-end web platform that Calcey developed for FFF to manage its entire business. This mini-ERP manages FFF’s complete workflow from customer sign-up and automates meal planning to ensure that users receive the exact nutrition they need each day. It even helps FFF manage cooking manifests and deliveries. Upon launching the solution FFF realized an immediate 14% improvement in gross margins.
The FFF mobile app
FFF’s mobile app is not a simple extension of this web solution, providing another interface for busy customers to reschedule their deliveries. Of course, it offers these capabilities to current FFF customers, but it also offers a whole lot more, essentially a ‘complete fitness center in your pocket’ for any user. If improving your fitness is on your new year’s resolution list this is the app you can’t do without. It offers;
Calorie tracking
Understanding the exact nutrients in a broad range of food items is the foundation of FFF’s business model. The mobile app is integrated with the leading food databases in the world – cataloging nutritional data for millions of food items and FFF’s team of nutrition experts are constantly validating and increasing the accuracy of these measurements.
Activity tracking
The app can be connected with Apple Health and Fitbits to seamlessly track daily activity levels.
Meal plan and recipes
As the app knows the exact calories you’ve had so far in the day, how active you’ve been, plus your health goals (e.g.: gaining muscle, losing fat) it’s better placed than anyone to recommend what’s optimal for your next meal. It does exactly this and provides recipes as well!
Guided workouts
The app has a complete section dedicated to guided workouts by top trainers. As a bonus, on the days you workout, the app will adjust your daily caloric expenditure accordingly and perhaps let you fit in that sweet treat, without letting you get derailed from your overall plan.
The holy grail of nutrition
What does all this mean for current FFF customers? In a nutshell, now they have access to the holy grail of nutrition. Imagine, you had a personal chef (and nutritionist) that tracked all your snacks and your activity level on a daily basis and adjusted your main meals in real-time to still keep you on track with your health goals. With the new mobile app, this is what the FFF’s customers now experience.
Changing the game and going international
If you’ve read so far you would have understood how this mobile app dramatically increases the value of FFF’s service to its existing customers. But what’s more, it will attract a completely new set of users drawn by its calorie and activity-tracking capabilities, guided workouts and healthy meal plans. In short, exactly the type of folk who will find FFF’s service quite valuable. Attracting your target audience by providing them with great value – we can get behind that marketing strategy!
Scaling any business worldwide is tough. Tech businesses find it easier because releasing an app for a new market is less risky and requires less investment than putting up physical infrastructure, creating delivery fleets, etc. This mobile app marks FFF’s transition from a click-and-mortar operation to a tech business. Today it can launch its app in any city and assess the interest level around its core ethos of healthy living and directly engage the people with this mindset. The core IP it’s created by its digital properties is scalable and franchisable worldwide.
Want to plan out a similarly transformative journey for your business? Get in touch and we’d be happy to help.
We love building great software. That means doing a few things differently
At Calcey, we develop software. We are a boutique development outfit with an office in Colombo, Sri Lanka. But we are also not your typical software development company. We prefer to think of ourselves as providers of small, extended remote teams for global clients in need of software development services.
Developing software is not like selling a commodity. People matter. Quality matters. When the two meet, magic happens. To build good software, the interests of a developer must align with those of a client. Anything less is a huge no-no.
If you’re a developer just starting out in your career…
One of the best and fastest ways to sharpen your skills and grow is to work in a small team, and on a challenging project for some time. This helps you develop a deep mastery in a given area, while preventing your effort from being buried under that of a hundred others. Deep mastery equals better learning, and higher visibility equals faster promotions, all else remaining equal. Of course, when the time is right, you should choose to move between teams to learn new tech stacks and skills. This is one advantage service companies like ours have over product companies. At Calcey, we have the ability to give our developers the chance to attain deep mastery and upgrade their skills with time by moving between teams if necessary. But at a product company, developers are often doomed to work on one part of a software forever.
On the other hand, if you’re a client…
You must look to work with a small, stable team that you can get to know with time, so that everyone can quickly develop a sense of camaraderie and start working towards a common goal. An organic relationship built this way allows for developers to become emotionally invested in your product, and allows them to take ownership and drive the process forward, instead of you having to push from behind with all your might. A small, stable team is inherently better at getting people to work together than a large, sprawling one. That’s why a certain Jeff Bezos prefers two-pizza teams.
A remote extended team will also allow you to reap the benefit of working with a group of developers who almost feel like your own, without taking the financial risk of actually hiring them and sinking a significant amount of capital into it.
Our approach…
Simply brings these two elements together to create a system that keeps everyone happy. Developers get to work on interesting things, while clients receive top-notch projects, finished and delivered on time. It also aligns our incentives with those of our clients. As we ship more and more successful projects, our clients can grow their businesses. That growth in turn comes back to us in the form of more projects, and we get to hire more people to work on them. Basically, it’s a virtuous cycle that everyone benefits from. This model has worked so well for us that we’ve managed to grow completely organically from a 2 person startup to a 140-strong team.
Henrik Palmquist is the CTO of Nelly.com, one of the largest online fashion retailers in the Nordic region. Nelly.com has been a client of ours for the last 3 years, and has benefited immensely from this extended remote teams model we’ve staked our reputation on. Here’s how Henrik felt about his experience working with us.
There are also a few other things that you ought to know about us, which we consider key pillars of the Calcey Way.
Transparency
We like to give our clients a high level of visibility into their projects. The more our engineering teams and our clients know about each other, the better, as it eliminates room for misunderstandings, and stops people from feeling like they don’t belong. Before COVID-19 took airplanes out of the sky, we encouraged our clients to come visit us in Colombo and get to know the team that would be working for them. They could have a team workshop and do a deep dive into the client’s domain or business challenge, or simply go out for dinner or on a trip around Sri Lanka. We encourage such visits and face-time because we know that is how the seeds of a great relationship are sown.
That’s not all though. Once the project is in progress, clients are free to join daily stand-up meetings and even talk directly to our project managers and developers. Here at Calcey, there are no middle men or lengthy email chains that make you want to rage-quit. Instead, we have actual, normal, and reasonable human beings who’d be always happy to get on a call with you and walk you through how your project is going, what we’d be doing next, what works, and (most importantly) what doesn’t.
Mikke, the CEO of Ancon—a Swedish firm that develops software for the restaurant industry, is someone who has visited our offices many times in the past to hang out with our developers. He was pleasantly surprised by how well our team got along with his, and had some nice things to say about us.
Straight talk all the way
At Calcey, each and every individual is encouraged to tell it like it is, politely and with respect for each other. No beating around the bush, and no false platitudes. Humans sometimes have the tendency to downplay things (or let them slide completely) in the hope of not upsetting the proverbial apple cart, but that doesn’t really help anyone. This is particularly true in our case, where we end up working with clients from different cultures with wildly differing levels of technical understanding. Being straight with the facts has helped us bridge these differences and made it so much easier to form trusting, mutually beneficial relationships.
As developers, sometimes we find ourselves in a position where we can clearly see that the approach a client is planning to take won’t help them achieve their goals. When we run into such situations, we encourage our developers to actually speak up, challenge the client’s assumptions where relevant, and put forward better approaches or suggestions. This can often happen when clients don’t come from a technical background, as Joanna and Lucy, co-founders of The Oneness Movement found out. Luckily, our team was on hand to help them navigate the confusing maze that technology can sometimes be.
Take ownership
Whether its a simple dashboard or a fully fledged enterprise app, we approach every project as if it was our own. When an outsourced development services provider doesn’t take ownership in their work, it naturally breeds a short-termist attitude where the focus is on delivering the project, billing the client, savouring that ‘ka-ching!’ and moving on. Things like strategic fit and future-proofing go out the window.
Instead, we like to think like product owners and take the long term view. This motivates us to flag issues as soon as they arise, and suggest features and fixes which we think would be helpful over the long run. For instance, if a client tells us to build a native android app, we would always try to find out if there would ever be a need for an iOS app as well. If there is, we would always take the time to suggest the option of building a react native app instead, which suits both dominant smartphone platforms thus saving time and money over the long run. If we don’t, the relationship we have with the client will be in tatters once the client realises that they’ve been taken for a ride.
When Compare Networks came to us to help them build an enterprise sales app for the biotech sector, they probably thought we would build it, ship it, and be done with it. Instead, we naturally took ownership of the project, and helped them envision the entire feature roadmap of the product. Our developers took the time to understand the mindset of the end user and empathise with them in order to make the features of the app very easy to use and understand.
Bespoke teams
The composition of engineering teams at Calcey tends to be flexible, and is always geared to meet a client’s evolving needs. Instead of having projects transferred between teams like a weird game of musical chairs, our clients get to work with the exact same core team while a few additional specialists will be brought in as and when required. For instance, a client who comes to us with the intention of developing an MVP might only need a small team to get things started. Later, when it is time to build a functioning app, the team might need a few more engineers and designers whom we can bring into the team. Eventually, if the app has to be scaled to accommodate millions of users, the team will need the services of architects and other experts whom we will draft into the team.
That is how we helped a London-based startup, Fresh Fitness Food (FFF), evolve from a fledgling meal delivery service to a global fit-tech company that is driven by technology. After all, we were once a startup too and know what it is like to try and achieve product-market fit and get a steady stream of cash trickling through the door. Over the years, FFF has been able to rely on us to shape and develop their product, business strategy and more. As FFF’s needs evolved, the composition of the Calcey team supporting them also evolved in tandem, thus ensuring that all the development resources FFF needed were always at its disposal.
Do the right thing, always
To this day, all new clients knock on our doors thanks to direct referrals from existing clients. We consider this to be a signal that we are doing something right. It also serves as an incentive for us to safeguard our reputation in the business, because one disgruntled customer is all that it would take to bring down the house that we so painstakingly built. That is why we always try to do what is right. Sometimes, that means saying ‘No’ to a client if we feel that we are ill-equipped to take on a job. At other times, it means making accommodations to suit talented and deserving employees, who may be going through tough times in their personal lives.
This ethos of doing the right thing has helped us cultivate a pool of happy clients and loyal employees, both extremely crucial for our success. Perhaps that is why our NPS scores have been consistently high, despite COVID-19 upending the way we live, work, and move. Over the last three quarters, our Net Promoter Score (NPS) has been on the rise, and hit an all time high of 78% despite all of us being forced to work from home due to the pandemic. Achieving this kind of NPS rating places us squarely amongst some of the best software development companies in the world, and leaves us feeling very optimistic about the future.
Should you be on the lookout for a reliable and agile software development partner for your business, don’t hesitate to get in touch with us through our website. Our client onboarding team will reach out to you in no time ?.
At Calcey, we believe that great things can happen at the intersection of business and technology. Be it in bio-tech, education, real estate, or finance, the intelligent use of technology can make things better for everyone.
Take for instance Fresh Fitness Food (FFF), a Calcey customer and a London-based startup that specialises in delivering bespoke healthy meals to suit a given caloric requirement of a customer. Every day, thousands of fitness addicts in and around London, including former England and Wasps rugby player James Haskell, depend on FFF to satisfy their nutritional requirements.
When you are in the business of delivering healthy meals to fitness junkies, it is really important to ensure that each and every meal suits the needs and dietary preferences of EVERY SINGLE CUSTOMER. To do so, bespoke meal services usually ask customers for information such as height, weight, metabolic rate, allergies and more.
Collecting this data is often a cumbersome process. To make things worse, the human brain is notoriously bad at estimating, as many a scientist has pointed out before.
But, what about the wearables on our wrists? These tiny devices manage to gather a treasure trove of information on us with every passing day, and soon, medical professionals could use the data to even predict illnesses. Why can’t services such as FFF tap into this treasure trove of data instead of relying on inputs from customers?
Integrating wearables with apps can provide a few distinct benefits such as:
Access to real-time data
Wearables can provide apps with continuous access to a stream of real-time data, thus allowing them to deliver an optimal user experience at all times. For a custom meal service like FFF, access to real-time data will allow it to tweak meals to a customer’s shifting health attributes on a daily, weekly, or monthly basis.
Better user experiences through precise data collection
For companies and apps operating in the health-tech or fit-tech space, the data collection process is the starting point of the value chain as well as the customer journey. As such, the accuracy of this data is extremely important, and more precise data makes for a better user experience. When paired with a fitness tracker, apps such as Fitbit Coach and Nike Training Club can deliver a vastly superior experience that very closely reflects the needs of the user (based on their physical attributes) compared to when they are used in isolation and depend on user input alone.
Insurance giant AIA’s Vitality program is a great example. By integrating insurance with fitness trackers, the company can incentivize users to take care of their health and use the data to fine-tune their underwriting practices over time.
All major wearable manufacturers such as Apple, Fitbit and Garmin provide developers with access to APIs that make it a breeze to integrate wearables with web and mobile apps. Given below are the basics of what you need to know if you ever intend to integrate a wearable with an app. For the sake of simplicity, we will only be focusing on integrating the Apple Health, Fitbit, and Garmin platforms with an iOS app.
Integrating Apple Health
Of all the wearable platforms, Apple’s HealthKit platform is probably the most feature-rich and easiest to integrate. Due to its laser-like focus on privacy, Apple requires developers to obtain the explicit consent of users before accessing data. In true Apple style, the company provides developers with a set of guidelines for the purpose, and developers are expected to inform users of exactly how and why their information would be used. Typically, this can be accomplished by making amendments to the app’s Info.plist file.
HealthKit relies heavily on subclassing. At its most basic level, this is how a code snippet would look:
class HKQuantitySample : HKSample
HealthKit has several different data types of which ‘Quantity Samples’ is the most common. This data type grants access to data such as a user’s height and weight, pulse rate, etc. which can then be used by services such as FFF to build a user profile.
Here’s a sample of how the code for a query to find out the basal energy burn would look like:
guard let quantityType = HKObjectType.quantityType(forIdentifier: HKQuantityTypeIdentifier.basalEnergyBurned) else {
fatalError("*** Unable to create a step count type ***")
}
// Create the query
let query = HKStatisticsCollectionQuery(quantityType: quantityType,quantitySamplePredicate: nil,options: .cumulativeSum,anchorDate: anchorDate,intervalComponents: interval)
Integrating Fitbit
Fitbit is somewhat different from Apple in that it does not allow developers to access historical data. To get around this problem, developers can use Fitbit’s Health API (now known as the Web API)
The Fitbit API uses OAuth 2 as its authentication protocol. Since integrating a service through the OAuth 2 protocol can be messy, developers can rely on Swift’s OAuth library to complete the integration. This method should serve well in most instances and doesn’t take much time to implement as well.
Once a connection is established, the Fitbit APIs Profile and Activity endpoints (or any other endpoint) can be used to obtain the necessary data.
Here’s an example of a GET request that can be entered to obtain information about activities completed by the user:
GET https://api.fitbit.com/1/user/[user-id]/activities/date/[date].json
Once processed, the API would spit out this response:
Unlike Fitbit, Garmin’s Health API uses OAuth 1 as its authentication protocol. Don’t worry though, because Swift’s OAuth library supports both OAuth 1 and OAuth 2 protocols.
To fetch data, developers can use the Garmin API’s Activities and Dailies classes. Here’s a sample code snippet that can be used to obtain a daily summary of the user’s activity.
Here’s the GET request:
GET https://healthapi.garmin.com/wellness- api/rest/dailies?uploadStartTimeInSeconds=1452470400&uploadEndTimeInSeconds=1452556800
And that’s all there is to it, really (at least from a developer’s point of view). Happy coding!
If you are interested in finding out how we can help unleash a new wave of growth for your company with the smart use of technology, contact us via our website.
A handy primer on React Hooks / React Hooks is what happens when you bring a cannon to a knife fight
A little over a year ago, React 16.8 shipped with an additional API that lets developers use state and other features in React without writing a class. Known as ‘Hooks’, this additional API has grown in popularity amongst developers and is now a common feature in everything from open-sourced applications to enterprise apps.
Crucially though, React hooks are completely opt-in, which means there is no need to rewrite existing code. Hooks are also 100% backward compatible and don’t contain any breaking changes.
Why Use React Hooks?
Hooks were developed with the intention of solving a range of seemingly unconnected problems, which were hampering the evolution of React—a language that is not yet a decade old.
Hooks make it possible to:
Reuse stateful logic between components Hooks allow you to reuse logic between components without changing their architecture or structure.
Understand components easily When components become larger and carry out many operations, they become increasingly difficult to understand. Hooks solve this problem by allowing developers to separate a given component into various smaller functions which are related to each other.
Navigate classes (without tearing your hair out) To the novice, Classes in React can become quite confusing. To complicate matters further, computers also tend to get confused by Functions and Classes. For instance, minifies/uglifies don’t play well with Classes and can cause problems. With Hooks, developers can use more of React’s features without opting for Classes. This makes sense because when you really think about it, React components have always been conceptually similar to functions. In essence, Hooks embrace functions without discarding everything that is great about React.
Before going any further, there are two main ‘rules’ that need to be kept in mind.
Make sure to not use Hooks inside loops, conditions, or nested functions;
Only use Hooks from inside React Functions.
The Different Types of Hooks
React 16.8 ships with 10 in-built hooks, but the most basic and commonly used ones are:
useState()
The useState() hook allows developers to update, handle and manipulate state inside functional components without needing to convert it to a class component.
useEffect()
The useEffect() hook accepts a function that would contain effectual code. In functional components, effects like mutations, subscriptions, timers, logging, and other effects are not allowed to be placed inside a functional component. Doing so would lead to a lot of bugs and inconsistencies when the UI is rendered.
When useEffect() hook is deployed, the effectual function passed into it will execute right after the render has been displayed on the screen. By default, effects are executed after the render has been completed, but you can also execute them when certain values change.
useContext()
The useContext() hook accepts a context object, i.e. a value that is returned from React.createContext, and then returns the current context value as appropriate.
Prior to the introduction of the useContext hook, developers would need to set up a contextType or a to access the global state passed down from a provider in a class component.
useRef()
The useRef hook is a function that returns a mutable ref object whose .current property is initialized with the passed argument (initialValue). The returned object will persist for the full lifetime of the component.
Experienced developers will recognise the useRef hook as something that is used to access DOM nodes or React elements. However, it can also be used to keep any mutable value around similar to how you would use instance fields in classes.
Before vs. After: A Code Example
In order to demonstrate how effective Hooks can be, let’s try to build a simple counter. If we were to use Classes, this is how the code would look:
Line 1: The useState Hook from React is imported. It lets us keep the local state in a function component.
Line 4: Inside the Example component, a new state variable is declared by calling the useState Hook. It returns a pair of values, to which names can be given. We’ve called our variable count because it holds the number of button clicks. We initialize it to zero by passing 0 as the only useState argument. The second returned item is itself a function. It lets us update the count so we’ve named it setCount.
Line 9: When the user clicks, we call setCount with a new value. React will then render the Example component again, passing the new count value to it.
Bringing It All Together
Here is a little tutorial on how to implement a few basic hooks. In order to illustrate how each hook can be used, we will be attempting to build a small app within React.
A few tips from us on how to scale an app as an MVP gains traction
“Premature optimization is the root of all evil.” – Donald Knuth
Building an app and scaling it to millions of users is tough. As any seasoned developer knows, there is a lot that can go wrong, which is why it is always better to follow an iterative approach starting with an MVP (minimum viable product). The logic is sound: assemble a small team, develop in small increments to gather customer feedback with fewer costs and validate business and technical hypotheses before committing large resources to an idea.
But what happens after the MVP is out? What then?
The reception to the MVP may show that there is a business opportunity to pursue. The logical move at this stage is to put the pedal to the metal and allocate more resources toward the project.
This is when the trouble starts. It is normal for startups to adopt shortcuts in the engineering and architecting process in order to ship an MVP on time while making do with extremely limited budgets. Unbeknownst to them, this approach can often lead to costly setbacks such as those below:
New development efforts are hampered as new developers get lost in pieces of code that were hastily put together and are now difficult to understand;
The number of bugs keeps increasing and the development team starts spending more time fixing bugs than on developing new features;
Resource-intensive processes such as AI modules may have been implemented in sub-optimal ways to reduce development complexity and time, but turn into a headache for developers to fix later on
the app starts to slow down as the number of concurrent users increases, sometimes even crashing under moderate loads
It is at this point that founders, CTOs, and developers advocate for a complete rewrite of the app which is seldom realistic. The product has just started to gain momentum, and the pressure on both the top line and the bottom line of the company would be too high.
In the search for a quick remedy, developers typically consider scaling the app using hardware, which is now quite cheap thanks to large volumes of AWS/Azure credits that are doled out by service providers for free in order to drive sign-ups. Though this approach will make scalability issues go away for some time, it won’t actually solve the problem. In effect, it ‘kicks the can down the road’, thus leading the original problem to snowball into something much bigger and harder to fix.
That is why we at Calcey are strong advocates of Scalable MVPs and techniques.
Most people fail to understand the thinking behind MVPs / Credit: uxdesign.cc
Most people fail to understand the thinking behind MVPs / Credit: uxdesign.cc
When first building an MVP, it really does not make sense to build an app that can cater to millions of users, when you aren’t even sure if you can sign up ten users. On the other hand, building an extremely limited MVP will almost always result in a costly rewrite, in the event the MVP manages to gain traction. In this context, Scalable MVPs constitute a middle-of-the-road approach, and allow developers to limit the effort that goes into building an MVP while leaving the door open for easy scalability, should the need arise.
Even though an MVP is typically developed in haste, adhering to core design principles (SOLID) and best practices is important. When best practices such as separation of concerns, dependency injection, interface segregation, and the open-close principle are already in place, it is much easier to extend the application beyond the MVP stage.
Scalable MVPs and techniques deliver the following benefits:
Horizontal Scalability
A scalable MVP allows developers to manage server loads cheaply and efficiently through horizontal scaling. Compared to vertical scaling, horizontal scaling is less cumbersome and comes with the inherent benefit of elasticity, enabling development teams to add resources as needed. Developers can also turn to orchestration services such as AWS Elastic Beanstalk to automatically handle capacity provisioning, load balancing, scaling, and application health monitoring in the background, with minimal need for human intervention.
However, there is a caveat. Horizontal scalability is largely dependent on the database the MVP or app is built on. If there is a reasonable chance of user numbers growing rapidly, it is important to be mindful of the database’s need to be able to cater to a large number of parallel requests, a common scenario with multi-tenant applications. Therefore it is worthwhile to consider opting for NoSQL databases such as AWS DynamoDB and Azure Cosmos DB that support horizontal scaling out of the box, thus allowing for throughput to be easily increased based on demand.
From a technical standpoint, the difference in performance between a database with 1000 records or 10 billion records is marginal at best. However, NoSQL databases are not silver bullets. As with everything, they do come with some limitations. Designing your data model with a NoSQL mindset is tough, and requires the presence of developers with prior experience. But, paying attention to such factors early on, will make scaling up much easier later on.
Reduced Re-architecting
As an app moves through its cycle of maturity, re-architecting becomes almost unavoidable. However, re-architecting is a tedious process, but if correct principles have been followed in building the MVP, the degree of re-architecting required will be less because performance testing is easier. Once current performance levels and bottlenecks have been identified, the next steps usually reveal themselves. For instance, an MVP that was originally written in Cordova may have to be rewritten in native iOS and Android in order to accommodate a better user experience and features that draw on functionality native to a given device. Since a scalable MVP follows the same logic as building blocks, it becomes easier to decide which components must be developed, modified, or done away with, while making sure that the core functionality of the app remains unchanged in the eyes of the user.
Unit Testing
Once they gain traction, MVPs tend to expand rapidly, adding lots of features within a very short time. This will make it necessary to refactor the existing code, which can be very dangerous. However, scalable MVPs make it possible to carry out unit tests, which makes it safer to carry out refactoring. Writing unit tests does consume more time and would definitely have a negative impact on the delivery timelines of the MVP. But, if the development team has the experience and is comfortable with writing unit tests, it eventually offers great payback allowing the team to both develop and test faster, without getting bogged down in manual regression testing every time they need to release a new feature.
Launching an app and scaling it to handle requests from millions of users is hard. However, using scalable MVPs and techniques from Day One can make life a tad easier.
For more ideas on cutting-edge technology from the minds at Calcey, follow us on Facebook, Linkedin, and Twitter.
Tech
Transforming Businesses On A Budget With AWS Lambda
Here’s how Calcey helped a London-based food-tech startup transform its business with AWS Lambda
When you think about it, the process of ordering food through an app does seem like magic. A few taps here and there, and voila! Your food is already on its way. But unbeknownst to us, there is a lot that goes on behind the scenes. Take the case of Fresh Fitness Food (FFF), a healthy meal delivery service based in London with whom we have had the pleasure of working. Every day, FFF delivers thousands of bespoke meals to its customers across London.
To borrow a metaphor, if the complexity of a regular meal delivery app can be equated to the experience of driving a car on a busy road, the complexity involved in ensuring a bespoke meal delivery service such as FFF runs smoothly is akin to piloting a helicopter. Every minute adjustment from the user’s end can set off a chain reaction in the algorithm that powers the company.
Like most other technologically powered services, FFF too is powered by an algorithm whose main function is to carefully put together a set of bespoke meals to suit a given daily caloric requirement, which can vary from customer to customer. The actual meals are then prepared accordingly and delivered on a pre-set schedule. At first glance, this looks easy, but when you have to tweak thousands of meals a day, it quickly becomes a nightmare.
On a given day, FFF has to balance and create meal templates for anywhere between fifty to hundreds of new orders. While the existing infrastructure was capable of managing this workload, any change to existing recipes or meals invalidated all previous meal/recipe templates due to changes in the nutrients between meals. This created a need to re-balance and create new meal templates for a large number of orders within a short timeframe, and the existing infrastructure could not cope with this increased demand for speed and simultaneous processing power.
When we first spoke to the FFF team, we found that FFF was running its own legacy meal balancing algorithm on a regular server which was also used to host all their backend IT infrastructure. As a result, whenever the resource-intensive algorithm was run, it slowed things down enormously for the entire company. With the algorithm needing 2-3 minutes to process each order, re-balancing FFF’s full order volume would have taken up to 4 days, and left quite a few Londoners hungry and disgruntled in the process.
Our Solution
Once we realised that FFF’s ability to scale and grow as a business significantly depended on the efficiency of the meal balancing algorithm, it became clear that whatever solution we came up with must also be scalable seamlessly. Since FFF was not a large corporation with deep pockets, we also had to be mindful of running costs.
After careful deliberation, the Calcey team zeroed in on using AWS Lambda to host the new meal-balancing algorithm. AWS Lambda is a server-less service provided by AWS and is used to isolate time-consuming computing activities away from regular IT infrastructure. A process running on Lambda is easily scalable, provided the underlying dependencies can support it.
How AWS Lambda works /Credits: Amazon AWS
In deploying the retooled meal balancing algorithm for FFF, we had to throttle the performance of the Lambda service, in order to ensure harmony with the capabilities of the existing database. But we also gave FFF the ability to increase the number of concurrent executions by increasing the resources available to the database, should it ever become necessary.
Even with performance throttled, Lambda has been successful in speeding up FFF’s meal-balancing algorithm tenfold. What would have taken four days will now take only eight hours. That’s good enough for FFF’s current scale of operations and near-term growth plans. And the operating cost of this dramatic performance enhancement? USD 15 per month. Not to mention the significant cost savings reaped by shifting meal balancing from the existing servers to Lambda.
Our experience retooling a key business process using AWS Lambda is also a great lesson for developers and executives everywhere. Having understood FFF’s requirements, there was no need to overhaul the entire IT infrastructure, as suited-up consultants may tell you. Instead, with a little bit of ingenuity and pragmatism, it is possible to fashion outstanding IT solutions to business problems without burning a huge hole in a company’s budget.
If your business is also looking to move key business processes to the cloud, talk to us and we will be happy to help!
In order to find a tech-driven startup, one doesn’t necessarily have to be an expert in all things tech. However, if you are a non-technical founder, it is absolutely important to know the basic concepts because many tech decisions are business decisions.
But first, let us examine the three most common scenarios a non-technical founder is likely to find themselves in.
Scenario A: As a non-technical founder, you outright admit that you don’t understand the first thing about tech. This could put you in a weak and disadvantaged position and risk making you look unprofessional.
Scenario B: You pretend to understand because you think your developer is a genius and accept whatever they say because you don’t want to look…well, stupid. This risks you giving them full power and losing control.
Scenario C: You decide to learn the basics so that you are able to a) follow a discussion with the tech stakeholders, and b) make educated tech-related business decisions.
Out of the three scenarios above, Scenario C is the most desirable. Scenarios A and B may work under certain circumstances, but they can also spectacularly backfire and lead to expensive rebuilding, which is something a young startup could really do without.
Let us now move on to a few basic concepts which you need to be aware of, in order to at least commence a discussion with a technical stakeholder.
Native App vs Web App
Web Apps have evolved so much in recent times that sometimes, it can be hard to choose between web apps and native apps. In reality, there is very little difference between the two unless you are building something resource intensive such as a game or a VR app. The differences will largely become apparent only when it comes to the User Experience (UX).
Note: Do not confuse User Interface (UI) with UX. UI refers to the look and feel i.e. the outward design of an app, while UX focuses on gaining a deep understanding of users, what they need, what they value, their abilities, and also their limitations. It also takes into account the business goals and objectives of the group managing the project. UX best practices promote improving the quality of the user’s interaction with and perceptions of your product and any other related services.
A native mobile app will have to be downloaded via a platform such as the App Store (iOS) or Google Play (Android) and is generally built to take full advantage of all capabilities on the end user’s device. A web app, in contrast, is essentially a mini-version of a website itself.
As a non-technical entrepreneur, keep in mind that deciding between web development and mobile development is not just a tech decision but also a critical business decision. While it is possible to use native mobile apps and web apps to accomplish the same thing, your choice needs to take into account the current functionality of your app, the feature roadmap, and the user’s needs. You can learn more about choosing the right tech stack for your app here.
Frontend vs Backend
Perhaps the most frequently used words in a developer’s vocabulary, the frontend refers to the code of the app running on your device, and it is responsible for:
Requesting information from servers
Showing the information in a User Interface (UI)
Obtaining user interactions
But this is only half of the story. There’s a whole universe underneath the surface — which is what we are referring to when we say ‘the backend’. The backend consists of all the code running on the servers. The backend is responsible for:
Talking with other computers
Storing data
Serving data when requested
The backend of an app communicates with the gazillion other devices connected to the internet through elements such as HTTP (which is a protocol, or set of rules, which determine how computers communicate), IP addresses (which is like a phone number used to identify a server where information is stored), URLs (web addresses such as google.com), and DNS (a service which matches IP addresses with URLs).
Database and Storage
Though these terms are often used interchangeably, they are in fact, two completely different objects.
The database is the know-it-all, the memory behind everything. It holds data in some predefined format. Storage, on the other hand, is a place used to store a variety of data that may not even be related to each other (think code, images, videos, etc.)
A good way to understand a database is to think of it as a group of connected spreadsheets, it is composed of a number of tables and they can all be connected. A classic relational data model looks like this:
This is what a database looks like / Credits: hackernoon.com
NoSQL
NoSQL is a type of non-relational database that became popular with startups due to its high scalability. Though it is referred to as a non-relational database, that doesn’t mean that NoSQL is incapable of creating relationships between different data.
If you are building an app that handles information you will be dealing with databases a lot. But here’s what you need to remember:
Relational databases tend to be faster, in some cases, but are much more rigid structures. This means that whenever you want to change the structure you might break the data consistency.
Non-relational databases, on the other hand, are a lot more flexible. You can change the relations every day and the structure will remain intact. It is for this reason that they are widely adopted by early-stage startups because in an MVP (Minimum Viable Product) the database structure will potentially be changing every day.
Unless you are 100% sure about the Database structure from day one you should have a structure that allows you to iterate with ease.
APIs
Recall the distinctions we made between the front end and the back end much earlier in the article. Now, how do you get these two sections to talk to each other? That’s where an API comes in.
An API is a common language that allows the backend and the frontend to communicate with each other, thus opening up the opportunity for you to connect your app to a vast variety of third-party services.
An API or microservice-based architecture, should you use it, will allow you to build different parts of your app in different languages, thus giving you the freedom to choose the best tools for each individual module. For instance, consider how LinkedIn is built. LinkedIn may have only one backend but several frontends such as a web app, an iOS app, and an Android app. All these individual modules can easily communicate with the backend with the use of a common API.
That largely covers the basics of what you need to know about tech as a non-technical founder, and we hope this information helps you make informed business decisions that can be critical for the growth of your business. By now, you should also be able to understand your technical stakeholders better.
If you can’t, the problem may very well lie with your technical partner(s) and could mean that they don’t know how to adapt their communication to suit their audience. In that case, you would probably be better off looking for a different technical partner to avoid running into bigger, much costlier problems down the line.
A lockdown and a recession brought about by a pandemic sound like the worst time to start working on a startup. Think again.
Cover image credits: Mind Cafe/Medium.com
He who has no dog hunts like a cat” – Old Portuguese Proverb
As we write this, the world is under lockdown. Large businesses are furloughing workers, and small businesses are shutting down. By all measures, it may seem unwise to contemplate or begin work on that MVP you have been thinking about for a long time now.
Or is it? Baron Rothschild, an 18th-century British nobleman and member of the Rothschild banking family, is credited with saying that “the time to buy is when there’s blood in the streets.” He should know. Rothschild made a fortune buying in the panic that followed the Battle of Waterloo against Napoleon.
Similar sentiments seem to prevail in Silicon Valley too. Here’s a recent tweet by Paul Graham, the founder of Y Combinator.
Investors: Any startup that gets started during the next few months is disproportionately likely to succeed. Success depends most of all on determination, and imagine how determined you have to be to start a startup in the middle of a global pandemic.
At Calcey, we are also inclined to agree with these views. Here’s our reasoning.
Downturns create problems that entrepreneurs can solve
Recessions create a variety of new problems, and entrepreneurs are problem-solvers at heart. Technology-based businesses typically go through a period of product development and finding product-market fit while in their pre-revenue phase. An economic downturn makes it easier to find this elusive product-market fit, since customers tighten their purse strings, thus forcing actual pain points to make themselves visible.
Easier to put together a good founding team (while big companies shed workers)
A downturn can make it easier to put together a good founding team. It is a well documented fact that the most successful founding teams usually consist of mid-career professionals who walked away from their regular jobs, either by choice or by circumstance. Going by this logic, the typical mid-career professional tends to be paid handsomely while being employed at a bigger, low-risk company during boom times. However, their handsome remuneration packages make them very vulnerable to layoffs during lean times, when large companies look to trim their fat.
And the lean times will come as they have now, and you will find many hyper-talented, experienced individuals joining the ranks of the newly unemployed. At this point, they may be willing to consider co-founding a startup, something they would have never thought about otherwise. However, do remember that for talented individuals with enviable track records, unemployment is a very brief experience. As soon as the economy shows the first signs of a recovery, they will be snapped up by larger companies. You have a small window to make use of this opportunity but don’t ever try to offer them a bad deal. Instead, talk to them and see if they are interested. See if they will make for a good co-founder, and go ahead with the hire.
You get to hone your business model in the harshest of conditions
Startups that succeed in finding product-market fit during a bear market often get there using a mix of ingenuity and a relentless focus on the product. The lack of VC funding and limited finances will force them to remain lean and agile, avoiding bloat and distractions.
Once the recession gives way to recovery, these battle-tested startups will find it easier to attract VC money. After all, it is hard to ignore the very convincing business case of a startup that convinced customers to part with their money during a time when they’d rather not.
Discipline and focus will become part of your startup’s culture
Frugality is one of Amazon’s 14 leadership principles. The company actively embraces frugality, claiming that “Constraints breed resourcefulness, self-sufficiency, and invention. There are no extra points for growing headcount, budget size, or fixed expense.”
This is very true. The most creative and innovative solutions are born when you have to make do with less. Just ask Brian Chesky and the AirBnB team, who ended up founding the lodging marketplace behemoth simply out of a need to make some extra money during the financial crisis of 2008.
The AirBnB co-founders resorted to selling Obama-themed breakfast cereal at one point, in a bid to make AirBnB work / Credits: Google
You bootstrap for longer, and end up with more equity
Startups founded during a recession are more likely to have been bootstrapped, and as a result, have no choice but to focus on achieving their revenue targets. Bootstrapped startups that make it out of a recession can afford to give away less equity to any potential venture capitalists since the underlying business model is already generating cash.
Besides, with no immediate need for cash, you can take your time to carefully vet any potential investors, so that they end up being a good fit for your startup.
You can build better, at a lower cost
During a recession, prices tend to come down and smart entrepreneurs know to take advantage of this. If you are building a technology startup, the costs of hiring external service providers are also likely to be lower, compared to what it would be during an economic boom. External developers and enterprise service providers would be happy to offer you discounts and better terms. What all this means is that you get to build your product for much cheaper.
It’s easier to gain someone’s attention
There has never been a moment in recent history where the entire world is at home, free from the many distractions which compete for our attention everyday. As a result, people will be in a better state of mind to listen to new ideas, ruminate on them, and actually respond. So, if you are thinking of pitching a new idea to a customer or a potential co-founder, this is the time to go for it.
Isn’t that great?
If you are working on an MVP, a full-blown app, or something similar while on lockdown, why not give us a call? We are working remotely too, and would be happy to see how we could help!