2017-05-22

How to get started with Qt (tutorial)

I found this question on Quora and decided it was the perfect opportunity to make the "getting started with Qt video tutorial" that I have been planning now for some time. In short, the question is "how do I get started from scratch with Qt5 to make GUI applications"?

So I made a short tutorial video and link it here for reference:





2017-05-20

The operation was successful, the patient died.

Extensive refactoring has been made to the build system for OctoMY™, however as it stands now, there are in fact no improvements to be experienced. In fact the build time has increased so much that TravisCI aborts the build thinking it has gone stale!


So why did we bother?

The new build architecture gives us the following benefits:


  • We can now select to build each part as a separate library or simply include the sources. Both has its pros and cons, and now we get to choose using a very simple syntax.
  • We no longer have to specify build parameters for each library, they are inferred automatically and you only supply them if you need to override the defaults.
  • All the include paths have been cleaned up so now all  #include "../libs/libX/subfolder/SomeClass.hpp" are converted to #include "subfolder/SomeClass.hpp"
At this stage it builds fine but more work will have to be put in before we can leverage this new system to get shorter build times and other benefits as promised.


2017-05-07

Refactor in progress.

We are working on a large refactoring of the OctoMY™ code base at the moment.


The reason we decided to start this was that the existing project structure was becoming increasingly difficult to work with. Now with the refactor we plan to improve on the following:

  • Shorter build times
  • More modular design
  • Fewer inter-dependencies
  • More organized and predictable structure
  • Smaller modules
It has taken more effort than anticipated. Hopefully it will resolve itself in a short time.

2017-04-22

Achievement unlocked: OctoMY™Travis build passes for the first time!

We finally managed to have OctoMY built using TravisCI.

It took a few days of googling around to get the perfect combination of yaml settings and the result was completely worth it.

We now have a shiny green "passing" button:

OctoMY™ Build status

2017-04-15

Build C++/Qt5 application on TravisCI

TravicCI is a brilliant idea with a shaky (IMO) execution.



The concept is simple enough; create a .travis.yml file with some markup to describe the building of your project, add said file to the root of your git repo, push.

In the other end, travis hooks into your repo (github) and detects the push and starts building your project according to the definition in your .yaml

And it works great for a lot of people, but after spending more than 2 hours with Travis you will know that it has it's limitations, especially if your language or platform is not of the hipster variety.



Since Travis is free for open-source projects it has become popular. This is a really sound business strategy, by capturing the hearts of passionate programmers, you will get sales when the weekend is over and they go back to work.

However, many users means lots of focus on operations, plenty of long wishlists and less time/opportunity for innovation/implementation.

And it shows. My experience with having Travis build OctoMY has been a mixed bag. It turns out that Linux support in Travis is "Beta" and is centered around Ubuntu 14.04 which as the name suggest is 3 years old (at the time of writing). If that was not bad enough, Ubuntu has very conservative collection of C++ compilers in the official repository which means that the only C++ compiler available in Travis does not support C++14.

Crazy right?

Further, Ubuntu, even after signing a deal with digia, has even more ancient versions of Qt in the repos. And you can forget support for multiple versions of Qt side by side.

OK, enough whining and on to what you came here for!

I managed to muster my inner zen-patience-plus-determination combo and I ended up confirming that you too can have your favorite version of Qt and your favourite version of clang++ or g++ building your project happily on Travis CI in Ubuntu Travis 14.04LTS.

At first this sounds wonderful, but please note that the resulting binaries are pretty tied to that platform, and unless you have a server side application (rare for Qt) running on Ubuntu 14.04 this will not really be useful other than to verify that your code builds and to run the tests.

So with no further ado, here is the link to the fully working travis yaml for building Qt5/C++14 applications.




2017-01-29

A different kind of CAD

I just discovered a new kind of CAD!

OpenSCAD Official Logo 2017
 

While the traditional CAD approach is all point-and-click in a laborious user interface, OpenSCAD takes the approach of the programmer, namely writing a definition text and viewing the reselt in an interactive 3D view. Since the language used in OpenSCAD allows the user to make relationships between parameters in the model, the result are highly flexible and customizable objects, perfect for rapid prototyping and research work. I can warmly recommend this software, I already have a substantial model build from the ground up after just 3 hours of use. It definitely made my grudge against CAD software go away!

2017-01-15

Wheeled rig build complete!

I finally managed to overcome myself and complete the wheeled rig hardware!

Now its only software left....

Wheeled rig for OctoMY™

Canuckistanian Dictionary

I have compiled this rudimentary Canuckistanian Dictionary, so that you may also follow the teachings of The One True Canuckistanian.

Schmoo Any liquid, be it hydrophillic or hydrophobic, homogeneous or pasteurized, that has a viscosity between that of Canuckistanian Beaver Semen at one hour after ejaculation ( 9.35 +/- 0.99 centipoise ) and Canuckistanian Maple Syrup (175 +/- 25 centipoises).
Chooch
  1. To move, either orthogonally, laterally or radially, or any combination of the aforementioned.
  2. To let pixies pass through the wires of a contrivance.
