Ideas and Workflow Organisation for (Slightly) Larger Projects

If there are 3rd-party libraries that will do the job, I say use it.
By the same token, try writing your own library of functions you can re-use for future projects.

I have (4) files that I use for that purpose, each file containing multiple functions. I grouped them logically by files. Each file ranging from short 120 lines, to 1300 lines of code. It makes development faster as I don’t have to re-invent the wheel and I can pull from my bag of magic tricks.

Name your functions/methods and variables descriptive names. Yeah, they may be longer but it will also read more easier and aid in remembrance. Also, I put comments on my functions so I’ll remember what it does months or years down the road (when the client requests a change or new feature, or to fix discovered bugs).
examples:

    public static int IncrementAdViews(int adid)
    {  // update page view counter for this story id#
       // return value will be the updated view total

       // actual code goes here...
    }

    public static string GetAStoryPhoto(int storyid)
   {  // retrieve a photo (if any) and use this photo 
      // for the facebook/twitter feed

      // actual code goes here...
   }

Don’t hardcode magic numbers throughout your code… a few months down the road, you may not remember what they’re for. Instead, name them for what they are. Example:

   int defaultWidth = 400;

If your editor supports split-windows, use it. One window can be viewing one part of your code, and another window pane on the section you’re working on. Then you can quickly lookup variable names, function names, whatever on the other window.

Multiple monitors — love them. I used to have (2) 23" Apple Cinema display. Now, I’ve added a third monitor! One monitor is my editor, the 2nd monitor is a preview of the work in a browser, the 3rd monitor can be Chrome Developer tools, or Netflix, or email, or facebook, or a view of the database in SQL manager, etc. Minimizes switching windows, or scrolling up and down.

Refactoring can come in later. Make your program work correctly first, giving the right results. Then git, commit. Then branch out and work on refactoring piece by piece. If something breaks during your refactoring, and you can’t recover, you can always go back quickly to last known good copy of whatever file you’re editing.

Tracking To do lists, issues, etc… I recently started using a software called JIRA. I’m just a single developer, and this software may be overkill. I don’t use all of it’s features right now, but it has helped me keep track of my to-do lists and issues. Before, I just use a notebook… and I forget to do items when I change the page. JIRA costs a one-time $10 for a self-hosted version. I’m hosting mine on my OSX desktop. Or go cloud version, but it’s $10/month.
https://www.atlassian.com/software/jira

Plus I get pretty graphs showing what I’ve finished, new to-do items or issues I’ve created, and how much is left.

That’s all for now, If I think of something else I’ll add to this.

Interested to hear others workflow too, please add to the list.

3 Likes