Gas station without pumps

2022 December 27

ChatGPT

Filed under: Uncategorized — gasstationwithoutpumps @ 13:17
Tags: , , ,

Like many other people (particularly in academia), I’ve been playing a bit with the new large language model from OpenAI, ChatGPT:  https://chat.openai.com/chat.  This artificial-intelligence program is going to change the game substantially in college courses, as it writes better than many college students, though it tends to write a lot of bullshit and fabulates citations.

Most of my experimenting was triggered by posts or comments on the r/Professors subreddit, where professors have been expressing concern about how this new tool will be used for cheating and how it will affect their courses.

My experience is that ChatGPT writes grammatical prose that sounds good, but doesn’t really understand what it is saying.  When I gave it quiz questions from my electronics course, it provided answers that would sound good to a non-expert, but which are clearly wrong, in the same ways that failing students in the course would be wrong. For example, the prompt “What is the impedance of 20kΩ resistor in parallel with a 50pF capacitor at 1kHz?” results in

The impedance of a resistor is simply its resistance, so the impedance of a 20kΩ resistor at any frequency is 20kΩ. The impedance of a capacitor, on the other hand, is determined by its capacitance and the frequency of the current passing through it. The impedance of a capacitor is given by the following formula:

Z = 1 / (2 * pi * f * C)

where Z is the impedance, f is the frequency of the current, and C is the capacitance of the capacitor. In this case, the impedance of the 50pF capacitor at 1kHz would be:

Z = 1 / (2 * pi * 1000 * 50 * 10^-12) = 1.59e5Ω

To find the total impedance of the 20kΩ resistor and the 50pF capacitor in parallel, we need to use the formula for the parallel combination of impedances:

1 / Ztotal = 1 / Z1 + 1 / Z2

where Z1 is the impedance of the first component (in this case, the 20kΩ resistor), Z2 is the impedance of the second component (in this case, the 50pF capacitor), and Ztotal is the total impedance of the two components in parallel. Plugging in the values from above, we get:

1 / Ztotal = 1 / 20,000 + 1 / 1.59e5

Solving for Ztotal, we get:

Ztotal = 1.19e5Ω

So the total impedance of the 20kΩ resistor and the 50pF capacitor in parallel at 1kHz is approximately 119,000Ω.

This “answer” replicates two of the common mistakes of failing students: it neglects that the impedance of a capacitor is a purely imaginary number and it gets the arithmetic of fractions wrong. Until the large language models can be appropriately merged with the math AIs (like Photomath or Wolfram Alpha), engineering faculty do not have much to fear from ChatGPT.  I guess that it will take 5–10 years to do that sort of merging, as the two approaches to AI are not very compatible.

I tried some more “creative” prompts also and tweaking the prompts to get better results. I tried one series of prompts (I won’t show the results for any but the last iteration):

• Write a song to be sung by students with the theme and title “When will I ever need this?”
• Try again but with rhyming verses.
• There is no rhyme there.
• Try again with real rhymes.
• Try again with a blues-song format and general air of depression.
• Try again without the upbeat bridge.
• Remove the current outro and end with singer being lost and forlorn.
• Try again incorporating “1812”, “square root of 1066”, and “the quadratic formula”.

resulting in

Verse 1: Sittin’ in this classroom
Feelin’ like a waste of space
Teacher’s talkin’ at me
But I can’t hear a word he’s sayin’

Chorus: When will I ever need this?
Will it help me find my way?
Will it make me rich or famous?
When will I ever need this?

Verse 2: I ain’t sayin’ it ain’t important
But it just don’t make no sense
Memorizin’ 1812 and the square root of 1066

Chorus: When will I ever need this?
Will it help me find my way?
Will it make me rich or famous?
When will I ever need this?

Outro: Feelin’ lost and forlorn
In this never-endin’ maze
I just don’t know where to turn
When will I ever need this?

Chorus: When will I ever need this?
Will it help me find my way?
Will it make me rich or famous?
When will I ever need this?

The main use case for faculty seems to be creating email templates or assignment prompts,  Here is an example of an email template (with the prompt provided from a question asked by a professor on the subreddit). Prompt: “Write an email telling a student that I will not change your grade because that is the grade you earned, and that there are no more opportunities for extra credit as the term is over.”  I had to reprompt with “Try again without inviting the student to reply.”

Dear Student,

I want to let you know that I have carefully reviewed your work and have determined that the grade you received is an accurate reflection of your performance in the course. As such, I will not be changing your grade.

Furthermore, the term is now over, so there are no more opportunities for extra credit. I understand that you may be disappointed with your grade, but please know that it is my belief that you earned the grade you received through your work in the class.

Sincerely,

