Skip to content

Instantly share code, notes, and snippets.

@sumanth-rajkumar
Last active March 31, 2023 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sumanth-rajkumar/705e0247c1b48f78bfded8fa58a98aa0 to your computer and use it in GitHub Desktop.
Save sumanth-rajkumar/705e0247c1b48f78bfded8fa58a98aa0 to your computer and use it in GitHub Desktop.

Google Summer of Code 2022 with Apache - Product Report

This product report is a summary of the work I did for the commons-numbers client under the Apache software foundation as part of Google Summer of Code 2022.

Project Description

Goals

  • Single Complex API with abstractions that allow for efficient data structures
  • Functional interfaces for complex unary and binary operators & functions
  • Refactoring complex API with use of Java 8 language features like lambdas

Pull Requests Merged

Refactoring Complex class using functional interfaces and static methods

Refactoring test methods with new functional interfaces

  • PR-117: As a first step, refactored log and log10 instance methods of Complex class as static functions
  • PR-118: Refactored all unary operations instance methods of Complex class as static functions
  • PR-119: Refactored all binary operations instance methods of Complex class as static functions
  • PR-120: Refactored all complex-scalar binary operations instance methods of Complex class as static functions

Abstracting the representation of multiple complex numbers into a list structure

Unit tests for list operations

  • PR-121: Representation of multiple complex numbers into a list structure storing real and imaginary parts in an interleaved format
  • PR-123: Additional list operations that are applied in-place

Making complex list implementation abstract to allow for multiple underlying data representations

  • PR-124: Private sub-class storing real and imaginary data with an interleaved double array format
  • PR-125: Private sub-class storing real and imaginary data in an non-interleaved format using 2 double arrays

Future Enhancements

I would work on enhancing support for complex binary and scalar operations by developing complex matrix/array API. This would help in advancing tests of scalar and binary operations for replaceAll by having the second argument change when applied to each element of the list. I would also like to implement a concurrent functionality allowing operations on large lists to work efficiently by breaking the list up in parts and running them in parallel. Another feature would be to make the current list formats returned as unmodifiable. This could be done by not implementing the methods that change the list (set, add). This would allow for a list abstraction of the complex data that can be used with get and forEach methods.

Personal Benefits

  • Learned how to raise PR's and now have a better understanding of git
  • Learned how to create unit tests to achieve full code coverage
  • Learned how to debug and fix code issues
  • Learned the importance of documentation
  • Learned how to work and contribute to the open-source world

Acknowledgements

I am incredibly grateful for the chance to take part in this program, develop my programming skills, and improve the commons-numbers project.

I am incredibly appreciative of my mentors for their continual support, thorough and fast code reviews, and participation in regular discussions to answer my questions.

The Apache community has been very helpful and their efforts to improve developer experience has made me very grateful to be a part of their organization.

Important Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment