NinjaCalc Is Now A Web App

NinjaCalc, a “collection of embedded engineering related calculators”, is now a web app (go to http://ninja-calc.mbedded.ninja/ to try it out)!

NinjaCalc is now a web app! A screenshot while selecting a calculator using the new web app at http://ninja-calc.mbedded.ninja/.

Up until now NinjaCalc has been a desktop app written in Java (as NinjaTerm still is). However, the functionality that NinjaCalc provided had no need to be a installable desktop app, and I had long desired to move it to the easily accessible web.

When I recently discovered vue.js, I finally decided to make the move (after trying both React and AngularJS a year or so ago but deciding not to use them). It was the simplicity and flexibility of vue.js which was the deciding factor. Porting took about 3 weeks of full-time work (luckily I was unemployed at the time).

After trying out Heroku as the deployment platform, I eventually choose to deploy it on my server instead due to increased configuration flexibility (incl. the ability to setup the Apache server routing with .htaccess files). rsync is used to copy the production files over ssh onto my server.

The newest version of the Java based NinjaCalc (v1.3.0) can still be downloaded from https://github.com/mbedded-ninja/NinjaCalc/releases/tag/v1.3.0, although this will slowly deviate from the web app as the web app is developed further.

Existing users of NinjaCalc may appreciate the similarity between the Java app and the web app. The results can be found below!

GitHub Repo: https://github.com/mbedded-ninja/NinjaCalc
GitHub Project Page: http://mbedded-ninja.github.io/NinjaCalc/
NinjaCalc Web-app: http://ninja-calc.mbedded.ninja/

Move To Managed WordPress Hosting For Speed Increase

blog.mbedded.ninja has been moved from a Linux-based shared server on GoDaddy to one of their “managed wordpress” services. It is about the same price, and instead of CPanel, they provide you with a pre-installed WordPress CMS (with a powerful and quick import from existing WordPress installation tool). The server is still shared, but is configured to run efficiently run WordPress-based websites.

Screenshot of GoDaddy's managed WordPress plans as of 2015-04-03.
Screenshot of GoDaddy’s managed WordPress plans as of 2015-04-03.

The idea was to hopefully speed things up, as blog.mbedded.ninja has been running really slow lately (30-60s load times!, see the Site Running Slowly, Does That Mean It’s Walking? post). So far so good, the page load times seem to have dropped dramatically. Now the front page takes 6.43s to load the first time, and 4.47s to load on a repeat view. See the screenshot below:

A webpage speed test run on blog.mbedded.ninja after the site was moved to a GoDaddy managed wordpress service.
A webpage speed test run on blog.mbedded.ninja after the site was moved to a GoDaddy managed wordpress service.

I think one of the big speed improvements came from the new way of caching. It suggests that the caching plugin I was using before was not working correctly.

At the same time, I decided to change themes. The reason behind this was because I wanted a “responsive” design, one that would look good on smart phones and tablets as well as the traditional computer monitor. Because I am no pro web designer, I wanted a framework to get me started, which I could then tweak to fit my needs. Call me a sheep, but I decided to go with the Avada theme, as it was very popular and had tons of good reviews.

A screenshot of the Avada WordPress theme homepage as of 2015-04-03. Image from http://theme-fusion.com/avada/.
A screenshot of the Avada WordPress theme homepage as of 2015-04-03. Image from http://theme-fusion.com/avada/.

It did cost a fair amount (US$58), so I was expecting it to be pretty easy to setup how I wanted to. Avada has a massive “Theme Options” menu that lets you customise many parts of the design. But I soon discovered that I had to make a child theme and edit both the PHP and CSS to get it to work to my liking. Maybe my requirements were just too specific? Things I had to use PHP/CSS for included:

  • Resizing the websites logo to the desired size in the header
  • Adding the site name and slogan to the header
  • Colouring alternate rows of a table a different colour
  • Adding a Revolution Slider to the header
  • Remove the huge featured image from the start of every page

Because of the speed improvements, I still wouldn’t go back to the Linux/CPanel style hosting, but a managed WordPress service does have it’s disadvantages:

  • No CPanel! (most of the following disadvantages are sub-issues due to this fact!)
  • No SSH, unless you pay for the Business or Pro managed WordPress services (these are expensive), and even then, SSH is still limited
  • No cron jobs
  • No file manager (uploading many files is slow, as you can’t upload a zip file and then unzip)

Thankfully, you do still get FTP access with the managed WordPress service.