Pages

Sunday, August 10, 2014

How easy is it to fake a push-up?

Push-ups is one of the most common exercise ever. I reckon anyone who has done any physical exercise would have tried doing the push-up. It's simple and straightforward, and the only 'equipment' you need other than yourself is the floor.

One of the new sensor technology I am working on is designed to be able to assess floor exercises such as push-ups and sit-ups. It is a floor mat sensor and it acts a little bit like a force plate, as in it measures force changes. So when a person is on the mat, in the push-up position, it can detect the force or pressure the person's hands place on the mat. As that person does a push-up, it measures the force changes during the push-up and that creates a signal. By recognising the signals of push-ups (through some algorithm), the sensor can then act as a push-up assessment device.

Now it all works well when I perform a standard push-up. A certain waveform is created that represents the standard push-up. Doing the push-up faster or slower basically changes that particular waveform in terms of its width or height.



But I soon realise that there are certain non push-up movements that can create a somewhat similar waveform. I could be shifting my weight forward and backwards while in the push-up position, or I could be adjusting my hand positions in a certain way, or I could be doing an improper push-up (e.g. arched back, knees down, elbows not bent till ninety degrees, etc). So once I figure out what movements (other than a standard push-up) can generate the same waveform, I can cheat the system into thinking I am doing push-ups when I am not. It's a bit like those activity trackers built with inertia sensors (accelerometers and gyros) that tries to identify sports activities but often fall short (there's an interesting article with video illustrations here: link).

This reminds me of being 'christian'. There are certain behaviours that I can have that reflects that I am a christian - I can attend church service regularly, participate in different church activities, be helpful and kind in my community etc etc. But what makes me truly a christian is when I have given my life to Jesus, fully surrendered and putting him first in my life. Then those outward behaviours that flow out of my surrendered life would be directed by God and be fruitful. God is interested in what's inside of me not what is outward.

Woe to you, teachers of the law and Pharisees, you hypocrites! You clean the outside of the cup and dish, but inside they are full of greed and self-indulgence. Blind Pharisee! First clean the inside of the cup and dish, and then the outside also will be clean. 


Friday, July 18, 2014

Having a real understanding (code and faith)


For the last 7 months or so, I started on a new job. It's somewhat related to what I have done (for my PhD) in the last 4-5 years. The new company that I work for can be considered a start-up. It's a new concept gym that aims to measure a group circuit training in an automated way. There's the usual cardio stuff (stationary bike, rowers etc), there's strength training (dumbbells, kettlebells, barbells), there's plyometric stuff (pushups, ball slams etc) and then there's a bunch of sensors in the gym that measures a person's performance doing all that stuff. So my role in this gym is to use those sensors, get a bunch of measured data and make sense of it - track what kind of movements a gym-user is doing, analyse them to see if they are done properly, score them and give them feedback for every repetition. If you have heard or seen the Nike+ Kinect personal training 'game', this new gym is a little bit similar to that concept but the main differences are:

1. It uses the Kinect sensor PLUS additional sensors and equipment
2. It tracks a whole group of people doing a circuit training and there's a bit of competition going on.

That's the gist of what I do. But what I actually do involves a lot of coding. Coding or programming or software development has never been my forte. In fact I don't really know what is my forte (but let's not start on that). So having the sensors alone, tracking and measuring stuff (position, acceleration, forces etc) only does half the job, the real value is in deciphering them, and that's where algorithms come in. Algorithms work when they are written and  executed in software. I could probably say that the sensors are the eyes and the ears while the algorithms/code is the brain. Since coding is not my strength, why am I doing it? Well, it's inevitable because I am fairly competent in analysing stuff, and to bring that analysis into real-life, I need to code. I do know the basics (really basic) and unfortunately that's not enough. So I have to learn on the job. Thank God my boss is kind enough to take me on and is even willing to coach me (when he has the time). 

But it has still been a struggle. On a good day, I will code some stuff, it crashes half the time or doesn't work the way I wanted it, then after hours of debugging, it works. On a bad day, in fact, on a bad week, I will code some stuff and nothing works even after days of debugging. I will then get my boss to look at it and he will solve it in 2 minutes! Usually it's because I misunderstood certain 'functions' or 'methods' or how a 'class' works. Each function has a specific task and it uses certain parameters and it returns something. The function can be part of a class and if I want to use it in another class, I need to reference it back to the originating class (I am confusing myself as I am writing this). But my point is some things work in a set way or has a set definition; when I use it in a different way thinking it could work, it simply wouldn't work because I am using it wrongly. 

As I thought about it,  I realised this happens in many many areas of life. How often have we bought a new equipment, and without reading the manual and understanding how it actually works, we start using it. Somehow there's always a particular feature or extra button that we think is useless and makes no sense. Then when the equipment stops working and no amounts of tinkering or restarting helps, we look to the manual, and everything starts to make sense! We go " uh-huh!" as we turn every page of the manual, then wonder why we didn't read the manual in the first place. We would have been able to use every feature and function and button the way it was designed/intended.

Our relationship with God is somewhat like that too. God has given us His Word to tell us everything we need to know about Him. But we often don't try to fully understand it, let alone follow it. We read certain bits that we like and assume that's how God works - for example we may know that God is love and God loves the world, but we may ignore the bits about God being holy and righteous and demands a high standard, and therefore it's only through Jesus that we can be saved. Some may take it further and assume that because God is for us (Christians) and God will 'prosper' us, that means a follower's life should be a bed of roses, and when it is not, God is not 'blessing' us (that is obviously a lie). Even though I have been a Christian for some years, sadly, I have made the mistake of making wrong assumptions too. But I am thankful that I have the opportunity to learn and correct my understanding, and I know that as I continue to read the Bible and seek Him, I will have more "uh-huh" moments.

We know that we have come to know him if we keep his commands. Whoever says, “I know him,”but does not do what he commands is a liar, and the truth is not in that person.  But if anyone obeys his word, love for God is truly made complete in them. This is how we know we are in him: Whoever claims to live in him must live as Jesus did. 

...   

Monday, May 12, 2014

Baby Grace



How time flies... Grace was born on Christmas day of 2013 and ever since then it has been madness in the household. Did I mention that Grace was born on Christmas day? I think that is probably one of the coolest things that has ever happened in my life. I doubt there is anything else that will top that for now. Unless Mabel decides that she will go to Macchu Picchu with me. :) But I digress...

Here are some pictures of our little princess from new born to four months of age, cos I figured some cute baby photos will paint more than a thousand words:

Day 2 in this world!
I am wonder woman! I will take over the world! yawn...

Sticker attack from the big brother!


"I like to dance!"


and Gideon keeps 'awarding' his little sister with more stickers...


Favourite sleeping pose at 3 months

And I'm 4 months old!!
I decided not to put any photos of the parents because the lack of sleep has made us not very photogenic. Plus everyone just loves baby photos. Oh and in case I forgot to mention, we were blessed with Grace on Christmas day. :)