Tirami

  • Home
  • About Us
  • Case Studies
  • Our Services
  • Blog
  • Contact Us

Tech to play with

5th October 2015 By andrew

It is no secret that I like playing with new tech gadgets, so much so that some even joke I’ve got more stuff than some high street electrical retailers. This morning someone asked me how I decide which gadget I’m going to take out with me for the day ahead. I couldn’t answer but I did describe it as a bit like how all the container pods go past for Thunderbird 2 to choose before it goes off on a mission! But it did raise a valid point, just what can I use all these cool things for?

There is an answer, or rather a chance for others to come up with a great answer and help me out. Later this month (24–25th October 2015) I’ll be taking a selection of things along to CodeTheCity 5 in Aberdeen for people to come up with ideas along the theme of Culture.

Don’t forget to take a break from VR once in a while to get something to eat!

So what fun things will I have? Well since last year I’ve been experimenting with the very nice Oculus Rift Development Kit 2 and thanks to the latest updates for Unity it will be nice and easy to create some virtual worlds to explore or visualise some Open Data.

The latest devices I’ve added to my collection is a Project Tango Development Kit. This is an Android powered tablet that can handle motion tracking, depth perception and area learning. It also lets you move around virtual spaces or augmented real ones kind of like VR but without the headset. I’ve not had a chance to properly explore it yet but its indoor positioning technology and ability to scan rooms to create 3D representations to move around will certainly provide great tools for us to try out at CodeTheCity, especially as it is easy to use with Unity.

I’m also thinking about adding music to the cultural mix and bringing along my Electronic Wind Instrument so we can link some MIDI action into the mix. Anyone up for building a virtual holoflute Futurama style?

Mixing the devices with the creating things in 3D means that even someone with no coding experience will be able to help create something.

So why not come along to CodeTheCity and help create something that will let us wander around Aberdeen University capturing things of cultural value into our new virtual worlds? Oh and give me an answer on how to choose which gadget to take out for the day.

Filed Under: Oculus Rift, Project Tango, Virtual Reality

Giving Go a go

30th September 2015 By andrew

At the start of any project one of the many things to consider is the development language or languages.

For a project I’m involved in, whilst wearing my Tirami hat, the software being developed fitted into several components with each component potentially being developed in a different development language.

The part that I’m focusing on is the data storage and querying server. My most recent projects in that area have been Rails based and that was an obvious first choice for me. However given that the actual database schema is very simple and the server API only being required to handle a very small set of methods I thought it was a good opportunity to give something else a try. This led me to looking at Go ( http://golang.org ).

As of writing this sentence I’ve not tried Go yet and it may prove to be a dead end. If it does then I’ve always got the fallback of Rails. So from here on it is a mystery on what I end up using (unless you’re impatient and have scrolled down to the end of this article!) As a jumping off point I foundhttp://tumblr.bwong.net/post/52143548323/howtolearngo and began to work my through what it suggested.

Installation

Installing Go on my MacBook Pro running Yosemite was straight forward (having battled some Ruby gem installations earlier in the day for another project this was a nice relaxing install). Within 30 minutes I had everything up and running and successfully worked my way through the first lessons of Go development and even had a test running.

Simple Steps to a Simple Web Server

Seeing as the aim is to develop an API service that outputs and inputs JSON via HTTP the next step was to see how easy it was create a simple web server. It turned out to be very easy indeed and I had something up and running in under 5 minutes.

A search online found http://thenewstack.io/makearestfuljsonapigo/ which proved to be the perfect jumping off point to writing my own RESTful JSON API. Within a couple of hours I had a simple server responding to 2 different URL paths and returning some dummy JSON structured in the format that matched my initial Swagger specification.

Sharing with the Team

Building and running on a development machine is one thing, the next step was to ensure other developers in the team could also download and run the code. Another task that turned out to be refreshingly simple. So now the front end developer can run a version of the server that outputs sample data that they can use to start developing the front end.

Adding a Database

The next step was to decide on the database to be used to store the data internally to the application. Time to explore using Postgres with Go! For this I found another website http://astaxie.gitbooks.io/buildwebapplicationwithgolang/content/en/index.html

It took about 2 hours playing around to get a first pass database setup and interacting with it. I then spent another hour or so refactoring the code and then another 30 minutes or so wiring up the searching so that it returned JSON based on the data for the search term entered as part of the URL received by the server.

A Positive Experience

The code I’ve written may not be pretty and will probably cause some Go diehards to be offended but this is a rapid learning curve and I’m pleased with the results so far in such a short space of time. To recap in the space of about 8 hours spread over a couple of days I’ve gone from having written zero lines of Go to:

● Installing the setup on a Mac
● Working my way through the basic tutorials
● Building a very simple web server
● Building a slightly more advanced RESTful JSON API
● Adding in Postgres for backend data store
● Generating output JSON based on queries submitted via HTTP

Importantly, I’ve also had fun as it feels like writing real code and real software and part of me feels like it should have been done on a green screen 80 column VDU, saved onto a 5 ¼” floppy disk and printed out via a line printer for reference.

Windows 10

Since originally writing this article I have had reason to get a Windows 10 based development laptop for another project. Having had very bad experiences getting open source development environments to run on Windows in the past I must say I was very pleasantly surprised to discover how easy it was to get Go up and running on Windows 10. It only took me around 15 minutes to go from nothing to having my project build and run on Windows 10.

I’ll still be doing my main development on my Macs but it was good to know it can run easily enough on the other side.

Filed Under: Uncategorised

Recent Posts

  • Tech to play with
  • Giving Go a go

Categories

  • Oculus Rift
  • Project Tango
  • Uncategorised
  • Virtual Reality

Get in touch

If you would like to talk to us about a project or learn more about our services then get in touch to start a conversation.

Keep Updated // Subscribe to our mailing list

Copyright © 2021 Tirami Ltd. Registered in Scotland No. SC498662