Rate my code

I wrote this in about an hour to download images from a Japanese blog. Please rate my code. I don't have a CS degree so please be nice

pastebin.com/pngGPDuD

Attached: meme.png (480x270, 27K)

Other urls found in this thread:

ameblo.jp/
twitter.com/SFWRedditGifs

Post the blog

Write more modular code. Any function should be able to completly fit on the screen. That improves readability massively and can make further development easier.

Also i myself would write stuff like this in bash but whatever.

I'm not gonna post the specific blog but if you look at the code it should theoretically work for any blog hosted on ameblo.jp/

Does it at least have 2D lewds on it?
Tell me so I know whether I should not care any more.

curl "$url" | grep -o '//\S\+.\(png\|jpg\)\b' | cut -c3- | xargs wget

It looks good at quick glance. As another user said break things down into functions.

I generally use functions but I figured there was no point for such a small application
no, it is a 3d blog
Most blogs have multiple pages and the blog in question had 16 or so. Your code would grab useless images like sprites, profile pictures, and headers. I only wanted "content pictures" from each post.

Without the blog to test with we can't evaluate the code

> 0/10

nice language, but for web ripping python could be easier.
good variable naming.
use more implicit variable declarations (var).
bad oo, one big function with no modularity.

it's literally hardcoded in his pastebin

t. Java pajeet

ameblo is a blogging platform similar to blogspot
what are the benefits of using implicit variables over explicit variables?
What is oo?

>No separation between the GUI code and the scraping code
>Poor modularity

Fix this please, I already weep tears of blood too much in my daily job looking at crappy code.

For such an obscure use case if it works its good enough

I didn't bother making the html parsing modular because I only used it twice and this was a very small project.
Can you explain like necessity for separating GUI and scraping code?

There's nothing wrong with the use of C# or whatever language.
But you would benefit from good readings such as "The Art of Unix Programming" from ESR, "Clean Code" from Robert Martin or "Code Complete 2" from whoever wrote this for Microsoft Press.

>what are the benefits of using implicit variables over explicit variables?
aesthetics
>What is oo?
object oriented

>aesthetics
that's it?

>I didn't bother making the html parsing modular because I only used it twice and this was a very small project.
not op, but you did want reviews
>Can you explain like necessity for separating GUI and scraping code?
practicing self discipline

I just want you guys to know I'm not a retard that is incapable of writing modular code
>self discipline
any dangers that would come from not separating gui/regular code?

You use it only twice, you mean : "copy / pasted in two places ?" If so, one is already too much. In fact, I would have made the parsing modular even though I used it only once.

As for the separation of the GUI and scraping code, it all boils down to :
- testability : once you learn about unitary tests, you want to be able to test your scraping code without involving GUI at all
- reusability : one day you will be happy to scrape all that sweet, sweet data from another place in the interface only by calling a function
- rate of change : when you have fixed all the bugs in the scraping code, you're done. On another hand, you will never be happy with your GUI and want to move things around. Isolation of the two makes sure you only change what you are supposed to.

On another level (and you'll learn this after the Dunning-Kruger effect steps down), you have to conserve the developer's brainpower (even if it's you).
The more your code looks like natural language, and with the details hidden in functions or classes, the better.

Source : I'm old enough to have written some code in 1993 and now make a living out of it.

>any dangers that would come from not separating gui/regular code?
yes, growing up to be lazy programmer like pajeets and making unmaintainable code.
regarding your question, poor testability for one.

>twice, you mean
yes
thanks for your guys' advice

>took an hour to write baby's first ultra high level garbage
Shameful. You could have been writing algorithms in C and actually learn something, but instead you wasted your time.

>Aesthetics as a standard
It’s not a fucking painting you faggot

>muh oo paradigm
Not everything needs to be oo, pajeet

not completely terrible but not great either. 5/10.
The code is littered with URLs and magic strings that should be defined at the top of the class as constants. Your code should also be split into a few functions, not one pile of spaghetti.

your code looks like newbie code. didn't check for functionality (i guess it works).
if you want to scrape sites more effectively learn some web-tech like javascript css html.
try to write more modular code: use functions/methods and classes - if you do this you'll be able to easily change code and maybe one day your current pastebin evolves into something useful.
never mix GUI with your actual code (aka business logic). if you do this your code is going to become one huge pile of turd.

what this guy is trying to tell you in an autistic way
is that you might have used the wrong tool (programming language framework etc) for the job. now that you've written it in c# try to use other languages.

this tard didn't even read your code kek
read "clean code" and "clean architecture" by robert martin. those are easy books and should be accessible to you (if you don't know how to read uml learn it - it's easy). start with "clean code".

learn more CS stuff. it's really useful and will improve the code you write.

>any function should be able to completely fit on the screen

Attached: 1545067005348.png (450x450, 307K)

why would you seek approval of a bunch of schizo retards on the internet? git gud noob

stopped reading at c#

isRipping = true;
Thread t = new Thread(new ParameterizedThreadStart(Rip));
t.Start(url);
while (isRipping)
{
Application.DoEvents();
}


jesus christ

whats wrong