Bitcoin Forum
December 09, 2016, 02:12:37 AM *
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: [WTB] Programming Reference Material (See details inside)  (Read 967 times)
Romoku
Jr. Member
*
Offline Offline

Activity: 35



View Profile WWW
July 07, 2011, 09:51:30 AM
 #1

Hello all,

I would be interested in buying Ebooks and stuff for programming using third party libraries and such. I am finding it difficult to get into other people's code as the amount of actual programming experience I have (outside of theory) is low.

I would be interested in the core concepts on how to program with libraries such as OpenSSL, ZeroMQ, RabbitMQ, Server side development (how to write server side handlers to process requests and such), Postgresql, Reddis, CouchDB, Nginx, Mongrel2, and other such libraries (and learn how to write wrappers and APIs).

The languages I am currently interested in are C/C++/C#, Python, Perl, and Erlang (I'm open for suggestions).

Other general advice would be appreciated and I'll toss BTC 0.02 for good comments.

Post an offer or send a message,


-Romoku

1CvNC6dj9hV4DCtjsUkdjHq5G1trnQBBfe

Lets talk:

virtualgnu.go-beyond.org
64738
1481249557
Hero Member
*
Offline Offline

Posts: 1481249557

View Profile Personal Message (Offline)

Ignore
1481249557
Reply with quote  #2

1481249557
Report to moderator
1481249557
Hero Member
*
Offline Offline

Posts: 1481249557

View Profile Personal Message (Offline)

Ignore
1481249557
Reply with quote  #2

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

Posts: 1481249557

View Profile Personal Message (Offline)

Ignore
1481249557
Reply with quote  #2

1481249557
Report to moderator
1481249557
Hero Member
*
Offline Offline

Posts: 1481249557

View Profile Personal Message (Offline)

Ignore
1481249557
Reply with quote  #2

1481249557
Report to moderator
useful_idiot
Newbie
*
Offline Offline

Activity: 29


View Profile
July 07, 2011, 01:54:13 PM
 #2

Save your money, go play with an open source project and try to fix bugs. You learn more about coding by actually coding, once you have that experience on a real project, then supplement it with extra reading.

The best topics on this are free online, this is one of my favorites: http://www.aosabook.org/en/index.html

 *Image Removed*
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
July 07, 2011, 07:02:41 PM
 #3

Agreed. You need experience, not more "theory." Go read some code. For some good experience, find a project you're interested in, find a simple bug (in their bug tracker!) and fix it.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
SmokeAndMirrors
Full Member
***
Offline Offline

Activity: 168


View Profile
July 07, 2011, 09:23:55 PM
 #4

The OP mentioned that he is not very experienced yet in programming so telling him to find bugs in someone's code is not the greatest of advice. If either of you two are programmers, just think back of the time when you were first starting into the most basic of programming. You were most likely not even able to find your own mistakes, let alone others. Even with the debugger it can be a pain for amateur developers.

To the OP, there are plenty of tutorials online for pretty much every language and most third-party libraries. If you are having problems with the tutorials, or your own little projects, check out programmingforums.org. This is a site I used to read up on quite frequently back when I first started programming.

C++ was my first language aside from PHP here and there with a buddy of mine when I was still in high school. I recommend C++ for newbies if you tend to quickly catch on to things, but even if you don't you can just trial and error until you understand (i suppose). The reason why I suggest C++ as a first language is that it is a very good "foundation" language and once you get to be moderate with C++ you shouldn't have much issue at all getting into other languages. C++ is also object oriented which will give you a good understanding of how to properly develop clean, readable code which is a plus if you plan on later working on collaborated projects. If you were interested in Java, I would say start there prior to C++ for a good foundation on the basics of programming as it is also OO and much easier to get into than C++ though it is not quite as powerful.

In the end, it is completely up to you and which style you like best, what you want to do, etc. All I have to say is don't waste your money on books when you've got the entire resources of the interweb at your disposal. I tried reading books when I was first starting to learn and it taught me nothing I didn't already know from tutorials and personal experience. Since then I've done work in range from chat clients/servers, smartphone development(both games and apps), simple 3d worlds for PC, etc. I've also created some dummy "viruses" and other fun stuff used for my own personal education on process injection, services and whatever else.

Hope this helps in some way.

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
cuongnq
Jr. Member
*
Offline Offline

