Live data from Hacker News

I think I need to go lie down

twitter.com

441–450 of 475 posts

Re: I think I need to go lie down

#441

I gave it a mockup from a FB interview question (two lists of checkboxes with two buttons to swap checked items between them) and it nailed it: https://gist.github.com/milesrichardson/2a2f77d4bfb19c3b28dc...

insane, I never thought that `toList.appendChild(item.closest('li'));` would MOVE the item. You learn something every day

Yeah, to the extent "I need to lie down," it's actually due to the features I didn't even know existed. In that followup with the accessibility corrections, I had no idea you could even do those things...

Re: I think I need to go lie down

#442
post #270

Earlier quoted context omitted.

I’d say nobody who “hand crafts” code finds any generated code readable. AI almost puts a dent in that, but even that often produces really ugly code.

People also produce really ugly code.

That's why any good company has code review rules and required linters and push restrictions, etc.

Re: I think I need to go lie down

#443

The system prompt used as found in the repo: ``` You are an expert tailwind developer. A user will provide you with a low-fidelity wireframe of an application and you will return a single html file that uses tailwind to create the website. They may also provide you with the html of a previous design that they want you to iterate from. Carry out any changes they request from you. In the wireframe, the previous design'…

"creative license" in plain English, means essentially "don't worry too much about constraints, do what you feel will is best." I don't think it has anything to do with software licenses.

As in https://www.google.com/search?q=poetic+license, e.g. misuse a word to make a rhyme.

Re: I think I need to go lie down

#444
post #252

Earlier quoted context omitted.

Not sure about Dreamweaver, but the fact that no Frontpage equivalent exists this day and age, and armies of developers are grappling with HTML, React and GraphQL (e.g. Gatsby) to generate what are essentially websites, is very surprising.

I'd like to talk about today's sponsor, Squarespace. (in Jest, I know it doesn't solve every problem!)

For some weird reason, "Squarespace" keeps reminding me of a location-based social network from the early 2000's. Did I imagine that? Or did the domain and trademark get bought?

Re: I think I need to go lie down

#445
post #319

Earlier quoted context omitted.

Do you really care about extensibility and maintenance when you could just generate an entirely new component when you want more features or need to upgrade the library?

If the team that came up with the prototype assumes that responsibility, then no, I don't. I'm sure an AI will understand how to refactor the codebase on an adhoc basis without creating any problems down the line.

Not a matter of refactoring. AI should ideally regenerate the code from the spec each time the requirements change. "Programming" won't go away, but it will refer to working with specification languages, not implementation languages.

In the best of all possible worlds, you'd have to deal with the C++ or JavaScript code about as often you have to dig into the x86 or ARM assembly code now.

Re: I think I need to go lie down

#446
post #444

Earlier quoted context omitted.

I'd like to talk about today's sponsor, Squarespace. (in Jest, I know it doesn't solve every problem!)

For some weird reason, "Squarespace" keeps reminding me of a location-based social network from the early 2000's. Did I imagine that? Or did the domain and trademark get bought?

You might be thinking of “Foursquare” :)

Re: I think I need to go lie down

#447
post #33

Such recent demos show both how impressively ML/AI has advanced recently, and how unimpressively repetitive and unoriginal tasks keep being reimplemented by millions of developers worldwide. Since most UI screens can be accurately described in one or two paragraphs, it's no wonder they can be represented in much detail in a relatively small embedding vector.

[deleted]

Re: I think I need to go lie down

#448

I gave it a mockup from a FB interview question (two lists of checkboxes with two buttons to swap checked items between them) and it nailed it: https://gist.github.com/milesrichardson/2a2f77d4bfb19c3b28dc...

insane, I never thought that `toList.appendChild(item.closest('li'));` would MOVE the item. You learn something every day

[deleted]

Re: I think I need to go lie down

#449

I gave it a mockup from a FB interview question (two lists of checkboxes with two buttons to swap checked items between them) and it nailed it: https://gist.github.com/milesrichardson/2a2f77d4bfb19c3b28dc...

insane, I never thought that `toList.appendChild(item.closest('li'));` would MOVE the item. You learn something every day

If you add a DOM node somewhere, it’s first removed from where it was because it can only exist in one place. You need to clone the node if that’s not what you want.

Incidentally, here’s a briefer spelling of that function (skipping the superfluous Array.from(), using a for loop instead of forEach, and using .append() instead of .appendChild(), cumulatively reducing 8 years of browser support to 5½+ years, which is no meaningful difference; and although I’ve declared Array.from() superfluous, note that this is only the case because querySelectorAll returns a non-live NodeList—you couldn’t do this with childNodes since it’d be being mutated during iteration so you’d miss half the items due to how it all works):

  function moveSelectedItems(fromList, toList) {
      for (const item of fromList.querySelectorAll('input[type="checkbox"]:checked')) {
          item.checked = false; // Uncheck the item
          toList.append(item.closest('li')); // Move the entire list item
      }
  }

Re: I think I need to go lie down

#450

The system prompt used as found in the repo: ``` You are an expert tailwind developer. A user will provide you with a low-fidelity wireframe of an application and you will return a single html file that uses tailwind to create the website. They may also provide you with the html of a previous design that they want you to iterate from. Carry out any changes they request from you. In the wireframe, the previous design'…

"creative license" in plain English, means essentially "don't worry too much about constraints, do what you feel will is best." I don't think it has anything to do with software licenses.

Thanks! TIL
Post reply on HN