Bitcoin Forum
April 24, 2024, 07:14:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 12,222 lines of code?  (Read 2626 times)
remotemass (OP)
Legendary
*
Offline Offline

Activity: 1116
Merit: 1016


ASMR El Salvador


View Profile WWW
September 07, 2013, 06:54:08 PM
Last edit: September 07, 2013, 08:28:27 PM by remotemass
 #1

You may find this a superfluous endeavor but I was curious and decided to find out the number of line numbers and of characters in the original version of Satoshi's bitcoin client code (bitcoin-0.1.0).

I disregarded all coments, spaces, line breaks, and so, leaving only his code. The files concatenated and minified were: base58.h, bignum.h, db.cpp, db.h, headers.h, irc.cpp, irc.h, key.h, main.cpp, main.h, market.cpp, market.h, net.cpp, net.h, script.cpp, script.h, serialize.h, ui.cpp, ui.h, uint256.h, util.cpp and util.h. Sha.cpp and sha.h were suppressed.

Without comments and blank lines I got 12,222 lines.
Interesting number, don't you think? (http://pastebin.com/MfABqyJd)
The number of characters I got without spaces was: 287,274 (http://pastebin.com/NnMQvPXT). Not markedly so interesting, I guess.

Lastly, one jolly curiosity; there is a code comment line that reads:
// This is why people hate C++

[EDIT-1]: I got 402 lines for sha.cpp and 135 lines for sha.h, so total number of lines including these two files would add up to: 12,222+402+135=12,759.

[EDIT-2]: The record for memorising Pi was achieved by Chao Lu (China) who recited Pi from memory to 67,890 places, at the Northwest A&F University, Shaanxi province, China, on 20 November 2005.

Inventor of: "Conic-Upward-Jet-Thrust 𝕊ℙ𝔸ℂ𝔼 𝔼𝕃𝔼𝕍𝔸𝕋𝕆ℝ" ¦¦ Monetize pics of in/out cash (with GPS metatag on and timestamp captions) ¦¦ archive.is/OMUJQ ¦¦ Forking LITECOIN: bitcointalk.org/index.php?topic=5362345 ¦¦ https://twitter.com/CubicPostcode/status/1782131590006477273
1713986079
Hero Member
*
Offline Offline

Posts: 1713986079

View Profile Personal Message (Offline)

Ignore
1713986079
Reply with quote  #2

1713986079
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713986079
Hero Member
*
Offline Offline

Posts: 1713986079

View Profile Personal Message (Offline)

Ignore
1713986079
Reply with quote  #2

1713986079
Report to moderator
will1982
Member
**
Offline Offline

Activity: 122
Merit: 10



View Profile
September 09, 2013, 12:34:38 AM
 #2

That's pretty funny and cool!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!