Bitcoin Forum
November 06, 2024, 11:28:43 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 »  All
  Print  
Author Topic: What programming language to learn?  (Read 14433 times)
Djao
Full Member
***
Offline Offline

Activity: 208
Merit: 100


Risk-hedging platform for cryptocurrency investors


View Profile WWW
July 10, 2011, 11:32:08 AM
Last edit: July 10, 2011, 01:53:23 PM by Djao
 #21



edit: changed pic to include Lisp

pB11
Newbie
*
Offline Offline

Activity: 12
Merit: 2


View Profile
July 10, 2011, 11:54:10 AM
Last edit: July 10, 2011, 03:48:13 PM by pB11
 #22

Its been a while since I programmed (basic) <-- dont laugh.. gorilla was an awesome game!

anyways I'd like to learn to make scripts or programs that can help bitcoin, I'm just wondering if I had to learn one which would be the best.  Should I learn C or should I learn php for web stuff.   Kinda leaning toward php.  But just wondering what others think.  When i go to learn something I go balls to the wall.

What is the bitcoin client programmed in?
Bitcoin client written in C++.

Basic C knowledge is always needed, whatever main language you about to choose.

A good starting point is this site:
http://projecteuler.net/index.php?section=problems
People solve problems using various languages and techniques.
You have to find a solution to access the discussion.

According to my observations of projecteuler (sorted by popularity):
- C++ wins, but by a small margin
- Python is more and more popular, native big integers is a big advantage (not in real world just in this particular problems), some implementations can compete with C++ speed (psyco etc.)
- Java is used quite often
- Ruby represents very nice and compact source code, but lack of speed make it worthless for final fast solution sometimes (300x slower than C is quite possible), but very useful in research/testing
- Haskell is the most popular functional language atm, there are some solution on Clojure,APL/J/K,LISP
- C#, Delphi is still used

Perl is the best for text/binary parsing, and my choice for very small programs.
Sandoz
Member
**
Offline Offline

Activity: 85
Merit: 10


View Profile
July 10, 2011, 11:58:05 AM
 #23

I would learn a language supporting the object oriented concepts. Java is a great starting place, C++ is also.

After that you can learn procedural languages (e.g. C, Perl etc) in no time.
SmokeAndMirrors
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
July 10, 2011, 12:13:07 PM
 #24

Bash, Python, and C/C++. If I were you I would stay away from Java.

Why do you say this? If you're not looking to make any huge million dollar project, java is a great language to get your feet wet.

I started out with C++ and while it did take quite some time to learn how to make my own fully functional programs without having to look at references every 5 minutes, I still recommend it as a start. I recommend any and all languages. They've all got their ups and downs. However, if you do plan on becoming a full-fledged programmer in the future, I would hope that you learn C++ eventually as it is one of the most powerful languages out there and while PHP claims to be able to do anything, C++ really can.

Help Bitcoins by buying clothes, technology, books, etc. through people/stores that accept BTC. This will increase overall value of BTC as well as mitigate unnecessary bank transaction fees.

My address -
1EM9HGg1SEa5Bux1rVEPxGqGSfNTTc9EkC
bcearl
Full Member
***
Offline Offline

Activity: 168
Merit: 103



View Profile
July 10, 2011, 12:15:40 PM
 #25

C++ with Qt Framework.

Puke.

C with Glib/GObject system.

Misspelling protects against dictionary attacks NOT
bcearl
Full Member
***
Offline Offline

Activity: 168
Merit: 103



View Profile
July 10, 2011, 12:20:27 PM
 #26

If you care whether your language is widely in use:

Programming Community Index

Code:
1 1 Java 19.251% +0.58%  A
2 2 C 17.280% -1.20%  A
3 3 C++ 9.017% -1.45%  A
4 5 C# 6.221% +0.49%  A
5 4 PHP 6.179% -2.39%  A
6 9 Objective-C 5.181% +2.68%  A
7 6 (Visual) Basic 5.106% -0.41%  A
8 7 Python 3.583% -0.63%  A
9 8 Perl 2.328% -0.77%  A
10 10 JavaScript 2.242% -0.19%  A
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html







