Categories
Programming Tech

Google Glass Unboxing and Review, Jasmine-Jquery+SquireJS example

Google Glass Review

I just got my Google Glass Explorer 2.0 edition in not that long ago, and I know alot of people are curious about how this gadget works, so I’ve put up a video of it (an unboxing one, and a review).

httpv://youtu.be/NPBNNwQB_Ss

httpv://youtu.be/RHg-bnx7r3A

Example client side Jasmine unit test using the jasmine-jquery + SquireJS libraries
Ok, so I finally figured out these client side tests. I have an example test here that uses Backbone Models as objects, the Jasmine-jquery library to test DOM interactions and the SquireJS library to mock out requireJS dependencies. Hope this helps someone.

//your jasmine test suite
describe('Car View', function() {

        beforeEach(function () {
            this.injector = new Squire();
            this.car = new Car();
        });

        afterEach(function () {
            this.injector.clean();
            this.injector.remove();
        });

       it('test car creation with a mocked out owner', function () {

            var ownerInput, brandInput, modelInput;
            var carMock = this.car;
            var injector = this.injector;

            //squire injector runs asynchronously inside its own closure so we need to run synchronously in Jasmine via run and wait
            runs(function() {
                carMock.set({
                    brand: 'Honda',
                    model: 'Civic',
                    owner: 'John Wayne',
                    url: '/car/civic/123456'
                });
                //Owner is some backbone model that is pulled in via requireJS that we want to mock because it can't be mocked normally
                var ownerMock = new Owner({ name: 'John Wayne' });
                injector.mock('dep/owner', ownerMock).require(['car.view'],function(CarView) {
                    var carView = new CarView({
                       model: carMock
                    });
                //lets say on render, your car view populates some owner field with the owner name, and the brand and model fields the same way.
                CarView.render(); 
                ownerInput = carView.$el.find('.owner input');
                brandInput = carView.$el.find('.brand input');
                modelInput = carView.$el.find('.model input');            
                });
            });

            //wait for dom to render 
            waits(1000);

            //do your assertions
            runs(function() {
                expect(brandInput[0]).toHaveValue(carMock.get('brand'));
                expect(modelInput[0]).toHaveValue(carMock.get('model'));
                expect(ownerInput[0]).toHaveValue(carMock.get('owner'));
            });

        });

});
Categories
Tech

Top 5 upcoming VR/AR gadgets I’m excited about

I loveeee gadgets (See here). Especially gadgets which have to do with simulating reality, virtual reality, and augmented reality. And here’s the top 5 list of the VR/AR gadgets that I’m most excited about in the near future.

1. Oculus Rift

httpv://www.youtube.com/watch?v=1obwvn1Pgfo

Man, this thing sounds really cool. I know developer editions are already shipping, but I can’t wait for the consumer versions to come out. I mean, being able to play games and have head tracking and that immersive feel is just awesome, and something I’ve been wanting to do for a long time. Imagine playing Fallout 3 and feeling you are actually inside that nuclear wasteland. So cool.

2. Meta glasses

httpv://www.youtube.com/watch?v=b7I7JuQXttw

The developer says that this is Google glasses on steroids. Basically its a more powerful, more featured version of Google glass, so you can imagine what thats like. In the video they had all sorts of augmented reality showcases, and it looks really cool and fun. They are currently shipping developer editions early next year, so I hope that it does what they say it will do. And I know Vuzix already has production versions of its augmented reality glasses, but this is much more affordable.

3. Sixense STEM system and ControlVR system

httpv://www.youtube.com/watch?v=UxSZ0fk_ubA

httpv://www.youtube.com/watch?v=UClUkL24oMc

These two devices are basically augment the virtual reality experience of the Oculus Rift/Sony HMZ/PS4 VR when playing games, specifically using the hands and arms. The STEM system puts sensor pads over some analogy controllers and packs so that individual limbs can be tracked, and ControlVR looks like a Kinect or Leap-motion-esque controller which has no physical device, unlike the STEM. By the way, the developer Sixense also made the Razer Hydra, so you know they have street cred.

4. Virtuix Omni and Cyberith Virtualizer

httpv://www.youtube.com/watch?v=03VghV33JZs

httpv://www.youtube.com/watch?v=k7n5kRRHDpw

Can you imagine Oculus + Omni/Virtualizer + STEM/ControlVR? Thats the full package right there. This completes the full VR experience.

5. KorFX

httpv://www.youtube.com/watch?v=dASpXLSjq20

A haptic gaming vest. Which means you can feel all the effects in game, except physically. This is awesome, if it works.

There’s some other gadgets that I am excited about too. Reactive Grip actually integrates with the Sixense STEM pretty well.The Turtlebot system is a robotic platform on which you can mount almost anything. So imagine what applications could be made if you could combine robots/quadcopters with VR/AR systems? Well, that kind of just blows my mind.

Anyways, these are exciting times we live in, and I’ve always been a gadget freak, from my Pocket PC/PDA devices I carried around in 2003 to the iPhone 5S with its fingerprint sensor, so I’m really excited for what the future holds :).