Our life around REPL – Read–Eval–Print Loop

Whenever I see my niece so comfortable with iPhone, Mac, Advance Toys; I usually wonder almost similar feeling our parents must have pondered about us. But what is the biggest disadvantage of being part of GEN X. What? We have best things in the world but the irony is that we don’t enjoy or embrace the inventions/creations done by our forefathers generation. For us TV, Radio, Telephone, Mobile, Desktop was little obvious, now for next generation iPhone, iPad, Smartphone, DSLR, Laptops, Tablets et al are very obvious. Its clearly visible our parents struggle with our generation widgets and I have now started to struggle with next-generation gadgets.

You must be thinking what is it had to do with REPL. During college days, I started coding in C, bit of Java (to clear job interviews incase required), then majorly on PHP, RUBY, PYTHON, JAVASCRIPT, BASH. The moment I started coding on these languages, which are derived from their forefathers C & Lisp, I sensed a sheer bliss while working on them and started promoting them in peer group as soon as I realized the language is always available and it was obvious not to look back at C, C++, Java and many others. We can easily compare it to Gramophone, cassettes, VCR , VCP, Landline but these inventions were the foundation of where we stand today in our life or in programming world.

I was not clear about the term REPL when I started working on these languages and thought of it as a jargon of programming world. Recently, wrote a smallest code on ruby and a REPL was created. This is when I realized the power of REPL and thought to read about their forefathers. Let’s first have a sneak-peek into that smallest piece of ruby repl code.REPL

#!/usr/bin/env ruby
loop {p eval gets }

 

Now read this piece of code in reverse order, READ (gets), EVAL, PRINT (p), LOOP. Save this file as repl.rb and run as`ruby repl.rb`

─$ ruby repl.rb 1 ↵
"akshay Gupta".upcase
"AKSHAY GUPTA"
1+2*3
7

Congratulations, now you understand REPL and underlying fact of  language is always available i.e. no real distinction between read-time, compile-time and run-time. Now, when I start working on any new language, it’s easier to pick up if it’s REPL based and I truly thank Mr. John McCarthy father of Artificial Intelligence, creator of LISP (where lies the roots of REPL) for his immense contribution in the field of computer science, AI, programming languages and so many programming paradigm. If i’m not wrong, he is also the inventor of if-then-else conditional construct and we take these for granted now.

Running code at read-time lets users reprogram; running code at compile-time is the basis of macros; compiling at runtime is the basis of Lisp’s use as an extension language in programs like Emacs; and reading at runtime enables programs to communicate using expressions.

There have been two really clean, consistent models of programming so far: the C model and the Lisp model. As computers have grown more powerful, the new languages being developed have been moving steadily toward the Lisp model. A popular recipe for new programming languages in the past 20 years has been to take the C model of computing and add some parts taken from the Lisp model, like runtime typing and garbage collection.

repl-loop

It’s equally important to look forward and innovate in coming time and respect, embrace the efforts of our remarkable forefathers. To read and practice different languages that support REPL please follow the below links. I primarily depend heavily upon irb and PRY.

In our everyday life we do nothing more than READ (consume knowledge), EVAL ( between right and wrong), PRINT (discuss around), LOOP (day everyday) i.e. REPL 🙂

 

How to study and learn from world’s best Teachers and Professors

When I was in college their was always a desire that If I would have been in Stanford or some great university I would have access to world’s best professors and it would have been a different learning experience altogether.

Or

How great it would be if I can study whatever I feel like outside of our course in a systematic way and can learn the fundamentals that help to grow my knowledge, fundamentals or businesses

Education for all

Education for all

Internet is open and google always helps but still felt their is a lack to find the best course material or community for International Students to learn new courses and subjects that interests you. Life is no better and still lakhs of student who passes out every year have very diminished knowledge about what they study. In most part, Indian Universities and Institutions are unable to provide good Professors or teachers to students. It still continues to be like this and “Quality Education” is still far from anyone without any differences. Students are first categorized on basis of their caste, creed, grades and reservation. Economic condition of a family is always a primary concern besides all these factors.

Recently after 4 years of college education and during my visit Bay area and Stanford. I heard about Coursera, founded by Stanford computer science professors Daphne Koller and Andrew Ng ( StanfordDaily ).

About Coursera

We offer high quality courses from the top universities, for free to everyone. We currently host courses from Princeton University, Stanford University, University of California, Berkeley, University of Michigan-Ann Arbor, and University of Pennsylvania. We are changing the face of education globally, and we invite you to join us.

