Wednesday, March 29, 2023

Disco Dancing Dog

I asked Chat GPT "Can you write a song about a disco dancing dog"

It's response:

Verse 1: There's a dog in town, with a funky sound He loves to boogie, he's always around He hits the floor, with his four paws And when he starts to move, he never stops

Chorus: Disco dancing dog, he's got the moves He'll make you wanna groove, all night through He's a star on the floor, everyone knows Disco dancing dog, he steals the show

Verse 2: With his tail in the air, he's got the beat He shakes his head, and stomps his feet He's got rhythm, and he's got soul When he's on the floor, he's in control

Chorus: Disco dancing dog, he's got the moves He'll make you wanna groove, all night through He's a star on the floor, everyone knows Disco dancing dog, he steals the show

Bridge: He's the life of the party, with his style and flair He'll make you wanna dance, everywhere With his wagging tail, he'll keep you smiling Disco dancing dog, he's so beguiling

Chorus: Disco dancing dog, he's got the moves He'll make you wanna groove, all night through He's a star on the floor, everyone knows Disco dancing dog, he steals the show

Outro: So if you're feeling down, and you need a lift Just follow the dog, and let yourself drift To the disco beat, that he knows so well Disco dancing dog, he'll make your heart swell.

© 2023 Praveen Puri

Tuesday, March 21, 2023

Testing ChatGPT, Part 2

For this test, I gave it an A.

I asked:

Pretend that I reach a land where there are two types of people: smurfs, who always tell the truth, and dragons, who always lie. I meet two men, and I know that one is a dragon and one is a surf, but I don't know which one. I ask the first one "If I asked the second one what he is, what would he answer?" The first one says that he would say that he is a dragon. Which one is the surf and which one is the dragon? Could you also explain how to figured it out.

It answered:

To solve this puzzle, we need to analyze the answer given by the first man and use it to determine whether he is a smurf or a dragon. Here's how we can approach it:

Let's call the two men A and B. We don't know which one is the smurf and which one is the dragon. So, let's assume that A is the dragon and B is the smurf. We will analyze the answer given by A to see if it makes sense.

We ask A: "If I asked the second one what he is, what would he answer?" A responds: "He would say that he is a dragon."

If we assume that A is the dragon and B is the smurf, then B would tell the truth and would say that he is a smurf. But A, being a dragon, would lie and say that B is a dragon. This contradicts what A just said, which was that B would say he is a dragon. Therefore, we can conclude that our assumption that A is the dragon and B is the smurf is false.

Let's now assume that B is the dragon and A is the smurf. We will analyze A's answer to see if it makes sense under this assumption.

We ask A: "If I asked the second one what he is, what would he answer?" A responds: "He would say that he is a dragon."

If we assume that B is the dragon and A is the smurf, then B would lie and say that he is a smurf. Therefore, when A asks B what he is, B would say that he is a smurf. And since A is telling the truth, he accurately reports that B would say he is a dragon. This makes sense, and we can conclude that our assumption that B is the dragon and A is the smurf is correct.

Therefore, the man who said "He would say that he is a dragon" is the dragon, and the other man is the smurf.

In summary, to solve this puzzle, we assume one person is the dragon and the other is the smurf, and we analyze the answer given by one of them to see if it makes sense. If it does, then our assumption is correct, and we can identify which person is the dragon and which one is the smurf.



© 2023 Praveen Puri

Testing ChatGPT, Part I

For this test, I give ChatGPT a grade of C.

I asked ChatGPT to write a Ruby (the programming language doesn't really matter) function to add up all the integers from 1 to N.  I wanted to see how it wrote it.  

It actually used a loop to iterate through all the integers to get the sum.  I'm sure many human programmers would do it that way, but the efficient way is to realize that you don't need a loop because, in math, the sum of 1 to N integers is N * (N+1) / 2.

So, for example, the sum of 1 through 10 is  10 * 11 / 2 = 55.

I was hoping that ChatGPT would know all the math tricks and use them.



© 2023 Praveen Puri

AI Replacing GUIs?

Microsoft is supposedly incorporating chatGPT into Office.  I can definitely see AI replacing (or greatly simplifying) the GUI (graphical user interface).  Instead of a menu with lots of drop downs, you just need a single box, like the Google or ChatGPT home page.

Imagine, in Word, being able to say (or type into the box) something like, "Indent all paragraphs",  "change the highlighted text to bold italics with font size 16", or "create a footer on each page that has the page number on the left, and date on the right."


© 2023 Praveen Puri

Saturday, March 18, 2023

Bank Crisis




What do you think of the current bank crisis?

First, last week three banks collapsed (Silicon Valley Bank, Signature Bank, Silvergate Capital).  The first two were the second and third largest bank failures in U.S. history. Now, First Republic and Credit Suisse are in trouble, even though ,yesterday, they got capital infusions ($30 billion for First Republic from a consortium of large U.S. banks, and 50 billion Swiss francs for Credit Suisse from Switzerland's central bank).

In the case of Silicon Valley Bank, it seems like management made two big mistakes: 1. Their clientele  wasn't diversified enough away from tech startups. 2. They chased returns and, even though the Feds gave ample warning that interest rates would go up, they had most of their deposits tied up in long term (10 year +) treasuries.  Now, with the economy slowing, too many of the tech startups wanted to take out cash at one time, forcing them to sell the treasuries at a loss.

 

This brings up some questions:

1. Will there be other banks?  Will this become a cascading crisis?

2. Is the Federal government response appropriate, or are they encouraging moral hazard?  Normally, FDIC insurance only covers up to $250,000 of deposits.  Many of these startups had much more in their accounts.  The government announced that, to stave off systemic risks, they will guarantee all deposits.  Are they helping out politically connected tech companies at the expense of taxpayers?

3. Also, the central bank will allow banks to put up their underwater treasuries as collateral, and borrow the full monetary value for 2 years.  Is that wise to stem risk, or is that a further bailout that might encourage reckless behavior in the future?


© 2023 Praveen Puri


Monday, March 13, 2023

State of Education

Today, people have unprecedented access to facts and data, but haven't developed critical thinking skills.

© 2023 Praveen Puri

Thursday, March 2, 2023

"The Good Old Days"


Two things I know:
1. We always talk about "the good old days."
2. In the future, today will become the "the good old days."

© 2023 Praveen Puri