Bitcoin Forum
December 06, 2016, 12:31:49 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: I am trying to read the Bitcoin source code, again.  (Read 4107 times)
Jon
Donator
Member
*
Offline Offline

Activity: 98


No Gods; No Masters; Only You


View Profile
March 26, 2012, 05:07:13 AM
 #1

Tell me, in what folder and with what file do I begin? What libraries do I need to know about?

I have never written anything this large -- much less read through it.

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
1481027509
Hero Member
*
Offline Offline

Posts: 1481027509

View Profile Personal Message (Offline)

Ignore
1481027509
Reply with quote  #2

1481027509
Report to moderator
1481027509
Hero Member
*
Offline Offline

Posts: 1481027509

View Profile Personal Message (Offline)

Ignore
1481027509
Reply with quote  #2

1481027509
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481027509
Hero Member
*
Offline Offline

Posts: 1481027509

View Profile Personal Message (Offline)

Ignore
1481027509
Reply with quote  #2

1481027509
Report to moderator
marked
Full Member
***
Offline Offline

Activity: 168



View Profile
March 26, 2012, 09:15:23 AM
 #2

use Doxygen? though it probably depends on how well the code is commented.

Generally you start with /src/main.cpp and then follow the execution paths.

Alternatively load the project into an IDE that can follow functions, headers, etc.

marked
Jon
Donator
Member
*
Offline Offline

Activity: 98


No Gods; No Masters; Only You


View Profile
March 26, 2012, 09:40:11 AM
 #3

use Doxygen? though it probably depends on how well the code is commented.

Generally you start with /src/main.cpp and then follow the execution paths.

Alternatively load the project into an IDE that can follow functions, headers, etc.

marked

Righto. Thanks. I really should try studying the syntax of C++ rather than applying prior knowledge from other languages. >_<

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
March 26, 2012, 09:42:40 AM
 #4

It's a big task to read the entire source code in one go. Reading source code "in the abstract" is hard work.

Why not pick some aspect that particularly interests you. For example: coin allocation, or the user interface for the address book, or block discouragement, or whatever. Then explore that part of the code.

Better still, find a change you'd be interested in making. That forces you to get to grips with that part of the code.

Oh, and have you even compiled the source code yourself? That's the first step, and it can be an interesting and educational experience in itself (especially on Fedora or Red Hat where you'll need to overcome some dependencies). Even if you don't plan to make any software changes, the building the application will help you become familiar with its files.
Jon
Donator
Member
*
Offline Offline

Activity: 98


No Gods; No Masters; Only You


View Profile
March 26, 2012, 09:47:29 AM
 #5

It's a big task to read the entire source code in one go. Reading source code "in the abstract" is hard work.

Why not pick some aspect that particularly interests you. For example: coin allocation, or the user interface for the address book, or block discouragement, or whatever. Then explore that part of the code.

Better still, find a change you'd be interested in making. That forces you to get to grips with that part of the code.

Oh, and have you even compiled the source code yourself? That's the first step, and it can be an interesting and educational experience in itself (especially on Fedora or Red Hat where you'll need to overcome some dependencies). Even if you don't plan to make any software changes, the building the application will help you become familiar with its files.

Let's just say I come up with goals too big for my own good. I will probably end up settling for something small at the end of this.

Yeah, I'll compile it first. That's pretty essential.

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
March 26, 2012, 03:58:57 PM
 #6

Start with this stickied thread.

How often do you get the chance to work on a potentially world-changing project?
fivebells
Sr. Member
****
Offline Offline

Activity: 462


View Profile
March 26, 2012, 04:25:08 PM
 #7

The version control history is pretty well organized.  I have gotten some mileage out of browsing it with gitk.   Also, libcoin is a fork which sells itself as a drop-in bitcoin replacement with better organized source code.  Might be worth a look.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!