Sunday, November 23, 2008

How iPhone Changed My Life

It's been a while. Had quite a rough week. Anyway, here's me blogging again for the last few days for this week.

Ever since I saw the iPhone in one of the Keynote, I was totally sold. I knew I need to get one. I waited for the iPhone 3G to be here in Singapore and gotten myself a unit.
No word can describe how the iPhone has changed my life. It's elegantly built and comes with everything that I need.

I no longer start my laptop unless I need to do more heavy duty stuff like assignments or surfing, else I can survive with my iPhone just fine.

I would like to show you what I do with my iPhone, so let me share with you a glimpse of my life and see how the iPhone has changed my life.

*Warning! Picture intensive post ahead*

First Thing in the Morning

The alarm wakes me up


Go to Home screen of my iPhone



Check Email of the day


Check Notes for ToDo or any other reminder


Check today's event on Calendar


Read updated feeds from my Google Reader


Check Facebook updates (Hello Neng Giin and Adeline, if you happen to read this =) )


Check Twitter for Tweets from my friends


Peep through what people nearby me say



When I am bored

Read some classics

Feed some fishy and play with them


Play some Games



When I feel like a Shutter-bug


My most loved App - CameraBag



When I am going out

This week is not a good time to go out... Good for me as it's Reading Week.

Check my directions or whereabouts



When I need help

So that I won't miss any special events, Keynote timing


Call out for help when you forgot that Scientific Calculator for that final exams


When you need that extra vocabulary


Solve the frustrations of not being able to figure out the song that is at the tip of your tongue but you just can't recall or that song without lyrics that is on the radio or playing in the shop sound system.

-----------------------------------------------------------------------------------------------------

This is how I use my iPhone. Tempted to get one yet?

Wednesday, November 19, 2008

Slide anyone?

