OpenAI Dev Day

I need to talk about the OpenAI keynote at the developer event this week (https://www.youtube.com/watch?v=U9mJuUkhUzk). There was a perception that ChatGPT was in decline, that the responses were not so good. In this tweet, Mike Young lists several threads on Reddit with the same complaint (https://twitter.com/mikeyoung44/status/1672971689573990400); this paper (https://arxiv.org/pdf/2307.09009.pdf) quantifies the drop in accuracy in the algorithm); and, in this interview (https://olhardigital.com.br/2023/08/22/pro/chatgpt-ja-esta-em-declinio-afirma-neurocientista-da-unifesp/), neuroscientist Álvaro Dias also says that ChatGPT is getting worse. Add to this the ongoing lawsuits for misuse (https://www.bbc.com/news/technology-66164228#:~:text=US%20comedian%20Sarah%20Silverman%20is,of%20the%20firms’ %20AI%20systems.
, https://llmlitigation.com, https://www.ft.com/content/aec1679b-5a34-4dad-9fc9-f4d8cdd124b9, https://www.npr.org/2023/08/16/1194202562/new -york-times-considers-legal-action-against-openai-as-copyright-tensions-swirl). It didn’t seem like a good time but the new news about the event puts ChatGPT in the headlines again.

Now there is the possibility of creating customized versions of ChatGPT for specific needs, without needing to know how to code. I already said that my parameter here is my 16-year-old son who uses the chat every day. He sat down with me on Friday and we did a personalized chat, which receives a text written by him and corrects it using the standards established by the school. We did a test and the recommendations are much more accurate comparing the “normal” model and the “international school” model. And he can share this with his colleagues, it’s a steroid version of custom prompts. OpenAI understood that the common user needs to make their lives easier.

Another example of this is the ability to send attachments (currently limited to 10 files). Before you needed to use a plugin, which sent the document to a service and from there ChatGPT analysed it. We tested this with a meteorological data file, 80MB and bzipped. He was able to open the file and do the analysis. Which brings me to another new feature, the “Data Analysis” agent. This could already be done before, but this personalised chat makes it even easier to discover trends and anomalies. In that file of mine, I must admit that the graphics he put together were better than mine ¯\_(ツ)_/¯

One more? You don’t have to switch modes to create images or browse the web. The algorithm can determine which mode you need for the interaction.

And for the corporate world, two messages: Sam stressed that ChatGPT Enterprise does not use the information submitted for model training, i.e., there is no risk of your spreadsheet with the last quarter’s sales data appearing to your competitor. And that OpenAI has an initiative, called “Copyright Shield”, in which it will bear the legal costs of actions for copyright infringement. The company defends its use of data under the claim of “fair use” under US copyright law, a standard that allows for a more liberal interpretation of copyright law in line with American ideals of free expression.

Exciting!

CSS made easy

Damien Riehl is a technology lawyer and musician. And he doesn’t agree with copyright infringement lawsuits, for him music is mathematics. And if you remember that there are only 8 musical notes, Damien had the brilliant idea of making an algorithm that made all the combinations and put it in the public domain. According to him, this can help in those cases where someone is prosecuted just because they used a combination used by another, and the second person didn’t even know. See the faq at http://allthemusic.info/ to understand better.

I’m not a lawyer, nor am I defending piracy, what caught my attention was the idea of noting that there is a finite space of possibilities. I think there is a fascination in being able to say ‘here’s everything about topic X’, personally that’s what attracted me to the master’s degree. I won’t be arrogant and say that I know everything about Design Thinking but I approached my studies with this objective.

Another topic: Think about the design of an HTML or SPA page, how many different ways are there to do it? We use CSS to control what is displayed. The colors are finite, ranging from #000000 to #FFFFFF; borders are top-bottom-left-right; and so on. Adam Wathan noticed this and developed TailwindCSS. With TailWind, you can write your CSS without leaving your HTML page. See the difference, before, if I wanted my text to be blue and bold, I would do this:

style.css

.info{
color: blue;
font-weight: bold;
}

index.html

<p class="info>
  Lorem Ipsum
</p>

And voilà, bold blue text. TailWindCSS allows you to write directly and it has a library with hundreds and hundreds of possibilities. As soon as you use it in your html, it automatically generates the CSS. This is a detail, an application runs in your terminal and scans your pages to know what to generate:

index.html

<p class="text-blue font-bold">
  Lorem Ipsum
</p>

or very large, bold, underlined, sky blue text centered on the page:

<p class="text-3xl font-bold underline text-sky-400 text-center">
  Lorem Ipsum
</p>

UnoCSS takes the idea further and eliminates the css file completely. In UnoCSS there is a script that analyses your pages at runtime and generates classes for you. And there is no need for an application running in the background. Magic! Note that the way of writing is exactly the same as TailWindCSS.

index.html

<p class="text-blue font-bold">
  Lorem Ipsum
</p>

I’ve been using UnoCSS a lot. But I have my criticisms, the large number of classes can make HTML code verbose, and it’s a fact, your HTML is difficult to understand. And the CSS generated by TailWindCSS is only readable by… TailWind developers 😀.

Additionally, the framework’s reliance on utility classes can lead to a lack of consistency in design across the site, as different people may use different classes to achieve similar effects. And since there is no CSS file maintained by the team, the need to document style choices is essential.

Still, the practicality seems to me to show that frameworks like these will be increasingly popular.

Technology Radar

A new edition of ThoughtWorks’ Technology Radar was published this week.

https://www.thoughtworks.com/content/dam/thoughtworks/documents/radar/2023/09/tr_technology_radar_vol_29_en.pdf

To no one’s surprise, AI is the big theme of this edition, I was however attracted by 2 items:

Mermaid

Mermaid is in the adoption quadrant.

https://mermaid.js.org/

In my current project at ING, we used documentation-as-code from the beginning, except that our choice is PlantUML. What I can comment on my experience, in 3 aspects:

  • Consistency: By treating documentation as code, it becomes easier to maintain consistency between the code and its documentation, especially when it comes to software architecture. We use C4 and when we make structural changes, the diagrams and the new code are versioned in the same PR, showing exactly the evolution of the system;
  • Collaboration: Between engineers is great because it sounds more natural to edit documentation in the same flow as the software is edited. Outside the world of engineers, there is a barrier as it is necessary to know the markup and a point-and-click interface is more intuitive. This is evident in the discussion of the software context, in which interaction with business colleagues is necessary;
  • Automation: This is where documentation-as-code shines. If the team culture encourages comments on your codebase, several diagrams can be automatically generated.

Complexity

It’s difficult for me to agree with the argument that we should embrace complexity in software development. Complexity is something that must be combated in our design, in our implementation, in our processes. Using Cynefin as guide, our goal is to transition from the complex to the complicated and, look, the article uses AI as an example of complexity but AI operates in the complicated, by using patterns and knowledge to deliver decisions and answers.

I remember Dumbledore saying to Harry: “Soon we must all face the choice, between what is right and what is easy”. An architect’s job, and all engineers are architects to some extent, is to resist the temptation of the easiest solution; It is common in these situations to introduce accidental complexity. If we are talking about essential complexity, ok, but we should still fight to reduce it. But I don’t blame Thoughtworks for the approach, Dijkstra once said “complexity sells better”.

https://www.thoughtworks.com/en-us/insights/blog/technology-strategy/why-embracing-complexity-real-challenge-software-today

Read the Radar, it’s always interesting, especially check out what’s close to the adoption level.

API Days

This week I was in London attending the ApiDays event. Once a year I participate in an external event, in addition to studying alone, it is important to meet professional colleagues and talk about what happens in the trenches. To my surprise, AI was not the central topic, I watched around 30 lectures and only 4 were specifically about AI. Two major themes at the event:

API Governance: Emphasis given to the API lifecycle: definition->design->development-> testing->publication->operation. What I’ll take home:

  • The importance of documentation is the central point of your API, whether consumed by developers or read by robots.
  • The role of patterns in design. This is a growing market and your consumers expect you to follow OpenAPI, AsyncAPI, Semantic Versioning, HTTP response codes, Protocol Buffers definition language.
  • Your operation must provide freedom of choice, do not assume a cloud provider, do not force a gateway, be open.

Democratization of APIs: Here there are 2 views that are converging, on the one hand experts say that we should develop APIs thinking about devops and gitops. This vision places great importance on the governance aspects mentioned in the previous item; In addition, this vision highlights interoperability and composability as essential attributes for modern APIs. On the other hand, if we look at the most common composition of companies, only 10% are in the technology area (Gartner research shown in one of the lectures); We have 49% end users and 41% classified as business technologists. These 41% create technology or analysis solutions based on the solutions that the IT areas provide. They coined the term ‘post-API economy world’ to embrace these people who should have easy access to APIs. The simpler it is, the easier it will be for innovative products to emerge from the available information provided. This second vision focuses on open and public APIs, ecosystems and marketplaces.

I will mention 2 tools that I tested at the event and found fantastic:

Superface.ai: OK, there are API catalogs, we know the concept of observability, how do we deal with APIs that are similar but have different formats? Think of wttr.in and OpenWeatherMap, both of which allow you to see if it’s going to rain in London today. But the similarity ends there, it is necessary to write code for each of them. Furthermore, if one of them is unavailable, you are responsible for routing the order. Superface deals with this: (1) you say what your contract is (2) Superface has autonomous agents that discover APIs consistent with your contract and maps your contract to the contract of the APIs it found. (ok, there’s AI here🙂)

Postman mocking servers: I often use Postman to test APIs, and I discovered that you can prototype your API in it. Design your methods, specify contracts from examples, and Postman creates documentation and an endpoint. When I wanted to think about an API, I used httpbin, this is much cooler.

Architecture and AI

When I wrote my Master’s thesis, conceptualizing Creativity was essential and I used J.P. Guildford‘s ideas as a basis: creativity is the ability to exhibit creative behavior to a remarkable degree. He conceptualized creativity as a factor within a general theory of intelligence, involving the divergent thinking that could be developed through interaction between individuals and their environments. His proposal uses divergent cycles, which make it possible to create alternatives to a design problem from different perspectives, and convergent cycles, emphasizing the best option for the problem, with no room for ambiguity.

I’ve been revisiting this topic discussing on Reddit whether ChatGPT can be considered creative and more and more I tend to say “Yes”. Last month an architect suggested me the book “Architecture in the Age of Artificial Intelligence-An introduction to AI for architects“; after all, an architect must have original ideas, could it be replaced by ChatGPT? It’s a short book (180pp) and I recommend reading it, the first 2 chapters are a summary of techniques and how we got here in the field of Artificial Intelligence (but don’t expect anything in depth). The remaining chapters offer the view that knowledge workers like architects will be helped by AI tools but can also be overwhelmed by them. And that it is necessary to anticipate and understand where this happens and prepare. The reports about XKool are fascinating and this Guardian article has great pictures.In my reading, the book considers AI capable of being creative, something that Nick Cave’s latest newsletter dismantles. According to Nick, “ChatGPT is fast-tracking the commodification of the human spirit by mechanising the imagination”, sounds an anachronism to me.

I, as a software developer, also see myself as a knowledge worker and I am studying a lot to be ready. I have also been using my children and their friends to (try) to understand how the next generation sees the world in a few years. Both see a world dominated by AI and fearful of their place in this world. I tell them what I wrote above: be prepared.