PDA

View Full Version : programming



The Shutter
02.09.11, 02:40
i'm interested in learning programming especially to know to code programs like mratio ,Greedy torrent & modded clients .

what do i have to learn to be able to code like these programs ?

so list down all what i have to learn + some ebooks that you used or resources that help you learn

shoulder
02.09.11, 02:47
First of all you should know which language you would like to learn.

The Shutter
02.09.11, 02:50
maybe you could tell me what's more important to learn :top:

anon
02.09.11, 03:58
maybe you could tell me what's more important to learn :top:

That's subjective and you'll get different replies. mRatio is apparently coded in C# .NET, GT I don't know, and Vuze in Java, as we all know. This is not to say you can't create programs in other languages.

If you're new to programming, you might want to start with something easy such as Visual Basic or Python (used by the Faze Mod). Google will provide plenty of handy reading material for a beginner, just search for what you want to do plus the programming language, e.g. "playing sound Visual Basic 6". Good luck!

The Shutter
02.09.11, 04:34
maybe there's basics i should learn to be able to code programs like mratio also there's alot of book so if someone could be more specific it will help me alot to start learning .

flowerorange
02.09.11, 05:34
go to bitspyder
or download them from other trackers.
But this will takes so much time before able to code something like mRatio.

An easy way ? makes friends with The248 :klatsch_3:

The Shutter
02.09.11, 05:40
i don't have a problem learning programing in alot of time just like i did in web development :top:

cheatos
02.09.11, 08:51
mRatio is apparently coded in C# .NET,

It's actaully in VB .NET,
as mr.RM said to me once, VB .NET, C# .NET same thing different syntax..


GT I don't know

IIRC, C++ with wxWidgets as the GUI toolkit.


If you're new to programming, you might want to start with something easy such as Visual Basic or Python

Totally agree,
Visual Basic teaches you how to think as a programmer, It's also backed up by the superior yet bloated Visual Studio IDE. :P

