Earlier quoted context omitted.
Does it matter if the code looks ugly or not? End users are not going to see the UI. If i have an AI in my toolbox that autoconverts designs to Code, within a minute. It would speed up my development time by a lot!
It matters because ugly code is probably also slow code (consider loading of unnecessary resources, and consider an excessively complex DOM). And probably also a page lacking accessibility.
Training an AI to convert design mockups into HTML and CSS
61–70 of 109 posts
Re: Training an AI to convert design mockups into HTML and CSS
#62Aren't there a bunch of WYSIWYG tools for creating appearance and HTML/CSS together? Years ago when I looked, these existed (but designers prefered photoshop just because). I mean, I'd assume also there's normally a give-and-take between designer, CSS-artist and client. The question is whether the neural network can also learn to take calls at 3am from a client wanting a different shade of aqua.
Just have the AI include a duck with every creation.
Re: Training an AI to convert design mockups into HTML and CSS
#63This is what we are all working for. If we can automate the stupid stuff we do then we can work on other interesting stuff and automate it too. I don't understand why we aren't all working on automating everything that we do. Every line of code you pulled out of the code mine today is finite and given a business logic rule engine it's outcome could have been generated.
> automate the stupid stuff Stupid is subjective :) I'd be happy to automate backend development and focus on a top notch UX and great front-end experience.
Re: Training an AI to convert design mockups into HTML and CSS
#64Earlier quoted context omitted.
I see this attitude all the time while people are being automated out of their jobs. Those people end up getting laid off anyway, and then wondering why jobs for their skillset don't pay as much as they used to. Resisting automation doesn't help, because if you don't do it, someone else eventually will. If you're in a job that's at risk of being automated in the near term, you're much better off learning how to autom…
It's not always that straightforward. I automated my job once, as a junior dev. My "job" (if you can call it that) was copying a web app's configuration off an Excel file, pasting it into a text file, converting it into XML by hand, feeding it into a program that converted it to SQL and finally running the SQL to create a database. Normally, I'd then have to tear it down again and start all over- because hand-crafted…
Perhaps you should find a new place to work. There are engineering firms that value talent and capability. While it's still important to be aware of business needs and deadlines, that doesn't mean you can't have a solid engineering culture coupled to the business vision.
Re: Training an AI to convert design mockups into HTML and CSS
#65The example mockup image shown is really unimpressive. As usual, the difficulty is in implementing the last 20% of edge cases and design subtleties, not well-defined black-and-white block layouts like the given example. It would've been simpler to build a classical program to handle that example, and the result would be much better and more predictably structured. It's like programming a self-driving car for a 2D gam…
Re: Training an AI to convert design mockups into HTML and CSS
#66>chrisfosterelli: This is a neural network that takes an image and predicts very simple blocks (like BODY, TEXT, BTN-GREEN in the bootstrap example) and then uses a map to convert them to well-formed HTML
>jamesjyu: I've always wanted to do a contest with other frontend coders to see who could get closest to a complex layout—like the NYTimes—in one go. >>janneklouman: these types of contests exist! I went to one of these[1] maybe two years ago in Stockholm and I had a blast [1] http://codeinthedark.com/
Pix2code: Generating Code from a GUI Screenshot | https://news.ycombinator.com/item?id=14416530 (May 2017)
Re: Training an AI to convert design mockups into HTML and CSS
#67Earlier quoted context omitted.
1) Because that's how most designers create layouts who can't code an not really interested in doing so. 2) It demonstrates AI capabilities on a new level. 3) If you design in PS or Sketch, then you will create more interesting layouts, because you won't skip things that are inconvenient or hard to do.
Does anyone use SketchApp to design at all? Just curious, I thought Photoshop was being replaced..
Re: Training an AI to convert design mockups into HTML and CSS
#68Earlier quoted context omitted.
If we think AI would not do awesome code, then we're ignoring the achievements of many of the AI bots. I saw an LOL bot outperform lots of world class videogamers. What makes you think a bot will not outperform any HTML/CSS frontend dev.
Right now, context. The ai will outperform us. But it currently lacks a lot of data to do so. A mock up is only a small part of the data and feedback loop you need to create a ui.
Re: Training an AI to convert design mockups into HTML and CSS
#69Earlier quoted context omitted.
Here is a silly question Why will everyone need jobs if so much stuff is automated? Why not just give out free money?
You have to collect the money from somewhere (printing it counts as “from savings accounts”), and the people you collect it from have, historically, tended to resist this any way they can. I’m not saying this problem can’t be solved — I rather hope it can — but that’s why it is still an open problem.
Re: Training an AI to convert design mockups into HTML and CSS
#70The final html code from the first example is not that bad. There's the usual problem of beginner coders of too much div wrapping that probably isn't really necessary. I'm curious if the system can also create the css. The css also suggests a beginner coder, such as an overuse of unnecessary clear classes because of the overuse of floats for layout. Or having extra class names for things that are easily handled by a parent class reference, such as a "last" class on the last li in the list. Although, it appears the css is just a template obtained online. More on that later.
The second example using bootstrap is a soft failure in my eyes. Although the html does render correctly in the browser, which is because browsers do their best to render crappy html, the code is rough. The main problem is it decided to render the head element as a header element. Compared to the first example I'm shocked that this is the generated output. The usage of bootstrap does pose an interesting thought in that the content section of the html is more precise than the first example.
My reaction to this is it's a decent try at generating a website based on very strict rules assuming that more than half of the website creation process still requires a human to complete. For example, I could see this working quite well if one were to design your mockups strictly be bootstrap, or a template, and provide that css beforehand. If the mockup is custom outside of the template/bootstrap css then it'll have to generate that css itself. Which I think I'm more curious if that's possible. Generating html is easy as you can establish ground rules of "use this series of nested elements for this situation" and so on. The examples provided could just as easily be created by a drag-and-drop system that allows a non-coder to build a basic website. For that matter, use a markdown to bootstrap converter and train your writers/editors on the bootstrap basics and off you go.
But it sure did look like a fun learning exercise. As a front end dev, I'm not worried over my future and would be curious to see where it goes.