Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[LEARNING VB] Made a useless app | Suggestions for imporvement? [LEARNING VB]

Ok so I made a Pastebin grabber (without using 'http://pastebin.com/raw.php?i=') just to try and learn a few things about regex, string arrays and various other things... Pretty dumb I know but on the upside it does work!

Example:
Spoiler (Click to View)

Code (Yes it is going to be shitty, also just forget the fact I used multithreading and only used 1 thread, it was because I was just experimenting with multithreading then had the idea for this app):
Spoiler (Click to View)

Anyone have any useful project ideas that I could have a go at to try and improve? I'm very new to VB btw...
Some ideas:
- Chat spammer
- Facebook, Twitter... account creator
- Screen Capture
- Assembly and icon changer
- Email Bomber
Please post your code, we can't really tell you where to improve, if we can't see anything else than the design.
(May 30, 2015 04:42 AM)Nicktron Wrote:  Please post your code, we can't really tell you where to improve, if we can't see anything else than the design.

Ok I have done. Let me know what I have done wrong!
First of all, when you work with threads, import "System.Threading".

Second, don't set Me.CheckForIllegalCrossThreadCalls to false. Google on how to use delegates.

Third, this line: "TextBox1.AppendText(CStr(line & Environment.NewLine))" it is not necessary to use CStr, it could be: TextBox1.AppendText(line & Environment.NewLine)

Thats all I have for a quick look. :)

Also this is fine for a beginner, I must say.
(May 30, 2015 04:32 AM)Neos07 Wrote:  Some ideas:
- Chat spammer
- Facebook, Twitter... account creator
- Screen Capture
- Assembly and icon changer
- Email Bomber

Don't make a tool that does this all in one. It would be horrible.
(May 30, 2015 05:19 AM)Nicktron Wrote:  First of all, when you work with threads, import "System.Threading".

Second, don't set Me.CheckForIllegalCrossThreadCalls to false. Google on how to use delegates.

Third, this line: "TextBox1.AppendText(CStr(line & Environment.NewLine))" it is not necessary to use CStr, it could be: TextBox1.AppendText(line & Environment.NewLine)

Thats all I have for a quick look. :)

Also this is fine for a beginner, I must say.

Thanks for your feedback, About the 'Cstr' thing, people have said using this is a good habit but I guess since 'line' is already declared as a string it's not needed.
(May 30, 2015 06:17 AM)Khamul Wrote:  Thanks for your feedback, About the 'Cstr' thing, people have said using this is a good habit but I guess since 'line' is already declared as a string it's not needed.

My pleasure 🤝

Also I don't see why it would be a good habit, since it's already a string as you said. :)
I was preparing to write up a huge response because I see a lot that can be improved on, until I saw this:
(May 30, 2015 04:24 AM)Khamul Wrote:  I'm very new to VB btw...

Someone very new should not be working with IO, networking, Regex (even though I can't see it in the code you provided), and threads.

I'm guessing you kind of glided your way through the project with the help of the internet for each problem you ran in to and slushed each snippet together, correct? This is an awful way to program so I'd suggest channeling your ambitions into learning from the start.

(May 30, 2015 06:17 AM)Khamul Wrote:  Thanks for your feedback, About the 'Cstr' thing, people have said using this is a good habit but I guess since 'line' is already declared as a string it's not needed.

My guess is they mean it's a good habit to work with Option Strict on. Btw Calling CStr/ToString() explicitly is redundant when using the & operator since it implicitly converts the operands it's concatenating to their string type representations.
(May 30, 2015 08:21 AM)Odus Wrote:  I was preparing to write up a huge response because I see a lot that can be improved on, until I saw this:

Someone very new should not be working with IO, networking, Regex (even though I can't see it in the code you provided), and threads.

I'm guessing you kind of glided your way through the project with the help of the internet for each problem you ran in to and slushed each snippet together, correct? This is an awful way to program so I'd suggest channeling your ambitions into learning from the start.

My guess is they mean it's a good habit to work with Option Strict on. Btw Calling CStr/ToString() explicitly is redundant when using the & operator since it implicitly converts the operands it's concatenating to their string type representations.

Thanks for the feedback, I kind of have tried 'learning from the start' and this was the first real 'project' I have attempted... I did get a few snippets from other people and I know that's not a great way to do things but I'd say most of the code I didn't know before this I got from MSDN and adapted it to my needs... I'm going to buy a few books so I can have a reference of some of the basics that I sometimes forget...I might just wait until September when I start my Computer Science degree at university.
If you are new to vb you should start with console applications. Try making a simple console calculator.
Lotta blood to let, peace to make, give a fuk about a check
(May 30, 2015 08:42 AM)BahNahNah Wrote:  If you are new to vb you should start with console applications. Try making a simple console calculator.

Why console? A GUI for a calculator is not hard at all.
(May 30, 2015 08:43 AM)Ninja Wrote:  Why console? A GUI for a calculator is not hard at all.

It is for someone who has just started vb.
Lotta blood to let, peace to make, give a fuk about a check
(May 30, 2015 08:43 AM)Ninja Wrote:  Why console? A GUI for a calculator is not hard at all.

Sorry guys for the confusion, I'm new to VB as in I've been trying to learn on and off for about a month and a bit...I've already made a GUI calculator but thanks for the suggestion.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by EnskyMar 23, 2017 01:27 PM 0 170 Mar 23, 2017 01:27 PM
Last Post: Ensky
[Python] by PronickrcApr 29, 2015 08:05 AM 0 104 Apr 29, 2015 08:05 AM
Last Post: Pronickrc
[.NET] by bobsledsFeb 19, 2014 03:38 PM 76 5,728 Feb 19, 2014 03:38 PM
Last Post: netics