ProffieConfig V2 Progress

Well, the summer is nearing its end, school is starting back up again, and I thought it would be interesting to share an update. :slight_smile:

ProffieConfig V2 has been in development for the past ~4 months, is a complete rewrite from V1, and aims to tackle the proffie experience from several different avenues, encompassing much wider (and hopefully more reliable and user-friendly) sets of features. That’s a lot of work, and there’s still without a doubt a long way to go, but this far it’s been going very well!

In case anyone’s interested (even if you’re not a programmer, this looks pretty cool), here’s a visualization of the progress, generated by gource:

In the following posts, I want to just kind of keep a running log of things, talking about the development along the way, and if there’s any anyone has, discussing feedback about different ideas.

I’ll work on the first couple of posts tomorrow going over what’s already happened, and just go from there, but for now, enjoy the eye candy above!

P.S. I want to quickly thank @NoSloppy and @profezzorn for answering my questions and their help thus far, (even if maybe they didn’t know they were helping specifically with this) as well as several people from the r/lightsabers discord who I’ve talked to along the way about different things. Not to mention some amazing people over on the TCSS discord!!

Perhaps it sounds a bit sappy and premature, but really a lot of what’s happened so far, and I imagine a lot of what is to come, is possible and heavily accelerated by the help and insight I’ve received from others. :slight_smile:

Posts

"What's The Point?" (8/17)

Post Link
I start off the posts by explaining some fundamental core guiding ideas of ProffieConfig as a whole, as well as ProffieConfig V2 specifically, to try and set the scene for the posts to come.


"Ground Zero" (8/21)

Post Link
Exploring new choices made when starting the development of ProffieConfigV2 with the advantage of “Ground Zero” and a clean slate. Some technical overview of the very first things I focused on, as well as an insight into some of the first architectural things decided about the app and how it’s different from V1.


5 Likes

What’s The Point?

I suppose it makes sense to first start out by explaining why I’m building ProffieConfig, what goals I have with it, and how that’s influenced things.

The Proffie “Problem”

Proffie has a reputation throughout the saber space as being difficult because you have to “know how to program to do anything,” and while that statement is disingenuous at best, it’s certainly not the easiest to get started. IMO a lot of that stems from a couple of things: a steep learning curve at the front of getting into things and a lot of lacking understanding around what’s possible and how to use things going forward once you’ve figured out your first config and upload.

The former makes sense, gathering Arduino, a text editor that doesn’t suck, installing drivers (especially when there’s something like Guillemot’s stuff in the way), even things some of us would consider simple like downloading ProffieOS and opening it in Arduino, opening their config, and making sure that they’re actually editing the right config, are all things I see firsthand people new to proffie struggle with for one reason or another.

ProffieConfig V1

This is where ProffieConfig V1 really started, its goal was to have a setup and UI that got users through the door quickly. By making ProffieConfig a single thing that was downloaded, where they could pop in their old config and just go, it got a lot of people off the ground a lot faster than they could have otherwise, some people even decided they wanted to try out using Arduino afterwards, and because of having already seen the fundamentals of things with ProffieConfig, that was a bit easier for them to grasp.

Additionally, and to the second point of difficultly, just being able to see all the options laid out concisely has been helpful to a lot of people. I’ve had cases where people who have used and are quite familiar with proffie surprised when using ProffieConfig cause they saw an option that they thought was cool and they hadn’t seen yet. There’s very little in ProffieConfigV1 which is not well documented on the POD, but even still being able to visually see things laid out plainly helps expose people to what’s possible.

This is not to say the pod is bad or not doing its job, to be clear. It’s an invaluable resource without a doubt, and the detailed and comprehensive explanations of different concepts is absolutely necessary. What I mean to point out with the aforementioned is a simple, hard truth… unless people have a reason, they often won’t read the documentation, and providing an overview of things to, once again, get people “in the door” and curious about a particular feature(s) is something that I hadn’t thought about when initially developing ProffieConfig V1, but has been an interesting advantage nonetheless.

Inexperience —> Convolution

ProffieConfig v1.6, the most recent major version of ProffieConfig, and the first version that really started expanding what ProffieConfig can do, was when I started thinking about a rewrite.