Activity: 50


View Profile
July 08, 2011, 09:43:29 AM
 #5

Hey guy, check PM please.

[WTS] Microsoft Xbox 360 4 GB Black - http://forum.bitcoin.org/index.php?topic=27629.0
[WTS] PSU COOLER MASTER Silent 1000W only 10 BTC - FREE SHIPPING - http://forum.bitcoin.org/index.php?topic=27587.0
sakkaku
Member
**
Offline Offline

Activity: 70



View Profile WWW
July 08, 2011, 10:38:01 AM
 #6

Learn a language.  You can't start writing scientific papers without first knowing english.

I would recommend python.

- Comes with a terminal/command prompt that allows you to evaluate expressions.
- Lots of shortcuts to make life easier along with a strong set of built in libraries.
- The python community within bitcoin is fairly strong so you will have a lot of code examples.
- The module interface is fairly easy to understand compared to say the imports in C.  Also tons of libraries that are easy to use and install via easy_install or pip.

I would recommend learning C at some point because it is fairly important to know and understand.  The problem with C and C++ is implementing 3rd party libs are funky at best.  The amount of pain needed to build a bunch of libraries for a programs dependencies is agonizing.  Also development on windows with C/C++ is god aweful.  Some programs/libraries will only build on GCC and others only MSVC.  >_<

Erlang will leave you frustrated but it is an interesting language.  Functional languages are nifty but the library support is lacking and often times the syntax is extremely verbose and frustrating.

C# is ok.  Especially if you start out using linq as it will make life easier.  Only downside is you are limited to windows only then unless you take special care to be compatible with mono.


13NiQcetcioQj3YwHL1ZWvgQg8eAjkzUdt
Blog/Projects: zxlu.com | syn-multiminer
Romoku
Jr. Member
*
Offline Offline

Activity: 35



View Profile WWW
July 08, 2011, 11:35:10 AM
 #7

Learn a language.  You can't start writing scientific papers without first knowing english.

I would recommend python.

- Comes with a terminal/command prompt that allows you to evaluate expressions.
- Lots of shortcuts to make life easier along with a strong set of built in libraries.
- The python community within bitcoin is fairly strong so you will have a lot of code examples.
- The module interface is fairly easy to understand compared to say the imports in C.  Also tons of libraries that are easy to use and install via easy_install or pip.

I would recommend learning C at some point because it is fairly important to know and understand.  The problem with C and C++ is implementing 3rd party libs are funky at best.  The amount of pain needed to build a bunch of libraries for a programs dependencies is agonizing.  Also development on windows with C/C++ is god aweful.  Some programs/libraries will only build on GCC and others only MSVC.  >_<

Erlang will leave you frustrated but it is an interesting language.  Functional languages are nifty but the library support is lacking and often times the syntax is extremely verbose and frustrating.

C# is ok.  Especially if you start out using linq as it will make life easier.  Only downside is you are limited to windows only then unless you take special care to be compatible with mono.



I already know C++, C#, and a little Python and C. I'm a CS major at my university, I'm just struggling with third party libraries and how to use them.

1CvNC6dj9hV4DCtjsUkdjHq5G1trnQBBfe

Lets talk:

virtualgnu.go-beyond.org
64738
sakkaku
Member
**
Offline Offline

Activity: 70



View Profile WWW
July 08, 2011, 04:40:10 PM
 #8

I already know C++, C#, and a little Python and C. I'm a CS major at my university, I'm just struggling with third party libraries and how to use them.

Which libraries?  Or more specifically what do you want to do?

"Server Side Requests" can be either with a web server or writing your own implementation from scratch.

13NiQcetcioQj3YwHL1ZWvgQg8eAjkzUdt
Blog/Projects: zxlu.com | syn-multiminer
Romoku
Jr. Member
*
Offline Offline

Activity: 35



View Profile WWW
July 08, 2011, 07:18:23 PM
 #9

I already know C++, C#, and a little Python and C. I'm a CS major at my university, I'm just struggling with third party libraries and how to use them.

Which libraries?  Or more specifically what do you want to do?

"Server Side Requests" can be either with a web server or writing your own implementation from scratch.

I'm attempting to write a server and client for Open Transactions.

https://github.com/FellowTraveler/Open-Transactions/

I can get the general point to most of the code as I have been taking notes on it little by little.

