Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

You guys are driving me nuts.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: You guys are driving me nuts.

    My thoughts don't mean much in this conversation but it looks to me that it's a matter of personal preference. I understand Cal's point but only if another developer will be working with it and only if the current developer has a short memory. Other than that, it makes for a type of security.

    That's my .02.

    kenn
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

    Comment


      #17
      Re: You guys are driving me nuts.

      Originally posted by aburningflame View Post
      I dont get it - there is nothing wrong with
      for i=0 to number_of_rows

      i is usually initialized within the loop definition and is usually local scope to the loop - after the loop i is gone.

      there is nothing wrong with using i=0 to whatever in every loop in your application - in fact - its almost standard
      You may be missing my point. There is nothing "wrong" with it. It works perfectly well. The only issue is with trying to figure out what is happening later - or, worse yet, what is happening when trying to debug/fix/update someone else's work. (As I've been doing recently.) Changing that "i" to something like "qi" or "ji" only takes a fraction of a second longer to type but can potentially save many minutes of search time later on. Almost every hit when searching for "qi" or "ji" will be a valid hit. (FYI, "si" would not be such a good choice - better than "i" but not as unique as "qi".)

      As already noted above, there is no good way to find every appropriate "i" other than to search for every "i" and evaluate each one to see if it's really the "i" variable or just another i inside a word. Trying to find where every appropriate "i" is located in order to determine exactly what is supposed to be happening in the code can be very time consuming and potentially error-prone - as in, it's easy to miss a valid hit when only 1 in 10 or 20 is a valid hit. And not doing a character search at all is an even better way to miss something.

      Just for fun I counted the i's above and found 11 that referred to the variable and a total of 108. That 10:1 ratio is pretty close to what I've seen in code as well.

      And, again, if it's a short FOR...NEXT loop - no big deal (other than what I consider to be a bad habit). But when the loop starts covering 100's of lines plus GOTO sections and calls to subfunctions it can be a much bigger problem - not functionally but for debugging/editing.

      Comment


        #18
        Re: You guys are driving me nuts.

        this reminds me of a funny story - several years ago a client asked about other people getting to the code and "stealing" the app

        I though a minute, and replied, well ...... I password protect scripts, and getting into the app, etc., but supposing they did get in - it will cost them so much time figuring out how the app works, that if would have been much much cheaper to just pay for it. The app is like a giant spider web, and if you don't understand how all the little threads are linked together, you would be better off just writing a new app from scratch.

        That was the first comprehensive, full blown app I wrote in Alpha, about 11 years ago, in all xbasic, which makes it all that much worse for someone trying to understand it.
        Cole Custom Programming - Terrell, Texas
        972 524 8714
        [email protected]

        ____________________
        "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

        Comment


          #19
          Re: You guys are driving me nuts.

          Couldn't the search for 'i' issue be resolved by searching for 'i =' or 'i=' ?

          Comment


            #20
            Re: You guys are driving me nuts.

            But Tim what about where the variable "i" is used elsewhere in the code that does not have the "=" sign which Cal pointed out---I, myself, have a lot of code that will use the for...next placeholder in other areas of code which will not have the "=" sign...usually by itself but other times surrounded by or next to "(" or ")" when used in or with other functions.
            Mike
            __________________________________________
            It is only when we forget all our learning that we begin to know.
            It's not what you look at that matters, it's what you see.
            Henry David Thoreau
            __________________________________________



            Comment


              #21
              Re: You guys are driving me nuts.

              Originally posted by MikeC View Post
              But Tim what about where the variable "i" is used elsewhere in the code that does not have the "=" sign which Cal pointed out---I, myself, have a lot of code that will use the for...next placeholder in other areas of code which will not have the "=" sign...usually by itself but other times surrounded by or next to "(" or ")" when used in or with other functions.
              Fair enough - but if youre at the point of debugging where youre finely combing through a procedure you will see the start of a for loop and the NEXT, you should also know that i refers to the i in the first for loop considering it is still in the for loop scope.

              if there is a nested for - it most likely wont be using i again (and if it does chances are you have more debugging to do)

              If youre fine combing the procedure - you should know that i refers to the counter for that loop, I dont see how counter1, counter2, counter3 would be necessarily better. i within a for loop is usually only used for array indexes and for small checks (i=maxrows, i=1 etc)

              I really dont see why you would need to SEARCH for i. (Youre example is that you are changing i to qi so you could figure out what the script is doing, but is qi really that different? :s in what other case would you need to search for i? its just a counter)

              anyways - i think its a matter of personal preference really.

              you should be commenting on the previous developers lack of comments - rather than his use of i

              'BEGIN FOR LOOP TO PROCESS CUSTOMER
              'BEGIN FOR LOOP TO GENERATE INVOICE RECORDS


              'END FOR LOOP TO GEN INVOICE
              'END FOR LOOP TO PROCESS CUSTOMER


              if he did that , i doubt you would notice his i (dealogy :))
              Scott Moniz - Computer Programmer/Analyst
              REA Inc.
              http://reainc.net
              (416)-533-3777
              [email protected]

              REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
              If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
              contact us to discuss options.

              Comment


                #22
                Re: You guys are driving me nuts.

                My Rant:
                i is the least of our worries.

                Database naming is horrible in some applications.
                Im guilty of this myself.

                field_name seems to be standard and this is what i have been using. Try creating a grid based on tables with this naming convention ;)

                person_id
                first_name
                last_name
                sin_number

                A grid generated against a table named using this convention will have its labels set to
                Person Id, First Name, Last Name, Sin Number

                Alpha (and other applications and DAL generators i have worked with use this convention) - alpha will split the field name on _

                do a toUpperCase on the first letter of every word

                and construct the label based on this - saves a lot of time


                Also, PUT PRIMARY KEYS, FOREIGN KEYS, AND INDEXES ON YOUR TABLES!!!GRRRRRRRRRR :) Data integrity is important!

                A person deleting a customer when that customer has existing orders is a NIGHTMARE situation!
                Scott Moniz - Computer Programmer/Analyst
                REA Inc.
                http://reainc.net
                (416)-533-3777
                [email protected]

                REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                contact us to discuss options.

                Comment


                  #23
                  Re: You guys are driving me nuts.

                  Originally posted by aburningflame View Post
                  anyways - i think its a matter of personal preference really.

                  you should be commenting on the previous developers lack of comments - rather than his use of i


                  if he did that , i doubt you would notice his i (dealogy :))
                  Pardon me, guys. But, this is getting kinda funny. Sometime ya can't see the forest through the trees. Maybe this is one of those situations.

                  Only the former developer knows for sure why it was done that way and that's a 'maybe'. It could have been intentional, eiher delibertly left out the 'comments' or just didn't care. If I were going to write an app where I needed tight security, I would not leave a paper trail with the app and I would not do a naming convention that would be relatively easy for someone else to figure out. I'd make'm suffer and figure it out. I would make sure it was all documented, just not with the app. Documention and naming conventions are a blueprint.

                  kenn
                  TYVM :) kenn

                  Knowing what you can achieve will not become reality until you imagine and explore.

                  Comment


                    #24
                    Re: You guys are driving me nuts.

                    Would this be a bad time to mention that this is not the 11th year of the 21st Century? That it is in fact the 10th? (11th soon though.)

                    Anyway, there is another aspect to naming, and notes. Job security. It's hard to fire the only person who knows what's going on. And even though somebody else can figure it out, the person may not want to make it easy for them.

                    Comment


                      #25
                      Re: You guys are driving me nuts.

                      Cal,

                      Until you (and the rest of us) figure out how to get developers to look beyond their immediate need (Get this app to work and I mean now!) and to think beyond them (the developer) being the one having to work on their application, you'll never get people to think (or care about) anything other than what is immediately in front their face.

                      In my mind that's the realty and unfortunately, I don't see it changing in the near term.

                      Dave
                      Dave Jampole
                      www.customalpha.com

                      Women and cats will do whatever they want. The sooner men and dogs realize that, the happier they will be.

                      Comment


                        #26
                        Re: You guys are driving me nuts.

                        Wow! I never expected this thread to get so long.
                        Originally posted by The Mage View Post
                        Would this be a bad time to mention that this is not the 11th year of the 21st Century? That it is in fact the 10th? (11th soon though.)

                        Anyway, there is another aspect to naming, and notes. Job security. It's hard to fire the only person who knows what's going on. And even though somebody else can figure it out, the person may not want to make it easy for them.
                        You are quite correct about the year of the 21st century. Worse yet, I knew that there was lots of confusion over the start of the century and that it didn't start on 1/1/2000. In the process of trying to get the count right I managed to confuse myself and get it wrong. What really surprised me was how much disagreement I found about this when Googling it. However, I believe this article gives the clearest reason. "What matters is that the calendar we use today – the Gregorian Calendar – starts with the year 1 AD and has no Year Zero." The Gregorian Calendar was designed by a Roman and, since Romans didn't even have a character for 0, the first year was year 1. Therefore, the first day of the Gregorian calendar was 1/1/0001 which means the "1st century" started on 1/1/0001 and the 21st century started on 1/1/2001.

                        As to job security, I've never had a concern with that and have also refused to take a job away from another developer until that developer told me himself that he wasn't interested in continuing with it. I have also taken over two applications from people who have retired. And there is the sad fact that sometimes people meet an untimely end or just seem to disappear. Then, lacking a good naming convention, the next guy has a harder time figuring out what was going on.

                        My personal feeling is that anyone who actually believes that a better naming convention would adversely affect their "job security" has much bigger things that need to be fixed.

                        Also, having made so many references to other people looking at someone's code, I should point out that I'm basically very selfish. The main reason I like having a good naming convention has nothing to do with anyone else. I do it because I believe that a better naming convention in my own code actually makes life easier for me.

                        Originally posted by davej View Post
                        Cal,

                        Until you (and the rest of us) figure out how to get developers to look beyond their immediate need (Get this app to work and I mean now!) and to think beyond them (the developer) being the one having to work on their application, you'll never get people to think (or care about) anything other than what is immediately in front their face.

                        In my mind that's the realty and unfortunately, I don't see it changing in the near term.

                        Dave
                        True. But I keep hoping. And if alternate/better methods are never mentioned then it will take even longer for people to figure it out on their own.

                        Also, some of the responses have led me to the conclusions that (1) a lot of people don't read the existing threads before responding and, more surprising to me, (2) there must be a LOT of developers who never use a search routine to find text matches. Apparently they just use the old fashioned Mark I eyeball. (Edit - Hmmm, maybe that's because they are using the Genies instead of writing xbasic??) In that case it doesn't make much difference how you name anything. Unfortunately I find that my own Mark I eyeball tends to miss a lot of things that a computerized text search doesn't. If you actually use a search routine (especially A5Doc or my AIMS_App_Analyzer vs. using Ctrl-F in one script at a time) to find names of variables, layouts, scripts, functions, tables, etc., you should quickly understand the advantage of unique names.

                        Up to this point I've avoided linking to it because I've linked to it in so many other threads. But now I'm going to include a reference my Naming Conventions page for those who haven't seen it before.

                        Comment


                          #27
                          Re: You guys are driving me nuts.

                          I just re-read my post and noticed that this comment might be taken as a shot at The Mage - it wasn't.
                          My personal feeling is that anyone who actually believes that a better naming convention would adversely affect their "job security" has much bigger things that need to be fixed.

                          Comment


                            #28
                            Re: You guys are driving me nuts.

                            Originally posted by CALocklin View Post
                            I just re-read my post and noticed that this comment might be taken as a shot at The Mage - it wasn't.
                            My personal feeling is that anyone who actually believes that a better naming convention would adversely affect their "job security" has much bigger things that need to be fixed.
                            I didn't take any of the comments that a good naming convention would affect a person's job security, just w/o one, the code is probably more secure. Personally, a good naming convention is a must, whether it's with the code or separate from the app.

                            Maybe there should be a thread for a review of suggestions and perhaps a uniform solution might be the result. (Yah, I know that's a bit of a stretch but, won't know until it;s tried.)

                            kenn
                            TYVM :) kenn

                            Knowing what you can achieve will not become reality until you imagine and explore.

                            Comment


                              #29
                              Re: You guys are driving me nuts.

                              If you ever get to write anything for a global company, you will need to demonstrate good configuration management, before they will allow you produce anything. With software this will encompass project documentation, standardized naming conventions and notes. This allows the company to protect its status in the event of an employee leaving.

                              Needless to say I don't write anything for anyone but myself (hobby stuff), but for the company I work for, I demand absolute stringent adherence to the policy. It can add painful overheads but they are a must.
                              -----------------------------------------------
                              Regards
                              Mark Pearson
                              [email protected]
                              Youtube channel
                              Website

                              Comment

                              Working...
                              X