Iirc it was v1.6 that introduced the ability to edit and manage multiple configs, added in a main “landing page” menu to the app, among other smaller changes. This was a huge update. Before that ProffieConfig was just a config editor, really. As soon as you launched it, there was the editor. You could load up new configurations and export them out, (and upload of course) but that was pretty much it.

Because of this v1.6 basically worked backwards, trying to move what used to be “The App” (the editor) into a separate, handleable thing. With ProffieConfig being my first proper desktop app project, and me being relatively new to C++ in general, there were a lot of bad things I did when writing it, and as I looked at the work I had to do for v1.6 along with the features I wanted to add, it made more sense to rewrite things differently.

Things I wanted like:

  • Better handling of bladestyles
  • Better management of configurations
  • Better isolation of features to make development easier
  • Better, more reliable handling of the upload process as a whole
  • A presentation of features that went beyond “here’s a bunch of options on a screen”
  • Better blade array handling
  • Better config parsing (there were many unique configs that would trip up ProffieConfig V1)
  • Easy updates for the end user
  • General polish
  • A better project management/build system (I was using qmake and QtCreator at the time… despite being written using wxWidgets)
  • Many little things
  • My sanity I’m mostly joking :laughing:

What ProffieConfigV2 Wants To Do Better

Besides a lot of architectural improvements along the way, ProffieConfigV2 wants to lead on from where V1 left off… if ProffieConfigV1 got people in the door, ProffieConfigV2 wants to repaint the house.

“Global” settings and human-centered configuration are really two key ideas ProffieConfigV2 features are being built around… but those are basically buzzwords and meaningless, so here’s what I mean practically.

The ProffieConfigV1 introduction was significant development-wise because it showed me how to create interactive experiences like that. Some people found it very useful, some people were confused by it (not understanding why certain things were locked off to them and that they were being guided), and some people just plain skipped it. The idea of introducing a user to the configuration process is perhaps one of the largest challenges… text-based or w/ ProffieConfig. While the Introduction was the first attempt at doing that, I think I can do better, and I think there’s a better way to go about things.

@profezzorn has (I don’t remember if it was in PMs or in a public topic) talked to me about what he considers good UI. It’s an idea of being plainly easy to grasp, guides the user by its nature and makes it clear where they should go, and yet still allows for advanced features the more and more familiar users get with it. And it’s with this idea I began my notes about how to build ProffieConfig V2

There will be no introduction.

…well that’s sad–because the entire configuration creation experience will be interactive.

Whenever creating a new configuration, instead of just dropping a new user (or even an experienced one) into a blank editor, ProffieConfig V2 will guide through the process. Instead of showing a user a hypothetical config during the introduction, it’ll guide a user through making their actual config.

But wait, that’ll be annoying to repeat users!

Not if the basis of the walkthrough is natural and the extra on top is purely informational.

But how will it be “natural,” what does that even mean?

Well, here’s where the radical difference between V1 and V2 begins. I start explaining things with this example because it’s both the first thing a new user will probably do, and a core part of the experience that highlights well my goals:

The Human Condition

Saber’s aren’t put together by clicking buttons or writing code, not physically at least. The very first thing that happens in a saber’s life is to have a design dreamed up, manufactured, and then meticulously (sometimes less so, but that doesn’t sound as fancy for this little bit) assembled by an installer.

Thus when creating a new config a user configures all the wiring-based aspects of the saber by using what I’ve liked to call, when talking to people thus far, KiCAD Lite :tm:. Put simply, users create a schematic in order to configure blades, buttons, things like RFID modules, etc. How this whole system works is for another later post, but that idea alone should put into perspective how ProffieConfigV2 is going to be laid out.

I’ve focused heavily on “what makes sense in the context of creating a saber and how it’s used?” instead of “how does the ProffieOS config file do it?” It’s a stark difference in practice/implementation, but I think it better aligns with ProffieConfig’s goals to be human-centered and make as most common sense as possible.

In the next post I think I’ll talk about development as it started, going over the first key things I tackled, and going from there how these different features have been implemented, or at the very least the groundwork for them has been laid.

3 Likes

Ground Zero

A bit of a warning up front, this’ll probably be intermingled with some more technical description. I’ll try and kind of explain things in a way that hopefully makes sense, but I won’t guarantee anything :sweat_smile:

