Announcement

Collapse
No announcement yet.

I have a new found respect for programmers...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • I have a new found respect for programmers...

    This sh*t can be difficult.

    And I'm not doing anything overly complex (I don't think) - creating a database based program to help my photograph business using File Maker Pro - started this about 18 months ago. I don't spend much time on it, but with two weeks off work, I figured I might as well jump back into it. I'm basing most of this on guesswork, experience in high school on MS Access 2000 (not entirely the same) and a training manual. Sometimes I think I've bitten off a little more than I can chew...

    Currently working on the invoicing side of things - generating/tracking/reporting invoices so I don't have to manually type up spreadsheets every month or two to see if I'm actually getting paid properly or not.

    Have just finished the invoice/quote generation side of things, will probably get to the reporting side of things tomorrow. My plan is to be able to create a report that will allow me to track any outstanding invoices or quotes I may need to follow up on, generate an account statement for each client, and easily track how much I've earnt each financial year for tax reporting purposes (In fact a single report can do all of this, just need to tell it what data sets to look for). Next stage will be working out how to automatically email this...

    I've already set up the purchasing side of things - allowing me to enter details on stuff I've bought related to the business; camera gear, printer ink, consumables etc and generate reports based on what I've bought (again for tax purposes) hardware & software registers so I can keep track of my serial numbers (great for insurance purposes and reinstalling software).

    Other simple things I've added in to the program are the ability to print address labels for posting stuff (usually DVDs of photos taken) because my handwriting sucks and I doubt the postie can read my writing and a section I can embed scanned receipts in if I need to.

    My next major task will be to develop and deploy the program to my mobile phone/iPad - reason I chose FMP is that they have an iOS app (being an Apple owned company) meaning I can generate an quote/invoice on the spot, wherever I am.

    I have had people I've told about this project ask why? or why not just use an out of the box package like MYOB. My answer to that is boredom, and to see if I can. Plus I like the satisfaction of being able to build something all of my own (big Lego fan as a kid).

    Anyone else here have similar experiences?

  • #2
    Considering I work at a software company that makes and sells several database applications, I understand completely. We have a lot more that we do besides invoicing, so it a hell of a lot more complex. And we're in the process of a complete rewrite to a new language...
    "If your day is filled with firefighting, you need to start taking the matches away from the toddlers…” - HM

    Comment


    • #3
      How does the song go again?

      100 errors in the code this time
      100 errors in the code
      fix the error, compile it again
      101 errors in the code this time

      I AM the evil bastard!
      A+ Certified IT Technician

      Comment


      • #4
        Quoth lordlundar View Post
        How does the song go again?

        100 errors in the code this time
        100 errors in the code
        fix the error, compile it again
        101 errors in the code this time

        Story of my life, lordlundar. Or at least my career.
        "If your day is filled with firefighting, you need to start taking the matches away from the toddlers…” - HM

        Comment


        • #5
          Yeah, I got some respect for programmers after my disastrous flirtation with CompSci. It was a lot harder than I had expected, although part of that was down to my complete lack of understanding of program design. Once I took a course later down the road on program design, it made a lot more sense, but it was still a lot harder than I had given it any kind of credit.
          PWNADE(TM) - Serve up a glass today! | PWNZER - An act of pwnage so awesome, it's like the victim got hit by a tank.

          There are only Four Horsemen of the Apocalypse because I choose to walk!

          Comment


          • #6
            As a programmer myself, in my experience, the most important skill a programmer has is to be able to take a problem, and to break it down into smaller chunks that can be solved and then strung together to solve the bigger problem.

            The second most important skill is to be able to do that in a way that won't make any other programmers want to lynch you if they saw the code.

            It really does take a certain mindset/way of thinking that some people can do well, while others can't even begin to imagine what you are doing. (I am the former, my mom is the later)

            As for the OP; maybe it's time to take a step back and do some organization. Do some research on Agile Programming, in particular the Task outlining and Task breakdown parts of it.

            Outline what you want your program to do much like you did above, and make a card with each goal in layman's terms.

            Then each card, figure out what you need to do to finish that goal and make another note card for each of that (you can get a bit more specific at this point). For each of those subtasks, decide if it's something you can do, or if its something you need to do more little things to accomplish; if so, break that card down into smaller tasks. Repeat until you have tasks that should take a few hours/few days to finish and you can start working on it.

            Focus JUST on the card at hand, and don't think of the rest. If you feel you are discovering a lot of nagging details that are complicating things or maybe a better way to do it, stop your work and rework the cards to reflect your new knowledge. Then pick a new card and continue.

            Comment


            • #7
              My midterm project for C++ class (waaay way back) was a simple "kill the bug eyed monster" type of game, for similar reasons; I probably still have the raw code around here somewhere, if anyone wants it -- essentially an exercise in Functions. It had monster choice (4 of them!); tracked HP, MP, and healing potions; a difficulty slider (I think); variation in the damage caused and absorbed...and, of course, sarcasm in the writing. It went over well with the class, and I enjoyed doing it.
              "For a musician, the SNES sound engine is like using Crayola Crayons. Nobuo Uematsu used Crayola Crayons to paint the Sistine Chapel." - Jeremy Jahns (re: "Dancing Mad")
              "The difference between an amateur and a master is that the master has failed way more times." - JoCat
              "Thinking is difficult, therefore let the herd pronounce judgment!" ~ Carl Jung
              "There's burning bridges, and then there's the lake just to fill it with gasoline." - Wiccy, reddit
              "Retail is a cruel master, and could very well be the most educational time of many people's lives, in its own twisted way." - me
              "Love keeps her in the air when she oughta fall down...tell you she's hurtin' 'fore she keens...makes her a home." - Capt. Malcolm Reynolds, "Serenity" (2005)
              Acts of Gord – Read it, Learn it, Love it!
              "Our psychic powers only work if the customer has a mind to read." - me

              Comment


              • #8
                Programming is fun!

                I've been doing code for the Megatokyo Visual Novel, mentioned here before. In one of the comic pages Piro, wearing a cat costume, chases his tail, and this is being turned into a minigame inside the VN.

                So, I had to model Piro spinning around, chasing and possibly catching his tail; modeling a tail flopping around in the wind wasn't too trivial; I did it by picking random points at intervals and accelerating the tail towards those points. I think it turned out nicely.

                Comment


                • #9
                  Way back in high school I took a programming course (BASIC on dumb terminals hooked up to a mainframe at another school). One assignment was to write a program that was basically a comparison of arithmetic and geometric progressions, and print a message when G exceeded A, and when the sum of the G sequence exceeded the sum of the A sequence. Most of the class couldn't figure out how I got the messages to print out only once, rather than at every step after the event happened (i.e. they couldn't grasp the concept of a flag to say "I've already done this").

                  Years earlier than this, I was at a consumer computer show. The brand new Radio Shack Colour Computer was there, with no program loaded. A couple of older kids were standing by it, and after not being able to get it to do anything (it didn't understand the command "Play hangman you dick"), they wandered off. I walked up to it, did a bit of typing, and walked away. A middle-aged woman demanded to know what I'd done to break the computer. What had I typed in?

                  10 print "I am broken, call a repairman."
                  20 goto 10
                  Any fool can piss on the floor. It takes a talented SC to shit on the ceiling.

                  Comment


                  • #10
                    Programming is weird. it's like jenga, you don't know how you pulled it off but you did and now leave it alone or it'll fall to pieces.
                    Interviewer: What is your greatest weakness?
                    Me: I expect competence from my coworkers.

                    Comment


                    • #11
                      Quoth Jetfire View Post
                      As a programmer myself, in my experience, the most important skill a programmer has is to be able to take a problem, and to break it down into smaller chunks that can be solved and then strung together to solve the bigger problem.
                      THIS THIS AND MORE OF THIS ^^^^^^

                      think of it this way ----- take any old school table top board game like Monopoly, break the game down into sections, totally understand the rules of play, board movement, buying selling mortgaging bankruptcy property transactions, Chance Comm Chest paying and receiving various property rents (esp. the RRs and utilities) houses hotels, etc.

                      When you play the actual board game a LOT of these functions are somewhat easy to do and understand.

                      Telling a program what to do and how to do it AND integrating all of those components together into a system that works is not really an easy task.

                      And yes I have done just that. about 30 odd years ago back in my college days I had a semester with no IT or programming classes and was bored...... SO I decided to do the above just for giggles. The system was 99% compatible with the Monopoly rules and regs. I did add a few things and removed a few things


                      The second most important skill is to be able to do that in a way that won't make any other programmers want to lynch you if they saw the code.
                      and that is why one of the first lessons they should teach (at least they did in my day) is COMMENT THE HELL OUT OF YOUR CODE. It costs nothing and leaves a decent legacy for the next person so they will not hunt you down and do VERY nasty things to you.
                      I'm lost without a paddle and headed up SH*T creek.
                      -- Life Sucks Then You Die.


                      "I'll believe corp. are people when Texas executes one."

                      Comment


                      • #12
                        commenting was one thing I tried to drill into my students heads some of them just would not get it.
                        Interviewer: What is your greatest weakness?
                        Me: I expect competence from my coworkers.

                        Comment


                        • #13
                          Comments are gold! I once spent nearly a full day trying to figure out why a certain function in a driver development kit wasn't working properly. Turns out the defined type mapped (after several iterations) into a signed long, but the documented behaviour depended on the return value for a function being treated as an unsigned long. I wrote a comment (couple paragraphs) explaining why to use an unsigned long instead of the type that Microsoft's documentation said to use, so that other programmers in the future wouldn't "fix" this "not doing what's documented" behaviour in my code and re-introduce the bug. My manager deleted the comment to save disk space.
                          Any fool can piss on the floor. It takes a talented SC to shit on the ceiling.

                          Comment


                          • #14
                            And for St Vidicon's sake, USE CONSTANTS!

                            It's a lot, LOT easier to modify code if you just have to change
                            HIT_FAILURE_CHANCE == 33; // Percentage
                            and not try to determine whether every '33' in the entire program is supposed to be the hit failure chance.
                            (== is 'is assigned to', ; is 'end of statement', and // is 'everything after this and on the same line is a comment for humans not the computer')


                            What I always found hardest was trying to foresee e-v-e-r-y-t-h-i-n-g.

                            For example, take a simple-sounding job. Giving people a chance to give themselves a title, on a message board like this one. What tasks does that create?

                            * Adding a title.
                            - What if they add an offensive title?
                            - What if they try to add a title that's too long?
                            - What if they add an empty title?
                            - What if they add a title that's just whitespace?
                            - What if they put carriage returns into the title?
                            - What if they try to add a title that uses cedillas or other accent marks? Or is in Korean or Arabic writing? Will you support that?
                            - What if they try the sort of thing shown in this XKCD strip about 'Little Bobby Tables'?
                            - What have I forgotten?

                            Then there's the UI - user interface - about adding a title.
                            - If you put it on a page of its own, is that adding an unnecessary step?
                            - If you put it on an already existing page, is that making it too crowded?
                            - If you're changing an existing page, will people notice, or will they try to type what they're used to putting in that space into the text field?
                            - Speaking of which: is this going to be a text field? Or am I just thinking habitually? Would something else be a better tool?
                            - (Assuming I've thought through the rest and have decided to put it on the profile page) Where on the profile page will I put it?
                            - Does it need its own submit button? If I give it one, will that be confusing - will people think that submitting the title submits the whole page?
                            - Do I need to preserve the data if people surf away without submitting changes? What about if they reload the page? Can I preserve the data if they don't permit cookies?
                            - Do I want to allow them to set a fixed font size or colour? If they do, do I want their chosen size or colour to override a reader-end setting?
                            - Will I convert smiley codes to smileys?
                            - What if we add a new smiley later? Will I retroactively smiley-code titles that didn't previously have smileys but have that code?
                            - .... etc etc etc.


                            .... and that's just for adding a title line to a simple bboard forum like this one. I haven't even started the 'changing' or 'removing' or 'default titles' or 'empty title lines' sections, nor reporting offensive titles, or any of the mod support.
                            Seshat's self-help guide:
                            1. Would you rather be right, or get the result you want?
                            2. If you're consistently getting results you don't want, change what you do.
                            3. Deal with the situation you have now, however it occurred.
                            4. Accept the consequences of your decisions.

                            "All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools." - Anders, Dragon Age.

                            Comment


                            • #15
                              Quoth Racket_Man View Post
                              and that is why one of the first lessons they should teach (at least they did in my day) is COMMENT THE HELL OUT OF YOUR CODE.
                              Well, my understanding is in certain CompSci programming courses, they actually do want you to comment your code. This is so you can follow along with yourself, and illustrate to the instructor you have a general idea of what's going on and can somewhat communicate it.

                              However, in the "real world" it's different. A lot of places do not want you to comment your code. They will sometimes allow for the XML-style (or JavaDoc) type comments above the method or class, but NOT within the methods themselves.

                              I currently work at a place like this. If you check in commented code, they wag their finger at you, and tell you to remove the comments.

                              What they really want is components (Classes/Methods/variables) named in such a way that you can understand what's going on just by looking at them.

                              For instance:

                              public int myMethod(int a, int b){}

                              would be a no-no. However,

                              public int AddTwoIntegers(int a, int b){}

                              would almost be OK, because you can look at the method name and it tells you what the method is going to do. But "a" and "b" should probably have better names. In most cases (with the exception of possibly variables for counters in loops) single-character variable names are frowned upon.

                              Actually, here's an example of some code I wrote that checks for a prime number passed in to a method (with comments). Forgive the sloppy copy & past & formatting. It looks fine in Eclipse:

                              Code:
                              public static boolean isPrime(int theNumber){
                              		int x = 0; // used as an iterator.
                              		int squareRoot = 0; // used to hold the integer part of a square root.
                              		
                              		// Get the square root of the passed in value.
                              		squareRoot = (int)Math.sqrt((double)theNumber);
                              		
                              		// Since any number below 2 is not prime by definition.
                              		if(theNumber < 2){
                              			return false;
                              		}
                              		
                              		// Since 2 is the only even prime, check for it here.
                              		// If the value is two, we return true, because it is prime.
                              		if(theNumber == 2){
                              			return true;
                              		}
                              		
                              		// Start at two, increase until we find a value that either meets
                              		// the criteria, or is equal to the square root of the passed in value.
                              		for (x = 2; x <= squareRoot; x++){
                                          /*
                                           * Since 2 is the only even prime number, we want to skip
                                           * all other even numbers, since they are composite by definition.
                                           */
                                          if(theNumber != 2 && theNumber % 2 != 0)
                                          {
                                              /*
                                               * Since the number is not divisible by two,
                                               * we can check it here to see if it's divisible by some other
                                               * odd number, other than 1 and itself. If it is, then we
                                               * need to return false, because the number is composite.
                                               */
                                              if(theNumber % x == 0 && theNumber != x){
                                              	// If the number is divisible by some other number, other
                                              	// than 1 and itself.
                                                  return false;
                                              }
                                          }
                                          else{
                                          	// The number is divisible by two, so the number is composite.
                                          	return false;
                                          }
                                      }
                                     
                                      // It's a prime number.
                                      return true;
                              	}
                              And here's a slightly modified version of the code, sans comments:

                              Code:
                              public static boolean IsPrime(int theNumber){
                              		int iterator = 0;
                              		int squareRoot = 0;
                                              bool primeNumber = false;
                              		
                              		squareRoot = (int)Math.sqrt((double)theNumber);
                              		
                              		if(theNumber < 2){
                              			primeNumber = false;
                              		}
                              		
                              		if(theNumber == 2){
                              			primeNumber = true;
                              		}
                              		
                              		for (iterator = 2; iterator <= squareRoot; iterator++){
                                                  if(theNumber != 2 && theNumber % 2 != 0)
                                          {
                                              if(theNumber % iterator == 0 && theNumber != iterator){
                                                  primeNumber = false;
                                              }
                                          }
                                          else{
                                          	primeNumber = false;
                                          }
                                      }
                                     
                                      return primeNumber;
                              	}
                              Last edited by mjr; 11-21-2014, 11:16 AM.
                              Skilled programmers aren't cheap. Cheap programmers aren't skilled.

                              Comment

                              Working...