The first time I pointed out to you that you were recommending non-best-practice things to wisdom seekers and reinventing wheels was roughly 5 years ago. Since then, over the years, I've pointed out similar things to you numerous times: 1, 2, 3, 4, 5, 6.

The reason why I like to "reinvent the wheels" is because while doing so, I learn how stuff works. For example, ImageMagick works great, but I have been writing a similar image processing program in pure Perl. Now, it is such a huge task that I don't think I will ever be able to finish it. LOL It's currently over 500KB and 15K lines. The reason I do it is because it's fun, and programming is my hobby! And I love to take photos. I have nearly a hundred thousand photos I have taken over the years, and it's interesting to figure out how they are stored.

Secondly, when I use someone else's code, I have to deal with potential bugs that they left in their code. I'd rather deal with my own bugs than someone else's bugs. I like to read the bug reports to see what kind of problems were detected by others.

Thirdly, if I use a module, it may get an upgrade which breaks things. If I use my own reinvented wheel, I know it's not going to get an upgrade, so if someone else changes things, my code will still function the way it did when I wrote it. If it doesn't work, I can change it later. But I feel like I have more control over my code. The more third-party modules I use, the more likely it is that something is going to quit working the way it did. Of course, I know there is an argument against that, but I just don't care. which brings me to my final point.

Finally, I am a hobby programmer. If we talk about golf, there is professional golf, and there is hobby golf. The difference is that as a hobby golfer, you can hold the golf club upside down and still hit the ball and get it into the hole and then dance around the hole like crazy! As pro golfer, you probably shouldn't do that. LOL As a hobby programmer, a lot of rules don't apply to me. I don't have a boss who tells me, "You can't do that. You got to do it this way." And I love that. That's why I am not a professional programmer. I love freedom. I like to tell myself what kind of program I need and how to write it. If I had a boss telling me how to write a program, then programming would no longer be fun. It would be a chore like washing the dishes.

The difference between a hobby programmer and the hired professional programmer is that the hobbist writes code in his spare time to relax. The pro programmer writes code all day for a company, and then goes home and tries to do something else to relax. A professional looks at the cost and the clock to make sure that he doesn't spend too much time on one single project. And if there are two solutions, then the quickest easiest solution is chosen as the best solution. The hobby programmer does not think like that. He doesn't care how much time he spends on a single project, because it's just fun. I've seen someone wrote a Windows multitasking environment written entirely in QBASIC. Talk about reinventing the wheel! Only a hobbist would do something like that. LOL

Btw some of the things you have linked to that I mentioned earlier turned out to be really bad solutions, and I have since quit using them. I am talking about using numbers as file handle or using the include() function that I wrote. LOL There are lots of other crazy things. And that's natural. That's the other thing I wanted to mention. As a programmer gains experience, his or her code changes. For example, at first, I was afraid to use regex in my Perl programs. I didn't understand any of that. So, I avoided it like fire. Now, I am brave, and I use regex whenever I want. If I look at my C programs that I wrote as a 14-year-old, I cringe! See, that's because our coding style changes. And that's normal. So, if I posted my stuff I wrote as a teenager, it would be unfair to give me a downvote NOW, because I have changed. Similarly, I feel it's unfair to judge me based on past code that I wrote earlier.

The two-argument open is still something I haven't gotten over yet. I think, I asked someone on here earlier to point me out the security flaw in the program, and all I heard was crickets. Nobody said a word. So, I think, the two-argument open or three-argument open is a matter of style. Some people like the newer style. I personally prefer the old:

my $F = 'FILENAME GOES HERE'; $F =~ tr`<>*%$?\x00-\x1F\"\|``d; local *FH; open(FH, "<$F") or die "\nCannot open file for reading - $F\n";

Yet your post contains no disclaimer that the code is not following best practices.

Yeah, I think, I am going to add that disclaimer to my programs. Thanks for suggesting it. Or maybe I just stop using "use strict" and "use warnings" and when people see that those two lines are missing, they'll figure out by themselves that this programmer does not use best practices.


In reply to Re^2: Automatic downvote by harangzsolt33
in thread Automatic downvote by harangzsolt33

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.