Sunday, December 27, 2015

The Open Song Project - "You Bring Out The Best In Me"

I wrote the song and my brother Tim arranged the music. He always seems to be able create some kind of magic with the piano. He has zest in music whereas I am kind of like a little more into sport. Anyway, this is an open project which means others can try to improve on it. I am not really sure if this song is complete so I guess additional lyrics and music could be added to it.I think my bro has missed out a line near the beginning but for starters, I think it is  good enough for the most part. The lyrics:-

You bring out the best in me
You mean all the world to me
Took my heart and took my soul
It's the greatest love I know
You bring out the best in me

I just want to be with you
Hold my hand and we will see it through
You bring hope in all my ways 
Light in all my days
You bring out the best in me




Update 3-1-2016: The song has been completed and the the project is generally considered closed. It has been been completed by my nephew in law (nephew of Tim's wife) . These things do happen sometimes I guess! We will be sharing songwriting and music credits with him and his band.  His full name is Ae  (Phumthep Pholwat) from Thailand and the band is a college one called the Sarapa Group. 

 We are now looking into the promotional stage of the song.

Tim Chin - "The Christmas Song" Cover

My brother's cover of " The Christmas Song" which I think is pretty good. (considering  that he doesn't have much time to play the piano)

Sunday, December 13, 2015

Python on the go - Application in calculating resistances

Here is a program that calculates resistances in series or  in parallel.


def resistor(l):
    a=raw_input("series or parallel? (s or p)")
    if a== 's':
       sum1 = 0
       for v in l:
                    
           sum1 = sum1 + float(v)
                    
       return sum1

    elif a =='p':
            sum1 = 0
            for v in l:
                    
                    sum1 = sum1 + (1/float(v))
                    
            return 1/sum1


So, how does it work? Firstly, def means that this is a functional program with a list called 'l' so when you run it, you should type 'resistor ([2,3,5])' for example to calculate three resistances of values 2, 3 and 5 ohms.

 In the second line of the program , you will need to  accept variable 'a' as a raw input which may be s or p.  If a='s' to signify that resistances are in series, then the variable suml is first set to 0. In a way  you can think of the variable suml as some kind of container or box where  values (or variables) v can be added to it. Next, there is a  for loop for each variable v  in list 'l' and this for loop will add each variable in 'l' until the end of the list. Once it has reached the end of the list , 'return sum1' displays the value of sum1 and the program exits.

If a=' p',    to signify that resistances are in  parallel, the process is almost the same, only that  the formula for parallel resistances is  different so some changes need to be made near the end.

Monday, December 7, 2015

Adele - "When We Were Young"

I am no Adele fan but I do like this song. I felt 'Hello ' was a little bit hyped up but this song seems to be timeless.

Sunday, December 6, 2015

FutureLearn - Electrify from University of Liverpool

I  have been trying this course out recently. It seems to be the  simplest  one for Electronics so far but it does help me to remember some of the basics of Electronics so   I suppose it is worth checking out. There is no free cert for this but for knowledge sake, the course seems okay. The videos are mostly about 2 minutes long which appears to work quite well for the course.

 For those starting Electronics or who just want a break from those tough edX courses, this could be one of the  better  ones to  take - just don't expect anything too deep from it.

Having said that, the lecturer does make things interesting and fun enough to keep me watching the videos for the last few days so I think that is the main thing that is good about it.