DEV Community

Cover image for Asking AI what it thinks programming languages look like!
GrahamTheDev
GrahamTheDev

Posted on

Asking AI what it thinks programming languages look like!

Hey all, long time no see!

Just a random fun post for you today, am I back, am I not? Who knows, but I just wanted to share this!

Oh and if you are wondering who the hell I am and why you are getting notifications for my stuff...I was known as InHuOfficial...hope that helps! πŸ€£πŸ’—

AI and programming languages

So I have been playing with AI art generation lately, mainly through MidJourney AI.

One thing that is always interesting is when you try and generate an image on a specific thing and it is very evident the AI has no idea what that thing is.

So I wondered, does AI have any awareness of programming languages? Even more interestingly, when it doesn't have any knowledge of something, what does it generate instead?

So that is the idea, I generated images for 17 different programming related languages and now it is up to you to try and guess which image is what language!

Have fun!

The languages

I generated images for 17 different languages related to programming (notice how I nicely side-stepped calling HTML and CSS programming languages to avoid that debate 🀣).

These are:

  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • Python
  • Rust
  • Dart
  • Go
  • Swift
  • C#
  • C++
  • Kotlin
  • Ruby
  • Ruby on Rails
  • PHP
  • COBOL (haha)
  • Java

Now that you have that list, see how many of the following you can get, I have given each one a rating on MY perceived difficulty to get them.

The images

Let's start you off with an easy one!

1.

Difficulty: Easy
Several image generations that look like snakes.

2.

Difficulty: Easy
4 image generation, first image is a woman wearing a head scarf holding a cup with steam coming out, second is an ornate teacup, the third is a coffee mug with the side missing revealing huge splashes and waves of colour, the fourth is a young girls face with a gigantic tangle of cogs, gears and industrial  items coming out of the back of her head looking like a headress.

3.

Difficulty: Easy
Several image generations, three of red trains and one of a golden crest with a red gem in the middle.

4.

Difficulty: Easy - Medium
4 image generations, the first is a strange elephant head attached to a strange tree like structure, the second is a colourful splash, the third is a skull combined with some 3d geometric shapes, the fourth is a sea creature that looks like a cross between a whale and a manatee.

5.

Difficulty: Medium
4 image generations, all are people with strange geometric shapes overlayed on them and digital artefacts. Strong orange and dark grey colouring in 2 images.

6.

Difficulty: Hard
4 image generations, first is an old computer that is very dirty and dingey, second is a person on a computer with messy hair, third is a person staring at a strange malformed computer with wires attached to their head, fourth is a strange caricature style drawing of a computer an a tiny person.

7.

Difficulty: Very Easy
4 image generations, 2 of dart boards and 2 of people with geometric shapes on them. The first image says

8.

Difficulty: Easy
4 image generations, 2 rusty trucks, 1 rusty car and 1 rusty piece of machinery, all in a desert setting. One image has the letters

9.

Difficulty: Easy - Medium
4 image generations, 2 of which are strange metalic shapes with random letters on, containing mainly

10.

Difficulty: Hard
4 image generation, first image is a colourful person in armour with some writing

11.

Difficulty: Medium - hard
4 image generation, 2 images are dirty machines that look like old / steampunk computers, one has arms and an image on the screen that looks like

12.

Difficulty: Medium - hard
4 image generation, 3 images are of a bird with short wings, a mid length beak and some strong orange / red colouring around the face. The fourth is of a young woman with blonde hair, in the background is a bright orange pattern that resembles large leaves or large petals.

13.

Difficulty: Easy
4 image generation. first image is a low-poly render of a mountain range with the text

14.

Difficulty: Medium
4 image generation, first image is an old computer, almost steampunk styled, second is some strange shapes that look like the letters

15.

Difficulty: Easy
4 image generation, 3 of the images are 3D renders of strange looking furry creatures, wearing glasses or eye wear. They have strong skin / tan colour combined with a strong turquoise colour. The fourth looks like an alien delivery robot on wheels with strong cream and turquise colouring.

16.

Difficulty: Easy - Medium
4 image generation, all of a young female with striking features. There are strong splashes or red over each image.

17.

Difficulty: Hard
4 image generation, first is an old computer with wires hanging our everywhere, small screen with letters

The answers (spoilers...duh!)

Check how many you got right!
  1. Python
  2. Java
  3. Ruby on Rails
  4. PHP
  5. C#
  6. HTML
  7. Dart
  8. Rust
  9. TypeScript
  10. CSS
  11. COBOL
  12. Swift
  13. Kotlin
  14. C++
  15. Go
  16. Ruby
  17. JavaScript

How did you do?

I hope you enjoyed this silly post, let me know how many you got right in the comments below!

Have a great week everyone, see you soon (maybe? 🀫) πŸ’—

Top comments (24)

Collapse
 
michaeltharrington profile image
Michael Tharrington

This was a lotta fun! πŸ˜€

Collapse
 
grahamthedev profile image
GrahamTheDev

Glad you enjoyed it! πŸ€£πŸ’—

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Brilliant idea, love it, love it, love it.

Didn't get JavaScript until I worked out everything else... HTML I found hard.

Collapse
 
grahamthedev profile image
GrahamTheDev

Yeah JavaScript, HTML and COBOL (if it wasn't for COOLL text) would be really hard.

Glad you enjoyed my silly idea lol!

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Yeah, you've been missed dude.

Collapse
 
aneeqakhan profile image
Aneeqa Khan

I got Ruby on rails, Dart, Rust, Typescript and Kotlin.

Collapse
 
grahamthedev profile image
GrahamTheDev

So how many did you get right?

It is interesting to see where AI has not had an item in a dataset what it comes up with!

Collapse
 
raibtoffoletto profile image
RaΓ­ B. Toffoletto

It helps when it writes down the name (or almost the name) in the image!! πŸ˜‚ I got 6 on first sight, but some I would probably guess with some thought.

Collapse
 
kvetoslavnovak profile image
kvetoslavnovak

Amazing and fun. Did really enjoy it. πŸ˜€

Collapse
 
grahamthedev profile image
GrahamTheDev

Glad you had fun, how many did you get? πŸ’—

Collapse
 
skyjur profile image
Ski • Edited

Cobol was my favorite. I think the picture is pretty ingenious. Its like more modern than steampunk but not as modern as cyberpunk - its Cobolpunk.

Collapse
 
coderamrin profile image
Amrin • Edited

I only got the python one haha

Collapse
 
grahamthedev profile image
GrahamTheDev

Hahaha, AI is obviously too abstract! πŸ€£πŸ’—

Collapse
 
coderamrin profile image
Amrin

yeah

Collapse
 
ironcladdev profile image
Conner Ow

Awesome set of images!

Unfortunately I don't have any idea how many I got right XD

Collapse
 
michaeltharrington profile image
Michael Tharrington

Heads up that you can actually review all the answers at the end of the post!

Collapse
 
grahamthedev profile image
GrahamTheDev

Thanks I used <details><summary> not knowing they didn't work, fixed it now!

Collapse
 
grahamthedev profile image
GrahamTheDev

There is a spoiler section at the bottom, you can see which image is which there to check!

Collapse
 
echofly profile image
echofly

"long time no see" is Chinglish, why do you know this?πŸ˜‚

Collapse
 
grahamthedev profile image
GrahamTheDev

dictionary.cambridge.org/dictionar... it isn't, I think you just read it that way lol! πŸ’—

Collapse
 
leomujo profile image
leomujo

Amazing!