Kogan.com Dev Blog

Kogan Dev Blog

A New Software Engineer’s Journey at Kogan.com

We are always excited to welcome new talent to our team! At the heart of our engineering culture is a robust and agile onboarding process that gets new joiners up to speed in no time. We pride ourselves on helping our teams hit the ground running, shipping fast, experimenting boldly, and embracing failure as a valuable part of learning.

Our onboarding is designed to immerse new team members in the action right away. From day one, they’re trusted to roll up their sleeves and tackle exciting challenges. Teams are encouraged to ship their first changes early, iterating quickly and gaining exposure to the "fun and gritty" aspects of the work. As part of our dev blog series, we speak to Fraser, one of our newest engineers, to hear about his experience joining the team and how our unique approach has supported his journey so far.

What was your first impression of the team and the kind of work you get to do here?

Joining this team has been an incredible journey, working alongside highly experienced engineers has been inspiring. It’s a fantastic environment to grow, learn, and problem solve alongside some of the best minds.

Can you describe the first project or task you worked on after joining?

I’m currently working on a project with one of Kogan.com’s verticals. It's a migration and integration project with a major financial institution. It’s been an exciting new experience, offering valuable insights and opportunities to learn.

What excites you most about the technology or product you're contributing to?

I hadn’t worked with the Django framework commercially before, but it’s been exciting to explore the structure of a large-scale Django application and come up with innovative ways to future-proof it.

How does this experience compare to other roles or teams you've been part of?

Kogan.com’s focus on in-person collaboration is incredibly refreshing. I truly value the emphasis on face-to-face conversations and the ease of tapping someone on the shoulder to quickly understand different parts of the application. It’s absolutely invaluable 🙂

Kogan.com Engineering Growth Paths: From Pricing Manager to Data Engineer

Committed to learning and continuous improvement, Kogan.com’s Engineering team develops its engineering talent through giving and taking responsibility, co-creation, mentorship, and internal mobility opportunities to grow and advance their careers. There are opportunities for Engineers at Kogan.com regardless of background. Some engineers at Kogan.com are Individual Contributors, Tech Leads or People Managers – and engineering growth paths and aspirations are supported throughout their journey. Featured here is Reuben Orange, our latest addition to the team who joined us through Kogan.com’s internal mobility program. After a highly successful 10-year journey in the Purchasing team, we were excited to support Reuben's career aspirations and his passion in all things data and software engineering.

With an Educational background in Mathematics and extensive experience across various roles within Purchasing, Reuben brings a unique skill set to his new role.

Collaborating closely with our Data Engineering and Business Intelligence squad,Reueben plays a crucial role in developing, managing, and optimizing infrastructure, tools, and processes important for meeting Kogan.com's analytics and data requirements.

Reuben's wealth of domain experience, coupled with his genuine passion for data and meticulous attention to detail, positions him as an outstanding Data Engineer member to the team. Tell us Reuben….

What initially sparked your interest in transitioning your previous role as pricing manager to data engineering? The pricing manager role was created to develop a “pricing strategy”, I called it “making sure we don't end up on an episode of Hoarders”. We needed to bring Kogan’s inventory level down from our very high post COVID levels, to a more reasonable position, while salvaging as much value as possible. Together, the whole team did that very successfully, and we now get much more value from a dollar invested into inventory than we did before. The role involved a lot of data querying, cleaning and crunching, which I enjoyed. And now as a data engineer, I can do even more of that! While also learning from the amazing DEBI (Data Engineering and Business Intelligence) team.

What were the biggest challenges you faced during your transition, and how did you overcome them? Wrestling with new tools has been a challenge, pushing, pulling, sprinting. I was comfortable living in a spreadsheet, but now I live in the belly of a python script. But I reckon the biggest challenge has been letting go of the old role. Old tasks die hard!