We shall talk about slides today. I am sure each of us will have to do at least one deck of slides every semester. I myself have been doing more than 2 slides average per semester ever since I entered NUS. Back then, I was like most of us, trying to fit everything into a slide so that there is no need for me to memorize what I need to say. I will just need to read from my slides. It was cramming bullet points containing full sentences of what I want to say during my worse period and perhaps some partial sentence when I was more confident. This was mainly due to me being Chinese educated (That's why the bad grammar). We do not speak English on a daily basis, Mandarin and Cantonese was all we spoke. English was only used during English lesson as well as exams. Chinese educated students tend to have difficulties in forming sentences in proper grammar structure and articulating their thoughts in English. It's even worse during stressful timing when we need to present in front of someone else.

I had always been hiding behind papers containing my speech and my slides. This did not go away until my wonderful teacher introduced me to Toastmaster. I joined Toastmaster International before I enter NUS and obtained the Certified Toastmaster certification on completion of 10 speeches with different objectives. It helped me tremendously in gaining confidence to speak in front of unfamiliar crowd. After the completion of 10 speeches, I have gone through some training on various topics like, how to tell a story, eye-contacts and gesture, vocal varieties, getting comfortable with visual-aid, giving a persuasion speech and inspirational speech, etc. If you would like to be able to speak without the fear, Toastmaster is definitely a good way to start.

Sorry for side-tracking but public speaking and slides are always relevant to each other with emphasis on the way you present more than slides, so I felt that it is important for me to mention some ways that might help improve the public speaking skills as well.

Back to slides now. I still remember it was my first Keynote after being introduced to the world of Apple. I was amazed by the slides and presentation by Steve Jobs. Instantaneously, I decided that that's the style of presentation slides I want. I was lucky to be acquainted to the Keynote.app from iWork. It produces elegant and minimalist presentation slides with little effort. So long hideous and wordy slides. Hello classy slides. However, it wasn't without its own problem. I overused too many fanciful effects that come with the software. All this was just the beginning when I explored deeper into slides creation. Now, I realized that it is not the app that you use that matters. But it's the content and your presentation skills. So, whatever that I will be sharing with you, applies to Powerpoint.app as well.

Below are 5 important points to remember when creating a deck of slides. The 5 points listed below are by no means exhaustive as there are more to be noted. It is important to remember, the presentation matters more than your slides. Slides are just visual-aid after all. The spotlight is still on you and what you are presenting.

Here are the 5 points.

1. Tell a story

It is only with a story that you are able to get conviction from your audience. I am sure all of us prefer a story than listening to a dry stating of fact. With a story, you are able to bring your audience through the ups and downs of the subject that you are presenting. This can be useful for case studies, business plan, business idea generation, etc type of presentation. Of course, if the module requires you to present an answer to the tutorial question with a step-by-step solution, the story approach won't work. Anyway, try to make sure that you are telling a story whenever you can do so. But remember, every presentation have different requirements and approach, so these are not dead rules to follow. A good example in telling a powerful story can be seen in Obama's victory speech when he narrates the Change witnessed by the oldest voter of US to bring across his Change message. Do watch it if you haven't [click to watch]. It is too good to be missed.

2. Avoid bullet-point
This is definitely something important to eliminate. Really, there is no point cramming every single line of what you want to present into a slide and read from there. The audience might as well read it themselves rather than listening to you. Guy Kawasaki in his Art of the Start speech [watch here] said that, if you cram everything inside a slide, you do not know your material well. When you do not know your material well, you will start reading your slides. Your audience will then quickly figure out that you are a Bozo that does not know your material. They will then read ahead as they can read faster than you speak. So definitely avoid being THE Bozo. Have only a one liner in your slide if you can. Convey one message per slide to make sure that it sticks in your audience. Your slides should not be useful unless you are there to present the presentation. If your audience need additional information, provide them with supplementary notes AFTER your presentation. You won't want them to be busy reading your notes instead of listening to you right?

3. A Picture Speaks a Thousand Words
There are actually various methods of making a powerful presentation slides, but the picture way is what I feel effective personally. I am a very visual person, so pictures leave better impression on me as compared to word. I realized that in Steve Jobs's keynote, he always has powerful images and photos to help him illustrate his product feature. Image allows you to relate the point that you are conveying much easier. However, avoid cheesy clip-art that comes with your Microsoft Office. Those are too old school. You don't need a black stick man pondering with question mark in all your slides that you want the audience to think about the point that you brought up. Use high quality photos instead. You may find such photos from website that sells stock photos or provide stock photos for free. Flickr's photos shared under the Creative Commons License[http://www.flickr.com/creativecommons/] are one good source for high quality photos. Try to find one with enough space for you to fit in your words. Just to give you an idea, a sample are attached below. It's one of my latest work done for a poster of a de-stress event for my residence. The idea behind are adopted from how I create my slides.




4. Make numbers (data) meaningful
I learn this very recently during one of the presentation slides I did for the Start-up Singapore competition. A lot of times we are overwhelmed by slides with big tables containing hundreds of different numbers with the presenter flying their little red laser dot around trying to make us look totally dumb when we don't get them. Another overkill stuff is graphs of survey results. I see this a lot during one of the recent presentation. No one needs to know every single result you obtained from the survey. Giving the audience bars and bars of graphs don't really help them in making sense of what kind of trend that you want to show. Numbers that you obtained be it from the survey or your ROI for your business idea will only make sense if you make them meaningful. How to make them meaningful you may ask. Let me give the first step to you. It's a no-brainer and a giveaway really. Come closer...
.
.
.
It's just as simple as...
.
.
.
MAKE 'EM BIG!

Yes, use BIG HUGE font size for that specific number that you want to highlight. Don't hide them somewhere in the bottom right of the table with the rest of the unimportant figures. Make it so big that it covers half of the screen even. This will lock the figure in the audience. They will be able to remember that slide with that BIG FAT YUMMY number which maybe your profit in 5 years or the 1000 users that say "Yes, I am interested in buying your product".

Check the following slides and compare yourself. You will know that I am not kidding you when I say make the number big.



VS.


Which one is more powerful? You should know the answer by now. Don't feel compelled to take a screenshot of the table just to prove that you got the figure from the spreadsheet. Just be ready to answer how you derive that if the audience would like to know.

Other ways of making numbers meaningful are making graphs that highlights the important figures or just simple table for comparison. If it is possible to break down the number into smaller more understandable number, please go ahead and break them down. Another sample to illustrate this.



It might not come across strong to the audience if we just state how many millions or billions of members Facebook has. It's hard to make sense of large figures. But by putting them into a context that they can understand or make sense better, it makes it easier to make an impact on the audience when showing important trends especially.

5. Keep things simple
Dump that theme from the powerpoint template, it's getting stale when everyone else is using the same theme. Also, using the same theme as your lecturer's slide is really not cool. Stay with plain background. At most, a little gradient.

Use at most 2-3 transition if you have to. No one likes overloaded transition presentation. It's as annoying as fly flying on top of your head. It will be distracting if you have too many fanciful transition (Note to self : Lesson well-learned.). Same goes to build within a slide. Use subtle transition like "dissolve" instead if you really have to build the content in your slide.

Other thing to trim away from your slide is cheesy sound effect like the "swoosh" or the "clap" when you end your presentation. Your audience will clap for you if you have done a good job in presenting, there is no need for you to clap for yourself.

So to summarize, the simpler your deck of slides is, the easier it is for you to convey your message. After all, presentation is to present the message or the idea behind and not to copy and paste what you have written in your report. Also, I cannot stop stressing that it is the content and how you present it that matters. Slides are just visual-aid to help you better illustrate your message.

I hope that this post have been useful for you. I am still in the process of learning and perfecting my skills myself, so I dare not call myself the expert in this. I just hope to share with all of you what I have learned, so that we can all progress together. Try to Google for more resources if you are interested in learning more (I am well aware that all SOC students already know this, but just in case =) ).

