loading...
Cover image for Snow Ball Effect Design

Snow Ball Effect Design

kodaman2 profile image Fernando B 🚀 Updated on ・4 min read

I wanted to talk about something I call snow ball effect design. Yeah I am just making this up. It boils down to how I test the waters when I have an idea for a software project. For my example I will use a "Visualization Plotting" tool since is my latest project in the works.

Why do I need a Visualization Plotting tool?

In my line of work, there is a lot of data analysis. The data can come from different points, csv, microcontroller, etc. It sucks looking at csv data, my brain just can't process numbers in a spreadsheet, maybe some people can. I need to see a visual plot to really make my brain process what's really going on.

Core Requirements

  • Display data real-time in nice plot lines anywhere from 1-16, anything more than that is very hard to analyze although not impossible. Though ideally one can still pull data for more than 16, let's say 32 as a limit.
  • Able to connect to different types of controllers handle different drivers, i.e. arduino, raspberry pi, allen bradley, siemens, omron, csv, etc.
  • Write/Read plot data

Other Requirements

A list of stuff that is not needed in the beginning. In other words nice features to have, but not necessary to run the program.

  • Display plot data with a digital readout
  • Display a list of alerts based on expressions
  • Auto-scale plot lines
  • Set trigger to start/stop plotting

Testing the waters

At this point, you would decide on a stack for the project. I use stack loosely here, but what I mean is you pick a programming language, libraries/frameworks, etc. Anything you would need to compile, and run a functional prototype. If is a website, then it would be something like apache, php, mysql, or node.js, npm modules, javascript. You get the idea.

In the case of the plotting tool, I tested the waters by choosing python as my ideal language because is fast to prototype anything. The biggest hurdle I encountered was finding a good python library for plotting just plot lines. Matplotlib was too big for my needs, and that required other modules. Bringing too much dependencies to the project in the end. Once I found a good plotting library, I needed to do the bindings for python, setup Qt\SIP for Python. And needless to say it was very difficult to get a project even setup. I spent days, and days until I threw my white flag of failure. Qt looked promising, but there were too many moving parts to setup a minimal project. I gave it a try on Windows, and Linux just to compare. Was a bit easier on Linux, but I still had tons of issues with SIP.

  • QT, MSVC
  • Compilers
  • Environment path variables
  • SIP
  • Generate Bindings for C++ lib

I went back to the drawing board, it was too much hassle. I had not even started on the project browsing through SO and manuals for QT. I turned to the other major language I know, Java. It turns out Java has JavaFX library for GUI projects which also supports plotting, it integrates nicely with Java without having to install a thousand things. Not to mention JavaFX has been open source for a while, and has a big community. I setup my project in less than 10 minutes.

Snowball 1kg - GUI Window

The very first thing to test was to produce a window GUI with JavaFX. I turned to examples online, and had a working GUI with a button in no time.

Snowball 2kg - Plotting lines

Have a working example of a plot with JavaFX charts API. As it turns out JavaFX had a nice Ensemble.jar with multiple GUI examples, and source code. I modify the source code to add a third plot line.

Snowball 3kg - Connect to controller

Ensure there is a connection to the controller, and device a working model to read data.

enter image description here
Image Credit: Praxisociety

Conclusion

I won't bore you with a lot of snowballs, no pun intended. The main thing to take from this is that when you begin a big project it can get overwhelming. Part of the journey is to break it down nicely. In the research part there might be something you don't know how to do. No, let me rephrase that, there will be something you don't know, and chances are someone has done it already and hopefully documented online. Try to get a working example first of that alone until you get a handle on that, because if you try to combine all your requirements at once it can get complex, and in the end slow you down.

In my plotting example, I had never done a plotting tool or connected to an arduino from Java, but conquering each requirement one at a time gave me a quick boost through the project because sometimes is not easy to see light at the end of the tunnel.

The core feature of snow ball design, is to keep making the snowball bigger each step of the project. By the way snow ball design is loosely modeled after waterfall. Snow ball design is more about getting started with the project, and testing ideas it doesn't have to be major milestones in the project like implementation, testing, deployment, etc.

  • How do you tackle initial project research?
  • How do you approach initial design?
  • What is the most used Software Development Life Cycle in your line of work?

Posted on by:

kodaman2 profile

Fernando B 🚀

@kodaman2

Coding space junkie with a sprinkle of writer heart. DMs open for any questions or comments. 🙂

Discussion

markdown guide