Friday, 1 June 2012

A funny picture that I made

Here is a funny picture that I made.

What do you think? Do you like it? spin it or bin it?

Having fun with google search

Thursday, 31 May 2012

Failure Set Theory

I have been thinking a lot about success and failure and what factor are responsible for the two. and I think I have come up with something interesting, here it is.

Failure is not that bad, as long as you make sure you learn from your mistakes which led to the failure, it teaches us a lot more lessons than a succes ever could, its like failure prepares you for that super special grand success that will follow after n failures, where n is a function of that fact that whether you learn from failures or not.

The following 2 figures shows two consecutive failures in your life, and the right failures and wrong ones,

If the sets representing the reasons for any 2 consecutive failures in any point of your life are disjoint then it means that you are moving on the right path ,but if the have few elements common then this implies you made the same mistakes on this failure as you made last time.

Actually this lesson that we should learn from our failures , itself was learnt after many failures.

So I have come up with an algorithm to succeed in life,what I think is that if I increase my tries and make sure I have completely new reasons for a new failure,than I had last time and do not repeat the mistake that led me to my previous failure, then a day will come when I will fail to fail, that will be my super grand success.

I am looking forward to it.

Sunday, 27 May 2012

CodingBat clean bowled

This refers to the "string_times" problem in the python section of codingbat , under the category warmup-2
the question says
Given a string and a non-negative int n, return a larger string that is n copies of the original string. 

string_times('Hi', 2) → 'HiHi'
string_times('Hi', 3) → 'HiHiHi'
string_times('Hi', 1) → 'Hi'

here is the link , (try it out)

the codingbat solution is

def string_times(str, n):
  result = ""
  for i in range(n):  # range(n) is [0, 1, 2, .... n-1]
    result = result + str  # could use += here 

return result
here's my solution:

def string_times(str, n):
   return str*n 

Irony of TLDR Syndrome!

What is TLDR syndrome?

TLDR syndrome refers to "Too Long Didnt Read" syndrome.Its not a proper syndrome, its just a name given to the inability to perform a patience requiring task like reading,(atleast thats what I think, lemme know if I am wrong in the open comments) the main reason behind it is social media and the overwhelming importance given to hasty,quick things by the sociey.

The Irony

The irony about TLDR is that most people who suffer from TLDR doesn't even know that they suffer from it, or in some cases they don't even know what TLDR is, this is because to know about TLDR syndrom you have to actually read about it, and the pages that describe this syndrome are themselves long, here is the link to the wikipedia page. 

As of me, I smetimes suffer from it, and sometimes dont,here is the code which returns False when I am not suffering from it, and return True otherwise.

def Do_I_Suffer_From_TLDR(Day,Mood,Song_in_Background,environment):
         if Day=='wonderful' or Mood=='Delightul' or Song_in_Background=='My Favorite' :
                              return False
         if Day =='waste' or Mood=='crap' or Song_in_Background=='this_one or one of these'
                               return True
                        return ' TCTD : Too Confused To Decide '


If you are reading this line right now , that means you probably aren't suffering from TLDR curently, but suppose that you didnt read it, then its sure that you are suffering from it,(otherwise why else would someone not read such an incredible article LoL) but then if that is the case and you arent reading it, then sadly you will never know that you are actually suffering from it right now, that my friend is the biggest irony of TLDR syndrome.)