But once you really learned to program, you don't need to lean specific languages any more. I never learned C++, but it's easy to understand Bitcoin with some knowledge of C and Java.

Misspelling protects against dictionary attacks NOT
timsmith
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
July 10, 2011, 12:31:38 PM
 #27

It all depends what you are trying to do. Saying "I want to learn programming, which should I go with?" is rather like saying "I want to do art, which should I go with?". If your goal is to get signed by a record label, learning sculpture is not going to get you very far, even if you are a master at it.

As has been said, the actually language itself is less important than what you learn from it. There are simple concepts that are common to all programming languages, like variables, and ones like iteration, recursion and scope which similarly crop up again and again.

You say you did BASIC? So you probably recognise:
FOR n$ = 1 TO 10
PRINT n$;
NEXT

In PHP it is:
for ($n = 1; $n <= 10; $n++) echo $n . "\r\n";

In Java it is:
for (int n = 1; n <= 10; n++) System.out.println(n);

The point is that it's not the syntax (the words and the grammer) so much as the semantics (what you mean by it) that matters.

But beyond that, it also depends what you are trying to achieve at a higher level. If you are wanting to build a database driven webserver, then you'll find the PHP and SQL are useful, or ASP.NET, or any of the other web languages. Learning Fortran will not greatly help your goal of web work.

If on the other hand, you are wanting to write simple CLI scripts to speed up your work, then things like Bash and SED or Perl are useful (assuming Linux) or even VBScript on Windows.

For embedded systems, C and raw assembler will be far more useful.

So before you can get a good answer, you need to think a little more about exactly what you want to achieve. I know you mentioned scripting, but you need to decide what you want to script, and more importantly, WHY it is beneficial for it to be scripted.
bitfreak!
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
July 10, 2011, 12:36:49 PM
 #28

- Learn C, then you're almost ready to learn PHP and others.
I highly doubt PHP is more complicated than C. PHP is a web language, and it's actually not very hard to learn.

@OP,
It really depends on what you want to make and how intelligent you are. If you want to make web applications I recommend that you stick with popular open languages like PHP, JavaScript, MySQL, and of course (X)HTML.

If you want to develop desktop applications than you're best bet is to probably learn one of the C languages and/or Java. If you want to stick with easy languages try Delphi or VB instead. Or if you want a basic scripting language try PascalScript or VBscript.

What languages do I know? All the ones I listed except C languages. Cool

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
w1R903
Full Member
***
Offline Offline

Activity: 218
Merit: 100


View Profile
July 10, 2011, 01:00:17 PM
 #29

Python is an excellent all-around language.  You can really do almost anything with it: very serious web design (Django, Plone -- extremely well-regarded frameworks/CMS), easy scripting (including a very cool runtime interpreter that can give immediate feedback), GUI design, Windows desktop executables.  If you need higher performance, you can use Python bindings to fast C/C++ libraries, but still use Python to tie it all together.  You can even use Python to do GPU programming (the last two are things I've done yet done with Python personally, but others do them all the time).  So you can basically take advantage of a lot that C/C++ has to offer without having to learn the languages themselves.

Python also has great documentation and friendly support boards.  You can find an excellent intro to computer programming that uses Python here:  http://greenteapress.com/thinkpython/  This is a guide that will teach you the basics of "computer programming" as a science/art and not just another language.

Google also offers some good Python tutorials.

I only wish I had invested all the time I did learning and using PHP on Python instead.  Unfortunately, when I started with PHP back in the 1990s, only really serious programming geeks new about Python, and its use had not yet been expanded to web programming to a significant extent.

Also, that (very funny) picture someone put up of different programming perceptions of other languages is totally true.  The language(s) you learn will have a big impact on how you are perceived by other programmers.  And even the most serious programmers usually take Python seriously, even if they don't use it themselves.  This is not the case with PHP.

PS -- If you do serious web programming, you'll also need to learn about databases.  Do yourself a favor and learn about basic database normalization.  Some many web apps end up totally screwed up because they ignore the principles of database normalization (and yes, I know that too much normalization can cause performance issues).  If you really understand object-oriented programming, normalization will make a lot of sense and will make your web app a much sounder application.

4096R/F5EA0017
enquirer
Sr. Member
****
Offline Offline

Activity: 306
Merit: 257


View Profile
July 10, 2011, 01:23:52 PM
 #30

language itself is only 1% of the story

you can learn PHP in one day but then you should also learn this http://php.net/quickref.php

90% of programmer's job is "google->copy->paste", so choose the language with largest amount of available code)

right now it's Java and C#

C and C++ look terribly outdated, if you code with them why not go directly for VHDL its even more efficient)
Steve
Hero Member
*****
Offline Offline