Then I started with more exploration and soon realized some best part of joining these courses. Mind it it’s free

  • Variety of Courses. I can study about anything and take up course of my choice e.g Algorithms, Pharmacology, Finance, Humanitics etc
  • Course taught by World’s best professors and Universities. Seriously it feels great to have access to best profs.
  • Small Video based tutorial. According to me “Small” videos are the key, as it’s easy to concentrate for shorter time and easy to watch as and when time suits you
  • Interactions with like minded people from the globe on the Discussion Forums
  • Format of the Syllabus and weekly assignment keep the clock ticking
  • Content of the course is way too good and easy to understand for anyone.

Last but not the least, now anyone from anywhere in the world can enroll and (re)study without any hesitation in his/her own time.

Heartiest thanks to the Universities and their Teachers and Professors to impart their knowledge to the world from their schedule and thanks to Coursera for providing it for free without any difference to everyone. Period

Note: This is in no way Coursera marketing but genuine feedback from a learning student 🙂

Happy Learning!

Online vs offline commerce: Targeting and Re-targeting your customers

Attended Triggr event today at InstaMedia Noida. It was interesting to hear couple of presentations and thoughts which was majorly focussed on one term “ENGAGEMENT”. I started loving this term especially, as everything revolves around this one simple term. Either your business is online or offline, engagement is involved at first hand once user showed some interest, then comes all other factors. If you succeeds in this engagement, you can turn your business to X folds.

In offline market, you go to shopkeeper to buy something, you showed interest then he starts engaging or recommending things to you, as you might also be interest and we tend to buy most of the times (credibility plays a vital role). If something is unavailable or when you come next time, he remembers what you want, he’ll greet you and engages you more. Now you’ll go to that shopkeeper again and again. Thats how a typical offline businesses run.

offline shopkeeper engagement

Talking in terms of Online context, their is no physical person, companies usually do lot of investment on Suggestions, Recommendations of products if a person shows a interest by saying “people also bought this”, “we recommend you to buy this” etc. to engage the users and converting it into business.

online product recommendations

Their were talks on how to minimize the bounce rates and more user engagement. Some implemented and proven ideas are designing it right way which comprises focusing the social media aspect i.e fb/tw views etc (talk from Slideshare), a/b testing (Paras, http://visualwebsiteoptimizer.com), Multi Variant testing (MVT), landing pages ( I must say unbounce guys have done a fantastic job) to understand what works best in terms of user engagement. Your product should ideally deliver the right message about your product in minimum words and should emphasize on self-talking images and help user talking the action on your page (without confusion). Once done, he will spend time to understand your product(s).

Interesting, met with Nitin Chawdhary, India Head, Tyroo ad network, I really like his presentation on E-Commerce, Engagement and Re-targeting your customers. To explain re-targeting in layman’s terms:

If your customer shows some interest in a product but goes off, next time if you happen to advertise/target him again, about that very specific items he was interested in, there is a high probability that he will buy this time.

According to him, if you re-target your customer around 5-6 times, there are high chances of actual lead conversion. One of the pain points he mentioned in e-commerce is, its very hard to find and target the customer back, once he is gone.

Talking more in terms of offline businesses or online businesses and once you scale re-targeting is hard to achieve, I’m sure technology has its limitations but its achievable on Internet. But re-targeting in physical world is yet missing according to me and in Indian context e.g. If I have an intention to buy a microwave and I go to market and try out couple of stores, how about the store shoots a message back to me (once I left his store) with some offer, to actually convert the lead and the time sales guy invested in explaining the whole Microwave functionality in person. I think enterprises will be interested in these solutions of re-targeting in physical world and simple implementation of this common and complex problem.

Ideas and their Execution..

Ideas … ?

Human brain works at much higher frequency than a CPU of one’s PC or laptop, without getting unplugged or low battery. Simulations shake hand concurrently without deadlock par than multitasking system can. Hemoglobin transfers data and control signals with FSB with the frequency of light. Brain stores all memories with infinite storage capacity as a Hard-disk without ever getting crashed, Responses which are impulsive, simple, potent and follow all the Laws of Nature, and portray ones thought process which flows out intermittently from our Mind (Cache). Ans if they really solve some problem…I call them IDEAS … !!!
Hope now one understands my IDEA !!
I’m another idiotic computers guy 🙂