# How do you understand the large code base of okteto?

**URL:** <https://community.okteto.com/t/how-do-you-understand-the-large-code-base-of-okteto/714>\
**Category:** Help\
**Created:** [March 10, 2023, 5:45pm UTC](https://community.okteto.com/t/how-do-you-understand-the-large-code-base-of-okteto/714 "2023-03-10T17:45:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NitishKumar06](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/nitishkumar06/32/302_2.png) [@NitishKumar06](https://community.okteto.com/u/NitishKumar06)\
**Post date:** [March 10, 2023, 5:45pm UTC](https://community.okteto.com/t/how-do-you-understand-the-large-code-base-of-okteto/714/1 "2023-03-10T17:45:16Z")

</div>

Hi, this might sound like a very silly question to all the people out there who are contributing to the code base of okteto.

**Background:** This is my first time coming up with solving an issue that involves coding and believes this is one of the best ways for me to get started with code contributions to okteto. Here’s the issue that I’m currently working on: [Show spinner while checking if the image needs to be built · Issue #3433 · okteto/okteto · GitHub](https://github.com/okteto/okteto/issues/3433)

Here are the following questions that I’d like to be guided about from the community:

1. What is the approach you follow to understand a large code base of any project, for eg. okteto?

2. How do I use okteto CLI with my latest changes being applied?

3. Let’s assume I’d like to modify a specific function. Do I need to understand each and every line of that function - including arguments, why are they being used? How do you go about it?

Looking forward to your response!

---

<div class="post-metadata">

**Author:** ![AgustinRamiroDiaz](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/agustinramirodiaz/32/34_2.png) [@AgustinRamiroDiaz](https://community.okteto.com/u/AgustinRamiroDiaz)\
**Post date:** [March 13, 2023, 10:56am UTC](https://community.okteto.com/t/how-do-you-understand-the-large-code-base-of-okteto/714/2 "2023-03-13T10:56:56Z")

</div>

Hi @NitishKumar06 !

First of all thank you for your interest in okteto ❤

I’ll try to be as explicit as possible, but follow up with more questions if needed 😃

> What is the approach you follow to understand a large code base of any project, for eg. okteto?

- Check for docs. In okteto we have
  - [contributing guide](https://github.com/okteto/okteto/blob/master/contributing.md)
  - [official web docs](http://okteto.com/docs)
  - [README](https://github.com/okteto/okteto/blob/master/README.md)
  - [code of conduct](https://github.com/okteto/okteto/blob/master/CODE_OF_CONDUCT.md)
  - [docs folder](https://github.com/okteto/okteto/tree/master/docs)
  - And the community we are talking through right now

- Check for [issues](https://github.com/okteto/okteto/issues) and [prs](https://github.com/okteto/okteto/pulls) to get a sense of what’s going on
- Be familiar with the programming language: We are using `golang` and we are using the [cobra package](https://cobra.dev/) in order to create a CLI. Understanding this will help you a lot to traverse the files from `main.go` to its imports as if they were a sort of tree directory structure. If you check [main.go](https://github.com/okteto/okteto/blob/master/main.go) you’ll see that all the commands get registered there. This is a great starting point to explore.  
We are following the standard of having a [cmd folder](https://github.com/okteto/okteto/tree/master/cmd) and a [pkg folder](https://github.com/okteto/okteto/tree/master/pkg).
- Ask and cooperate: This post is exactly that, asking to the community in order to know what to do and how to get guidance
- Get a sense of the tool: In order to understand the concepts that are described in the code, you’ll need to have some knowledge as a user

Anyways, this is my POV so complement it with other online resources like [How to Contribute to Open Source Projects – A Beginner's Guide](https://www.freecodecamp.org/news/how-to-contribute-to-open-source-projects-beginners-guide/)

> How do I use okteto CLI with my latest changes being applied?

There are docs on this [here](https://github.com/okteto/okteto/blob/master/contributing.md#development-guide).

The main idea is that you will compile the code with `golang` and that will output an executable binary file. Then, you can use that binary as if you’d use the classic `okteto` cli command in order to test your changes. If you are interested in what’s going on under the hood, check out the [Makefile](https://github.com/okteto/okteto/blob/master/Makefile) which what’s being used with `make`. `Makefiles` are one of the most common developer shortcuts to writing commands

> Let’s assume I’d like to modify a specific function. Do I need to understand each and every line of that function - including arguments, why are they being used? How do you go about it?

At first I’d follow “the less you know the better” approach in order to not overload yourself. Try to be as atomic and scoped as possible in order to fulfill your particular need. This is very hard to do since often times the code is entangled with other pieces that affect your behavior, but it’s a great way to start digging into the project. I’d suggest trying to get a sense of inputs and outputs first, and then dig into the logic inside

* * *

All this being said, if you found any of this useful and think of a way to distribute this knowledge as docs in the [repo](http://github.com/okteto/okteto), feel free to open a PR 😃

Happy coding!

---

<div class="post-metadata">

**Author:** ![NitishKumar06](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/nitishkumar06/32/302_2.png) [@NitishKumar06](https://community.okteto.com/u/NitishKumar06)\
**Post date:** [March 13, 2023, 2:38pm UTC](https://community.okteto.com/t/how-do-you-understand-the-large-code-base-of-okteto/714/3 "2023-03-13T14:38:03Z")

</div>

@AgustinRamiroDiaz Thanks for mentioning these points! I appreciate you spent time writing this:)