Activity: 868
Merit: 1008



View Profile WWW
July 10, 2011, 01:25:27 PM
 #31

A good understanding of C/C++ is pretty fundamental for everyone (and in particular calling conventions and how various OSes approach linking).  A general understanding of processor instruction sets and how you go from a high level language to machine code helps as well.

Here's one language no one has mentioned (or maybe I missed it): JavaScript...every major web browser runs it, it has many advanced features (i.e. closures), and it has a server side implementation (nodejs.org).  Google's v8 team is very talented and making JavaScript very fast (I've read that is it 10x faster than PHP right now and 3x faster than Python and likely to continue getting much faster).  

(gasteve on IRC) Does your website accept cash? https://bitpay.com
julz
Legendary
*
Offline Offline

Activity: 1092
Merit: 1001



View Profile
July 10, 2011, 01:36:27 PM
 #32

Here's one language no one has mentioned (or maybe I missed it): JavaScript...every major web browser runs it, it has many advanced features (i.e. closures), and it has a server side implementation (nodejs.org).  Google's v8 team is very talented and making JavaScript very fast (I've read that is it 10x faster than PHP right now and 3x faster than Python and likely to continue getting much faster).  

+1 to javascript.
It's a language that has been underappreciated, miscategorized and misunderstood for many years.. but is finally getting the recognition it deserves.  If any language is going to take off 'bitcoin style' .. it'll be javascript.
Serverside JS is an awesome development that has only just begun.

@electricwings   BM-GtyD5exuDJ2kvEbr41XchkC8x9hPxdFd
Ekaros
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500



View Profile
July 10, 2011, 01:41:49 PM
 #33

I wouldn't personaly suggest C as first, too much work unrelated to programming itself. In my opinion more high level language is somewhat easier to start with, just for geting in loops, if/else and such. No need to deal with C's strings, pointers and memory managment and so on.

Now when I'm learning Python, it seems so simple compared to C Grin

Personaly I went Java->C(/MIPS)->Python, next I think C++, but this is all in University.

12pA5nZB5AoXZaaEeoxh5bNqUGXwUUp3Uv
http://firstbits.com/1qdiz
Feel free to help poor student!
MatthewLM
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
July 10, 2011, 01:45:56 PM
 #34

What do you want to do for bitcoin? If you want to understand the client, you'd need to understand C++.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1026



View Profile
July 10, 2011, 03:35:40 PM
 #35


I suggest watching the lecture videos too.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
ampkZjWDQcqT
Member
**
Offline Offline

Activity: 70
Merit: 10


GNU is not UNIX


View Profile
July 10, 2011, 03:50:37 PM
 #36

[...] Google's v8 team is very talented and making JavaScript very fast (I've read that is it 10x faster than PHP right now and 3x faster than Python and likely to continue getting much faster).  

No. Languages don't have speed, implementations do. Comparing implementations evaluation time (Speed) only makes sense for a given test case(s), which are missing from your claims.

I don't understand. Java, Ruby @ seen by Lisp fans, duh?.

If you found my comment useful please express your gratitude by doing an action of similar magnitude towards a better society. Thanks you!.
JohnDoe
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
July 10, 2011, 03:55:36 PM
 #37

+1 to Javascript. If you are going for web development that's the way to go as you can use it for both front end (jQuery) and back end (Node.js).
bernd
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
July 10, 2011, 04:02:32 PM
 #38

You shouldn't go with your mind set to "learn a programming language". A "programming language" is only an expression of the underlying art, The art of computer programming, there even is a multi-volume book bearing that title. Programmers ought to dedicate their career to master this art. I recommend Structure and Interpretation of Computer Programs. TAOCP is a legend, it's very lengthy but if you have enough time you can't afford to not to read it.

This. Even though i am no master or anything like that, i loved the Lectures.
hugolp
Legendary
*
Offline Offline

Activity: 1148
Merit: 1001


Radix-The Decentralized Finance Protocol


View Profile
July 10, 2011, 04:47:11 PM
 #39

C++ with Qt Framework.

Puke.

C with Glib/GObject system.

And Vala!


               ▄████████▄
               ██▀▀▀▀▀▀▀▀
              ██▀
             ███
▄▄▄▄▄       ███
██████     ███
    ▀██▄  ▄██
     ▀██▄▄██▀
       ████▀
        ▀█▀
The Radix DeFi Protocol is
R A D I X

███████████████████████████████████

The Decentralized

Finance Protocol
Scalable
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
██                   ██
██                   ██
████████████████     ██
██            ██     ██
██            ██     ██
██▄▄▄▄▄▄      ██     ██
██▀▀▀▀██      ██     ██
██    ██      ██     
██    ██      ██
███████████████████████

███
Secure
      ▄▄▄▄▄
    █████████
   ██▀     ▀██
  ███       ███

▄▄███▄▄▄▄▄▄▄███▄▄
██▀▀▀▀▀▀▀▀▀▀▀▀▀██
██             ██
██             ██
██             ██
██             ██
██             ██
██    ███████████

███
Community Driven
      ▄█   ▄▄
      ██ ██████▄▄
      ▀▀▄█▀   ▀▀██▄
     ▄▄ ██       ▀███▄▄██
    ██ ██▀          ▀▀██▀
    ██ ██▄            ██
   ██ ██████▄▄       ██▀
  ▄██       ▀██▄     ██
  ██▀         ▀███▄▄██▀
 ▄██             ▀▀▀▀
 ██▀
▄██
▄▄
██
███▄
▀███▄
 ▀███▄
  ▀████
    ████
     ████▄
      ▀███▄
       ▀███▄
        ▀████
          ███
           ██
           ▀▀

███
Radix is using our significant technology
innovations to be the first layer 1 protocol
specifically built to serve the rapidly growing DeFi.
Radix is the future of DeFi
█████████████████████████████████████

   ▄▄█████
  ▄████▀▀▀
  █████
█████████▀
▀▀█████▀▀
  ████
  ████
  ████

Facebook

███

             ▄▄
       ▄▄▄█████
  ▄▄▄███▀▀▄███
▀▀███▀ ▄██████
    █ ███████
     ██▀▀▀███
           ▀▀

Telegram

███

▄      ▄███▄▄
██▄▄▄ ██████▀
████████████
 ██████████▀
   ███████▀
 ▄█████▀▀

Twitter

██████

...Get Tokens...
qbg
Member
**
Offline Offline

Activity: 74
Merit: 10


View Profile
July 10, 2011, 05:11:25 PM
 #40

Its been a while since I programmed (basic) <-- dont laugh.. gorilla was an awesome game!

anyways I'd like to learn to make scripts or programs that can help bitcoin, I'm just wondering if I had to learn one which would be the best.  Should I learn C or should I learn php for web stuff.   Kinda leaning toward php.  But just wondering what others think.  When i go to learn something I go balls to the wall.

What is the bitcoin client programmed in?

Anyways thanks.
Avoid PHP; it is a poorly designed language.

For general programming, I'd recommend you a member of the Lisp family with a focus on functional programming such as Scheme, Racket, or Clojure. Clojure runs on the JVM and is a very practical language, but can currently be rough in a few spots.

For web programming:
* Javascript - You need it for client side scripting (you can also use it server side with Node.js). A lisp background will help with good Javascript code.
* Ruby - A clean language (with lisp influences), and it has Ruby on Rails.
* Java - The JVM is good for server-side programming, and has a ton of libraries available. Spring MVC makes web programming bearable, but it is still rather heavy.

90% of programmer's job is "google->copy->paste", so choose the language with largest amount of available code)
Wrong. Cargo-cult programming is a very bad practice.
Quote
C and C++ look terribly outdated, if you code with them why not go directly for VHDL its even more efficient)
C and C++ are general purpose programming languages (and are good languages for some domains). VHDL is for hardware.
Pages: « 1 [2] 3 4 5 »  All
  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!