Python is cross-platform, complete and easy but It's not suitable for closed-source applictions:
licensing - How do I protect python code? - Stack Overflow (http://stackoverflow.com/questions/261638/how-do-i-protect-python-code)
Python also has good GUI toolkits (Qt(pyQt GPL, pySide LGPL),wxWidgets).

and learn java if you (are going to work/think you'll work) in companies :biggrin: (java is not easy like vb.net and it's not hard either), also because Java and C# are very similar, you automatically learn C# with java as well (http://www.harding.edu/fmccown/java_csharp_comparison.html) :tongue:.


That's subjective and you'll get different replies.

Exactly, me, a fan of .NET will recommend it :D,
Use C#/VB .NET for everything that doesn't need/use Windows-Only functions/methods, as a beginner, you wouldn't run into using the Windows API anyway so that's OK. You can run .NET application on Linux/Mac.


maybe there's basics i should learn to be able to code programs like mratio also there's alot of book so if someone could be more specific it will help me alot to start learning .

The248 can comment better on his own program if you ask him directly.


But this will takes so much time before able to code something like mRatio.

Yes!, you should take things slowly and step by step...
neither mRatio nor RM were finished by a newbie in short time, they are old-ass programs :P (like mR is 3 years old, RM is 5-6 years old)..
The248 told me once, when I requested mR's source: start with something simple like a proxy tool then proceed to make a full ratio-tool.


Learning resources:
for python, the official documentation is good,
for other languages, use this site, I like a lot:

http://www.thenewboston.com/

for web development (except asp.net), I like w3schools.

The248
02.09.11, 20:05
What he said ^^

Check this out, a quick sample proxy tool i did to demonstrate the concept: (source code included)
http://www.sb-innovation.de/showthread.php?threadid=21536&page=3#post215021
Maybe you can make use of it, because the other guy, well ... let's just say he had good ideas for someone else to make.

But if you don't know the basics, like conditions test (If Then Else), loops (For, while) , ... the basics of every language, i'd suggest you start there.

anon
02.09.11, 20:08
But if you don't know the basics, like conditions test (If Then Else), loops (For, while) , ... the basics of every language, i'd suggest you start there.

I learned that when I was a kid using the BASIC interpreter on this :happy:

http://www.sb-innovation.de/attachment.php?attachmentid=11590

Owyn
02.09.11, 20:48
if you wonder - uSerenity is in pure C++ & ASM

I personally don't like heavy frameworks and wrappers but as to the question of the thread - just see samples and understand it trying to modify and then add your own is the easiest way ^_^ but reading lots of books before doing anything is a way too, oldschool way :)

The Shutter
02.09.11, 21:31
What he said ^^

Check this out, a quick sample proxy tool i did to demonstrate the concept: (source code included)
http://www.sb-innovation.de/showthread.php?threadid=21536&page=3#post215021
Maybe you can make use of it, because the other guy, well ... let's just say he had good ideas for someone else to make.

But if you don't know the basics, like conditions test (If Then Else), loops (For, while) , ... the basics of every language, i'd suggest you start there.

i know some of these basics but still i have to learn the others like close command , open in new window ...etc , i've started to read "Beginning Visual Basic 2010 By Wrox" & trying what i learn on visual studio .


if you wonder - uSerenity is in pure C++ & ASM

I personally don't like heavy frameworks and wrappers but as to the question of the thread - just see samples and understand it trying to modify and then add your own is the easiest way ^_^ but reading lots of books before doing anything is a way too, oldschool way :)

reading source codes won't help me since i don't know the basics for programming it's like reading another language other than your First language :top:

The248
02.09.11, 22:31
Cheatos gave you a very good website, that redirects to this youtube playlist:
TheNewBoston - Visual Basic - YouTube (http://www.youtube.com/playlist?list=PL5012F4C1CFE7E554)

It's always easier to learn when you see things being done.

The Shutter
02.09.11, 22:48
Cheatos gave you a very good website, that redirects to this youtube playlist:
TheNewBoston - Visual Basic - YouTube (http://www.youtube.com/playlist?list=PL5012F4C1CFE7E554)

It's always easier to learn when you see things being done.

i'll have to open it from another connection cause this one is limited .
i've downloaded your source code for proxy tool & i saw this in your post



1. this source code it's not prepared to handle exceptions, you have to improve that
2. this code it's only a example, it's not improved performance wise
3. you have to add any extra option you want
4. the interface needs improvements if you plan on a public release

1.what do you mean by Exceptions?
2.Don't understand this point~~~

can you tell me the idea of this tool , i see port & multiply upload by Number , isn't this like gt?

anon
02.09.11, 22:52
1.what do you mean by Exceptions?

Exception handling - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Exception_handling)


2.Don't understand this point~~~

He means the code is not optimized and there are more efficient ways to do what it does.

The248
02.09.11, 23:07
can you tell me the idea of this tool , i see port & multiply upload by Number , isn't this like gt?
Yes, more or less like greedy torrent.
http://www.sb-innovation.de/showthread.php?threadid=21536&page=3#post215450

The Shutter
02.09.11, 23:16
Yes, more or less like greedy torrent.
http://www.sb-innovation.de/showthread.php?threadid=21536&page=3#post215450

ok but there's 2 files in project one is proxytool which contain the tool & other my project contain a whole list ... can you tell me what's the use of the second one?

The248
02.09.11, 23:52
You need Microsoft Visual Studio to open the solution file (*.sln file).
The "My Project" folder contains all sort of information about the program you are creating, like author, version, copyright, resources used by the program, settings, a bunch of things that you don't need to care about because Microsoft Visual Studio handles all of that for you.

The Shutter
02.09.11, 23:55
You need Microsoft Visual Studio to open the solution file (*.sln file).
The "My Project" folder contains all sort of information about the program you are creating, like author, version, copyright, resources used by the program, settings, a bunch of things that you don't need to care about because Microsoft Visual Studio handles all of that for you.

ok , you said the program isn't ready to be released can you tell me what is missing & what i need to fix?

cheatos
03.09.11, 00:14
ok , you said the program isn't ready to be released can you tell me what is missing & what i need to fix?

It's not like we want the program to be complete, use it for learning (after you learn basic VB.NET skills first),
with that example, you learn how to listen on a port (sockets), asynchronous operations(multiple things doing things at the same time :P), dealing with tracker responses (a bit)..etc.

The248
03.09.11, 00:21
That's up to you, depending on what you want to do with it.
What do you need to fix?

You can start with the problem of it reporting less upload than last time. Example:
Announce 1:
Upload = 2 Gb
Multiply = 5
Reported upload = 10Gb

User changes multiply from 5 to 2 while the torrent it's running.

Announce 2:
Upload = 2.2 Gb
Multiply = 2
Reported upload = 4.4Gb

You can't lose upload on a real client and that may lead to a ban.
There you go, something to start with.

ghostfucker
03.09.11, 00:24
multiple things doing things at the same time :P
synchronous operations can do that too ;-)

The Shutter
03.09.11, 17:29
what language is the proxy tool written in ? cause i tried to search for some of the attributes & didn't find any info about it.

The248
03.09.11, 22:02
Visual Basic .Net

The Shutter
03.09.11, 22:36
what i don't understand are these attributes


TorrentClientSocket.BeginReceive(TorrentClientBuff er, 0, TorrentClientBuffer.Length, SocketFlags.None, New AsyncCallback(AddressOf OnReceived), TorrentClientSocket)

'Obtain upload amount
Dim UploadedStart As Integer = GetString.IndexOf("&uploaded=") + 10

The248
03.09.11, 23:11
1º Socket.BeginReceive Method (Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) (System.Net.Sockets) (http://msdn.microsoft.com/en-us/library/dxkwh6zw.aspx)

2º String.IndexOf Method (String) (System) (http://msdn.microsoft.com/en-us/library/k8b1470s.aspx)

fuzzy
05.09.11, 10:40
@The Shutter You should be reading about asynchronous sockets first. Better yet about threading and implicitly about forking. Good programmers always know their toolset. It's not that hard to jump in and understand clear code that others have written in higher level programming languages but when you try to develop something I highly doubt anything good will come out of it without good practice before hand.
And another thing, you mentioned you were a web developer. My suggestion to you is the following: decide on one thing and one thing only and keep working at it. Most good programmers are polyglot, but as it turns out to be good they only focus on one domain. It's good to have written something in let's say Haskell or done scripting in *nix, because trying things out of your comfort zone grows you as a professional, but try sticking with your piece of bread and practice, practice, practice. When you reach a level where using that specific toolset is like breathing and you say to yourself that you still aren't good enough than you've become a good programmer.