bitstorm.org

Weblog by Edwin Martin about frontend webdevelopment and related topics

How can machine learning help a frontend developer?

Drawing of a woman working on computer being assisted by a robot

Machine learning is a subfield of artificial intelligence that focuses on developing algorithms that are able to automatically learn and improve based on data. This technology can help front-end web developers by providing them with powerful tools and techniques to solve complex problems and improve and accelerate their work.

There are several ways machine learning can help front-end developers. For example, machine learning algorithms can be used to analyze and predict data, which can help optimize the user experience of a website or web application. Machine learning can also be used to automatically recognize patterns and classify data, which can help develop more intelligent and advanced user interfaces.

In addition, machine learning can help front-end developers by providing them with powerful tools and techniques to improve and accelerate their work. For example, machine learning can be used to write and maintain code, which can help reduce errors and shorten development time. Machine learning can also be used to manage and update dependencies, which can help simplify and streamline the development process.

Overall, machine learning can help front-end developers by providing them with powerful tools and techniques to solve complex problems and improve and accelerate their work. By harnessing the power of machine learning, front-end developers can improve their skills and contribute to the creation of innovative and advanced websites and web applications.

Content generation

I did not write the above text myself, but had it written by ChatGPT. I had the drawing drawn by Midjourney.

This would not have been possible a month ago, or with much lower quality. Both the text and the image were created using engines released in November 2021. Developments are moving very quickly, if you look at the progress that has been made in the last few years. The engines will only get better in the coming years.

AI, ML, DL: what is it actually about?

AI (artificial intelligence) is the umbrella term for anything a computer does that would otherwise require a human brain, such as translation, object recognition, speech recognition, driver assistance and so on.

ML (machine learning) is the term for machine learning feeding it with data whereby a model is created from this data that contains all accumulated knowledge. Think of thousands of photos of birds with their names birds.

DL (deep learning) is machine learning, which uses multiple processing layers.

Neural network is the technique used in machine learning and is inspired by how brains work.

Practical examples you can use now

Suppose you have to create a page for a client about a motorized three-way ball valve and you don’t know what it is and the client can’t come up with a text either. You could then have AI generate a description for the product, complete with a list of pros and cons and name alternative products.

If you want to write a text yourself, there are solutions such as Lex that will assist you with writing.

Some web pages contain a lot of text. You can make it a bit more interesting by: add one or two pictures. You can now easily generate that, like I did did this article. I generated the image for this article with the prompt “home office, happy woman working on laptop, giant cute friendly robot helping her, ghibli style, dramatic”. The drawing does contain several things that are not really correct.

You can also generate background images for a webpage. If you want, you can even connect them seamlessly.

AI generated drawing of pastel leaves

It can also help you with development. This year, GitHub Copilot was released, a tool that provides suggestions while writing code. Some developers have tried it out, but removed it again, but I also hear stories from developers who are very enthusiastic about it.

ChatGPT can also help you, because you can also ask programming questions there.

ChatGPT gives good answer to JavaScript question

Other examples where AI can help is creating a multilingual website and writing alternative texts for images.

Many AI services also offer APIs, allowing you to automate some things.

I also tried to generate a website layout, but again, but that didn’t really work well. This is the result of the “good website user interface” prompt. I don’t think many people will find this a good website user interface.

AI generated website interface that looks impressive but is hardly useful

Try it yourself

You can try most AI services for free.

Objections

With every new development there are doomsayers, but there are a number of points we should pay attention to with these developments.

In 2016, Microsoft launched a self-learning chatbot Tay. Users fed the chatbot with racist texts and at one point the chatbot started saying racist things itself.

Twitter taught Microsoft’s AI chatbot to be a racist asshole in less than a day

Or, in 2018, Amazon’s AI recruitment tool. He saw that most developers were male which made it less likely for women to apply for a job.

Amazon scraps secret AI recruiting tool that showed bias against women

A lawsuit has been filed against GitHub Copilot because Copilot uses all source code used on GitHub, including code that is not open source and code that requires attribution is required. Copilot says it combines code from multiple sources and so there no single source can be identified.

GitHub Copilot litigation

The ruling of this case could also have consequences for many other AI services.

Apart from the judiciary, you can also ask yourself whether you want people is extracted from content creation.

Re: AI for content creation

It is almost certain that AI will change our world.

Follow it, use it, but remain critical and be alert to the side effects.