The main ways that people have thought of to avoid or detect ChatGPT cheating have included highly technical content that requires math skill; checking citations (ChatGPT likes to fabulate them); making prompts that use a visual image (it will be a while before the large language models are merged with computer vision); requiring web lookup of current events (newer than the model’s training—the models currently do no search); requiring live, in-class writing; and requiring multiple stages of writing process (proposal, outline, draft, edited draft).  I don’t think that the last approach would work, as ChatGPT seems capable of doing outlines and editing drafts.

Someone suggested that real student writing could be detected by the cliched “hooks” that students use, but that is easily faked also: “Write a 200-word essay about cheating using AI, starting with ‘Since the dawn of education, students …’ “

Since the dawn of education, students have always looked for ways to cheat in order to get ahead. With the rise of technology, cheating has become even easier with the use of artificial intelligence (AI). AI can be used to generate answers to tests or homework assignments, or even to write essays.

While using AI to cheat may seem like an easy way to get good grades, it is ultimately a dishonest and unethical way to succeed. Not only does it go against the principles of fair competition and hard work, it also undermines the value of education. By cheating, students are not truly learning and are not gaining the skills and knowledge necessary for future success.

Furthermore, using AI to cheat can also have serious consequences. Students caught cheating can face disciplinary action from their schools, and in some cases, it can even result in expulsion. In addition, using AI to cheat can also have long-term consequences on a student’s future, as it can damage their reputation and make it more difficult to get into college or find a job.

In conclusion, while using AI to cheat may seem like an easy way to get ahead, it is ultimately a dishonest and unethical action that can have serious consequences. It is important for students to understand the importance of hard work and honesty in education, and to resist the temptation to cheat.

I’m convinced that Chegg will be buying a large language model and retraining it on their large database of cheating materials, resulting in an AI that can replace the “experts” that they hire in India. The results from ChatGPT are already about as good as Chegg answers, and training a dedicated CheatGPT bot will undoubtedly increase Chegg’s profit margin (no labor costs for “experts”).

For my Spring quarter class, I will have the students use ChatGPT (assuming it is still free then) to create the summaries that they need to write for the class—they will have to provide ChatGPT with the info and have it turn it into readable prose of about the right length.  I think that this approach will result in more readable summaries than in the past, while still challenging students to come up with the key points that need to be communicated. I suspect that a lot of writing in future will be done by a combination of human and artificial intelligence, and I think that this 2-unit, non-required, P/NP course will be a good way for students to experiment with that approach to writing (with no academic-integrity issues interfering).

2021 December 14

Which cover?

Filed under: Circuits course — gasstationwithoutpumps @ 14:50
Tags: , , ,

My publisher has sent me 3 mock-ups of the cover for the book.  Which of them do you think will sell best?  (I know which one I like best, I think, but that is less important than how well the book will sell.)  I’ve converted their files to PNG for the blog—the real covers have much better resolution.

Peach cover

Blue cover

Brown cover

2021 Dec 28: We’re going with the blue cover.

2021 December 2

Help needed with writing blurb

Filed under: Circuits course — gasstationwithoutpumps @ 08:56
Tags: , , ,

I need to write a draft blurb for my textbook as part of the “promotional questionnaire”, and that is something I’ve always been bad at.  I’ve not been able to make the book sound as good as I think it is. Can anyone provide some suggestions?

Here is what I have so far:

2. Book Information

2.1. Describe the aims and scope of the book.

 This textbook is for a first course on electronics. It assumes no prior electronics experience, but does assume that students have had calculus 1 (single-variable differential calculus) and high-school physics. A key idea of the course is that students need a lot of design experience and hands-on work, rather than a lot of theory. The course is centered around the labs, which are a mix of design labs and measurement/modeling labs. The book is also intended for hobbyists and students on a limited budget to be able to learn from without a course. The inexpensive equipment needed is described in the Preface. The book is intended to take students from knowing no electronics to being able to design and build amplifier and filter circuits for connecting sensors to microcontrollers within 20 weeks.  Students design a digital thermometer, a blood-pressure meter, an optical pulse monitor, an EKG, an audio preamplifier, and a class-D power amplifier.  They also learn how to measure and characterize components, including impedance spectroscopy of a loudspeaker and of electrochemical electrodes.

2.2 Explain why the book is important in the field or market. Feel free to elaborate on the value it can provide to the readers.

 Many educators have seen the need for getting engineering students to do hands-on projects early in their education, but few textbooks exist to support ambitious projects with few prerequisites—most either develop foundational math and never get to design or assume that the foundations have already been covered in a previous course.  This book was deliberately written for a design-first approach, in which the design projects are the center of the course, with just-in-time teaching of concepts as they are needed for the projects. The book focusses on three building-block concepts that are used over and over: voltage dividers, complex impedance, and negative-feedback amplifiers.  Despite the simplicity of these concepts, they provide powerful tools for doing design. The book does not shy away from non-linear components, as it has students design a log-transimpedance amplifier for the optical pulse monitor and uses FETs as switches in the class-D power amplifier. Although the book can certainly be used for teaching electrical engineering majors, it was aimed primarily at non-EE engineering majors (bioengineers).