Can you share some specific examples of how skills from your previous role have been valuable in your new role? I am lucky in my old role I gained experience writing SQL and building dashboards, with the help from some great mentors. But a large part of the data engineering role is playing detective, you have to understand the data, and how it’s all connected, to get some value from it. So it has helped having experience as an end user of the data. For example, how are the different objects in the admin panel connected, or what do we mean when using different terms like AGPDI or Gross Sales.

How has your day-to-day work as a data engineer differed from your previous role as a pricing analyst? I would say the biggest change is the Engineering way of working, agile. Every day, we have a stand up to chat about what we’re working on, and what we’re planning to work on, and if anything is blocking us. When completing a piece of work, we always get feedback on it from the rest of the team, everybody knows a lot about what I’m working on, and could easily pick up where I left off. We also have continuous improvement baked in, with fortnightly retrospectives, where we look back at what did and didn’t work.

What advice would you give to others looking to make a similar career transition? I wouldn’t say it’s easy to get into software engineering, it's a lot of work, but I would say it’s very accessible, more so than ever. There is a rich vein of golden knowledge out there on the internet, you just have to mine it.

Project Spotlight: Optimise Product Updates/ Creates on pipelines

Challenge - Our platform which houses millions of products were subject to regular updates by Marketplace sellers via APIs or by Kogan.com's internal teams. However, an arduous average update pipeline duration of 8 hours hindered the prompt visibility of these changes to customers on the website or app.

Determined to tackle this challenge, our focus rested on expediting the update process while concurrently reducing infrastructure costs so that our customers can swiftly access the most recent product information.

An analysis of the update pipeline revealed several areas requiring our immediate attention:

  1. Repetitive Update Events - recurrent API calls made by Marketplace sellers resulted in duplicated update events for the same product. This redundancy significantly impeded operational efficiency.
  2. Sluggish Database Queries - inefficiencies in database queries engendered prolonged processing times, undermining the timely dissemination of updated product information.
  3. Architectural Bottlenecks - restrictive architectural elements posed as bottlenecks, impinging on system throughput and curtailing overall performance.

To overcome these hurdles, the following measures were taken:

  1. Enhanced Diffing Logic - by leveraging an opensearch cluster, we revolutionized our diffing logic. This sophisticated cluster facilitated real-time comparison of incoming API payloads. Consequently, if no alterations were detected in the product information, redundant requests were skipped, culminating in a more expeditious system.
  2. Optimized Database Queries - a Thorough optimization of database queries was undertaken, incorporating prefetching techniques and mitigating the prevalence of joins and n+1 queries. This meticulous overhaul addressed the root causes of sluggishness, resulting in expedited processing times.
  3. Introduction of a Datastore - a revolutionary datastore was introduced, specifically designed to house denormalized product data. This datastore formed the bedrock of product information display to customers, effectively reducing dependence on Opensearch and enabling its gradual scaling down. The introduction of this refined infrastructure bolstered system responsiveness and agility.

By implementing these measures, we were able to address inefficiencies on our product updates in a timely manner. Our actions played a big part in providing our customers a more seamless experience on our site! This also enables us to scale our operations so we can support a wider range of products and continue meeting the needs of our customers in the future.

Widgeting around Kogan.com Hack Day!

There’s never any rivalry between Mobile developers vs Web developers, right? Well, the intrigue of what happens in the (more exciting) mobile development space piqued the interest of our frontend and backend mates, so a few joined the Kogan Apps team along with our talented UX designer to tackle a project part of a recent Hack Day.

An idea was pitched to develop a Kogan widget for both iOS and Android devices. On any given day, we have multiple deals going on (see below for a screenshot from our website) but we narrowed it down to showcasing our popular ‘Kogan Daily Deal’ - complete with its own countdown timer to firstly, generate excitement and the sense that time is running out and secondly (and importantly in the world of eComm) to induce FOMO to prompt our users to purchase!

Divide and conquer! (How we started)