Time to get some sleep after posting such a long post. Till then, see you in my next post.

Monday, November 17, 2008

Untypical SOCian in Da House

I will be taking the stage for the next 7 days to guest blog. Thanks to Juliana for giving me this opportunity to hopefully share some of the things that I am passionate about in life with you.

I am Yan Yan, year 4 E-commerce major. Why E-commerce? Simple, because I can avoid all the Maths, Stats, etc. I love E-commerce too much now. All the e-businesses fascinates me very much. I suck at programming. I do not hate them, I just simply did not get them when I was first in NUS. We were expected to be proficient in programming within two semesters and I am too dumb for programming I supposed. Clock is ticking... I will be graduating in July next year. If you are able to save me before I graduate, gimme a holla.

Let me first do some self-introduction. I am a perfectionist and I have OCD. I like popping bubble wraps (I can't resist if I see one, gotta pop 'em all) and I can't live without Dettol. Scratch that. That totally sound psychotic.

I am a big Apple fan. Mac is my preferred platform for it's simplicity. Of course, I know a lot of SOCians prefer Linux for it's flexibility. But well, with a MacBook or MacBook Pro, I can have the best of all worlds(i.e. Mac OS, Linux OS and Windoze OS). Anyway, not trying to start a OS war here as that will be never-ending. >.< I used to be the Mac Evangelist for MacNUS - the Mac user group in NUS. I am still in MacNUS currently serving as the VP.

Presentation slides design is my forte I guess. I think bullet points and wordy slides are total snoozers. I go for zen-like and minimalist design. I think the world will be a better place without wordy slides. Maybe we can talk about slide design over the next few days.

