2026 1

White Pebble Black Pebble

When I was in class 8 or 9, our English teacher told us a story I’ll never forget. There was a poor farmer who lived in a village. He owed the zamindar (landlord) of the village a lot of money. The zamindar had an eye on his daughter. “Marry your daughter to me, and I’ll forgive your debt,” he said. The farmer was reluctant. “Please, sir, what will the village say about your marrying such a young girl?” he asked. ...

2024 1

Why don't students hack exams when they can?

This year, I created a series of tests for my course at IITM and to recruit for Gramener. The tests had 2 interesting features. One question required them to hack the page Write the body of the request to an OpenAI chat completion call that: Uses model gpt-4o-mini Has a system message: Respond in JSON Has a user message: Generate 10 random addresses in the US Uses structured outputs to respond with an object addresses which is an array of objects with required fields: street (string) city (string) apartment (string) . Sets additionalProperties to false to prevent additional properties. What is the JSON body we should send to https://api.openai.com/v1/chat/completions for this? (No need to run it or to use an API key. Just write the body of the request below.) ...

2021 1

How to extend Markdown with custom blocks

One problem I’ve had in Markdown is rendering a content in columns. On Bootstrap, the markup would look like this: <div class="row"> <div class="col">...</div> <div class="col">...</div> </div> How do we get that into Markdown without writing HTML? On Python, the attribute lists extension lets you add a class. For example: This is some content {: .row} … renders <p class="row">This is some content</p>. But I can’t do that to multiple paragraphs. Nor can I next content, i.e. add a .col inside the .row. ...

2008 1

Implicit information

From what I’ve seen, puzzles and exam questions share two un-real-worldly characteristics. Firstly, you are guaranteed that a solution exists. Secondly, you are given that all the information provided to you is relevant. (Well, not always. Some case studies I’ve seen have had their share of contrived irrelevance. But that’s often what it is, I think. People fill in the relevant stuff, and then try and distract by adding irrelevant material in the hope of making it more real-world-like. But that’s just a guess). ...

2007 1

Solving multiple choice questions

How would you solve this multiple-choice problem: What is 12345 x 45678? 201932843 563894910 402394820 384718349 938491834 It always amazes me when people try and multiply the two numbers. In any objective-type test (multiple choice question), the aim is not to solve the problem – it is to pick the correct answer! Most people don’t seem to realise the difference. If I had to solve the problem, I’d look for shortcuts. For example, ...

2006 4

Absolutely convergent series

I’ve seen many proofs that 1=2. Here’s a classic. The (not-so-subtle) error in the above proof is that we’re cancelling (a-b) on both sides, when (a-b) equals zero. That is, we’re dividing by zero on both sides. That completely invalidates the equality. Another proof uses the fact that the square root of a number can be both positive or negative. ...

What programmers do

What programmers do.

Market emergence - fan bartering

Over my last few years as a consultant, I’ve seen many interesting ways in which markets have emerged where they shouldn’t have, creating havoc in pricing and scarcity. Fixed prices fluctuate, free goods acquire a value, and non-tradeable goods are traded. I’ll share a few of these examples over the next few weeks. Once, a fan manufacturer asked us, We did an analysis and found that our wholesalers’ margins fluctuate. How could that happen, when we are fixing their buying and selling prices? ...

2005 2

Think like a genius

Think like a genius.

10 steps for boosting your creativity

10 steps for boosting your creativity If you’re stuck for an idea, open a dictionary, randomly select a word and then try to formulate ideas incorporating this word. You’d be surprised how well this works. The concept is based on a simple but little known truth: freedom inhibits creativity. There are nothing like restrictions to get you thinking.

2002 1

Realistic lateral thinking puzzles

Realistic lateral thinking puzzles.

2001 1

Lateral thinking puzzles

It’s been long since I solved lateral thinking puzzles. Hartman’s site has over a hundred (with answers).

2000 1

Boston Consulting Group Interview

First Round On Saturday (25th November 2000), I dress up in my best suit (only suit, really), and find my way to the Green Park station for an interview with the Boston Consulting Group. Of course, being terribly conservative, I arrived an hour early, so it was time to walk around Green Park and have a look at the Buckingham Palace, while singing “I have confidence…” from Sound of Music. The walk did lift my spirits a bit. There was this tiny poodle that was busy licking a bulldog. The bulldog didn’t seem to mind, though it was large enough to eat up the poodle. Then the poodle’s owners picked it up, and walked away. The poodle was reluctant though. It just hadn’t finished licking the bulldog. After about 5 minutes, the bulldog (and owner), were about half-a-kilometer away, when the poodle was finally let down. Being the determined creature that it was, it ran ALL the way to the bulldog, and proceeded to lick. The bulldog, right through, was wearing a puzzled expression on its face, as if to say, “Are you sure you don’t want me to smack this little white fluff?” ...