2.3. Describe 3 key selling points of your book (e.g., how it differs from competing titles; unique treatment of certain topics; new edition/material; prominent authors or contributors).

 This book is centered around the design labs, rather than using labs just to illustrate concepts, the concepts are introduced just in time to support the work of the labs. Design is started right away, rather than building a lot of foundations with the usual empty promise that they will be useful “later”. The labs are mostly centered around the small amount of analog electronics needed for connecting sensors to computers and are chosen to appeal to a wide range of  engineering students, not just electrical engineers. In fact, bioengineering students were the primary audience for the first several years, and many labs are measuring heart function (blood pressure, optical pulse measurement, and EKG). The class-D power-amp lab also introduces H-bridges, which are a major concept for motor controllers and mechatronics. Three basic concepts (voltage dividers, complex impedance, and negative-feedback amplifiers) are used over and over in different ways, encouraging students to learn engineering as creative reuse of building blocks, rather than as memorizing piles of unrelated formulas.

2021 November 24

Contract signed with publisher!

Filed under: Circuits course,Uncategorized — gasstationwithoutpumps @ 10:31
Tags: , , , ,

I’ve just signed a contract with World Scientific Publishing to publish my Applied Analog Electronics textbook.  They first contacted me on 2021 Oct 7 expressing an interest in the book, we met on Zoom on Oct 20, and they had a proposed contract to me by Oct 26, and we had a few back-and-forth rounds of negotiations.  The final contract was sent to me on Nov 19, I signed Nov 21, and they signed Nov 24. So the full process took about 48 days.

Here is the contract:

The most surprising thing in the contract is that they are continuing to let me sell the PDF through Leanpub (and my own web site, if I ever create one).  The royalties per book for Leanpub sales are higher than I’ll get from World Scientific Publishing, and the price will most likely be lower.

I did not use a lawyer in negotiating the contract—I contacted 4 lawyers who specialize in book contracts, but even the cheapest of them was too expensive, as I don’t really expect to make much money on this publishing deal.  I did use two online books:

Now I just have to get the 250MB of source files to the publisher and fill out the promotional questionnaire.  They may want me to make some small changes (like changing the title page).  When they are ready to publish, I’ll have to register the copyright also.

I’ll post here again when the book becomes available in paper.

2021 October 1

Edition 1.3 released today!

Filed under: Circuits course — gasstationwithoutpumps @ 21:50
Tags: , , , , ,

I finally released the new version of the textbook Applied Analog Electronics today at https://leanpub.com/applied_analog_electronics. The book is a little longer than the previous editions:

Edition 1.1 Edition 1.2 Edition 1.3 type
659 673 691 pages
337 342 348 figures
14 14 14 tables
515 523 528 index entries
162 162 169 references

The newest edition adds a new section in the active-filters chapter, some additional explanation at the beginning of the FETs chapter, a constant-current circuit for electroplating the Ag/AgCl electrodes, and a few pieces of advice in the design report guidelines.

The chapter on design report guidelines is available free as a separate publication:
https://leanpub.com/design_report_guidelines

The minimum price is still \$7.99, but I’m doing a special one-month coupon that lowers the price to \$5.99, just for my loyal blog readers! One nice thing about selling through Leanpub is that purchasers get all future editions published through Leanpub as part of the price—the company is trying to encourage authors to publish book drafts through them, rather than waiting until the book is completely polished. That means that people who bought (even with free coupons) earlier versions of the book will get this release for free, and anyone who buys now will get the benefit of future releases. I will still provide coupons for free copies to instructors who are considering using the textbook for a course—contact me if you need a copy!

As before, I am still offering 25¢ rewards for the first report of each error (no matter how small) in the book.

I have recorded video lectures for the book. Playlists are at https://www.youtube.com/playlist?list=PLQCrrTKnAE-97LcrJuUQ_5wKBFil8An9i for the first course and https://www.youtube.com/playlist?list=PLQCrrTKnAE–khjVV52ZWU_Usc3e6KV9J for the second course. The first playlist of 122 videos runs about 27:16 and the second playlist of 50 videos runs about 12 hours, so the average video length is under 14 minutes.

There may be one or two videos added and existing ones may be updated, but the set of lectures is essentially complete. Many still have only automatic closed captioning, but the captions will (slowly) get hand edited.

Next Page »