See also "Pixies".
Pixies Small, usually obedient particles that are expected to form lines inside wires to make contrivances chooch. Se also: "Chooch", "Angry Pixies".
Angry Pixies Pixies that for some reason are no longer obedient, and may for no reason at all step out of line. Se also: "Pixies".
Bumblefuckery An activity that may result in a contrivance stopping to chooch. See also "Pop fart and give up the ghost".
(The room formerly known as) wife's sowing A traditional in-home style Canuckistanian man-cave. Dedicated to learning from books and staying in front of the screen with the occational work with brain boxes. Tempered at around 23 Dungrees.
(The) shop A traditional out-of-home style Canuckistanian man-cave. Dedicated to performing bumblefuckery with the bridgeport. Tempered at around 15 Dungrees.
(The) bridgeport An age old contrivance for manually and forcefully opening snail-mail, cracking plexiglass, bending and annealing end-mills and making vodka glasses from sheets of copper.
(The) screen Special purpose contrivance that allows Canuckistanians to learn stuff from the interwebs and youtubes.
Keep your dick in a vise Have a nice day. See also "Keep your stick on the ice".
Brainbox A contrivance dedicated to the controlled conversion of pixies into angry pixies, thereby making one or more other contrivances chooch.
Sexpert Dumb fuck.
Enginerd Engineer
Stupidvisor Supervisor
Frankenstein Unit of measure for temperature.
  • 1 °Dungree = ( °Frankenstein - 32) × 5/9
  • 1 °Frankenstein = °Dungree × 9/5 + 32
Se also: "Dungrees"
Dungrees Unit of measure for temperature.
  • 1 °Dungree = ( °Frankenstein - 32) × 5/9
  • 1 °Frankenstein = °Dungree × 9/5 + 32
Se also: "Frankenstein"
Vijeo Sequence of images displayed in rapid succession with accompanying audio.
Wank overload An event where too much wank happened.
Cromulent Important
Redonculous Ridiculous
Jelly 4 ur Jam Bang for your buck
Bifocals Glasses
Canuckistan The land of the polar beers.
(Canuckistanian) Copeks Primary unit of wealth in Canuckistan. See also "(Canuckistanian) Pesos".
(Canuckistanian) Pesos Secondary unit of wealth in Canuckistan. See also "(Canuckistanian) Copeks".
Scientician Learned Canuckistanian.
Scienticious Actions carried out exclusively by learned Canuckistanian. See also "Scientician".
Yada yada yada I don't feel like elaborating now.
It's the cicle of life At this very moment, I am having an epiphany.
Dog bless the nanny state Idiomatic exclamation of pure satisfaction equivalent to "God bless the government of Canuckistan for looking after its citizens"!
Pop fart and give up the ghost To stop chooching.
Flogg it like a Rented mule To start chooching.
Son of a diddely Mild expression of disappointment.
Safety squint engaged Eyes squinting momentyarily to avoid damage. See also "Bifocals".
Fantabulous Mild expression of approval.
Scokum Of right Canuckistanian quality.
Keep your stick on the ice Good day. See also "Keep your dick in a vise".
Rippums Rotations Per Minute.
Meat hook abortion Contrivance of unknown or non-Canuckistanian origin. See also "Chinesium".
Chees grade Of considerable softness.
Bob's your auntie Let's try this.
The sharpest bowling ball in the shed Round Contrivance typically kept by land owners of Canuckistan in out-door sheds. Used for measuring relative mental capacity.

2017-01-12

Brain-dead fuzzing in C++

I like to pursue quality in software, and so I am constantly looking for innovative or smart ways in which to improve quality.

One approach I have always liked is the concept of Fuzzing. Basically fuzzing means to feed random or cleverly provocative data into your innocent and carefree API to wreck complete havoc and expose all its bad traits/bugs/unexpected features etc. But I am reluctant to bring new dependencies into my project if I can avoid it. So how could we implement a built-in fuzzing in the least amount of code?

I came up with the approach below which I find myself being really happy with! Here the qrand() function could be exchanged with a more devious/evolutionary and data driven fuzz data generator function.

2017-01-10

Wheeled rig update

Just a quick update on the wheeled rig. Electronics are starting to come together.


Power bar created.
  • Main power bar was created and connected to battery.
  • Relay board high end connected to power bar.
  • Ribbon cable to carry signal between controller and relay boards was prepared with apropriate connectors.
  • RC Servo pins soldered to stand alone PCB that allows for combining power with signal from different sources.
  • RC Servo, ESC and power connected to RC servo board.
  • ESC connected to power bar.
  • Audio amplifier connected to power bar.
  • Buzzer and warning light was connected to the power bar and relay board.
  • Most circuits tested.
 Now only software remains!
Test circuit for RC servos.


2017-01-07

UTAU Robot Voice at it's best.

Who said robots could not sing?


Happy Anniversary 2017

The 7th of January marks the one year anniversary of the OctoMY™ project, and we have a ton of progress to celebrate!

OctoMY™ Anniversary 2017

2017-01-03

Vector SVG icons for bool/boolean, char, short, int, long, float, and double

While working on the Actuator model as part of ActuatorWidget and the ArduMY™ serial protocol, my UI was in dire need of some icons to represent the different representations of values in computers.

I looked long and hard in google image results before realizing there really arn't any icons that represent this in a good way. So I decided to make my own.

Please accept my humble contribution!


OctoMY™ SVG Vector format Icons representing C/C++/Java fundamental datatypes
svg icon for bit datatype download free svg bit icon
svg icon for nibble datatype download free svg nibble icon
svg icon for byte datatype Download free svg byte icon (8-bit integer)
svg icon for word datatype Download free svg word icon (16-bit integer)
svg icon for double word datatype Download free svg double word icon (32-bit integer)
svg icon for quad word datatype Download free svg quad word icon (64-bit integer)
svg icon for float datatype Download free svg float icon (32-bit)
svg icon for double datatype Download free svg double icon (64-bit)
svg icon for extended float datatype Download free svg extended float icon (80-bit)
svg icon for quad float datatype Download free svg quadruple float icon (128-bit)