Skip to content

Ways to Optimize your Development

ADMIN | 25-01-2013

This blog post describes some ideas I have about writing better code.

Hexagon pattern 1

computersThis blog post describes some ideas I have about writing better code.  When one says “optimize” the first question I have is: what is the goal?  What are we optimizing for?  I think optimizing means maximizing the economic value of the software you are working on.  There is a subjective component to value that a developer has no control over.  However, there are a lot of things that influence value that are directly controlled by developers. 

With that, I will enumerate some key areas asking questions for each.  Remember that programming is hard, and there is no panacea that works for everything.  But these are some questions which help me think about what is working and what is not.

1. Use a specification/contract 

  • Can developer reading only the signatures and inline comments figure out how to use the functionality?
  • Is expert knowledge of the implementation required to understand what the functionality is going to do?
  • When a bug occurs, how difficult is it to find the part(s) of the code that are responsible?
  • Are contracts recorded in comments? Enforced as runtime checks? Enforced as compile time checks?


2. Handle errors consistently

  • Do you use return codes?
  • Do you use exceptions?
  • Is it possible to debug failures easily (e.g., set one breakpoint for unexpected events)?
  • In the event of an error, does the program silently produce unexpected results?
  • In the event of an error, does the program offer an informative error message and avoid damaging the program state?
  • Can the program recover from some failures to still produce a meaningful result?  (Please note: recovering from an error is completely different from ignoring it…)


3. Use interfaces

  • To add a new functionality X, how much code needs to change?
  • Do the function/method signatures make sense without reading the implementation code?
  • Are there any functions/methods with more than six arguments?


4. Multithreading Friendliness

  • How much static and global data is present?
  • How monolithic are the algorithms?
  • Can the big/time consuming parts of the algorithm be broken into non interacting pieces?


5. Know your programming tools

  • Are you familiar with what STL can do, and how quickly? i. E.g., what does std::equal_range do?
  • Are you familiar with Boost and other available utilities?
  • Are you aware of domain specific libraries to help with what you are doing?
  • Does your programming environment offer things like auto completion, cross referencing in the code, etc.? 
  • How much do you need text find to navigate in your code?


6. Know your source control, build, and testing systems

  • How long does it take a new employee to check out and build a copy of the product?
  • Are automatic tests run regularly on the code?
  • How long does a build take?
  • If someone makes grossly incorrect changes to the code, how long does it take to recover from that?
  • Are changes associated with stories/bug fixes?
  • Can you obtain source for each version of your released product easily?
  • Are dependencies noted between changes? i. e.g., if someone wanted a version of your product from 10 years ago, except with bug fixes x,y, and z applied, how long would it take to comply with that request?)


7. Performance

  • How do you measure size/complexity of inputs?
  • How does compute time scale with size of inputs?
  • How does memory consumption scale with size of inputs?
  • For a given hardware configuration, how large a problem can you handle without running into memory problems?


Do you, dear reader, have any questions or schema for accessing software and development quality that you would like to share?

 

You might also like...

5 Min read
CGM Modeler
Software components are like the stage crew at a big concert performance: the audience doesn’t see them, but their...
8 Min read
CGM Modeler
There’s a lot of confusion around what the terms additive manufacturing and 3D printing mean.
2 Min read
CGM Modeler
WRL files are an extension of the Virtual Reality Modeling Language (VRML) format . VRML file types enable browser...
Voxel model example
3 Min read
CGM Modeler
Voxels are to 3D what pixels are to 2D. Firstly -- let’s examine what pixels actually are. Everything you see on your...
Point_cloud_torus
2 Min read
CGM Modeler
Point-cloud modeling is typically used in the process of 3D scanning objects. Rather than defining surfaces through...
Polygonal Modeling
2 Min read
CGM Modeler
Polygonal (or polyhedral) modeling is the most common type of modeling for video games and animation studios. This type...
BREP Model example
2 Min read
CGM Modeler
BRep modeling, or Boundary Representation modeling, is, in CAD applications, the most common type of modeling. BRep is...
Construction site with crane and building-1
3 Min read
3D Software Development Kits
Digital twins are changing the way the construction industry manages large building projects and infrastructure...
3 Min read
3D Software Development Kits
There is a new wave of innovative processes and solutions that improve product production throughput, and enable...
3D Product Visualization.jpg
2 Min read
3D Software Development Kits
In the 3D modeling space, application developers face a number of challenges — getting to market on time, delivering...
General PMI
4 Min read
3D Software Development Kits
It has already been a year since release 2017 1.0, which saw the introduction of a number of innovative features aimed...
Large Tolerant  Vertex
3 Min read
3D Software Development Kits
boolean operation Boolean operations on individual bodies are common functions in 3D modeling. While simple in concept,...
3 Min read
3D Software Development Kits
In much the same way as physical design has moved from paper 2D drawings to 3D models in software, so has analysis....
2 Min read
3D Software Development Kits
Today was day one of Spatial Corp.’s 3D Insiders’ Summit 2016, an educational event that focuses on technical topics...
4 Min read
3D InterOp
Part and parcel with model-based engineering is model translation. Because the model is now the specification, accurate...
3 Min read
3D Software Development Kits
In case you missed the news this week, we announced the availability of Release 2017 1.0 for Spatial software...
2 Min read
3D Software Development Kits
Augmented World Expo 2016
4 Min read
3D Software Development Kits
Make or buy is an age old question for anyone building products, whether hardware or software. For example, for a...