Categories
Computer Science

Expect the unexpected

When you design software you usually have a few use cases in mind, in the case of EpsilonGit the use case I keep coming back to is a project lead who wants an overview of how his team is working and how they are using their version control software.

Back in second year when I developed The JavaScript Orrery my target audience was David Parker and the only use of the software was to impress him for degree credit.

A short while later I made a few small adaptations to package the orrery as a Windows Store (now called Universal Windows) Application. I thought a few people might enjoy watching the planets go around the screen, but didn’t really expect too many people to download it. To be completely honest, I mainly packaged it as an app to get points for the App Builder Rewards competition.

I haven’t touched the orrery, packaged as Solar System Simulation on Windows, for years. However, I wrote a little while back about someone who used it to teach their daughter about space, an unexpected use but a nice one.

Today I got an email from a student in Brazil who wondered if the software had a function to see planet locations at specific dates, as he liked the simple 2D graphics and wanted to use them to make a tattoo of the layout of the solar system on his birthday. Strange, but cool.

Unfortunately the Solar System Simulation (which is a gratuitous name — its in no way even close to a ‘simulation’) doesn’t support this function — but its a cool idea, and one I wouldn’t have thought of.

It might be fun to add it in one day, and see how popular some of the ideas I have would be compared to those that a user has had and wanted to be implemented enough to go to the effort to email me about it. I suspect the user submitted ideas might be more popular, because no one knows how well a customer users your product as well as a customer. But I might be wrong, it could be an interesting bit of research.

So, expect the unexpected uses of your software and services — both in positive ways, such as odd-but-exciting use cases, and negative, such as malformed input — but also be excited by the prospect.

Danny

P.S ‘Solar System Simulation’ is still available and works on Windows 8, 8.1 and 10.

Categories
Modern Experience Development Programming

Solar System Simulation is the 8th best app for Students and Teachers on Windows 8

Today I was looking at the newly revamped developer dashboard on www.dev.windows.com where you can see a lot of stats about the applications you have uploaded to the Windows 8 Store. Whilst I was having a look round I noticed that you could see which web pages linked to your application in the store. One of the websites which had given my app the most “hits” was one called Fractus Learning.

I thought I would head over to their website and have a look at what they had to say about my application and I was pleasantly surprised to see that they had written a list about the Top 10 application for Students and Teachers, and my app featured at number 8 — how apt.

In particular Fractus said the app is:

Ideal for older students, The Solar System Simulation allows users to explore the affects of gravity on land masses in space.

I was especially pleased with this after reading what Fractus are all about:

Fractus Learning is a growing team based in Dublin, Ireland working with educators around the globe to promote cutting edge technology skills and tools. We strive to build amazing learning environments where students are engaged and inspired and classrooms that are a joy to teach, work and learn in.

Our goal is to motivate, excite and enhance the teaching skill set with the use of technology, making sure educators are always on the cutting edge.

So you could say they know what they’re on about!

Thanks Fractus, look out for some excting updates to the simulation soon!

Danny

Categories
Life Modern Experience Development

A Heartwarming Review

I was looking at the statistics for my Windows 8 Application, Solar System Simulation, the other day when I stumbled upon a review by someone who goes by the name of  “vikram” from the United States:

Review Title: I found it so useful

Helped me teach solar system concepts to my 5yr old

I must admit it made me smile thinking that I may have helped a father or mother teach their child about the vast expanses of space 🙂 Even if the “simulation” isn’t incredibly accurate it’s nice to see its useful on some level.

Danny

Categories
Programming University

2D Graphics Solar System Simulation Coursework Result

I’ve written a few posts now about my Solar System Simulation — also known as a JavaScript Orrey — Coursework for 2D Graphics. It was the coursework I’ve been most enthusiastic about since I’ve got to university so I was anxious to get my result.

I’m very pleased to say I got a grade of 86%. This is a high first class.

Because I’m pretty confident I did quite well in the other half of the module, User Interface Design, I think I should have a high first class for the Module as a whole, which I’m very happy about! Of course I will update this blog when I get my module grades back on the 18th of February.

The lecturer who set this coursework, Dr. David Parker, provided me with some really useful feedback, saying:

This was a well featured piece of work, I also love what you did turning it into an app (though that isn’t reflected above).

Some of the code is a little over complicated and you could put some thought towards how to make it simpler. This also has maintainability consequences.

Taking that into account I intend to spend much more of my programming time working on refactoring my code to make it easier to understand and maintain.

