Mind Set

Post a reply

In an effort to prevent automatic submissions, we require that you complete the following challenge.
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review

Expand view Topic review: Mind Set

Re: Mind Set

Post by jeeswg » 06 Nov 2017, 18:34

>>> What's your mind set when it comes to programming?
Does it work? Is it perfect? (Is it safe?) (Is it readable/commented?)

>>> Do you like to look for one specific problem to fix?
- I don't need to look for anything, I either solve an old problem, solve a new problem, or improve an old script.
- Answering questions on the forum has helped round my knowledge of AutoHotkey, to check certain commands that I never use, or take on challenging RegEx questions.
- Sometimes I will learn a tiny bit of information from a question, not even the answer. I will be reminded of an old issue I wanted to double-check. Sometimes a gap in my knowledge is exposed that I didn't know I had, e.g. recently: opening the Desktop user/public combined folder versus the Desktop user proper folder in Explorer (taking into consideration that Explorer might not be the default app to open programs with), plus I had previously made a special effort to find ways to open special folders and Control Panel items.
- The more you know, the more you can notice a tiny thing that may be of great value.
- Btw users should be wary of stating something with certainty, or without qualifiers, for example, I often have to double-check basic things in the documentation before posting, one example of this was regarding 'UTF-8 ini files', I knew how the IniRead/IniWrite commands would probably work, and I could try to figure everything out just by reading the documentation, but really I had to write the code and then double-check it, which I did.
- Talking about double-checking, it's awful if you've made a typo or missed out a word, to know that editing the post will untidy the post by leaving a 'last edited' message. I also find, too many, or too few, commas, just as bad nowadays.
- Sometimes a problem that I would likely experience in the future is anticipated by someone else, I am forewarned and forearmed.
- I dread changes in Windows 8 and Windows 10, that may exist, but that I do not yet know of.
- I am concerned that we need a web browser that we can do COM-equivalent actions with, and that perhaps using Selenium is not the answer if it only lets you operate on one-tab only windows, and/or has other restrictions. I would even consider using a little-known browser as my main(/only) browser, if it had this capability.
- I also tend to think of tutorials as important, not just scripts.
- Generally speaking, I do something that is useful to me, I don't look for things to do for the sake of it, I suppose I could look at Project Euler if I ever wanted to do code but didn't have any code to do. I could also start reading the AutoHotkey source code. Another idea is to skim read all of the posts by a particular user.
- Occasionally I'll do something silly like 'qwertybetical order' or metric time or image-based scripts like the Solar System/Mandelbrot set scripts. Or the AHK console script that I did as a joke because I wanted an excuse to create a GUI with grey text on a black background, which looks quite cool, but which could in theory be useful. C++ has a console window available, so why not AHK, so I made one.

>>> Do you try to show off your skills in programming by making a highly detailed script/program?
- I don't always insist on making everything as short as possible, but sometimes a small piece of code can look really elegant.

Code: Select all

(oArray := {})["a","b","c"] := 3
oArray := {}
oArray["a","b","c"] := 3
- I want my scripts to be as simple as possible, so in theory, no. I do like to make my scripts as readable and as clear as possible, this is often helped by clear variable names, indicating variables/objects with 'v'/'o' prefixes, so that you can distinguish them from command names etc, and occasional comments.
- Also to save people bother, it's best to include any constants as comments, i.e names not just numbers. This is not something I always did, but I do now, this definitely helps me when I review old scripts.
- In this regard, if you can stand the 7 gig or so download for Visual Studio Express, the .h files (header files) in C:\Program Files (x86)\Windows Kits\8.1 plus NirSoft SearchMyFiles are really useful for looking up constants.
- Rather than showing off per se, one has to love the elegant hack, I believe these to be rare, but I have listed a few on my homepage. I would welcome anyone to post a collection of them.

>>> Do you tend to veer off topic from your original project to move to another?
- I think people like variety, so switching between multiple projects can be easier than spending all day on one project.
- Sometimes if I have a long to-do list, I can group certain things together, that have some sort of overlap, and investigate them simultaneously, this can be quite efficient.
- I tend to have one goal, and then once the goal is met, the project is over. Sometimes you'll find additional features you would like to add, to a project that you've completed. Feature requests, either by you or by someone else.

>>> Why are scripts created by experts so complex that they aren't readable? They're written in the same language? I'm just curious
- Laziness. Lack of expertise. Lack of understanding of other people. Haven't collected personal principles for clear coding. The lack of style.
- I have done so much with AHK, but I would generally say, never use object classes. For people that haven't questioned this, they probably won't agree with this, should they read this. But many months later it might sink in.
- The AHK standard arrays (i.e. its methods) and File object are useful however.
- I've always been willing to use object classes, but realistically they've never been useful, and using straightforward standard arrays and/or functions provides the better approach.
- Also, if you use functions rather than methods, this is more flexible, you can apply them to anything, they aren't anchored to the object.
- It's been painful trying to deconstruct someone's class to understand how something works, or to create a simple stand-alone function. Often people create a fancy class, and perhaps they feel proud of it, a 'concept', but then someone creates their own class for something similar, e.g. different GUI control types, and it's completely different and incompatible. So I say, keep it simple, and don't patronise the user. Don't insist on creating a vision, keep everything as low-level as possible, don't impose an esoteric way of doing something where it's not needed or wanted.
- It's amusing when you notice someone's personality on the forum, but more humorous is when you notice their inflexibilities, or an occasional lack of imagination.
- (Assuming that the code works.) Style is the most important thing, indeed Linus Torvalds in a TED talk said he looks for style.

Good questions. Cheers.

Re: Mind Set

Post by tidbit » 16 Sep 2017, 13:14

I do next to nothing (ahk-wise) for months on end until there's something I actually need. I help in irc but 1-5liners don't count.
I don't seek out things to do/learn or challenge myself. no point in fixing things that aint broke.

Re: Mind Set

Post by Delta Pythagorean » 15 Sep 2017, 07:02

derz00 wrote:Why are scripts created by experts so complex that they aren't readable? They're written in the same language? I'm just curious
The reason the code is so "difficult to understand" is because of how simplified and small the code is.
Most newer programmers tend to not think and they simply do the code that would either seem to expansive, or open ended.

Re: Mind Set

Post by derz00 » 15 Sep 2017, 04:55

Why are scripts created by experts so complex that they aren't readable? They're written in the same language? I'm just curious

Re: Mind Set

Post by nnnik » 14 Sep 2017, 12:57

I follow my curiosity most of the time. But if I find a problem that I have solved a few times I generalize it.
I liked to show off my skills - which has gotten pointless since it's at a point where I could easily create scripts that are so complex that nobody would ever be able to use or understand them.
I want to create scripts that I can reuse as much as possible. If that script can't be reused there is no point to creating it in the first place.

Re: Mind Set

Post by derz00 » 14 Sep 2017, 08:13

I find things to automate, programs to improve, and do that for a stress reliever (it's just a hobby for me, generally). When I get myself pulled into a project, I tend to use every spare fraction of a minute to work on it.

Mind Set

Post by Delta Pythagorean » 14 Sep 2017, 08:10

What's your mind set when it comes to programming?
Do you like to look for one specific problem to fix?
Do you try to show off your skills in programming by making a highly detailed script/program?
Do you tend to veer off topic from your original project to move to another?

Curiosity kills, and for me, procrastination kills even more.