Live data from Hacker News

I wrote a tool in Go to write Sequence Diagrams in Go

github.com

41–48 of 48 posts

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#41
post #36
post #12

"Because of my own personal philosophy regarding technology and AI, all the code in this repository that was written by me - I wrote 100% on my own. There is and will be no usage of Github Co-Pilot or any other AI tool." As a developer that recently went to the dark side with co-pilot... all I can say is that from my perspective having used AI-augmented IDEs, arguments like this seem to me like a carpenter refusing t…

In my experience power saws and power drills don't steal intellectual property without telling you. On a less snarky note, this seems like a pretty serious exaggeration. You could have learned about .every() and .some() in many many other ways

Depends on the granularity of your copilot use. Generating entire classes or non-trivial functions from a prompt vs. generating just the next few lines at a time. Pretty hard to "steal intellectual property" when the comment you wrote as a prompt was "// remove all items from myArray that have the provided prefix"

> On a less snarky note, this seems like a pretty serious exaggeration. You could have learned about .every() and .some() in many many other ways

Yeah but I didn't because it was an unknown unknown. How would I have learned about .every() when I didn't know it existed? Copilot as a discovery engine is a fantastic way to learn about language features you didn't know about.

That was just one recent example. Copilot occasionally suggests ways of doing things I didn't know about and that were even better than my original approach.

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#42
post #12

"Because of my own personal philosophy regarding technology and AI, all the code in this repository that was written by me - I wrote 100% on my own. There is and will be no usage of Github Co-Pilot or any other AI tool." As a developer that recently went to the dark side with co-pilot... all I can say is that from my perspective having used AI-augmented IDEs, arguments like this seem to me like a carpenter refusing t…

Wrong analogy in my opinion. A hand saw vs power saw is like an old Pentium Laptop vs M2 Macbook. The latter is just faster and better. But both do not tell you how to do something. In case of the both the hand and power saw, you need to know exactly where to drill/cut without any hint. When coding with AI, you are getting actual code snippets and hints.

I disagree. In my analogy, cutting wood == writing code. You can't write code any faster on an M2 Macbook just because the CPU is faster. If you are more productive on an M2, it's only because you have more intelligent software (re: AI) helping you write code faster. But given vi or emacs in both setups, they are basically the same from a software dev standpoint aside from faster build time as your software gets huge.

> When coding with AI, you are getting actual code snippets and hints.

I still know the cut that needs to be made. Say I need a function that returns true if an array contains a value. Without AI, I would write it by hand, which might require me to RTFM. But with AI, I can simply prompt "// return whether the provided array contains a given value" and the AI will fill in the function. I could have accomplished my goal either way. But with AI, I was done and moved on without context switching to google or stackoverflow.

I could have sawed the 4x4 in half by hand. But instead I buzzed it with a buzz saw and moved on to the next part of my project 5 minutes ago.

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#43

There's an AI solution for this https://chatuml.com/ OK, I know the author are against AI, but just in case anyone want to see an AI solution.

Wait, they ask for your api key and they promise not to store it !

Other OpenAI-based projects does that too, and there's an option to not provide your API key as well https://chatuml.com/early-bird

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#44
post #12

"Because of my own personal philosophy regarding technology and AI, all the code in this repository that was written by me - I wrote 100% on my own. There is and will be no usage of Github Co-Pilot or any other AI tool." As a developer that recently went to the dark side with co-pilot... all I can say is that from my perspective having used AI-augmented IDEs, arguments like this seem to me like a carpenter refusing t…

That’s a flawed analogy, a power saw never suggests a cutting pattern while the very essence of what copilot/AI etc does is suggest coding patterns. Which may or may not be vetted. Typing manually vs auto-complete is a correct handsaw/power saw analogy.

In my experience copilot behaves more like a power tool than what you are suggesting. I know the cut that needs to be made, and copilot makes the cut faster than it would have taken me to make the cut myself via RTFM/google/stackoverflow.

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#45
post #33

I'm a bit biased, but I feel diagrams-as-code should use a stateless, declarative language (like json or yaml) and not a programming language. Programming languages have so much functionality that just doesn't apply to the output you're generating. I guess the argument is "I already know Go" (or Python etc.). But you probably already know json (yaml), too. And if not, it won't take long to learn.

Like D2? I love it.

https://play.d2lang.com/

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#46
post #33

I'm a bit biased, but I feel diagrams-as-code should use a stateless, declarative language (like json or yaml) and not a programming language. Programming languages have so much functionality that just doesn't apply to the output you're generating. I guess the argument is "I already know Go" (or Python etc.). But you probably already know json (yaml), too. And if not, it won't take long to learn.

I've used python for graphviz just because I wanted some looping for many-to-one or one-to-many relationships and the auto-complete that comes from anything with an LSP or Python mode.

Honestly I'd use it just for the auto-complete.

(Admittedly, I didn't look too hard for dedicated editing environments that could do it for DOT files specifically. I just wanted to make something real quick.)

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#47
post #33

I'm a bit biased, but I feel diagrams-as-code should use a stateless, declarative language (like json or yaml) and not a programming language. Programming languages have so much functionality that just doesn't apply to the output you're generating. I guess the argument is "I already know Go" (or Python etc.). But you probably already know json (yaml), too. And if not, it won't take long to learn.

There are times when it's very useful to have programmatic bindings for diagrams, I've used them multiple times when I want to create a diagram that represents the structure of some code, auto-generate a state machine diagram based on the code, etc. These are very handy because you don't need to keep documentation up-to-date.

Re: I wrote a tool in Go to write Sequence Diagrams in Go

#48
post #33

I'm a bit biased, but I feel diagrams-as-code should use a stateless, declarative language (like json or yaml) and not a programming language. Programming languages have so much functionality that just doesn't apply to the output you're generating. I guess the argument is "I already know Go" (or Python etc.). But you probably already know json (yaml), too. And if not, it won't take long to learn.

Loops are way too useful, which is why I prefer actual programming languages over declarative solutions.
Post reply on HN