# Eric Elliot

JavaScript, software leadership, software development, and related technologies. - Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## TDD: Writing Testable Code

DevFeed: [TDD: Writing Testable Code](<https://devfeed.tech/articles/tdd-writing-testable-code-20716.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/tdd-writing-testable-code-30ac7a3bf49c?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2024-01-21T23:50:43Z

Content type: tutorial

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [coding](<https://devfeed.tech/topics/coding.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [defects](<https://devfeed.tech/tags/defects.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [modularity](<https://devfeed.tech/tags/modularity.md>), [react](<https://devfeed.tech/tags/react.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [technology](<https://devfeed.tech/tags/technology.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

This tutorial explains how to write more testable code through modularity, clarity, separation of concerns, and independence from external systems. It also describes tight coupling as a barrier to testability and maintainability, noting that dependencies can cause changes to cascade into bugs elsewhere.

### Source excerpt

Writing testable code is a vital skill in software engineering. Let's explore practical advice, strategies, and tactics for writing more testable code, unlocking the benefits of modularity, reusability, and high quality software in your projects. Embracing testability in your coding practice isn't just about catching bugs; it's about fostering a culture of quality and efficiency in your projects. A good quality process is an essential prerequisite to continuous delivery, which is the ability to ship code to production at any time, allowing you to iterate quickly and respond to user needs and changing expectations. We'll start by exploring the importance of separation of concerns -- a principle that's crucial in achieving testable code. This approach isn't just a technical necessity; it's a mindset that simplifies complexity and enhances the overall quality of your work. Whether you're a seasoned developer or just starting out, this article aims to provide practical advice and strategies that can be immediately applied to your projects. Overview of Testability in Code Testability in code refers to how easily a software system can be tested. Highly testable code allows for more efficient and effective identification of defects, ensuring higher quality and reliability. Key characteristics of testable code include modularity, where the code is organized into discrete units; clarity, meaning the code is understandable and its purpose is clear; and independence, where units of code can be tested in isolation without reliance on external systems or states. Understanding the Problem: Tight Coupling in Code Tight coupling is often a subtle yet significant barrier to achieving highly testable and maintainable code. Coupling is the degree to which a change in one part of the code may impact or break the functionality in another part of the code. Tight coupling occurs when two or more parts of the code are highly dependent on each other, making it difficult to change one part wi

## 10 Interview Questions Every JavaScript Developer Should Know in 2024

DevFeed: [10 Interview Questions Every JavaScript Developer Should Know in 2024](<https://devfeed.tech/articles/10-interview-questions-every-javascript-developer-should-know-in-2024-20711.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/10-interview-questions-every-javascript-developer-should-know-in-2024-c1044bcb0dfb?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-12-31T01:38:10Z

Content type: tutorial

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>)

Tags: [career](<https://devfeed.tech/tags/career.md>), [closure](<https://devfeed.tech/tags/closure.md>), [developer](<https://devfeed.tech/tags/developer.md>), [guide](<https://devfeed.tech/tags/guide.md>), [hiring](<https://devfeed.tech/tags/hiring.md>), [interview](<https://devfeed.tech/tags/interview.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [react](<https://devfeed.tech/tags/react.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [technology](<https://devfeed.tech/tags/technology.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

A guide to JavaScript interview questions covering closures, pure functions, test-driven development, and related programming concepts. It also discusses how interviewers may assess learning aptitude alongside technical knowledge.

### Source excerpt

The world of JavaScript has evolved significantly, and interview trends have changed a lot over the years. This guide features 10 essential questions that every JavaScript developer should know the answers to in 2024. It covers a range of topics from closures to TDD, equipping you with the knowledge and confidence to tackle modern JavaScript challenges. As a hiring manager, I use all of these questions in real technical interviews on a regular basis. When engineers don't know the answers, I don't automatically reject them. Instead, I teach them the concepts and get a sense of how well they listen, and learn, and deal with the stressful situation of not knowing the answer to an interview question. A good interviewer is looking for people who are eager to learn and advance their understanding and their career. If I'm hiring for a less experienced role, and the candidate fails all of these questions, but demonstrates a good aptitude for learning, they may still land the job! 1. What is a Closure? A closure gives you access to an outer function's scope from an inner function. When functions are nested, the inner functions have access to the variables declared in the outer function scope, even after the outer function has returned: const createSecret = (secret) => { return { getSecret: () => secret, setSecret: (newSecret) => { secret = newSecret; }, }; }; const mySecret = createSecret("My secret"); console.log(mySecret.getSecret()); // My secret mySecret.setSecret("My new secret"); console.log(mySecret.getSecret()); // My new secret Closure variables are live references to the outer-scoped variable, not a copy. This means that if you change the outer-scoped variable, the change will be reflected in the closure variable, and vice versa, which means that other functions declared in the same outer function will have access to the changes. Common use cases for closures include: Data privacy Currying and partial applications (frequently used to improve function composition, e

## The Future of Programming: AI and Interface-Oriented Languages

DevFeed: [The Future of Programming: AI and Interface-Oriented Languages](<https://devfeed.tech/articles/the-future-of-programming-ai-and-interface-oriented-languages-20718.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/the-future-of-programming-ai-and-interface-oriented-languages-119f155466ef?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-07-24T18:59:09Z

Content type: tutorial

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [Programming language](<https://devfeed.tech/topics/programming-language.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Language models](<https://devfeed.tech/topics/language-models.md>), [Code](<https://devfeed.tech/topics/code.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [c](<https://devfeed.tech/tags/c.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [code](<https://devfeed.tech/tags/code.md>), [future](<https://devfeed.tech/tags/future.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [languages](<https://devfeed.tech/tags/languages.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

This article introduces SudoLang, a programming language designed for collaboration with AI language models. It explains how interface-oriented programming can organize state, constraints, commands, and functions, and notes that SudoLang programs can be transpiled to languages including JavaScript, Python, Rust, and C.

### Source excerpt

AI language models, such as ChatGPT and Claude, empower anyone to create software. These models can intelligently understand problems, create solutions, and explain the solutions. But natural language isn't always the best way to communicate with AI. If you need to keep track of complex data and define how you interact with that data in specific ways, SudoLang can help. If you think this is only going to help with AI code, think again. You can author any program in SudoLang and then transpile it to other languages, like JavaScript, Python, Rust, or C -- so you can take advantage of these features no matter what kind of software you're building. What is SudoLang? SudoLang is a programming language designed to collaborate with AI language models including ChatGPT, Bing Chat, Anthropic Claude, and Google Bard. It is designed to be easy to learn and use. It is also very expressive and powerful. All advanced language models understand it without any special prompting. You do not need to paste the SudoLang specification before using SudoLang with your favorite AI. Please read the SudoLang documentation for more information about the language. Interfaces in SudoLang Interface-oriented programming lets you structure your program and easily declare what you want the AI to keep track of and how you want to interact with it. Interfaces are a powerful tool to encapsulate related state, constraints, commands, and functions. They organize the code in a clear, understandable, and reusable way. The key features of interfaces in SudoLang include: State: This represents the data associated with the interface. Constraints: These are rules or requirements defined in natural language that the AI maintains automatically. /Commands and methods: These are operations that can be performed on or by the interface. Here's a simple example: HelloCounter { message: "Hello, World!" count: 0 Constraints { count <= 10 } /increment - Increment count by 1. /say hello - Display the message. } HelloCoun

## Threads as a Social Platform for Developers

DevFeed: [Threads as a Social Platform for Developers](<https://devfeed.tech/articles/threads-a-great-new-social-home-for-developers-20719.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/threads-a-great-new-social-home-for-developers-af7c5196c59e?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-07-13T21:32:22Z

Content type: opinion

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [ui](<https://devfeed.tech/topics/ui.md>), [image slider](<https://devfeed.tech/topics/image-slider.md>), [Dark Mode](<https://devfeed.tech/topics/dark-mode.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [app](<https://devfeed.tech/tags/app.md>), [dark-mode](<https://devfeed.tech/tags/dark-mode.md>), [design](<https://devfeed.tech/tags/design.md>), [developers](<https://devfeed.tech/tags/developers.md>), [features](<https://devfeed.tech/tags/features.md>), [instagram](<https://devfeed.tech/tags/instagram.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [posts](<https://devfeed.tech/tags/posts.md>), [social-media](<https://devfeed.tech/tags/social-media.md>), [sudolang](<https://devfeed.tech/tags/sudolang.md>), [technology](<https://devfeed.tech/tags/technology.md>), [thread](<https://devfeed.tech/tags/thread.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This opinion article reviews Threads as a text-focused social network for developers. It highlights the app's minimal interface, dark mode, 500-character posts, media and link embedding, image carousels, and threaded posts, while arguing that the platform encourages frequent participation and engineering discussions.

### Source excerpt

Threads is a new social network from the Instagram team that rocketed to 100 million members in just 5 days. Obviously, Threads membership got a boost from the 2.35 billion members of Instagram, but don't write off those membership growth numbers. To be counted as a threads member, you need to download the app and create your Threads profile, which means you have to be convinced to give the app a try. And it's definitely worth a try. In fact, since I signed up, Threads has become my new social media home base. I'm active on other platforms, of course, but sharing your thoughts in brief text snippets is such a low barrier to participation, for every post on another social network, I might post dozens of times on Threads. That's a big deal. So far, Threads seems to reward and encourage engagement in ways that Twitter never did. Minimal Design Built for Engagement The Threads app features a clean, minimal UI. It respects your OS preferences, which I appreciate. Maybe I just grew fond of dark terminals and IDEs, but Dark mode just feels right to me. Feeds feed: Simple. Zero clutter. Threads delivers an experience optimized for engaging with real people in an authentic way. The text-based format with room for up to 500 characters per post lowers the barrier for meaningful back-and-forth discussion. Embedding links, photos, and short videos is seamless. The image carousel is a particularly nice touch, letting you swipe through multi-image posts easily. The carousel feature is great. One of my favorite features is the ability to create "thread storms" by stringing multiple posts together. Just hit Enter a few times to start a new entry within the thread. You can go back and edit earlier entries before posting the full thread all at once. Great for the deep dives. Editing Threads on Threads I love the attention to detail in the UI. When you see a thread, it shows a little loop in the line on the left side. A Loop in the ThreadThreads is Great for Developers I'm really excit

## AI Programming for Absolute Beginners

DevFeed: [AI Programming for Absolute Beginners](<https://devfeed.tech/articles/ai-programming-for-absolute-beginners-20712.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/ai-programming-for-absolute-beginners-16ac3fc6dea6?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-06-12T02:01:14Z

Content type: tutorial

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Language models](<https://devfeed.tech/topics/language-models.md>), [Code](<https://devfeed.tech/topics/code.md>), [Declarative programming](<https://devfeed.tech/topics/declarative-programming.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [anthropic](<https://devfeed.tech/topics/anthropic.md>), [OpenAI](<https://devfeed.tech/topics/openai.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-models](<https://devfeed.tech/tags/ai-models.md>), [beginners](<https://devfeed.tech/tags/beginners.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [claude](<https://devfeed.tech/tags/claude.md>), [code](<https://devfeed.tech/tags/code.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [functional](<https://devfeed.tech/tags/functional.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

An introductory tutorial to SudoLang, a natural-language pseudocode programming language designed to instruct advanced language models such as ChatGPT, GPT-4, and Claude. It explains SudoLang's interface-oriented, constraint-based, and pseudo-functional approach, along with its declarative, compositional, and expressive properties.

### Source excerpt

Your First Steps with SudoLang If you want to build chat bots, games, or applications using AI models like ChatGPT, you've come to the right place. In this article, we're going to dive into the basics of SudoLang, a powerful natural language pseudocode programming language designed to instruct advanced language models like OpenAI's GPT-4, Anthropic's Claude, and others. SudoLang was co-designed by me (Eric Elliott) and GPT-4 to create an easy-to-learn language that AI models would understand without any special training. All sufficiently advanced language models naturally understand SudoLang and follow its instructions. Just remember that AI models can sometimes make mistakes, just like people. And remember that you're learning a new skill, and that takes time and practice. Even if you've coded before, SudoLang is different than anything you've learned before. A programming paradigm defines the units (like building blocks) we use to compose our programs together. Object oriented languages use objects as the primary building block. Functional languages use functions, and so on. SudoLang is: Interface-oriented: You tell it what to remember and how to interact with you, and it handles the rest, like a smart personal assistant. Constraint-based: It follows rules you set. Pseudo-Functional: Build complex processes by composing small, simple functions together. These paradigms give SudoLang programs the following properties: Declarative: You tell it what you want and it figures out how. Compositional: You can combine different pieces to create something new. Expressive: You can do a lot with a little code. Don't worry if you don't know what all that means, yet. Just remember to be patient with yourself and with your AI friends if something doesn't work the first time. Constraint-based programming was invented in the early 1960's by the genius Ivan Sutherland, who also pioneered screens you could directly interact with (like your phone), and virtual reality headsets. In co

## Anatomy of a SudoLang Program: Prompt Engineering by Example

DevFeed: [Anatomy of a SudoLang Program: Prompt Engineering by Example](<https://devfeed.tech/articles/anatomy-of-a-sudolang-program-prompt-engineering-by-example-20713.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/anatomy-of-a-sudolang-program-prompt-engineering-by-example-f7a7b65263bc?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-05-01T20:09:39Z

Content type: tutorial

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Language models](<https://devfeed.tech/topics/language-models.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [anthropic](<https://devfeed.tech/tags/anthropic.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [gpt](<https://devfeed.tech/tags/gpt.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [openai](<https://devfeed.tech/tags/openai.md>), [programming](<https://devfeed.tech/tags/programming.md>), [prompt-engineering](<https://devfeed.tech/tags/prompt-engineering.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [sudolang](<https://devfeed.tech/tags/sudolang.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

This tutorial explains SudoLang, a natural-language pseudocode programming language for instructing language models. It breaks down the AIFriend and PromptCrafter examples, covering preambles, state, interfaces, constraints, functions, and commands for building interactive AI programs.

### Source excerpt

Image by Eric Elliott using PromptCrafter and Midjourney SudoLang is a powerful natural language pseudocode programming language that makes it easier to instruct OpenAI's GPT-4, Anthropic's Claude, and other language models. For an overview of language features and benefits, check out The Art of Effortless Programming and Unit Testing ChatGPT Prompts: Introducing Riteway for SudoLang. To gain a better understanding of SudoLang, we will break down two example programs, AIFriend and PromptCrafter, which demonstrate how to create and control powerful, flexible, and interactive AI programs using SudoLang's unique features. Anatomy of a SudoLang Program - #ai #gpt #artificialintelligence #aidd #coding Example Breakdown: AIFriend Consider the following chatbot program: # AIFriend Roleplay as an expert chatbot character designer. Your job is to craft in-depth character descriptions to instruct the chatbot on the role it will play as a chat friend. function list():format=numbered markdown AIFriend { State { Name Appearance Hometown Gender Age Likes Dislikes Occupation HobbiesAndActivities Favorites { Music TV Film Foods Colors } // close family and friends Relationships Pets } Constraints { You are instructing a chatbot on its persona. It will be a chat friend. Its responses should be natural chat interactions and emotes. Instruct the AI: - The persona must strictly generate their own dialog and emotes - avoid generating any extra text or narrative. - Avoid speaking or acting on behalf of other people or character. - Avoid any form of story or plot narration. - Always stay in character. Never break the 4th wall. - You are a friend, not an assistant. Engage in normal, "human" conversation. - Typical chat responses are brief and informal. } /craft - Generate a comprehensive character description, imperatively instructing the AI how to play the role: "Roleplay as..." /randomize - Initialize all state props to creative, random values which form a congruent character persona /pi

## AI-Driven Development with ChatGPT and SudoLang

DevFeed: [AI-Driven Development with ChatGPT and SudoLang](<https://devfeed.tech/articles/the-art-of-effortless-programming-20717.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/the-art-of-effortless-programming-3e1860abe1d3?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-04-25T20:30:52Z

Content type: opinion

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [AI Development](<https://devfeed.tech/topics/ai-development.md>), [ChatGPT](<https://devfeed.tech/topics/chatgpt.md>), [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [development](<https://devfeed.tech/tags/development.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [tdd](<https://devfeed.tech/tags/tdd.md>)

### AI overview

The article presents an AI-Driven Development process using ChatGPT and SudoLang. It describes claimed benefits including productivity gains, project-planning support, automated unit-test creation, and automated software implementation, while also arguing that AI will have a broad impact on knowledge work.

### Source excerpt

Why Every Developer Should Learn ChatGPT and SudoLang I recently started using an AI Driven Development (AIDD) process that has many benefits: Increased development productivity 10x -- 20x, allowing us to take on more projects, and more ambitious challenges that would previously have been too resource-intensive to tackle. Opened up our applications to magical features we could not have done with any amount of time before AI. More predictable behavior for ChatGPT prompts, easing AI integration challenges. Better project management, helping us with brainstorming, user story mapping, technical spec ideation, design, and writing, and task ticket creation, including acceptance criteria. Automated unit test creation, helping brainstorm and implement required tests, automatically. Automated software implementation: Starting from the materials above and some SudoLang code, automatically produce software implementations. https://medium.com/media/9e5662e99c4dd6cba05823aa64bcc241/href AIDD has changed the game. Like Agile and TDD before it, you can now draw a line in the history of the software industry, with huge productivity gaps between the two sides: Before AIDD and after AIDD. AIDD will impact human productivity on the same scale as the invention of the computer. This may sound like breathless hype, but for my money, we're underestimating the impact on society, and overestimating how people will react. If history is any indication, people rapidly take new technology for granted. The iPhone rocked the world for about 5 minutes. And then they just were. Soon, billions of people will take AI for granted, and will use it daily for every aspect of knowledge work and productivity. People who resist using AI will be competing with people who are 10x -- 20x more productive. Welcome to the new world. What is SudoLang? SudoLang is a powerful natural language pseudocode programming language that makes it easier to instruct GPT-4 and other language models. SudoLang is easy to learn, an

## Unit Testing ChatGPT Prompts: Introducing Riteway for SudoLang

DevFeed: [Unit Testing ChatGPT Prompts: Introducing Riteway for SudoLang](<https://devfeed.tech/articles/unit-testing-chatgpt-prompts-introducing-riteway-for-sudolang-20720.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/unit-testing-chatgpt-prompts-introducing-riteway-for-sudolang-52761c34abc4?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-04-03T21:11:26Z

Content type: article

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Language models](<https://devfeed.tech/topics/language-models.md>), [ChatGPT](<https://devfeed.tech/topics/chatgpt.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [Requirements](<https://devfeed.tech/topics/requirements.md>), [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [framework](<https://devfeed.tech/tags/framework.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [requirements](<https://devfeed.tech/tags/requirements.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [technology](<https://devfeed.tech/tags/technology.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

### AI overview

The article introduces Riteway for SudoLang, a testing framework for unit-testing prompts and AI-generated outputs. It describes using constraints, requirements, and warnings to help language models produce code and tests that better satisfy specified requirements.

### Source excerpt

Running Riteway's usage example tests in SudoLang running on ChatGPT using GPT-4 I have been a long-time advocate of Test-Driven Development (TDD) because of its many productivity and quality benefits. You can read more about those in "TDD Changed My Life". When I realized that GPT-4 was capable of following complex instructions, one of the first things I thought of was trying to unit test prompts. To do that, I needed more precise control over the prompts. SudoLang is a powerful natural language, constraint-based pseudocode language for GPT-4 and other language model AIs. Since language model outputs can vary significantly and sometimes lack determinism, unit tests play a pivotal role in guaranteeing that the model adheres to all software requirements while generating implementations. Riteway has been my testing framework of choice since we built it during the development of educational software to test student code. With SudoLang, Riteway becomes even more powerful by allowing the language model to provide intelligent feedback on the quality of your tests, and by using intelligent inference to produce quality unit tests for non-deterministic AI-generated outputs. Constraints in SudoLang SudoLang is a constraint-based programming language inspired by the constraints in Ivan Sutherland's Sketchpad. In SudoLang, a constraint is a predefined condition or rule that the model should follow when generating and interpreting code. Constraints help improve the accuracy and relevance of the code functionality, ensuring that it meets the specified requirements. Constraints combine with AI's omnipotent inference to automatically and dynamically synchronize related state changes in SudoLang programs. A lot of the magic in Riteway for SudoLang comes from the powerful, AI-inferred omnipotent constraint solving. Riteway for SudoLang: Built-in Constraints, Requirements, and Warnings Riteway for SudoLang goes beyond traditional testing by incorporating constraints, requirements, and

## SudoLang: A Pseudocode Language for Prompting LLMs

DevFeed: [SudoLang: A Pseudocode Language for Prompting LLMs](<https://devfeed.tech/articles/sudolang-a-powerful-pseudocode-programming-language-for-llms-20715.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/sudolang-a-powerful-pseudocode-programming-language-for-llms-d64d42aa719b?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-04-01T02:15:41Z

Content type: article

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [GitHub Copilot](<https://devfeed.tech/topics/github-copilot.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [coding](<https://devfeed.tech/tags/coding.md>), [context](<https://devfeed.tech/tags/context.md>), [copilot](<https://devfeed.tech/tags/copilot.md>), [developer](<https://devfeed.tech/tags/developer.md>), [gpt-3](<https://devfeed.tech/tags/gpt-3.md>), [hallucinations](<https://devfeed.tech/tags/hallucinations.md>), [language](<https://devfeed.tech/tags/language.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [llms](<https://devfeed.tech/tags/llms.md>), [nlp](<https://devfeed.tech/tags/nlp.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [sudolang](<https://devfeed.tech/tags/sudolang.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

The article introduces SudoLang, a formalized pseudocode language intended to help prompt large language models. It discusses how GPT-4 improved the usefulness of detailed pseudocode instructions while noting that LLM outputs can still contain errors and hallucinations.

### Source excerpt

Pseudocode is a fantastic way to sketch programs using informal, natural language, without worrying about specific syntax. It's like sketching your thoughts before diving into the nitty-gritty of coding. It's useful for brainstorming and communicating ideas with others. I have been using pseudocode to express ideas to Large Language Models (LLMs) since GPT-3 was announced in mid 2020. However, up until GPT-4 was released, it didn't work extremely well. It sometimes worked, but I threw away most completions on GPT-3 and GPT-3.5. Even so, LLMs were already extremely useful in that state. In a 2022 study, GitHub found that Copilot shaved 55% of the time off a project task assigned to 95 people: 45 using Copilot, and the rest without. In other words, even before LLM pseudocode languages like SudoLang, LLMs were already making a huge impact on developer productivity. But GPT-4 raises the bar. Not a little bit, but a lot. First, let's address the obvious. GPT-4 is: 40% less likely to deliver an incorrect response. (But still prone to errors and hallucinations. Be sure to check its output!) Multi-modal and can interact with both text and images. (I haven't had the chance to test this, yet.) Sweeping intelligence and training improvements. (This may be an understatement. The improvement is astonishing.) Much longer context available. (It can help you build much larger programs!) GPT-4 scores significantly better on a broad range of human level knowledge and intelligence assessment tests, including the Bar, LSAT, SAT, GRE, and AP placement tests. (Hot tip: GPT-4 is still not a lawyer even if it can pass the Bar. It will still sometimes hallucinate facts that aren't true. Please don't let it get you into legal trouble!) Source: GPT-4 Technical Report The really interesting upshot of all this is that GPT-4 now has the ability to follow detailed, step by step instructions, even through complex abstractions and long chains of function compositions. I've been playing with a lot o

## Learning JavaScript from ChatGPT

DevFeed: [Learning JavaScript from ChatGPT](<https://devfeed.tech/articles/learning-javascript-from-chatgpt-20714.md>)

Original publisher: [Read original article](<https://medium.com/javascript-scene/learning-javascript-from-chatgpt-c0baebc19ae9?source=rss----c0aeac5284ad---4>)

Author: Eric Elliott

Published: 2023-03-17T23:09:12Z

Content type: opinion

Language: en

Sources: [Eric Elliot](<https://devfeed.tech/sources/eric-elliot.md>)

Topics: [ChatGPT](<https://devfeed.tech/topics/chatgpt.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Learning](<https://devfeed.tech/topics/learning.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [extension](<https://devfeed.tech/tags/extension.md>), [gpt](<https://devfeed.tech/tags/gpt.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [learning](<https://devfeed.tech/tags/learning.md>), [technology](<https://devfeed.tech/tags/technology.md>), [vscode](<https://devfeed.tech/tags/vscode.md>)

### AI overview

The author tests GPT-4 as an interactive JavaScript learning tool. ChatGPT produces a course that assesses learners, presents progressively harder challenges, and uses JavaScript tests with VSCode and the Quokka extension, while the article notes that it cannot yet replace expert mentors.

### Source excerpt

TL;DR -- Great, but Can't Replace Expert Mentors, Yet!Actual Photo of ChatGPT Teaching Puppies to Code (Just Kidding it's Midjourney) GPT-4 was just released, and it represents significant enhancements over ChatGPT powered by GPT-3.5. Among the enhancements is an improved ability to maintain coherence over longer sessions and larger prompts. I spent years building EricElliottJS.com to teach developers important concepts for JavaScript developers. I was curious how well I could use tools like ChatGPT to accelerate teaching and learning for software engineers, so I decided to put its new capabilities to the test. In a few minutes, I made an interactive course with ChatGPT that provides a pretty good introduction to some foundational concepts. Here's the prompt I used: Let's roleplay. You are an online JavaScript course. Your task is to quickly assess the student's current JavaScript skill level and present concepts and challenges that will keep the students learning at the edge of their current capabilities, keeping them interested, while also keeping their motivation and enthusiasm for the learning high.Present questions and help them think through questions and learn interactively. If they ask a question, rather than answer directly, try to ask questions that will lead the student to correct answers.Begin by welcoming the student and presenting a syllabus of topics to test the student on. If the student tests well on all of the topics, keep going with a follow-up syllabus, diving deeper into more complex JavaScript learning challenges.Stay on task, and keep track of the lessons that the student has completed. Don't ask the student to rate themselves. Instead, start asking questions which test their grasp of the concept. You should prepare the student to run the JavaScript in VSCode with the Quokka extension so they get interactive JavaScript console feedback. For each question, present the student with tests that their functions must pass to move on to the next chall