Consistent with Agile methodology, we created a backlog of tasks and divided them amongst our teammates. The web developers tackled the API, the mobile developers started their widgeting and UI/UX designed away. 

We did manage to squeeze in a quick 101 for the web devs about the wonderful worlds of SwiftUI and JetPack Compose. WD1 (web developer one) tried to relate with how Angular, Vue or React works for the frontend, which is understandable and WD2 (web developer two) amused themselves with the discussion. It did come up later in conversation that WD2 had been a Mobile developer in the past and worked with Objective-C. Despite showing WD1 & 2 the cooler things that can be achieved with SwiftUI and Jetpack Compose, they remained unconverted - but hey, that’s their loss! 

Henceforth, we will relay our learnings and achievements as conquerings!

Conquering #1

For a Mobile developer (MD) that creates the UI and writes code in either Swift/Objective-C or Kotlin/Java, they understand the pains of working with an Imperative Programming Language. However a WD or a frontend developer is blissfully unaware of these issues. They work with FlexBox and CSS, whereas a Mobile or Desktop developer has to work with making the UI as pixel perfect as the designer conceptualized. With a Declarative Programming paradigm like SwiftUI or Jetpack Compose, it makes it easier for our MDs to create the UI, similar to the ease of our teammates using FlexBox and CSS.

When the designs were completed, the next task was to compose the UI using Declarative. As we were waiting for WD1&2 to finish the API that would retrieve the Daily Deal data, static images were used as a placeholder. 

Conquering #2

There was no API in the Kogan-verse to consume the Daily Deal data, so a handy bit of reverse engineering helped WD1 locate the data source such that they were able to create a wrapper to provide the necessary API endpoint that would return Daily Deal structure.

Matching the UI designs accurately on the Widget using SwiftUI was difficult! Where SwiftUI allows for composing new components quickly, it also has its fair share of quirks because the layout gave us some grief! We did end up getting the images to load, but getting the timer to tick away per the three boxed component design proved too challenging to hack on the one day.

Conquered

We completed the widget family for various sizes per the screenshots below. SwiftUI allows for previewing multiple views simultaneously. 

Conquering #3

With SwiftUI or any framework, if we embed data into a scrollView, we have an instant list of multiple items that can be scrolled and viewed. We spent time trying to make scrollView work, only to realize that it crashes the code and SwiftUI does not provide a scrollView to a widget. So the List of Hot Deals had to be limited from a scrollable list to a list of 3 items.

Conquering #4

Making a lot of formatting functions and styles only highlighted that the designs could be improved. While we were working with a declarative way to create the components, having sizes that were fixed ranging from 11 to 22 points was not the best idea. In hindsight, we could have followed the Apple methodology to declare the styles, just like in CSS, and then apply a Heading, Body, type tag etc to an element rather than adhere to strict font sizes. 

Conquering #5

In the designs there were places where the Price did not have decimals and places where the decimal place digits had a smaller font. This got complicated since the textbox that hosted “$479.75” needed to be split into the three components, “$”, “479” and “.75”, then they needed to be formatted accordingly.  So similar to the TimerView above, and to make it customisable, we put a flag in to conditionally display the decimal points to work for both “$479.75” and “$599” type designs. Passing the font sizes and getting the decimal part of numbers is quite painful when dealing with computers storing numbers in 4 bytes. 0.99 would become 0.9900000000000000001 or 1.00 would become 1 and not have any trailing zeros. Our Javascript friends could use strings to take the characters around the decimal point. However we used Swift NumberFormatter to provide a minimum and maximum of 2 decimal places to ensure consistency, and used the suffix command to get the last 2 digits.

Finish

Our conquering process to develop a widget was an interesting one. Experimenting with the quirks of the language and technology enabled us to highlight learnings that were valuable and applicable to our day to day development work as Mobile engineers. And working alongside our WD friends harmoniously to achieve our goals, while showcasing to them the wonderful world of app development, is always a bonus. Onwards and upwards as we look forward to conquering the next hack day!