Lighting simulation with Groundhog
  • Introduction
  • License
  • Installation instructions
  • Radiance
  • History
  • Tutorials and learning
    • Getting started
    • Add a Workplane
    • Adding Windows
    • Materials
    • Weather Files
    • Adding Illum surfaces
    • Grouping Windows
    • Exporting Views
    • The design assistant
    • The simulation manager
    • Objectives
  • Basic Lighting Theory
    • Lighting Units
    • Climate Based Daylight Modeling
    • Daylight Metrics
  • Coding for Groundhog
    • Coding standards
    • List of Labels
    • List of Values
  • Appendixes
    • GNU General Public License
    • Known issues
  • Known issues
Powered by GitBook
On this page
  1. Coding for Groundhog

Coding standards

PreviousCoding for GroundhogNextList of Labels

Last updated 6 years ago

This project was founded by non-programmers, which explains the lack of standards and good-practices in the code. However, I have recently started following this publicly available . Also, since the beggining, the code has been documented using . Groundhog is far from having a well standardized code, but I would appreciate your contributions to be styled and documented properly.

Please keep in mind the following standards before adding features to Groundhog.

  1. Document your functions and methods and code using YARDOC. You may use for learning how to do it.

  2. Please follow the for coding

  3. Avoid creating methods that are already available in the

  4. Avoid using system calls to create, write or delete files. Use FileUtils and other Ruby modules instead.

  5. When creating scripts and calling the system, avoid using Pipes. There are machines who do not like them, crushing Groundhog.

  6. When calling the system, prefer cross platform implementation of system code instead of OS specific calls. For example, rtrace -e "179(..." program can sometimes be replaced by rmtxop -c ...

  7. Keep the code simple... it is better to add more simple functions than to create a horrible big function.

Ruby Style Guide
Yardoc
THIS GUIDE
Ruby Style Guide
SketchUp API