Okey, okey. So, as my thought process was, “ProffieConfig V2’s gonna be a thing, what should I work on first?!” Given ProffieConfig V1 was my first Desktop application (well… technically that’s not true, SpacenavdRadialMenus came first… but I don’t think it counts), there were plenty of things that I wanted to change architecturally. There were lots of code style and layout things too, but that’s a bit more in the weeds than I want these posts to get into (for now at least).

Foundation Areas of Focus

Among those things, maintenance, updates, and delivery. ProffieConfig V1 was very, very straightforward and pretty basic. I compiled the program, (manually) threw a bunch of files into the resources folder, zipped it, and pushed it up to GitHub (and later my website). Later I got a bit fancy and started making .dmgs for macOS, but it was still the same basic process. I was using a deprecated build system (qmake) because my IDE (Qt Creator) supported it and was easy, and so that whole thing I wanted to rethink… and if I wanted to rethink that it had to come first.

Build System

CMake is an industry standard for C++ build systems, for better or worse.

What is a build system?

Well, I’m glad you asked!

Build systems are a whole bunch of software that you setup to manage your code files as you write them, and structure how things should be built. With C++ especially, the language is very old, and provides a lot of power to programmers. This however means there’s a lot of responsibility (Uncle Ben, is that you?).

So, different things that have to happen to your files to turn them into a real Linux, Windows, or macOS program (and believe me, they differ), and there’s a lot of programs involved in that process. It’s virtually impossible to do it all by hand, so you need a build system to do it for you. There’s still a lot of configuration to do, but it makes everything manageable.


CMake is old, and a lot of people find different things about it annoying, but it’s been around the block a while, and a lot of niche cases and issues have been worked out over the course of its lifetime that simply doesn’t exist with other build systems. Plus, IMO if you’re gonna be a contrarian you’ve gotta have a good reason to… and I didn’t. (And if you’re curious, from using it thus far and learning it, I’ve found it pretty straightforward and, relatively, simple. I’ve been pleased with it and it’s worked well for me)

Updates

Additionally, I wanted to make updates convenient for users…erm, moreso than V1. The best answer V1 had to updating was “well, drag the new files on top of the old ones and let your OS merge them.” That’s certainly inconvenient and less than ideal!

In order to make update sizes smaller if only a certain part of the code is changed, I decided it was reasonable to split parts of the code up into shared libraries. Shared libraries are probably most well-known on Windows as .dlls. They’re often used when, as the name implies, code needs to be shared between multiple applications. By separating it, it can be reused. However, for my case, this has the benefit of breaking apart ProffieConfigV2 into smaller files, which is good for speedy updates.

Then, for the actual updating, since this is largely an educational exercise for myself, I needed to roll (read: program/create) an update system. As I saw it, the easiest way to do this was to use file hashes. File hashes are essentially the result of taking a file, running it’s raw data through a bunch of mathematical operations, and getting back a nice short, unique identifier for that file. They’re extremely common in cryptography and just for data integrity, and it solved a couple of problems.

I didn’t need to keep track of versioning somehow else, and when the files are downloaded, I needed to hash them to verify their integrity anyways (if the file was corrupted during download the hash would be different/invalid), so it was a “two birds with one stone” sort of thing.

So, then updating is pretty simple for the program. Whenever it starts up it (optionally), pulls down a manifest file (A pconf file, which is a simple file format I created for ProffieConfig that probably deserves its own post) from the website (assuming internet is available), reads it, hashes all the program files, checks if there’s updates, and then politely lets the end-user know. If a file is expected but it’s not found, it’s known that it should be added, if a file has a hash that’s not recognized, then it’s considered out of date and needs an update. If I want to add files later, I can, additionally I’ve setup the manifest so different versions (macOS, Linux, Windows) each keep track of their files semi-separately, which is important.

I’m sure there’s more robust systems out there, and I’m sure I’ll find problems with it that require updating the updater (ironic), which will in turn require downloading the new version manually, but if that’s the case, the update system is equipped so it can inform users of any unforeseen breakages that they’ll need to update for.

Ultimately, I’m pretty happy with the solution given I’m completely green to the problem.

Delivery

Well, before things can be updated they have to be installed first!

