9 Replies - 4091 Views - Last Post: 24 August 2019 - 08:55 AM

#1 Hack3rcon   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-August 19

How can I start development an open source project?

Posted 23 August 2019 - 07:05 AM

Hello,
I downloaded an open source program and when extracted it then it have a lot of files and directories. I don't know how can I start and where is a good place for start?
How programmers read long codes and understand them? Any tool or trick?
I'm thankful if someone help me.

Thanks.
Is This A Good Question/Topic? 0
  • +

Replies To: How can I start development an open source project?

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15219
  • View blog
  • Posts: 60,924
  • Joined: 12-June 08

Re: How can I start development an open source project?

Posted 23 August 2019 - 07:12 AM

Start by defining what you want to do, goals, interaction, user actions, etc. Get the idea fleshed out.

Then narrow down where your changes would be most likely would be found. If need be a simple file search or start with a known action and walk through the code following the logic to where you need to be.

There's no real guide on reading code or understanding. It typically comes with writing your own code, doing your own projects, etc.
Was This Post Helpful? 0
  • +
  • -

#3 Hack3rcon   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-August 19

Re: How can I start development an open source project?

Posted 23 August 2019 - 07:17 AM

View Postmodi123_1, on 23 August 2019 - 07:12 AM, said:

Start by defining what you want to do, goals, interaction, user actions, etc. Get the idea fleshed out.

Then narrow down where your changes would be most likely would be found. If need be a simple file search or start with a known action and walk through the code following the logic to where you need to be.

There's no real guide on reading code or understanding. It typically comes with writing your own code, doing your own projects, etc.

Thank you for your reply.
A programmer that want to understand a project, will read all lines of code? Some of codes related to each other or files :(
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15219
  • View blog
  • Posts: 60,924
  • Joined: 12-June 08

Re: How can I start development an open source project?

Posted 23 August 2019 - 07:18 AM

I mean.. maybe? If it's needed I guess that's a route. I tend to shake down into areas/functions I may need or have interest aligned with my goals.
Was This Post Helpful? 0
  • +
  • -

#5 Martyr2   User is online

  • Programming Theoretician
  • member icon

Reputation: 5454
  • View blog
  • Posts: 14,405
  • Joined: 18-April 07

Re: How can I start development an open source project?

Posted 23 August 2019 - 07:20 AM

Simple, poke around. Often times when I don't know where to start, I start somewhere. What does this function do? If I change this class, what happens? Can I get the program to do something different? Can I change a message it is sending out? What if I comment out this line of code?

What this will do is cause you to start tinkering and then that leads to ideas. It is like if you ever doodled while talking on a phone call. You start drawing a shape, maybe shade it, what if you add in a square? Next thing you know, you have the beginnings of a masterpiece and all out of nothing to start.

As they say for writers, just start writing. As for coders, just start messing with code. I don't think you HAVE to go in with a goal in mind, but goals can form when you just start messing around.

:)

This post has been edited by Martyr2: 23 August 2019 - 07:21 AM

Was This Post Helpful? 0
  • +
  • -

#6 jon.kiparsky   User is online

  • Beginner
  • member icon


Reputation: 11623
  • View blog
  • Posts: 19,754
  • Joined: 19-March 11

Re: How can I start development an open source project?

Posted 23 August 2019 - 08:06 AM

I assume you're trying to fix some bug that's listed in the issues list. If not, stop what you're doing and go to the issues list and pick an issue. Often projects will tag certain issues as "entry-level" or "beginner" or something, if there are any such, grab one of those.

Start by reproducing the issue. This will probably require building the project locally and following the repro steps in the bug ticket.

From there, you'll want to read enough of the code to figure out where the issue is located, and then read through that code and understand why you're seeing what you're seeing, and how to fix it.
Was This Post Helpful? 0
  • +
  • -

#7 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7024
  • View blog
  • Posts: 23,849
  • Joined: 05-May 12

Re: How can I start development an open source project?

Posted 23 August 2019 - 11:38 AM

My copy of "Beautiful Code" is buried amongst my other books in the attic. I vaguely recall there was a small section in it about how to dive into somebody else's code. As I recall, it involved reading the readme and developer's notes first, then getting familiar with the directory and file layouts. After that is getting familiar with the coding conventions used in the project.

If there is a design document and/or a specifications/requirements document, read those as well no matter out of date they may seem. These will help you wrap your head around what the original people were seeing as the problem and how they were going about coming up with a solution.

As mentioned above, get familiar with how to build the project. If there are unit tests, run them. Read those first before you read core code. Unit tests are very revealing about code intent and expected behaviors.
Was This Post Helpful? 0
  • +
  • -

#8 Hack3rcon   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-August 19

Re: How can I start development an open source project?

Posted 23 August 2019 - 11:24 PM

Any tool for this kind of stuff?
Was This Post Helpful? 0
  • +
  • -

#9 jon.kiparsky   User is online

  • Beginner
  • member icon


Reputation: 11623
  • View blog
  • Posts: 19,754
  • Joined: 19-March 11

Re: How can I start development an open source project?

Posted 24 August 2019 - 06:26 AM

The most important one is your brain.
Was This Post Helpful? 0
  • +
  • -

#10 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7024
  • View blog
  • Posts: 23,849
  • Joined: 05-May 12

Re: How can I start development an open source project?

Posted 24 August 2019 - 08:55 AM

Brain coupled with a good IDE with very good symbol parsing and navigation.

As a side note, not only does it have to be a good IDE, but you also have to comfortable using it. For example, emacs coupled with its plugins has very good symbol parsing and navigation, but if you are like me and just can't get in the groove using it, you'll be spending unconscious mental cycles fighting with IDE. I recall I ended up making more headway using the more primitive vi and ctags after realizing that I was just getting frustrated with emacs.

I used to recommend using Source Insight for code exploration if your code is in C++ and does not use a lot of macros. (Macros tended to confuse SI.) But it's navigation with multi branching history stack was great for exploring new code. And the visuals for fonts and syntax coloring was wonderful. After that I recommended SlickEdit. Great navigation with a symbol parser that is very intelligent and does not get tricked by macros as easily. Alas, it's visuals were just slightly better than Eclipse when I last used it a few years ago. Lately VSCode and Visual Studio 2017/2019 have been what I've been using. Navigation is not quite as great (perhaps because I've not found or mapped the right hotkeys), but they provide very good symbol parsing.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1