https://github.com/Romoku/OT-Documentation

It's just hard trying to figure out how his code works as he uses some unorthodox methods (at least that I have never encountered) such as:

if (pContract = (*ii).second) // if not null

When I looked at that piece of code it made me go WTF, but essentially it assigns a value to a pointer and if the pointer isn't null it executes the code.

I don't know if that is the "right" way of doing it or if it will cause issues down the line.

1CvNC6dj9hV4DCtjsUkdjHq5G1trnQBBfe

Lets talk:

virtualgnu.go-beyond.org
64738
sakkaku
Member
**
Offline Offline

Activity: 70



View Profile WWW
July 08, 2011, 07:39:47 PM
 #10

if (pContract = (*ii).second) // if not null

When I looked at that piece of code it made me go WTF, but essentially it assigns a value to a pointer and if the pointer isn't null it executes the code.

You have to break it down.

- First (*ii) is evaluated.  I think that is transforming the iterator (integer?) into a pointer to an object.  My C++ is rusty.
- Then the expression (*ii).second returns the "second" member from the object.
- It gets assigned to pContract.
- The if statement will only execute if pContract is not 0 which is also the "null" value in C++

This works because you can do expressions like x = y = z where x and y get the value of z.  The value just gets passed to the left.

Quote
-- Open Transactions is open-source, written in C++, object-oriented, and includes a high-level API in Java, Ruby, Python, C, D, C++, Obj-C, C#, Lisp, Perl, PHP, and Tcl.

Once you compile it you should be able to use it in the language of your choice.  For python you would "import namespace" for C# you will need to add the the DLL you built to the references then use the "using namespace".  PHP would add it to the global namespace I think.  C/D/C++/Obj-C you would need to copy the headers and library and link against it.  That is if you intend to use their implementation of the protocol rather then starting from scratch.

13NiQcetcioQj3YwHL1ZWvgQg8eAjkzUdt
Blog/Projects: zxlu.com | syn-multiminer
Romoku
Jr. Member
*
Offline Offline

Activity: 35



View Profile WWW
July 08, 2011, 11:33:45 PM
 #11

Quote
-- Open Transactions is open-source, written in C++, object-oriented, and includes a high-level API in Java, Ruby, Python, C, D, C++, Obj-C, C#, Lisp, Perl, PHP, and Tcl.

Once you compile it you should be able to use it in the language of your choice.  For python you would "import namespace" for C# you will need to add the the DLL you built to the references then use the "using namespace".  PHP would add it to the global namespace I think.  C/D/C++/Obj-C you would need to copy the headers and library and link against it.  That is if you intend to use their implementation of the protocol rather then starting from scratch.

I see. I don't know how I would start from scratch as this project looks way more complex than I can just "jump into." I believe I would be able to write a client okay after about 192 hours of playing around, but with the server I have no idea. I've never done any formal networking course work or programmed on the network stack.

How I think a server works:

while (1)
wait for connection

I guess I just need to dive in at this point because the more specific abstract issues come up, the less that reference material .

And I have no idea of where to get started making daemons or windows services.

Also thanks for the discussion everyone.

1CvNC6dj9hV4DCtjsUkdjHq5G1trnQBBfe

Lets talk:

virtualgnu.go-beyond.org
64738
fellowtraveler
Sr. Member
****
Offline Offline

Activity: 440


View Profile
July 13, 2011, 07:45:38 AM
 #12


Hello, I just noticed this thread...

1) There is no need to write an OT server, as the OT server is already written (it's in the transaction folder.)  Read the instructions that come with OT, they will show you how to RUN the server.

2) If you wish to play with OT, I recommend building it in Java mode (see the instructions) and then use the Moneychanger GUI.

3) If you want to write your own GUI, you can copy what Moneychanger does.  For exact instructions, see this link: https://github.com/FellowTraveler/Open-Transactions/wiki/Use-Cases
(Now you have instructions AND sample code.)

FYI, you don't have to learn the internal objects to use OT, just call the API.


co-founder, Monetas
creator, Open-Transactions
fellowtraveler
Sr. Member
****
Offline Offline

Activity: 440


View Profile
July 13, 2011, 07:55:17 AM
 #13

Here's the command line output from actually compiling AND running OT in PHP mode:

http://pastebin.com/cwuS97n6

co-founder, Monetas
creator, Open-Transactions
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!