This is a pretty short little section. macOS by its nature makes applications very easy, and I like it for that. There’s pretty much nothing changing from the .dmg approach I had figured out by the most recent versions of V1. That’s how macOS likes it, it works well, and it makes installation very easy (literally drag and drop)

Windows on the other hand is… annoying and difficult. I tried to look into it a bit and the MSI format is something I decided I didn’t want to deal with. Shopping around, I think what I’ll be using is a program called “Advanced Installer,” which takes care of all the MSI packaging. It has a free version that I think will be perfectly adequate, and it handles installing a Start Menu shortcut, desktop shortcut, moving the files where they need to go (duh), and the MSI is just something that’s familiar and easy for Windows users (relatively).

TL;DR Installation of ProffieConfig V2 will be more conventional, updates will be automated, and my system for handling it all should make my life easier. Excellent!

The Experience

That idea of splitting different things apart comes into play in the UI as well. Instead of a monolithic editor like with V1, which can start to get a bit crowded and confusing, ProffieConfigV2 plans to make better use of a home/launch menu for managing configurations and settings.

At present, the plan is to split up settings for editing wiring (think blades, buttons, OLED, stuff like that), general settings (Volume, idle off time, that sort of thing), presets, and the prop file stuff into their own little window for editing. This will allow me to make UIs that are very much tailored to the goal of each editor, and not need to conform to a general layout. Just like V1, editor windows from multiple different configs can all be open at once.

Additionally, a major shift I hinted at earlier is “global” management of certain features. So, for example, something like bladestyles, which one might want to reuse and edit across configs, will be managed and edited separately from the config, and simply selected in the presets editor. This means that for those settings, you can essentially create a “master” list of all your stuff, and keep track of it all nice and easily. That’s a key design goal with ProffieConfig V2, and my hope is that it’ll make things easier for those who have lots of configs and/or bladestyles, among other things.

The Configuration

If you cannot already tell, ProffieConfig V2 plans to store a lot more information about a config (simple example: blade names) than is intrinsic to a config file. At first I considered trying to use comments to do the job inside a normal config file, but the thing about V1 was that it loaded and used config files the same way it loaded them if they were being imported. There was no distinction. This was great because:

  • The savefile
  • The output file
  • The export file/format
  • The import file
  • The only file I needed to handle

was the config .h file. That simplified things a lot, but I just don’t think it’s practical for what V2 wants to accomplish. Instead, config files are going to be saved as .pconfs, with a lot of dynamic references to the different global things that can be edited. They’ll only be assembled into .h files for uploading.

However, by nature of still needing to export the .h file to actually make use of the config, users will still have the option to do that themselves. However, as stated above, a .h file can’t carry all the metadata I want. So another export option will be available to users to export a config in a bundle specifically for ProffieConfig. It will ensure that everything needed for a config file (bladestyles and other global configuration bits) are all included in it and include all the metadata needed to import fully into another ProffieConfigV2 (e.g. on another computer) without loosing any of that data.

For the use of ProffieConfig, this bundle will be ideal, and I think there’s a lot of potential for more complete and advanced, seamless sharing with it. I’m sure some people might not want it for a variety of reasons, which is why the alternative will still exist, but I do think it should be pretty neat.

Ideas

The aforementioned approaches and ideas to the fundamental structure and guiding principles of ProffieConfig V2 began to give me a clear direction of how to start developing things in the app.

I’m not quite sure what makes sense to talk about next. I think maybe talking about some UX/UI things might be appropriate?

Comments, Questions, & Concerns

I’d be quite interested to hear people’s thoughts about what I’ve talked about. I’d also love to hear feedback whether people would be more interested in high-level guiding ideas, focusing and drilling down into specific technical challenges I’ve had, and/or just talking about more technical aspects of the program in general.

I’m not super sure what would be interest for me to talk about, so please share!

If there’s anything specific anyone thinks is interesting or they’re curious about, I’d love to hear it, and I’d probably love to share and speak about it. :slight_smile:

Oh, and if there’s any specific feature-requests for ProffieConfig V2. I’ve heard quite a few already, and some things are already kind of set in my mind (or in the code), so you might have to present your case a bit more on certain things, but I’m always open to suggestions!

Otherwise, MTFBWY!

END OF LINE

2 Likes