I am into photography as well. I like the cross-processing effects, but I am unable to shoot films cause it's too expensive. I totally love the lomo-styled photos that can be easily produced with the Camera Bag.app on my iPhone. I also shoot with my DSLR Canon 40D. I am a Prime person. I do not fancy zoom too much. Prime allows me to be more creative with the composition of my photos. Next lens on my list will be the Ultra Wide-angle Canon EF-S 10-22mm f/3.5-4.5 USM and another prime, either the SIGMA 30mm F1.4 EX DC HSM Lens for Canon Mount or the Canon EF 85mm f/1.8 USM. I still can't decide between the 30mm and 85mm. Dilemma when you want everything but you can't have everything.

Forgive me if you find any grammar mistakes. I know how much it irks. If you are able to permanently cure me from making grammar mistake, please, I need your saviour. =)

It's the reading week and I am sure everyone is slaving yourself to prepare for the coming finals. For now, I should get off the computer and start studying for my CS4251. I am really curious how many of you out there are reading this blog. So, shout out in the comments to let me know that someone is indeed reading this.

My Favorite XKCD Strips

This strip was about the limitations of complexity analysis. If something is unsolvable like TSP, it just means it is unsolvable on a Turing machine. There are other paradigms to try.

Here is another:


This is not technically impossible. It is about a cellular automata called Rule 34 which has been shown to be Turing Complete. i.e. it can simulate everything a gerneral purpose computer can do.

Sunday, November 16, 2008

Biology for Computer Scientists

Look at yourselves. You are mostly made of proteins. Your skin is made of collagen. Your arteries, lungs, bladder, ligaments etc are made from elastin. Your eye color is due to a protein . Your hair is keratin. Mechanical forces are generated using myosin, kinesin and dynein. Insulin signals cell metabolism. Enzymes are proteins that reduce the activation energy of a chemical reaction so that it is feasible in biological conditions.

Proteins are made of long strings of polymers. Polymers are the same stuff used to make CDs and plastic bags. Unlike CDs and plastic bags which are made from the same repeating group of atoms, proteins are made from 20 different types of groups of atoms known as amino acids. So there are 20 different amino acids repeating in predefined sequence of arbitrary length.

Proteins do so much by relying on their 3D structure and certain groups of atoms on them. The 3D structure is entirely dependent on the predefined sequence of amino acids of arbitrary length.

This predefined sequence of amino acids or better known as the chemical formula of a protein is defined (encoded) in a molecule called the DNA. Ordinary human cells have 46 huge molecules of DNA called chromosomes. Every human cell literally "reads" these molecules like a processor reading instructions and literally "prints" the proteins in a nano 3D printer called the ribosome.

DNA are a different type of polymers made from repeating sequences of 4 different types of groups of atoms known as the nucleotides.

So the obvious question for the computer scientist is how to encode for chains of 20 types of amino acids using chains of 4 types of nucleotides. We know how to encode for 10 decimal digits using 2 binary digits. The same principle applies her too. We will need 3 nucleotide pairs of a DNA sequence to encode for 1 amino acid of the protein. This is because the number of possible permutations of 3 nucleotides of a DNA using 4 types of nucleotides is 43=64 which is greater than 20 amino acids. Using every 2 nucleotides of a sequence to encode for 20 different amino acids won't work because the number of possible permutations of 2 nucleotides of a DNA using 4 types of nucleotides is 42=16 which is less than the required 20.

So the cell reads the DNA in groups of threes called codons. And each codon codes for one amino acid of a protein. Once the protein is made it folds itself into a 3D structure which lends it its functionality.

Biologists really badly need love and attention from Computer Scientists because Life is Information Technology. We still don't know the algorithm our universe uses to fold these proteins.However we know the algorithm the universe uses for Newtonian physics.

So Biologists want us Computer Scientists to do for them what we did for physicists, so that they can design enzymes to act as medicines, design biochemical pathways that facilitate the production of industrial chemicals and fuels.

We need you!

BTW, This is not entirely science fiction. There are companies like Amyris that do exactly this.

Will it halt?

