logo

Resources/Blogs/Technology

How Freight Tiger Leverages AI in Tech Development

By Freight Tiger News Desk/5 minutes read
blog_image_large

“The next wave of AI — the biggest wave of AI — is about companies around the world using AI to be more productive, as their digital employees/agents/copilots” – Jensen Huang, NVIDIA CEO”

As Jensen Huang, CEO of NVIDIA, points out, we are on the cusp of a new era where AI is becoming an integral part of companies’ productivity strategies. The concept of AI as “digital employees/agents/copilots” represents a paradigm shift in how we approach productivity and innovation in the workplace.

At Freight Tiger, we’ve fully embraced this vision of AI as a productivity multiplier. Our integration of Cursor AI into our development workflow exemplifies how AI can serve as a digital employee, agent, and copilot in the realm of software development.

This blog post will dive deep into how Freight Tiger leverages AI to boost efficiency by producing consistent documentation, comprehensive test cases, and cleaner code, all while giving our developers more time to focus on innovation.

Cursor AI: Overview

Cursor AI is an AI-driven code editor based on Visual Studio Code. It uses advanced machine learning models, like GPT-4 and Claude-3.5-Sonnet, to assist with code generation, context-aware analysis, multi-language support, Natural language querying, automated refactoring suggestions.

Use Case 1: Documentation Generation

Before integrating Cursor AI, our documentation process, while thorough, often required extra time and effort. This occasionally extended onboarding for new team members and slowed down knowledge sharing. With Cursor AI, we’ve streamlined these processes, making documentation faster, more consistent, and easier to manage, which has significantly boosted both onboarding speed and developer productivity.

 

Implementation

We integrated Cursor AI into our documentation process as follows:

  1. Input: Developers provide the codebase and specific documentation requirements to Cursor AI.
  2. AI Processing: Cursor AI analyzes the codebase and generates comprehensive documentation.
  3. Output: Markdown-formatted documentation including:
    • Application workflow descriptions
    • Sequence diagrams
    • Low-level design documents
    • API endpoint specifications with input/output details
    • Database schema documentation
  4. Review: The development team reviews and refines the AI-generated documentation.

Results

  • Documentation generation time reduced from an average of 3-4 days to 2-3 hours per project module.
  • Improved consistency in documentation across projects.
  • Enhanced cross-team collaboration due to better understanding of existing functionality.
  • Reduced onboarding time for new team members by approximately 40%.

Use Case 2: Test Case Generation

Our development team identified an opportunity to enhance our product’s reliability and scalability through increased unit test coverage. By implementing a more robust testing strategy, we’re proactively addressing potential issues and streamlining our quality assurance process. This initiative will not only improve our product’s performance but also increase our development efficiency in the long run.

Implementation

We employed Cursor AI to generate test cases using the following process:

  1. Input: Developers specify the class or function to be tested.
  2. AI Processing: Cursor AI analyzes the code and generates a comprehensive test suite.
  3. Output: JUnit test suite including:
    • Positive test cases
    • Negative test cases
    • Edge case scenarios
  4. Review: Developers review, augment, and integrate the generated tests.

Results

  • Test case generation time reduced to 20-30 minutes per class, down from several hours.
  • Test coverage increased from an average of 50% to 75%.
  • Reduction in production bugs related to edge cases by approximately 30%.
  • Improved code quality and reliability due to comprehensive testing.

Use Case 3: Code Development Assistance

Developers spent significant time on boilerplate code and repetitive tasks, reducing overall productivity and potentially introducing inconsistencies in coding patterns. In our implementation, we leveraged Cursor AI to streamline both frontend and backend development processes, where the AI assists in transforming Figma designs into functional React components and generating API endpoints based on specified requirements. This approach enables developers to focus on code refinement and integration while the AI handles initial code generation, significantly accelerating the development lifecycle.

Implementation
We utilized Cursor AI for both frontend and backend development tasks.

Frontend Development

  1. Input: Developers provide Figma design links and component requirements.
  2. AI Processing: Cursor AI analyzes the design and generates React component code.
  3. Output: Functional React component code, including styling and basic functionality.
  4. Review: Developers review, refine, and integrate the generated code.

Backend Development

  1. Input: Developers specify requirements for new features or API endpoints.
  2. AI Processing: Cursor AI generates code based on the requirements and existing codebase.
  3. Output: API endpoints, business logic, and data layer interactions.
  4. Review: Developers review, test, and integrate the generated code.

Example Prompt (Backend)

Create a new API endpoint for updating supplier information in Google Sheets:

  1. Define the endpoint structure (PUT /api/supplier/{supplierId})
  2. Implement input validation for supplier data
  3. Create a service method to update the Google Sheet
  4. Handle error scenarios and return appropriate HTTP status codes
  5. Implement logging for auditing purposes

Results

  • Development time for new features reduced by approximately 30-40%.
  • Increased consistency in code structure and patterns across the project.
  • Reduction in time spent on boilerplate code by 50%.
  • Improved code quality due to AI-suggested optimizations and best practices.

Quantitative Impact

By embracing AI as our digital employee, agent, and copilot, we’ve dramatically improved our development processes – slashing documentation time by 70-80%, boosting test coverage to 75%, and increasing overall development speed by 30-40%. These gains have freed our human developers to focus on innovative problem-solving and creative feature design, elevating their role from code writers to strategic innovators.

Conclusion

The integration of Cursor AI into Freight Tiger’s development workflow has significantly improved efficiency in documentation, testing, and code development processes. By automating time-consuming tasks and providing intelligent assistance, we have been able to focus more on complex problem-solving and feature innovation.

Future work will focus on further integration with our CI/CD pipelines, exploration of automated code review processes, and expansion of AI-assisted development practices across more projects within the organization.

Email icon
Whatsapp icon
facebook icon
twitter icon
SHARE
share

Authored By

Freight Tiger News Desk

More about the Author

Freight Tiger News Desk

Published on 10 Oct 2024

BlogsTechnology

Get our resources in your Inbox

Get our latest blog posts, videos, webinars, case studies, whitepapers and events, straight in your inbox. No spam, we promise.

Related Reading