I was also very pleased that Dr Parker described my use of SVN, a subversion system used to keep track of changes to software source code over time, as the best he had seen. 🙂

Danny

Categories
Programming University

2D Graphics Coursework – Solar System Simulation now on Windows 8

Before Christmas I submitted my Assessed Coursework for my 2D Graphics and User Interface Design module, a  2D Orrery (or Solar System Simulation in laymen terms) using the HTML 5 Canvas Tag and associated JavaScript API’s. I think I did pretty well, as I implemented every feature outlined by the specification to, what I feel, was a high standard.

6 days after the hand in date my friends Rob, James and I went to ‘Appy Christmas, an event set up by Microsoft to encourage the development of Windows 8 app in the holiday period. Whilst there I ported my application from a browser based webpage to a fully featured WinJS Windows 8 application. When I told my lecturer, Dr. David Parker about it he seemed interested in the ease of the porting experience, so I shall outline it here.

  • I added all my “Business Code” and classes by just adding the .js files to the solution
  • I edited the HTML page to make it fit better, as scrolling pages don’t look great in apps — all of the Windows 8 style came for free with no work

And that was it! At this point the application worked, however it wasn’t very touch friendly and the Koch Snowflake fractal algorithm would lag on some lower powered arm devices, including the Microsoft Surface RT, so I made the following enhancements

  • Lowered the amount of iterations my fractal function went through, lowering the computational power required
  • Added an “App Bar” to hold buttons which controlled all of the functions — the coursework spec asked that all functions were called using keyboard input, so this made it much more usable on a touch screen
  • Added support for the share charm. When you press it a bitmap image is created from the canvas and sent to whatever application you chose.

If you want to play with the application now, you can do so by downloading it from the Windows store here.

Below you can see some screenshots of the application in action.

I hope you enjoy using the solar system.

Danny

Categories
Programming University

2D Graphics Coursework – A JavaScript Orrery

I apologize for the lag in the above video, its honestly not my code! 😉 It’s the free screen recorder program I used being iffy.

For the last few weeks I’ve been steadily working on my coursework for the “2D Graphics and User Interface Design” module. We’ve been tasked with developing a digital orrery using the HTML5 canvas tag and the associated JavaScript drawing API’s. “What is an Orrery?” I hear you ask, Wikipedia to the rescue:

An orrery is a mechanical device that illustrates the relative positions and motions of the planets and moons in the Solar System in a heliocentricmodel

Heliocentric just means that the planets move around a stationary sun.

The finished, final version of the product will have gravitational forces effect the positions of each planet, allow the user to invent new planets and place them in (effecting the courses of all the other planets!) and have an additional drawing mode in which all of the planets are made to look like pretty Koch Snowflakes 🙂

In the above video you can see what I have achieved up until now, with another month remaining to get it finished. I have

  • 4 Drawing modes (Arc mode, Line Mode, Sprite (image) mode, Animated Earth Mode (Using spritesheets))
  • Independent rotation speeds for each of the planets
  • Keyboard controls to decide which mode is shown

I have the following left to implement

  • Gravity
  • User added planets
  • A moon orbiting earth
  • Elliptical orbits
  • Koch Snowflake drawing mode

I hope to get most of these done this week 🙂

One of the interesting parts of the assignment has been the programming language used itself. JavaScript, though based on the same family of programming languages as my preferred language C#, is quite different to the aforementioned language in some pretty important ways, for example Object Orientation doesn’t come naturally, instead the language uses the Prototyping paradigm, which takes a bit of getting used to if you are an OOP programmer.

JavaScript is also the first loosely typed language I have been formally taught, though I did write in PHP for a few years before university which is also loosely typed. A loosely typed language such as JavaScript doesn’t have hard and fast rules on what can be stored in a variable, for example in C# if I write:

public int WholeNumberVariable = "string";

the whole program will not compile, because putting a string in a variable that has been initialized to hold integer numbers is illegal. In JavaScript when you initialize a variable you can’t assign a type, so It can hold anything

var WholeNumberVariable = "string";
var IExpectANumericResult = WholeNumberVariable / 2;
//I'm going to be a huge bug! I expected a number to divide by 2 but now I'm trying to divide letters! This makes no sense!

This can cause some unexpected behaviour, also known as bugs. So it’s fair to say I much prefer Strongly typed languages.

But, I’m getting used to JavaScript and its numerous quirks, and actually rather enjoying it. I hope to report back soon with some additions to my orrery to show you!
Danny