This is perhaps the most important thing we should like to know about any process. OK I agree it doesn't seem like an important thing to know. What's the big deal? So lets just say, I have it with me: I have an algorithm to determine whether an algorithm will halt or not and it is always right. I call it h(a,i). It takes any algorithm a as it's first input and an input string i, algorithm a will work on, as its second input. It i.e. h(a,i) returns "will halt" or "will not halt" as its output.

Imagine what I could do with this h(a,i)! I can prove the Goldbach's conjecture and get the Field's Medal with it. More importantly, I can prove everything and win all the field's medals forever. ROFL!

OK here is how I will do it. But first, Goldbach's conjecture:
Every even integer greater than 2 can be written as the sum of two primes.
Nobody has proved it as such. Distributed supercomputers have verified this to be true until 1018. But hey! I have h(a,i)! So I write a program p(i) that loops over all possible even integers greater than i and halts whenever it finds an even number that cannot be written as sum of two primes. Now the best part is I don't even have to run p till the end of time. All I have to do is run h(p, 2). If it returns "will not halt", then Goldbach's conjecture is true or else it is false! What more evidence do we need than to know all even numbers greater than two can be written as sum of two primes? LOL!

Similarly, I could use h(a,i) to prove everything and anything!

P.S: Sorry to get your hopes up. This article was about the well known Halting Problem. And Alan Turing proved a perfect h(a,i) that computes correct answers for all possible values of a and i are impossible. He used a variant of Cantor's Diagonalization Argument to prove it. However a lot of partial versions h(a,i) that compute on a subset of a and i are possible. That is why automatic theorem provers exist. So tough luck guys! There are no easy paths to win Field's Medal :(

P.P.S: The Matrix Trilogy explores the philosophical implications of the halting problem. In it Oracle is like h(a,i), in that it is designed to predict the behavioral outcome of any process (e.g. a human mind, a set of events). It is right most of the time. However Neo is a special process, in that it tries to create a final outcome that would prove Oracle's prior prediction to be wrong. This is evident in the final conflict in Matrix Revolutions where Agent Smith gets the eyes of The Oracle and predicts Neo would give up in the end, but Neo simply chooses to contradict by not giving up. 

In fact this story is so close to the Halting Problem that Alan Turing's proof is all about proving the existence of algorithm "Neo" for all h(a,i). The existence of algorithm "Neo" also hints on the possibility of generating freewill within an algorithm. All one would need is a genetic algorithm that all become a better approximation of h(a,i) in each generation and an algorithm "Neo" to contradict it.

Fascinating! Isn't it?

Saturday, November 15, 2008

Ways to get caught: Buffer Overflows

Buffer Overflows are a class of techniques used by bad guys to do everything they want. I attempt to give a simplified description of how it works.

In native languages like C and C++, buffers a.k.a arrays can be filled with more data than they are made to hold. (This is not strictly true. Modern OSes and compilers have ways to check this even for native code).

If the array is declared as a local array with a fixed size, just like any other local variable, a space equal to the size of the array is pushed into the stack. This is nothing new. All local variables are allocated on the stack segment. The compiler generated machine code automatically pushes all local variables onto the stack segment.

Did I say segment? Yes. For the uninitiated, let me explain: Every executable in most OSes are organized into segments during runtime. There is the data segment, code segment, stack segment and heap segment. Stack and heap segments may share the same memory space and they grow into each other. Keep in mind that stack and heap segments are not the data structures we studied in CS1102, we are talking about sections of memory allocated for an executable during runtime by the OS.

OK so back to local variables being pushed onto the machine stack. There is one other thing that get pushed onto the stack besides local variables: Return Addresses! The stack stores resturn addresses for the processor to return to after a function call. The funny thing is that even main() has a return address.

So here is what the bad guys do; Since most input to any program, be it a web server or a nuclear detonation device, is stored in arrays (remember char** argv?) the bad guys will give the program specially designed input values which overflow a local buffer and overwrite the return address of the current function to point to the address of the beginning of the array. (There are some technnicalities involved like NOP sleds because we do not know the exact address of the beginning of the array. I do not cover these). So the processor returns to the begnning of the array to execute whatever is written there. And guess what? The array contains the machine code bad guys want to execute on your system.

Lets say the bad guys targeted a web server that was running with administrator privileges. Then they would be able to execute code only an administrator would be allowed to execute. Thus buffer overflows could potentially give unlimited power for the attacker over the system.

Believe me, there are ways to upload entire VNC Server DLLs into certain Windows machines because of a buffer overflow in one of the network services a Windows machine opens for the whole world to connect to. And the attacker would be able to hijack your mouse and screen just like in the movies.

Fortunately, with the introduction of the NX bit most buffer overflows are impossible because the NX bit can be enabled to make a stack segment non-executable.

Ways to get caught: SQL Injections

If you have taken CS2102, or wrote an application that uses a relational database to authenticate users, you might have come across code like this:

SELECT * FROM USERS WHERE USERNAME='[username]' AND PASSWORD='[password]'

..where [username] is usually a variable that holds the username the user inputed into you application and [password] is usually the variable that holds the password the user inputed into your application. There may be string concatenation operators that make this possible in your favorite web application development language.

Assuming that the user uses the inputs directly in the SQL query without manipulation there are ways to break into such a system. And SQL Injection is the way. Here is how you do it.

Let us substitute the following input into the above query:
  • [username] is ' OR 'x'='x
  • [password] is ' OR 'x'='x

SELECT * FROM USERS WHERE USERNAME='' OR 'x'='x' AND PASSWORD='' OR 'x'='x'

As you can see this query will return some user from the database and the remaining application logic will authenticate you as that user.

This is a well known technique therefore it is very unusual to find web applications that have this vulnerability. However my polytechnic hired me after I showed them this vulnerability in one of their intranet web applications. So keep your eyes open, and report all such holes to NUS and be rewarded for your effort.

Monday, November 3, 2008

IQ Tests Suck

Here is a question I found on the Mensa website under "Mensa Workout":
Sally likes 225 but not 224; she likes 900 but not 800; she likes 144 but not 145. Does she like 1600 or 1700?
The pattern the question designers want me to find is that Sally likes perfect squares, and so she likes 1600. But there seems to be other valid solutions:
  1. Sally likes numbers in which the sum of the digits plus the number of digits equals 12. Therefore, she likes 225, 900, 144, and, of course, 1700.
  2. (This one is for the fans of Occam's Razor) Sally likes numbers whose sum of the digits is odd. Therefore she likes 1600, not 1700.
  3. Sally likes 1700 because she likes the roots of x4 - 2969 x3 + 2521800x2 - 648810000 x + 49572000000, which is 144, 225, 900 & 1700.
  4. Sally likes 1600 because she likes the roots of x4 - 2869 x3 + 2394900x2 - 612360000 x + 46656000000
  5. Sally does "not" like 1600 or 1700, because neither number has digits which sum to 9. She "does", however, like 1800.
All these solutions are logical but only 3 out of these 6 rational solutions gives me a score.

This makes me wonder: Is Intelligence a social phenomena? Please note the fact the these questions are designed by people who are recognized by the society as intelligent, i.e people who have achieved something "great" in their lives. That implies that the society defines somebody as "intelligent" just because he thinks like the other "great" people.

What if Beethoven was born before the piano? Spielberg before the invention of the camera? Steve Jobs before the computers? So there are people alive today whose technology has not yet been invented yet, the perfect means to their genius has never materialized. And if society starts to brand, recognize and promote only the people who are like the achievers of yesterday, I think we will soon enter a second Dark Age.

Hello World

Hello, I am Edwin and I will be the guest blogger for this week.

I am an undergraduate student of Computational Biology. I study it because I believe it will speed up the progress of Life Sciences and eliminate the need for slow experimental techniques and ethics that limit it. As of now most of that dream is still science fiction, but I hope somebody will make progress.

You can read more about my academic and professional past here.