Aside

Udacity CS 101: Homework 3

Just completed Homework 3, which really did require quite a bit of thinking, especially at the Sudoku problem! But the sense of achievement when you finally solve the problem feels great! I think the resources on the forums are great, lots of help from people who are very smart. But if you feel shy posting there, feel free to comment below. I’ll try my best to help!

Advertisements
Aside

Disillusionment of an Entrepreneur

Disillusionment of an Entrepreneur via TechCrunch

This is the disillusionment of the entrepreneur. There is no such thing as success. It is a moving target. A mirage. By the time you attain what you thought was your wildest dream, reality has moved on and left your dreams in the dust. And the desire for success grows stronger still.

Can we ever be satisfied with our current circumstances? I would say no, and we should not be. Otherwise we would probably still be in the stone age. So should we aim for success? Yes, but we do not let our goals consume us. We must have goals to ensure we do not stagnate, but we should not be too obsessed with reaching the goal, to the extent that all we think about is the end result (success). The journey is much more important than the end, like they always say.

Udacity CS 101: Lists Part III (Loops and Pop)

We learned about the while loops, which tests an expression and executes the code block below. Here we’ll meet a new kind of loop, called the for loop. The for loop is especially useful for list:

oddNumbers = [1,3,5,[7,9]]

for num in oddNumbers:

print num

# this will output:

# 1

# 3

# 5

# [7,9]

Continue reading

Udacity CS 101: Lists Part II (append, +, len)

There is a specific method called append() provided by lists. It is used to append an element to a list. This mutates the original list (it does not create a new list.:

listSay = ['How','Are']listSay.append('You')

print listSay # will give you ['How','Are','You']

This might remind you of the ‘+’ operator we use for joining strings, lists can use this operator too:

listSay = ['How','Are']

listGreet = ['You','Today']

hello = listSay + listGreet

print hello # will give you ['How','Are','You','Today']

# this however creates a new list and assigns it to the variable hello

Continue reading

Udacity CS 101: Lists Part I ([], Mutation, Alias)

We have learned about strings, and how strings are basically sequences of characters. In this new unit, Professor Evans introduces us to a new kind of data structure, called list. Lists are much more accommodating, they are sequences of anything. Here is an example of a list assignment:

stringSay = 'Hello!'

listSay = ['H','e','l','l','o','!']

Like how strings are recognized by the quotes, lists are identified by square brackets, and the elements are separated by commas. Remember how we could use square brackets to call out a particular character or a sequence of characters in the string, we can do that to lists too!

stringSay[0] # refers to the character 'H'

listSay[0] # refers to the character 'H'

stringSay[1:3] # refers to the string 'el'

listSay[1:3] # refers to a list ['e','l']

Now to the coolest part of lists, list can contain anything! Yes really anything: lists can contain numbers, strings, characters and even lists!

Continue reading

The A/B Test: Inside the Technology That’s Changing the Rules of Business

The A/B Test: Inside the Technology That’s Changing the Rules of Business via THE VERGE

For the button, an A/B test of three new word choices—”Learn More,” “Join Us Now,” and “Sign Up Now”—revealed that “Learn More” garnered 18.6 percent more signups per visitor than the default of “Sign Up.” Similarly, a black-and-white photo of the Obama family outperformed the default turquoise image by 13.1 percent. Using both the family image and “Learn More,” signups increased by a thundering 40 percent.

Have you heard of A/B testing? It basically means diverting a small amount of your users to an alternative site, and to test for certain response.

For example if you run a blogs covering the latest technology, and you over premium memberships for access to HD videos. That’s also where your income is from. Suppose you want to see if a “SUBSCRIBE” button placed at the top right or the top left is more likely to entice users to actually subscribe. You would carefully direct say, 10% of your users to a page with the button on the right, while the rest of the users stay with the normal page (button on the left). Then you analyse the statistics and results to determine if the position of the button actually matters. Well this example is largely simplified.

Big businesses today perhaps do more than A/B testing, maybe A/B/C/D/E/F/G testing or more! And the primary aim is to increase their user-base. More often than not, A/B testing focuses on small elements (like the position of the buttons), sometimes even minute, unnoticeable elements such as border width. It aims to use data to analyse the psychological impacts of such changes to the users, because sometimes we make decisions and we don’t even realize it. And because such changes are often small, the article mentions a great point on how it might stifle revolutionary revamps, in favor of small, data-driven tweaks.

Udacity CS 101: Loops

Loops go in loops:

Decision

Loops, they loop.
Image courtesy of http://www.thelineofbestfit.com

Yea I probably don’t make much sense, but loops do exactly what they mean! Loops continue executing the block until a specific expression stops it. It is possible to write an infinite loop that keeps going on and evaluating the same block of code, but that will probably eat up your computer memory and crash. A simple kind of loop is called the while loop:

i = 0
while i < 10:

print i
i = i + 1

Continue reading