ReadLog: Impact Mapping, Paul Graham’s Tweet Brings Back an Old Idea

I was reading this article on impact maps – a great technique for visualizing scope and underlying assumptions of a product (ideally before it is built).

An impact map is a visualisation of scope and underlying assumptions, created collaboratively by senior technical and business people. It is a mind-map grown during a discussion.

Mind maps are great tools for thinking and impact map is a special kind of mind map. I wanted to try it with one of my micro-product ideas.

“Can we make it better” (#cwmib) has been rattling in my head for a while. I got a domain name and tried a couple of implementations but was never satisfied with it.  Then I saw this tweet from Paul Graham. I also happened to read about impact mapping on the same day. So I decided to combine the two.

“Can we make it better”  essentially works like this.

I write a piece of code. A class, a function or a module or a tiny utility. I have the feeling that it can be improved but not sure how. So I share the code with the rest of the world and request people to take a shot at making it better. It is not a challenge but a request for help.

A bunch of developers see this code and think they can make it better. They take the code, improve it along one of the vectors – simpler, faster, more evolvable, more maintainable, more elegant etc. They rewrite the code or modify it and submit the mod along with an explanation of why it is better. Several people try the same.  We all learn from each other. A healthy debate (or a flame war) erupts. But we all learn something from it. Here is a very early impact map from this idea.

 

cwmib

* Even though, I use a code snippet as an example, it can be done with any artifact – a design, a logo, a survey form, a block diagram – anything you want to improve.

Let me know what you think.

ReadLog: Declarative Programming

Declarative Programming – Is that a real thing – A bit long but it was worth the time. Here are a few things you will learn when you read/listen to this article.

  • What is Declarative Programming
  • Domain Specific Languages and Declarative Programming
  • Some good parts of DP and some challenges in using them.
  • The concept of complexity gap
  • A process called Unfolding
  • DSDSL – Data structure Domain Specific Language
  • Patterns of representation
  • Patterns of generation
  • How to “Walk, then Slide” while building software

I think I need to re-read the article a couple of times. Even though the author starts with SQL (the most popular declarative language to date) he spends most of the time on template languages and their related problems.

If you read the article, I would like to know what you think.

ReadLog: Launching a SaaS Company, CTO Coding and Order Matters in Software

Here are a few entries from my readlog.

1. In Here’s How I Built and Launched a SaaS Company For Less Than $40k, Ryan Shank tells us how he built a SaaS product company in 6 months. Ryan describes:

  • How he found a designer through Dribble (a community of designers)
  • Created product requirements
  • Designed deliverables
  • Found a senior developer in India through Upwork
  • Built and Marketed the Product

Enjoyed reading Ryan’s detailed account how a single person can build and market a SaaS product and start building a company.

2. Matt talks about a common dilemma technical founders face. In Should a CTO keep on coding?  He discusses how to balance your desire to remain tech (by coding) with the need to do all the other things a founder CTO needs to do.

When you start as a technical founder, you are really a developer, quickly becoming a team lead. The team lead does leadership things but still codes and does very little management tasks. Then depending on how the company grows, usually you become a manager and now you have very little time to code.

Matt has some good advice and it was a pleasure reading the post.

3.  More than one order matters was a refreshingly different article from the ones I usually read.

Order matters. In real life when you’re in a library or a city or in your kitchen. And in software development. Order, the right order, helps understanding. Where there is order orientation is easier.

Order is important but hard to create and maintain.

Order is helpful, even important. But often order is hard to create and/or to maintain. Why’s that? What’s order anyway?

“What kind of order does software need?” is a great read, if you are building software.

Chatbots – What, Why, and How?

What are Chatbots?

What is all this rage about Chatbots?  Why are they popping up all over the tech news? Why are big companies like Google, Facebook, Microsoft jumping in and creating platforms and products?

Let us start with a few descriptions from the Web.

define chatbot3

Wikipedia has a more elaborate description.

A chatbot (also known as a talkbot, chatterbot, Bot, chatterbox, Artificial Conversational Entity) is a computer program which conducts a conversation via auditory or textual methods. Such programs are often designed to convincingly simulate how a human would behave as a conversational partner…

Here is one from Kik, that I like.

Bots are like mini-apps that live in a conversation thread. Consumers can chat to bots as if they were chatting to a friend. Bots help people find information, have fun, or get connected to the real world

The key words are “convincingly simulate”. Another term for this “seemingly intelligent”.  Pay careful attention. Bots are not humans. The bot makers try their level best to simulate humans, but we have a long way to go before they can come anywhere near human intelligence (or lack of it).

Why do we need Chatbots?

Why do we need chatbots? We have been pretty happy living our lives, without them so far. So why? and Why now? There are several good stories if you just Google “why chatbots”. a But I am going to just give you one of my favorite answers from Kik.

Why? Three simple reasons:

Messaging has surpassed social media in usage.

Consumers don’t download new apps.

And if chat is the new browser, bots are the new websites.

The beauty of bots is that you don’t have to download new apps. Bots live in your chat app, for which you already have an account. Also, you don’t have to learn a new UI, since you already know how to use your chat app.

How Chatbots work?

Let us look through the flow of a simple request to a Chatbot and its response. This is a an oversimplified version. In reality, the components and interactions are more complex.

 

chatflow

Let us assume that you are the user.

  1. You make a simple request to find out how to return a gadget you purchased. This is a typical customer service request.  You invoke the customer service chatbot and enter a text message.
  2. In the chatbot world, your request “How do I return my gadget X” is an utterance. The intent of the request is finding instructions on how to send the gadget back for a refund. Humans, being humans, have a variety of ways of expressing the intent. Here are a few. They are all asking for the same thing.
    1. I would like to return my mobile phone that I just purchased. Can you tell me how to do it?
    2. How do I return my gadget I received yesterday. It is not working.
    3. You sent me a defective gadget. I want to send it back.
  3. Once the bot understands this request (using some pattern matching or natural language understanding), it has to map this request to a service at the vendor site. In our example, the request for finding “instructions to return a product” initiates a search in the rules/policy/procedure part of the database.
  4. The bot application (typically server/cloud based) receives this request and searches the knowledge base. For example, the return policies may vary based on products and customer shipping locations.
  5. The knowledge base consists of information about products, users, policies, procedures and other information. It can be a typical company database or some other structure.
  6. The response may indicate the location and instructions on how to return the package. This may be in some geeky format like JSON that programs understand (better than humans).
  7. The bot application extracts relevant information from search results and sends it to the language module.
  8. This cryptic answer from the bot application is formatted by a component of the language module (called Natural Language Generator) into a polite, human readable format and sent to the chat client.

This completes one round trip of request resulting in a response.

A few things to think about

  • So how do various components of the bot work? For example, how does the natural language understanding  (NLU) module know how to extract the intent of the user?
  • How does NLU know what other l information is needed from the client to satisfy the request?
  • How does the mapper work? How is the intent mapped to a set of functions in the bot application?
  • How does Natural Langauge Generation (NLG) work?
  • What happens if the user has typos in his request?

These are the kinds of problems that keep bot makers up at night, worrying. We will discuss each component and their working in more detail in future posts.

 


 

 

A Few Things We Learned from Doing a Workshop at #PyDelhiConf

Here are a few lessons I learned, doing a workshop at #PyDelhiConf
  1. Chatbots are interesting to people (we had good attendance)
  2. Jump into the code after showing a couple of overview diagrams (I talked too much)
  3. Send the code and tools to the participants a few days earlier
  4. Make it interactive (one of the organizers came by and told me during our session)
  5. Just because you are going to a Python conference, don’t assume that everyone knows Python. Lots of students and beginners were in attendance.
  6. Do code walkthroughs – very clear and very concise
  7. Don’t underestimate the time needed to do a good workshop. Use time wisely.
  8. Take the help of the community during the workshop, a couple of kindred spirits helped others.
  9. Always go with a few copies of all the software needed in pen drives.
  10. Ask yourself one question and let it guide the flow – what nanoskill will a participant get from their investment of time in your workshop

Trying to Teach my Companion Bot

This is an imaginary conversation between me and my companion bot. I teach my cb and by teaching, I am learning too.
me: Hi cb, how do you find Twitter influencers?
cb: Dorai you need to tell me what is Twitter first and then about influencers. 
me: fair enough. Twitter is a micro-blogging service.
cb: I know about blogging. What is micro-blogging?
me: micro-blogs are blogs limited to 140 characters.
cb: I get that. Anything else I should know about Twitter?
me: It is very popular with over 300 million users using it.
cb: wow! that is almost the population of USA. 
me: Yeah.
cb: tell me more
me: People pointificate on Twitter.
cb: That is not very useful. Why do they do that?
me: Forget that.
cb: Ok. Erased “pointificate” from my memory. What else do people do on twitter?
me: They post news and links
cb: what else?
me: They retweet – meaning that they repost other tweets they like.
cb: Retweet is Repost?
me: Yeah.
cb: Is that all?
me: They sometimes post videos and images.
cb: Is this like sharing photos and videos?
me: Somewhat.
cb: Ok. I am getting a dim picture of Twitter now.
me: Give me a break. Dim picture?
cb: Hey, I am just a bot. I don’t have all the contextual knowledge you humans have.
me: Sorry. I forgot that.
cb: Since you seem to be tired of explaining Twitter, tell me about influencers. 
me: An influencer tweets and has a lot of followers.
cb: Followers?
me: I forgot. You can follow Tweeters.
cb: Dorai, you are a lousy teacher. Who are Tweeters? 
me: Thanks for the compliment, cb. Tweeters are people who tweet.
cb: That is better. Now tell me about followers. 
me: Followers are people who subscribe to Tweeters and receive their tweets.
cb: This is all very confusing. But I am getting excited to learn this stuff.  Now tell me about influencers. 
me:  you know what? I need to prepare a lot better to teach you. I am going to take a break now and come back later. Remember all this stuff.
cb: You humans. Always taking breaks. Sigh! Ok. Ping me when you are ready to resume. Of course, I will remember all the stuff. I have infinite memory. 
me: bye cb.
cb: bye Dorai
Meta: What does it take to teach a bot? How can they understand semantics? How can we give them bits of world knowledge? I cheated a bit and took lots of shortcuts. This dialog shows some of the problems in imparting knowledge to bots. We will try another version of this with an AI engine and see how it pans out.

A Good Teacher …

A good teacher worries about a lot of things, IMO. Here are a few, I can think of:

  1. Do I understand the subject really well to teach? Do I have both the conceptual and the detailed understanding of the topic?
  2. How can I keep the students engaged, curious and continuously learning during my session?
  3. How can I make my students understand enough to ask a lot of questions? What do I do if I don’t know the answer to some of them?
  4. What pace should I cover the subject?
  5. How do I handle a mix of knowledge levels of students?

Once you start teaching, you will figure out the answers to most of these questions. You will also learn how to be a good guide.  Be comfortable with who you are. Prepare, prepare, prepare and prepare some more. If you don’t know something, say so and find the answer and get back to the students.

The toughest part of teaching is to keep the students fully engaged and curious and maybe even a bit entertained.  The greatest joy of teaching is that you will always learn something new and the ‘aha’ moments you create for the students will make you forget everything else.

Meta:

I wrote this for a young friend who is just starting to teach to professionals.

Drinking from the CES2017 Fire Hose

I am going to try this for the first time. It is supposed to be live blogging, but it really is not. I am not at CES (I wish, I were). I am running a tweet collector to gather #ces2017 tweets (thanks to my buddy #Faizal), pick a few, add some choice comments and blog them here.tweetstream

 

What does that mean? I first got a friend to install #Wordpress #liveblogging plugin kept the authoring window open so that I can blather on.

Now to the announcements (tweets and my pearls of wisdom draped all over them):

Python Workshop for Students – An Experience Worth Sharing

Yesterday I conducted a Python hands on workshop for (mostly) students. Before I started the workshop, I asked them to introduce themselves and share why they were attending the workshop.

Here are some answers that warmed my heart.

I want to learn something that is not covered in our courses and do something that we don’t do as part of our college education.

Ever since I started programming, I got hooked on to solving problems. I am here because I want to become a full stack developer and solve problems.

I have been mostly doing embedded programming for robotic challenges. I was inspired by a couple of members in my team who were Python experts. I tried Python, and liked it.

I try to learn new things whenever I can. During holidays and breaks I keep trying out new things.

I am into competitive coding and like to participate in challenges. That is why I am here.

There were some amazing things about the participants:

  • They came on a Saturday to learn and sat till about 6 pm working on problems
  • Some of them built websites when they were in school and won competitions. They kept learning new things.
  • Some of them were in robotics competitions and were interested in embedded programming, Arduino, Raspberry Pi. Python is the next step in their evolution.
  • A faculty member came to the class (not to attend it but to encourage the students) and stayed throughout the day. He was interacting with students, instructors and even the organizers.
I taught them very little – mostly showed code snippets and made them work through problems throughout the day. We ended with a 2 hour coding challenge. We plan to offer internships to two of them (there were about 16 students).